foundryvtt-reve-de-dragon/templates/chat-demande-defense.html

64 lines
2.5 KiB
HTML
Raw Normal View History

<div data-passearme="{{passeArme}}">
{{#if (eq surprise 'totale')}}
<span><strong>{{defender.name}}</strong> est totalement surpris</span>
{{else if tentatives.defense}}
<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}} :
</span>
{{/if}}
<span class='chat-card-button-area'>
<br>
{{#unless (eq surprise 'totale')}}
{{#if tentatives.defense}}
<br>
{{#unless tentatives.chance}}
{{#if (eq defender.data.type 'personnage')}}
<a class='chat-card-button' id='appel-chance-defense' data-attackerId='{{attackerId}}'
data-defenderTokenId='{{defenderTokenId}}'>Faire appel à la chance</a>
</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}}'
data-defenderTokenId='{{defenderTokenId}}'>Utiliser la destinée</a>
</a>
<br>
{{/if}}
{{/if}}
{{else}}
{{#each armes as |arme key|}}
<a class='chat-card-button' id='parer-button' data-attackerId='{{../attackerId}}'
data-defenderTokenId='{{../defenderTokenId}}' data-armeid='{{arme._id }}'>Parer avec {{arme.name}}
</a>
<br>
{{/each}}
{{#if mainsNues}}
<a class='chat-card-button' id='parer-button' data-attackerId='{{attackerId}}'
data-defenderTokenId='{{defenderTokenId}}'>
Parer à mains nues
</a>
<br>
{{/if}}
{{#if (ne attaqueCategorie 'tir')}}
<a class='chat-card-button' id='esquiver-button' data-attackerId='{{attackerId}}'
data-defenderTokenId='{{defenderTokenId}}'>
Esquiver
</a>
<br>
{{/if}}
{{/if}}
{{/unless}}
<a class='chat-card-button' id='encaisser-button' data-attackerId='{{attackerId}}'
data-defenderTokenId='{{defenderTokenId}}'>
Encaisser à {{#if (eq dmg.mortalite 'non-mortel')~}}
({{numberFormat dmg.total decimals=0 sign=true}})
{{~else~}}
{{numberFormat dmg.total decimals=0 sign=true}}
{{~/if}} !
</a>
</span>
</div>