Merge pull request 'Fix: automatisations de combat' (#734) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 1m28s

Reviewed-on: #734
This commit is contained in:
uberwald 2024-12-20 10:52:54 +01:00
commit af4404aab1
3 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,7 @@
# 12.0
## 12.0.31 - le mausolée d'Astrobazzarh
- Correction: les automatisation de combat jouer-MJ fonctionnentde nouveau
## 12.0.30 - le cauchemar d'Astrobazzarh
- calcul automatique du niveau des entités selon leur rêve
- la description des créatures venimeuses contient un lien vers leur venin

View File

@ -752,7 +752,6 @@ export class RdDCombat {
dialog.render(true);
}
/* -------------------------------------------- */
_prepareAttaque(competence, arme) {
let rollData = {
@ -762,8 +761,8 @@ export class RdDCombat {
competence: competence,
surprise: this.attacker.getSurprise(true),
surpriseDefenseur: this.defender.getSurprise(true),
sourceTokenId: this.attackerToken?.id,
targetTokenId: this.defenderToken?.id,
sourceToken: this.attackerToken,
targetToken: this.defenderToken,
essais: {}
};

View File

@ -14,13 +14,14 @@ export class Targets {
return {
id: target?.id,
name: target?.document.name,
img: target?.document.texture.src ?? target?.actor.img ?? 'icons/svg/mystery-man.svg',
target
};
img: target?.document.texture.src ?? target?.actor.img ?? 'icons/svg/mystery-man.svg'
}
}
static buildActorTokenData(tokenId, actor) {
return { id: tokenId, name: actor.name, img: actor.img ?? 'icons/svg/mystery-man.svg' };
}
static isTargetEntite(target) {
return target?.actor.type == 'entite' && target?.actor.system.definition.typeentite == ENTITE_NONINCARNE;
}