Automatisations de combats, WIP

This commit is contained in:
2023-12-24 12:38:02 +01:00
parent 91ad26730a
commit 2a8617d781
83 changed files with 543 additions and 249 deletions

View File

@@ -103,9 +103,7 @@
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<h4 class="item-name-label competence-name">Santé</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
@@ -123,8 +121,19 @@
<input type="text" class="input-numeric-short" name="system.sante.letaux" value="{{data.sante.letaux}}"
data-dtype="Number" />
</li>
<li class="item flexrow">
<label class="label-name">Malus</label>
<input type="text" class="input-numeric-short" name="system.sante.malusmanuel" value="{{data.sante.malusmanuel}}"
data-dtype="Number" />
<label class="label-name">Malus auto</label>
<label class="label-name">{{santeMalus}}</label>
</li>
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<h4 class="item-name-label competence-name">Ame</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
@@ -170,11 +179,47 @@
value="{{data.combat.defensebonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.defenseTotal}}</label>
</li>
<li class="item flexrow">
<label class="competence-name">Total protection</label>
<label class="competence-name">{{protectionTotal}}</label>
</li>
</ul>
</div>
</div>
<div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Modificateurs</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Valeur</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
</div>
</li>
{{#each modifiers as |modifier key|}}
<li class="item flexrow " data-item-id="{{modifier._id}}" data-item-type="modifier">
<img class="item-name-img" src="{{modifier.img}}" />
<span class="item-name-label competence-name">{{modifier.name}}</span>
<span class="item-field-label-short">{{upperFirst modifier.system.modifiertype}}</span>
<span class="item-field-label-short">{{modifier.system.value}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Competence Tab --}}
@@ -536,6 +581,8 @@
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if protection.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>

View File

@@ -13,12 +13,12 @@
</div>
{{/if}}
<div class="flexcol">
<div class="flexcol">ntfabr
</div>
<div>
<ul>
<li>Arme : {{arme.name}} (+{{degatsFormula}})</li>
<li>Arme : {{arme.name}} {{#if degatsFormula}} (+{{degatsFormula}}) {{/if}}</li>
<li>Information : {{degatsMessage}}</li>
<li>Dégats : {{finalResult}} {{#if arme.system.nonletaux}}(Non létaux){{else}}(Létaux){{/if}}</li>
{{#if nextBonus}}
@@ -27,6 +27,13 @@
{{#if nextMalus}}
<li>Malus au défenseur pour prochaine action : {{nextMalus}}</li>
{{/if}}
<button class="chat-card-button chat-card-button-degats arme-apply-degats">
Appliquer les dégats/bonus/malus
</button>
</div>
</ul>
</div>

View File

@@ -78,20 +78,24 @@
<li>Echec Dramatique!!!</li>
{{/if}}
{{#each predilections as |pred key|}}
{{#if (not pred.used)}}
<div class="action-section">
{{#each predilections as |pred key|}}
{{#if (not pred.used)}}
<li>
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">
Predilection : {{pred.name}}</button>
</li>
{{/if}}
{{/each}}
{{#if (and arme isSuccess)}}
<li>
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">
Predilection : {{pred.name}}</button>
<button class="chat-card-button chat-card-button-degats arme-roll-degats"> Lancer les dégats ! </button>
</li>
{{/if}}
{{/each}}
{{#if (and arme isSuccess)}}
<li>
<button class="chat-card-button chat-card-button-degats arme-roll-degats"> Lancer les dégats ! </button>
</li>
{{/if}}
</div>
</ul>
</div>

View File

@@ -0,0 +1,35 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<span class="flexrow">
<label class="generic-label">Type de modificateur </label>
<select class="status-small-label color-class-common" type="text" name="system.modifiertype"
value="{{data.modifiertype}}" data-dtype="string">
{{#select data.modifiertype}}
{{#each config.modifierTypes as |mod key|}}
<option value="{{key}}">{{mod.name}}</option>
{{/each}}
{{/select}}
</select>
</span>
<span class="flexrow">
<label class="generic-label">Valeur </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.value" value="{{data.value}}" data-dtype="Number" />
</span>
<div class="flexcol">
{{> systems/fvtt-mournblade/templates/partial-item-description.html}}
</div>
</section>
</form>

View File

@@ -132,6 +132,24 @@
{{/if}}
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">Malus de santé : </span>
<span class="roll-dialog-label">{{malusSante}}</span>
</div>
{{#if (count modifiers)}}
<div class="flexrow">
<span class="roll-dialog-label">Modificateurs enregistrés : </span>
</div>
{{#each modifiers as |modifier idx|}}
<div class="flexrow">
<span class="roll-dialog-label">{{modifier.name}} : </span>
<span class="roll-dialog-label">{{modifier.system.value}}</span>
<input class="apply-modifier" data-modifier-idx="{{idx}}" id="apply-modifier" type="checkbox" name="apply-modifier" value="{{modifier.system.apply}}" {{checked modifier.system.apply}} />
</div>
{{/each}}
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">Modificateur : </span>
<select class="roll-dialog-label" id="modificateur" type="text" name="modificateur" value="{{modificateur}}"