Destinée et Appel à la chance exclusifs
This commit is contained in:
parent
02beb4ee37
commit
c9cc1de16e
@ -136,7 +136,6 @@ export class RdDCombat {
|
||||
}
|
||||
const defenderTokenId = event.currentTarget.attributes['data-defenderTokenId'].value;
|
||||
|
||||
let defenderRoll = this._getDefense(attackerRoll.passeArme);
|
||||
const armeParadeId = event.currentTarget.attributes['data-armeid']?.value;
|
||||
|
||||
switch (button) {
|
||||
@ -150,13 +149,13 @@ export class RdDCombat {
|
||||
() => this.attaqueChanceuse(attackerRoll),
|
||||
() => this._onEchecTotal(attackerRoll));
|
||||
case '#appel-chance-defense': return this.defender.rollAppelChance(
|
||||
() => this.defenseChanceuse(attackerRoll, defenderRoll),
|
||||
() => this.defenseChanceuse(attackerRoll),
|
||||
() => this.afficherOptionsDefense(attackerRoll, { defenseChance: true }));
|
||||
case '#appel-destinee-attaque': return this.attacker.appelDestinee(
|
||||
() => this.attaqueSignificative(attackerRoll),
|
||||
() => { });
|
||||
case '#appel-destinee-defense': return this.defender.appelDestinee(
|
||||
() => this.defenseDestinee(defenderRoll),
|
||||
() => this.defenseDestinee(attackerRoll),
|
||||
() => { });
|
||||
}
|
||||
}
|
||||
@ -194,7 +193,7 @@ export class RdDCombat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
defenseChanceuse(attackerRoll, defenderRoll) {
|
||||
defenseChanceuse(attackerRoll) {
|
||||
ui.notifications.info("La défense est rejouée grâce à la chance")
|
||||
attackerRoll.essais.defenseChance = true;
|
||||
attackerRoll.essais.defense = false;
|
||||
@ -203,7 +202,9 @@ export class RdDCombat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
defenseDestinee(defenderRoll) {
|
||||
defenseDestinee(attackerRoll) {
|
||||
let defenderRoll = this._getDefense(attackerRoll.passeArme);
|
||||
if (defenderRoll) {
|
||||
ui.notifications.info('Défense significative grâce à la destinée')
|
||||
RdDResolutionTable.forceSignificative(defenderRoll.rolled);
|
||||
this.removeChatMessageActionsPasseArme(defenderRoll.passeArme);
|
||||
@ -214,6 +215,10 @@ export class RdDCombat {
|
||||
this._onEsquiveNormale(defenderRoll);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui.notifications.warn("Appel à la destinée impossible, la passe d'armes est déjà terminée!")
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
afficherOptionsDefense(attackerRoll, essais) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{#if (eq surprise 'totale')}}
|
||||
<span><strong>{{defender.name}}</strong> est totalement surpris</span>
|
||||
{{else if essais.defense}}
|
||||
<span><strong>{{defender.name}}</strong> doit</span>
|
||||
<span><strong>{{defender.name}}</strong> doit :</span>
|
||||
{{else}}
|
||||
<span><strong>{{defender.name}}</strong> doit se défendre
|
||||
{{#if (eq surprise 'demi')}} avec une significative {{/if}} :
|
||||
@ -12,7 +12,6 @@
|
||||
<br>
|
||||
{{#unless (eq surprise 'totale')}}
|
||||
{{#if essais.defense}}
|
||||
<br>
|
||||
{{#unless essais.defenseChance}}
|
||||
{{#if (eq defender.data.type 'personnage')}}
|
||||
<a class='chat-card-button' id='appel-chance-defense' data-attackerId='{{attackerId}}'
|
||||
@ -20,7 +19,6 @@
|
||||
</a>
|
||||
<br>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{#if (eq defender.data.type 'personnage')}}
|
||||
{{#if (gt defender.data.data.compteurs.destinee.value 0)}}
|
||||
<a class='chat-card-button' id='appel-destinee-defense' data-attackerId='{{attackerId}}'
|
||||
@ -29,6 +27,7 @@
|
||||
<br>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{else}}
|
||||
{{#each armes as |arme key|}}
|
||||
<a class='chat-card-button' id='parer-button' data-attackerId='{{../attackerId}}' data-defenderTokenId='{{../defenderTokenId}}' data-armeid='{{arme._id }}'>
|
||||
|
Loading…
Reference in New Issue
Block a user