forked from public/foundryvtt-reve-de-dragon
		
	Empoignade V2
This commit is contained in:
		| @@ -1,25 +1,24 @@ | ||||
| {{log this}} | ||||
| <div class="roll-chat" data-passearme="{{passeArme}}"> | ||||
|   <div class="chat-img"> | ||||
|     <img src="{{opponent.img}}" data-tooltip="{{opponent.name}}" /> | ||||
|     <img src="{{active.img}}" data-tooltip="{{active.name}}" /> | ||||
|   </div> | ||||
|  | ||||
|   <div class="chat-header"> | ||||
|     <h4>Défense de  {{opponent.name}}</h4> | ||||
|     <h4>Défense de {{active.name}}</h4> | ||||
|   </div> | ||||
|  | ||||
|   <div class="chat-resume"> | ||||
|     {{#if (eq opponent.surprise.key 'totale')}} | ||||
|       <span><strong>{{opponent.name}}</strong> est totalement surpris</span> | ||||
|     {{#if (eq active.surprise.key 'totale')}} | ||||
|       <span><strong>{{active.name}}</strong> est totalement surpris</span> | ||||
|     {{else}} | ||||
|       <span><strong>{{opponent.name}}</strong> doit se défendre | ||||
|         {{~#if (eq opponent.surprise.key 'demi')}} avec une significative {{/if}} d'une attaque | ||||
|         {{~#if particuliere}} <strong>particulière en | ||||
|           {{~#if (eq particuliere 'finesse')}} finesse | ||||
|       <span><strong>{{active.name}}</strong> doit se défendre | ||||
|         {{~#if (eq active.surprise.key 'demi')}} avec une significative {{/if}} d'une attaque | ||||
|         {{~#if attackerRoll.particuliere}} <strong>particulière en | ||||
|           {{~#if (eq attackerRoll.particuliere 'finesse')}} finesse | ||||
|           {{else if (eq particuliere 'force')}} force | ||||
|           {{else if (eq particuliere 'rapidite')}} rapidité | ||||
|           {{/if~}}</strong> | ||||
|         {{/if}} de {{active.name}} ({{current.attaque.label}}): | ||||
|         {{/if}} de {{opponent.name}} ({{attackerRoll.current.attaque.label}}): | ||||
|       </span> | ||||
|     {{/if}} | ||||
|   </div> | ||||
| @@ -28,30 +27,23 @@ | ||||
|   </div> | ||||
|  | ||||
|   <div class="chat-actions"> | ||||
|     {{#unless (eq opponent.surprise.key 'totale')}} | ||||
|     {{#unless (eq active.surprise.key 'totale')}} | ||||
|       <a class='chat-card-button button-defense' | ||||
|               data-attackerId='{{ids.actorId}}' | ||||
|               data-attackerTokenId='{{ids.actorTokenId}}' | ||||
|               data-defenderTokenId='{{ids.opponentTokenId}}' | ||||
|               data-attackerId='{{ids.opponentId}}' | ||||
|               data-attackerTokenId='{{ids.opponentTokenId}}' | ||||
|               data-defenderId='{{ids.actorId}}' | ||||
|               data-defenderTokenId='{{ids.actorTokenId}}' | ||||
|             > | ||||
|       <img src="systems/foundryvtt-reve-de-dragon/assets/actions/defense.svg"/> | ||||
|             Se défendre | ||||
|             {{#if (or (eq attaqueCategorie 'tir') (eq attaqueCategorie 'lancer'))}} | ||||
|             {{#if (or (eq attackerRoll.attaqueCategorie 'tir') (eq attackerRoll.attaqueCategorie 'lancer'))}} | ||||
|               (difficulté à déterminer) | ||||
|             {{else}} | ||||
|               à {{current.diff.value}} | ||||
|               à {{attackerRoll.current.diff.value}} | ||||
|             {{/if}} | ||||
|       </a> | ||||
|     {{/unless}} | ||||
|     {{#unless (eq dmg.mortalite 'empoignade')}} | ||||
|       <a class='chat-card-button encaissement'  | ||||
|               data-tooltip="Encaisser à {{plusMoins dmg.total}} {{#if (eq dmg.mortalite 'non-mortel')~}}(non-mortel){{/if}}" | ||||
|             > | ||||
|         <img src="systems/foundryvtt-reve-de-dragon/assets/ui/encaisser.svg"/> | ||||
|         Encaisser à {{plusMoins dmg.total}} | ||||
|         {{#if (eq dmg.mortalite 'non-mortel')~}}(non-mortel){{/if}} | ||||
|       </a> | ||||
|     {{/unless}} | ||||
|     {{> 'partial-encaissement'}} | ||||
|   </div> | ||||
|  | ||||
|   <div class="chat-buttons"> | ||||
|   | ||||
| @@ -1,15 +1,29 @@ | ||||
| {{log 'partial-encaissement' this}} | ||||
| {{#if show.encaissement}} | ||||
|   {{#if done.encaissement}} | ||||
|   <span class='chat-card-info'> | ||||
|     <img src="systems/foundryvtt-reve-de-dragon/assets/ui/encaisser.svg"/> | ||||
|     {{active.name}} a encaissé | ||||
|   </span> | ||||
|     <span class='chat-card-info'> | ||||
|     {{#if (eq attackerRoll.dmg.mortalite 'empoignade')}} | ||||
|       <img src="systems/foundryvtt-reve-de-dragon/assets/actions/empoignade.svg"/> | ||||
|       {{opponent.name}} a {{done.empoignade.system.pointsemp}} point d'empoignade contre {{active.name}}. | ||||
|       {{#if (gt done.empoignade.system.pointsemp 2)}} Si {{active.name}} ne se libère pas, il sera immobilisé à la fin du round{{/if}} | ||||
|     {{else}} | ||||
|       <img src="systems/foundryvtt-reve-de-dragon/assets/actions/encaisser.svg"/> | ||||
|       {{active.name}} a encaissé | ||||
|     {{/if}} | ||||
|     </span> | ||||
|   {{else}} | ||||
|   <a class='chat-card-button encaissement'  | ||||
|     data-tooltip="Encaisser à {{plusMoins attackerRoll.dmg.total}} {{#if (eq attackerRoll.dmg.mortalite 'non-mortel')~}}(non-mortel){{/if}}" | ||||
|     > | ||||
|     <img src="systems/foundryvtt-reve-de-dragon/assets/ui/encaisser.svg"/> Encaisser à {{plusMoins attackerRoll.dmg.total}} | ||||
|     {{#if (eq attackerRoll.dmg.mortalite 'non-mortel')~}}(non-mortel){{/if}} | ||||
|   </a> | ||||
|     {{#if (eq attackerRoll.dmg.mortalite 'empoignade')}} | ||||
|       <a class='chat-card-button encaissement' data-tooltip="Marquer un point d'empoignade"> | ||||
|         <img src="systems/foundryvtt-reve-de-dragon/assets/actions/empoignade.svg"/> | ||||
|         Marquer un point d'empoignade | ||||
|       </a> | ||||
|     {{else}} | ||||
|       <a class='chat-card-button encaissement'  | ||||
|         data-tooltip="Encaisser à {{plusMoins attackerRoll.dmg.total}} {{#if (eq attackerRoll.dmg.mortalite 'non-mortel')~}}(non-mortel){{/if}}" | ||||
|         > | ||||
|         <img src="systems/foundryvtt-reve-de-dragon/assets/actions/encaisser.svg"/> Encaisser à {{plusMoins attackerRoll.dmg.total}} | ||||
|         {{#if (eq attackerRoll.dmg.mortalite 'non-mortel')~}}(non-mortel){{/if}} | ||||
|       </a> | ||||
|     {{/if}} | ||||
|   {{/if}} | ||||
| {{/if}} | ||||
|   | ||||
| @@ -15,19 +15,32 @@ | ||||
|       {{selectOptions refs.tactiques selected=current.tactique.key valueAttr="key" labelAttr="label"}} | ||||
|     </select> | ||||
|   </subline> | ||||
|   <subline> | ||||
|     {{#if (eq current.arme.system.mortalite 'empoignade')}} | ||||
|       Empoignade, pas de dommages directs | ||||
|     {{else}} | ||||
|       {{#if (and (ne current.arme.system.mortalite 'non-mortel') (eq current.dmg.penetration 0))}} | ||||
|         <input name="check-mortalite" type="checkbox" {{#if (eq current.dmg.mortalite 'mortel')}}checked{{/if}} /> | ||||
|       {{/if}} | ||||
|   {{#if (and refs.isEmpoignadeEnCours (eq current.arme.system.competence 'Dague'))}} | ||||
|     <subline> | ||||
|       <span> | ||||
|       Pour pouvoir attaquer avec une dague en cours d'empoignade, il faut réussir:<br> | ||||
|       <a class='chat-card-button utiliser-dague-empoignade'>DEXTÉRITÉ / Dague à -4</a> | ||||
|       <br>En cas d'échec total, {{rollData.active.name}} sera désarmé. | ||||
|       </span> | ||||
|     </subline> | ||||
|   {{/if}} | ||||
|   {{#if (eq current.arme.system.mortalite 'empoignade')}} | ||||
|     <subline> | ||||
|       Empoignade, pas de dommages directs.<br> | ||||
|       Si {{either rollData.opponent.name}} est équipé d'une arme de mêlée, ou attaque | ||||
|       à mains nues (pugilat), il bénéficie d'un bonus de +4 à son attaque. | ||||
|     </subline> | ||||
|   {{else}} | ||||
|     <subline> | ||||
|     {{#if (and (ne current.arme.system.mortalite 'non-mortel') (eq current.dmg.penetration 0))}} | ||||
|       <input name="check-mortalite" type="checkbox" {{#if (eq current.dmg.mortalite 'mortel')}}checked{{/if}} /> | ||||
|     {{/if}} | ||||
|       <label for="check-mortalite"> | ||||
|         Dommages: {{plusMoins current.dmg.total}} ({{current.dmg.mortalite}}) | ||||
|         {{~#if current.dmg.penetration}}, pénétration {{current.dmg.penetration}}{{/if}} | ||||
|       </label> | ||||
|     {{/if}} | ||||
|   </subline> | ||||
|     </subline> | ||||
|   {{/if}} | ||||
|   {{#if rollData.active.effets}} | ||||
|   <subline> | ||||
|     <span class="status-surprise"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user