feat(traits): tâche 0 + phases 2-4 — automatisation complète des Traits
Tâche 0 : - item.mjs : champ equipped sur items génériques + toggle fiche - nouveau module/system/traits.mjs (helpers partagés : equippedItems, lourdMalus, mobilityHandicap, feticheItem…) Phase 2 — Combat : - Lourd : malus cumulés auto (Vigueur < n) dans le dialogue + pool - Rapide : handicap (n) pré-rempli dans la défense (character + PNJ) + note carte - Rafale : case tir en rafale (+2 difficulté), +n réussites si réussi (bonusOnSuccess) - Portée : portée effective n × Vigueur affichée - Maniable/Mobilité : note de rappel (dialogue + carte) - Incapacitant : bouton « Jet de Santé (n) » sur la carte d'échange - getLabel() : libellés caractéristiques/compétences localisés Phase 3 — Jets d'action : - Ponctuel : annule jusqu'à n Handicaps, consommé au jet (Traits supprimé à 0) - Pratique : outil sélectionné +2D au lieu de +1D - Intimidant : case « Brandit » → -1D Psychologie ou Relance 1D - Malus : champ « Malus temporaires » manuel déduit du pool - Durée : note « n tours » sur la carte de jet d'arme - roll() : transmission effectiveRange/mobilityHandicap/ponctuelUsed/intimidant (corrige l'affichage Portée/Mobilité) Phase 4 — Acteur : - Fétiche : +1D Effort ET Sang-Froid (max dérivé, config corrigé), alerte 2+ fétiches, action « Perdre le fétiche » (-2D, max -1D persistant feticheLoss) - Zone : note + bouton « Appliquer aux cibles de la zone » (#onApplyZone) CSS : styles LESS pour les nouvelles classes (fetiche-block, exchange-reminder/zone, traits-reminder, tool-bonus/ponctuel, duree-note) i18n : 29 clés fr/en TRAITS_PLAN.md : plan complet cochée
This commit is contained in:
@@ -21,6 +21,21 @@
|
||||
</div>
|
||||
</div>
|
||||
{{> "systems/vermine2047/templates/actor/parts/actor-equipped-gear.hbs"}}
|
||||
{{#if fetiche}}
|
||||
<div class="fetiche-block flexrow align-center">
|
||||
<div class="fetiche-info flexcol">
|
||||
<h4 class="align-center"><i class="fas fa-heart"></i> {{ localize "VERMINE.fetiche" }} : {{fetiche.name}}</h4>
|
||||
<p class="fetiche-bonus">{{ localize "VERMINE.fetiche_bonus" }}</p>
|
||||
{{#if feticheMultiple}}
|
||||
<p class="fetiche-warning"><i class="fas fa-triangle-exclamation"></i> {{ localize "VERMINE.fetiche_multiple" }}</p>
|
||||
{{/if}}
|
||||
{{#if feticheLost}}
|
||||
<p class="fetiche-warning"><i class="fas fa-triangle-exclamation"></i> {{ localize "VERMINE.fetiche_lost_penalty" }}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
<button type="button" data-action="loseFetiche" title="{{ localize 'VERMINE.lose_fetiche' }}"><i class="fas fa-unlink"></i> {{ localize "VERMINE.lose_fetiche" }}</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="flexrow">
|
||||
<div class="self-control-container flexcol align-center">
|
||||
<h4 class="align-center">
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<strong>{{localize "VERMINE.ranges"}}:</strong>
|
||||
{{ weapon.system.min_range }} / {{ weapon.system.max_range }}
|
||||
</span>
|
||||
{{#if effectiveRange}}
|
||||
<span class="weapon-detail">
|
||||
<strong>{{localize "VERMINE.effective_range"}}:</strong>
|
||||
{{ effectiveRange }} m
|
||||
</span>
|
||||
{{/if}}
|
||||
<span class="weapon-detail">
|
||||
<strong>{{localize "VERMINE.ammo"}}:</strong>
|
||||
{{ weapon.system.ammo }}
|
||||
@@ -29,6 +35,13 @@
|
||||
|
||||
<h4 class="combat-mode-label">{{#ife mode "ranged"}}{{localize 'VERMINE.attack_ranged'}}{{else}}{{localize 'VERMINE.attack_contact'}}{{/ife}}</h4>
|
||||
|
||||
{{#if lourdMalus}}
|
||||
<p class="traits-reminder"><i class="fas fa-weight-hanging"></i> {{ localize 'VERMINE.lourd_malus_note' malus=lourdMalus }}</p>
|
||||
{{/if}}
|
||||
{{#if mobilityNote}}
|
||||
<p class="traits-reminder"><i class="fas fa-shoe-prints"></i> {{ mobilityNote }}</p>
|
||||
{{/if}}
|
||||
|
||||
<div class="dice-pool">
|
||||
|
||||
<!-- ATTACKER POOL -->
|
||||
@@ -90,6 +103,12 @@
|
||||
<span class="label">{{localize 'VERMINE.consume_ammo'}}</span>
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#if hasRafale}}
|
||||
<label class="flexrow bonus-item">
|
||||
<input type="checkbox" data-roll="true" name="rafale" id="rafale" value="1" />
|
||||
<span class="label">{{ localize 'VERMINE.rafale_check' rafaleValue=rafaleValue }}</span>
|
||||
</label>
|
||||
{{/if}}
|
||||
<div class="flexcol handicap-section">
|
||||
<label class="label" for="handicap">{{localize 'VERMINE.handicap'}}</label>
|
||||
<select class="info-value" data-roll="true" data-dtype="String" type="number"
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
|
||||
<!-- TOOLS -->
|
||||
<div class="flexrow bonus-item full-width">
|
||||
<label class="label">{{localize 'VERMINE.tooling'}} (+1D)</label>
|
||||
<label class="label">{{localize 'VERMINE.tooling'}} (+1D / +2D)</label>
|
||||
<div class="item-list grid grid-4col">
|
||||
<label>
|
||||
<input
|
||||
@@ -258,12 +258,37 @@
|
||||
id="usingTools"
|
||||
value="{{item.name}}"
|
||||
/>
|
||||
<i>{{item.name}}</i>
|
||||
<i>{{item.name}}{{#if item.system.traits.pratique}} <em class="tool-bonus">+2D</em>{{/if}}{{#if item.system.traits.ponctuel}} <em class="tool-ponctuel">P{{item.system.traits.ponctuel.value}}</em>{{/if}}</i>
|
||||
</label>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INTIMIDANT -->
|
||||
{{#if hasIntimidant}}
|
||||
<div class="flexrow bonus-item full-width">
|
||||
<input type="checkbox" data-roll="true" name="intimidant" id="intimidant" value="1" />
|
||||
<label class="label" for="intimidant">{{ localize 'VERMINE.intimidant_check' intimidantName=intimidantName }}</label>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- TEMPORARY MALUS -->
|
||||
<div class="flexrow bonus-item full-width">
|
||||
<label class="label" for="temporary-malus">{{localize 'VERMINE.temporary_malus'}}</label>
|
||||
<input
|
||||
type="number"
|
||||
data-roll="true"
|
||||
class="numeric-entry"
|
||||
style="text-align: center;"
|
||||
name="temporary-malus"
|
||||
id="temporary-malus"
|
||||
min="0"
|
||||
max="5"
|
||||
value="0"
|
||||
/>
|
||||
<span>D</span>
|
||||
</div>
|
||||
|
||||
<!-- TOTEMS -->
|
||||
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
|
||||
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
<section class="sheet-body ">
|
||||
|
||||
{{> "systems/vermine2047/templates/item/partials/traits.hbs"}}
|
||||
<div class="resource align-center flexcol">
|
||||
<label class="resource-label">{{ localize "VERMINE.equip" }}
|
||||
<input type="checkbox" name="system.equipped" {{#if system.equipped}}checked{{/if}} data-dtype="Boolean" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="resource align-center flexcol">
|
||||
<label class="resource-label">compétence necessaire
|
||||
<input type="checkbox" data-tooltip="ajouter la vigueur" name="system.needSkill.value" {{#if system.needSkill.value}} checked {{/if}}>
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
<strong>{{localize "VERMINE.ranges"}}:</strong>
|
||||
{{param.weapon.system.min_range}} / {{param.weapon.system.max_range}}
|
||||
</span>
|
||||
{{#if param.effectiveRange}}
|
||||
<span class="weapon-detail">
|
||||
<strong>{{localize "VERMINE.effective_range"}}:</strong>
|
||||
{{param.effectiveRange}} m
|
||||
</span>
|
||||
{{/if}}
|
||||
<span class="weapon-detail">
|
||||
<strong>{{localize "VERMINE.ammo"}}:</strong>
|
||||
{{param.weapon.system.ammo}}
|
||||
@@ -48,12 +54,21 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if param.weapon.system.traits.duree}}
|
||||
<div class="weapon-detail duree-note"><i class="fas fa-hourglass-half"></i> {{ localize 'VERMINE.duree_note' value=param.weapon.system.traits.duree.value }}</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if param.attack}}
|
||||
<div class="exchange-actions" data-exchange-id="{{param.attack.id}}">
|
||||
<div class="exchange-header"><i class="fas fa-exchange-alt"></i> {{localize "VERMINE.exchange"}}</div>
|
||||
{{#if param.attack.rapideHandicap}}
|
||||
<div class="exchange-reminder"><i class="fas fa-bolt"></i> {{ localize 'VERMINE.rapide_note' handicap=param.attack.rapideHandicap }}</div>
|
||||
{{/if}}
|
||||
{{#if param.attack.zoneValue}}
|
||||
<div class="exchange-reminder"><i class="fas fa-burst"></i> {{ localize 'VERMINE.zone_note' value=param.attack.zoneValue }}</div>
|
||||
{{/if}}
|
||||
{{#each param.attack.targets}}
|
||||
<div class="exchange-target">
|
||||
<span class="exchange-target-name"><i class="fas fa-bullseye"></i> {{this.name}}</span>
|
||||
@@ -65,9 +80,15 @@
|
||||
{{else}}
|
||||
<span class="exchange-passive"><i class="fas fa-shield-virus"></i> {{localize "VERMINE.passive_defense"}}</span>
|
||||
{{/if}}
|
||||
{{#if @root.param.weapon.system.traits.incapacitant}}
|
||||
<button type="button" class="exchange-incapacitant" data-target-id="{{this.id}}" data-target-uuid="{{this.uuid}}" data-value="{{@root.param.weapon.system.traits.incapacitant.value}}" title="{{localize 'VERMINE.incapacitant_roll'}}"><i class="fas fa-bolt"></i> {{localize "VERMINE.incapacitant_roll"}} ({{@root.param.weapon.system.traits.incapacitant.value}})</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<button type="button" class="exchange-resolve" data-exchange-id="{{param.attack.id}}"><i class="fas fa-balance-scale"></i> {{localize "VERMINE.resolve"}}</button>
|
||||
{{#if param.attack.zoneValue}}
|
||||
<button type="button" class="exchange-zone" data-exchange-id="{{param.attack.id}}"><i class="fas fa-burst"></i> {{ localize "VERMINE.zone_apply" }}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -87,12 +108,30 @@
|
||||
<span class="context-value">+{{param.handicap}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if param.mobilityHandicap}}
|
||||
<div class="context-item">
|
||||
<span class="context-label">{{localize "VERMINE.mobility"}}</span>
|
||||
<span class="context-value">{{ localize 'VERMINE.traits_mobility_note' handicap=param.mobilityHandicap }}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if verdict.bonusSuccesses}}
|
||||
<div class="context-item">
|
||||
<span class="context-label">{{localize "VERMINE.auto_successes"}}</span>
|
||||
<span class="context-value">+{{verdict.bonusSuccesses}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if param.intimidant}}
|
||||
<div class="context-item">
|
||||
<span class="context-label">{{localize "VERMINE.intimidant"}}</span>
|
||||
<span class="context-value">{{#if param.intimidant.psychology}}{{localize "VERMINE.intimidant_psychology"}}{{else}}{{localize "VERMINE.intimidant_reroll"}}{{/if}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if param.ponctuelUsed}}
|
||||
<div class="context-item">
|
||||
<span class="context-label">{{localize "VERMINE.ponctuel"}}</span>
|
||||
<span class="context-value">{{ localize 'VERMINE.ponctuel_used' value=param.ponctuelUsed }}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if param.specialtyName}}
|
||||
<div class="context-item">
|
||||
<span class="context-label">{{localize "VERMINE.specialty"}}</span>
|
||||
@@ -142,9 +181,15 @@
|
||||
{{#if param.poolBreakdown.help}}
|
||||
<span class="pool-item">{{localize "VERMINE.pool_help"}} +{{param.poolBreakdown.help}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.tooling}}
|
||||
<span class="pool-item">{{localize "VERMINE.pool_tooling"}} +{{param.poolBreakdown.tooling}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.tooling}}
|
||||
<span class="pool-item">{{localize "VERMINE.pool_tooling"}} +{{param.poolBreakdown.tooling}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.tempMalus}}
|
||||
<span class="pool-item pool-malus">{{localize "VERMINE.pool_temp_malus"}} -{{param.poolBreakdown.tempMalus}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.psychology}}
|
||||
<span class="pool-item pool-malus">{{localize "VERMINE.pool_psychology"}} -{{param.poolBreakdown.psychology}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.group}}
|
||||
<span class="pool-item">{{localize "VERMINE.pool_group"}} +{{param.poolBreakdown.group}}D</span>
|
||||
{{/if}}
|
||||
@@ -160,9 +205,19 @@
|
||||
{{#if param.poolBreakdown.domainBonus}}
|
||||
<span class="pool-item">{{#ifgt param.poolBreakdown.domainBonus 0}}{{localize "VERMINE.domain_bonus"}}{{else}}{{localize "VERMINE.domain_penalty"}}{{/ifgt}} {{param.poolBreakdown.domainBonus}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.malus}}
|
||||
<span class="pool-item pool-malus">{{localize "VERMINE.pool_malus"}} -{{param.poolBreakdown.malus}}D</span>
|
||||
{{/if}}
|
||||
{{#unless param.poolBreakdown.wound}}
|
||||
{{#unless param.poolBreakdown.lourd}}
|
||||
{{#if param.poolBreakdown.malus}}
|
||||
<span class="pool-item pool-malus">{{localize "VERMINE.pool_malus"}} -{{param.poolBreakdown.malus}}D</span>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
{{#if param.poolBreakdown.wound}}
|
||||
<span class="pool-item pool-malus">{{localize "VERMINE.pool_wound"}} -{{param.poolBreakdown.wound}}D</span>
|
||||
{{/if}}
|
||||
{{#if param.poolBreakdown.lourd}}
|
||||
<span class="pool-item pool-malus">{{localize "VERMINE.pool_lourd"}} -{{param.poolBreakdown.lourd}}D</span>
|
||||
{{/if}}
|
||||
<span class="pool-item pool-total">{{localize "VERMINE.pool_total"}} {{param.poolBreakdown.total}}D</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user