ajout du statut de combat dans fiche perso

This commit is contained in:
rwanoux
2024-11-22 18:17:34 +01:00
parent 299fbcd50d
commit b478fd7b54
+79 -40
View File
@@ -1,19 +1,25 @@
<div class="align-center"> <div class="align-center">
<div class="shadow">
<h4>situation de combat par défaut</h4> <h4>situation de combat par défaut</h4>
<div class="flexrow align-center combat-status"> <div class="flexrow align-center combat-status">
{{#each config.combatStatus as |dif label|}} {{#each config.combatStatus as |dif label|}}
<div> <div>
<label for="combatStatus1">{{label}}</label> <label for="combatStatus1">{{label}}</label>
<input type="radio" style="width:1rem" <input
type="radio"
style="width:1rem"
name="system.combatStatus.difficulty" name="system.combatStatus.difficulty"
id="combatStatus1" id="combatStatus1"
value="{{dif}}" value="{{dif}}"
{{#ife @root.system.combatStatus.difficulty dif}}checked {{/ife}}> {{#ife @root.system.combatStatus.difficulty dif}}checked
{{/ife}}
>
</div> </div>
{{/each}} {{/each}}
</div> </div>
</div> </div>
<div class="grid grid-3col"> </div>
<div class="flexrow">
<div class="self-control-container flexcol align-center"> <div class="self-control-container flexcol align-center">
<h4 class="align-center"> <h4 class="align-center">
@@ -35,7 +41,9 @@
unavailable unavailable
{{/ifgt}}"> {{/ifgt}}">
{{#iflteq @row @root.system.attributes.self_control.max }} {{#iflteq @row @root.system.attributes.self_control.max }}
<input type="radio" data-dtype="Number" <input
type="radio"
data-dtype="Number"
name="system.attributes.self_control.value" name="system.attributes.self_control.value"
value="{{@case}}" value="{{@case}}"
class=" class="
@@ -43,7 +51,8 @@
checked checked
{{/iflteq}} {{/iflteq}}
" /> "
/>
{{/iflteq}} {{/iflteq}}
</div> </div>
@@ -75,7 +84,9 @@
unavailable unavailable
{{/ifgt}}"> {{/ifgt}}">
{{#iflteq @row @root.system.attributes.effort.max }} {{#iflteq @row @root.system.attributes.effort.max }}
<input type="radio" data-dtype="Number" <input
type="radio"
data-dtype="Number"
name="system.attributes.effort.value" name="system.attributes.effort.value"
value="{{@case}}" value="{{@case}}"
class=" class="
@@ -83,7 +94,8 @@
checked checked
{{/iflteq}} {{/iflteq}}
" /> "
/>
{{/iflteq}} {{/iflteq}}
</div> </div>
@@ -93,23 +105,24 @@
{{/repeat}} {{/repeat}}
</div> </div>
</div> </div>
<div class="blessure-container flexcol align-center"> <div class="blessure-container flexlarge flexcol align-center">
<h4 class="item-name flexrow">{{ localize <h4 class="item-name flexrow">{{ localize
"VERMINE.wounds.name"}}</h4> "VERMINE.wounds.name"}}</h4>
<ul class="unstyled"> <ul class="unstyled">
<li class="row mdb align-center">{{ localize <li class="row mdb align-center">{{ localize
'VERMINE.wounds.light'}} <span 'VERMINE.wounds.light'}} <span data-tooltip="seuil">({{
data-tooltip="seuil">({{
system.minorWound.threshold }})</span> system.minorWound.threshold }})</span>
<div class="flexrow align-center"> <div class="flexrow align-center">
{{#repeat system.minorWound.max 1 "minorwoundmax"}} {{#repeat system.minorWound.max 1 "minorwoundmax"}}
<div <div class="hexa ability{{#iflteq @minorwoundmax @root.system.minorWound.value }}
class="hexa ability{{#iflteq @minorwoundmax @root.system.minorWound.value }}
checked checked
{{/iflteq}}"> {{/iflteq}}">
<input type="radio" data-dtype="Number" <input
type="radio"
data-dtype="Number"
name="system.minorWound.value" name="system.minorWound.value"
value="{{@minorwoundmax}}" data-wound="minorWound" value="{{@minorwoundmax}}"
data-wound="minorWound"
class=" class="
{{#iflteq @minorwoundmax @root.system.minorWound.value }} {{#iflteq @minorwoundmax @root.system.minorWound.value }}
checked checked
@@ -117,7 +130,8 @@
" "
{{#ife @minorwoundmax @root.system.minorWound.value }} {{#ife @minorwoundmax @root.system.minorWound.value }}
checked="true" checked="true"
{{/ife}} /> {{/ife}}
/>
</div> </div>
{{/repeat}} {{/repeat}}
</div> </div>
@@ -128,13 +142,15 @@
system.majorWound.threshold }})</span> system.majorWound.threshold }})</span>
<div class="flexrow align-center"> <div class="flexrow align-center">
{{#repeat system.majorWound.max 1 "majourwoundmax"}} {{#repeat system.majorWound.max 1 "majourwoundmax"}}
<div <div class="hexa ability{{#iflteq @majourwoundmax @root.system.majorWound.value }}
class="hexa ability{{#iflteq @majourwoundmax @root.system.majorWound.value }}
checked checked
{{/iflteq}}"> {{/iflteq}}">
<input type="radio" data-dtype="Number" <input
type="radio"
data-dtype="Number"
name="system.majorWound.value" name="system.majorWound.value"
value="{{@majourwoundmax}}" data-wound="majorWound" value="{{@majourwoundmax}}"
data-wound="majorWound"
class=" class="
{{#iflteq @majourwoundmax @root.system.majorWound.value }} {{#iflteq @majourwoundmax @root.system.majorWound.value }}
checked checked
@@ -143,7 +159,8 @@
" "
{{#ife @majourwoundmax @root.system.majorWound.value }} {{#ife @majourwoundmax @root.system.majorWound.value }}
checked="true" checked="true"
{{/ife}} /> {{/ife}}
/>
</div> </div>
{{/repeat}} {{/repeat}}
@@ -156,22 +173,24 @@
system.deadlyWound.threshold }})</span> system.deadlyWound.threshold }})</span>
<div class="flexrow align-center"> <div class="flexrow align-center">
{{#repeat system.deadlyWound.max 1 "deadlywoundmax"}} {{#repeat system.deadlyWound.max 1 "deadlywoundmax"}}
<div <div class="hexa ability{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }}
class="hexa ability{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }}
checked checked
{{/iflteq}}"> {{/iflteq}}">
<input type="radio" data-dtype="Number" <input
type="radio"
data-dtype="Number"
name="system.deadlyWound.value" name="system.deadlyWound.value"
value="{{@deadlywoundmax}}" data-wound="deadlyWound" value="{{@deadlywoundmax}}"
class=" data-wound="deadlyWound"
{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }} class=" {{#iflteq @deadlywoundmax @root.system.deadlyWound.value }}
checked checked
{{/iflteq}} {{/iflteq}}
" "
{{#ife @deadlywoundmax @root.system.deadlyWound.value }} {{#ife @deadlywoundmax @root.system.deadlyWound.value }}
checked="true" checked="true"
{{/ife}} /> {{/ife}}
/>
</div> </div>
{{/repeat}} {{/repeat}}
@@ -184,7 +203,10 @@
<h4 class="item-name effect-name flexrow">{{ localize "UI.effects.name"}}</h4> <h4 class="item-name effect-name flexrow">{{ localize "UI.effects.name"}}</h4>
<ol class="items-list effects-list"> <ol class="items-list effects-list">
{{#each effects as |section sid|}} {{#each effects as |section sid|}}
<li class="items-header flexrow" data-effect-type="{{section.type}}"> <li
class="items-header flexrow"
data-effect-type="{{section.type}}"
>
<p class="item-name effect-name flexrow">{{#if (eq section.type <p class="item-name effect-name flexrow">{{#if (eq section.type
'temporary')}} 'temporary')}}
{{localize "UI.effects.temporary" }} {{localize "UI.effects.temporary" }}
@@ -197,8 +219,11 @@
<div class="effect-source">{{localize 'UI.source'}}</div> <div class="effect-source">{{localize 'UI.source'}}</div>
<div class="effect-source">{{localize 'UI.duration'}}</div> <div class="effect-source">{{localize 'UI.duration'}}</div>
<div class="item-controls effect-controls flexrow"> <div class="item-controls effect-controls flexrow">
<a class="effect-control" data-action="create" <a
title="{{localize 'UI.effect_create'}}"> class="effect-control"
data-action="create"
title="{{localize 'UI.effect_create'}}"
>
<i class="fas fa-plus"></i> {{localize "UI.add"}} <i class="fas fa-plus"></i> {{localize "UI.add"}}
</a> </a>
</div> </div>
@@ -206,24 +231,38 @@
<ol class="item-list"> <ol class="item-list">
{{#each section.effects as |effect|}} {{#each section.effects as |effect|}}
<li class="item effect flexrow" data-effect-id="{{effect.id}}"> <li
class="item effect flexrow"
data-effect-id="{{effect.id}}"
>
<div class="item-name effect-name"> <div class="item-name effect-name">
<a class="effect-control flexrow flex-group-center items-center" <a
data-action="edit" title="{{localize 'UI.effect_edit'}}"> class="effect-control flexrow flex-group-center items-center"
<img class="item-image" src="{{effect.icon}}" /> data-action="edit"
title="{{localize 'UI.effect_edit'}}"
>
<img
class="item-image"
src="{{effect.icon}}"
/>
<span>{{effect.label}}</span> <span>{{effect.label}}</span>
</a> </a>
</div> </div>
<div class="effect-source">{{effect.sourceName}}</div> <div class="effect-source">{{effect.sourceName}}</div>
<div class="effect-duration">{{effect.duration.label}}</div> <div class="effect-duration">{{effect.duration.label}}</div>
<div class="item-controls effect-controls flexrow"> <div class="item-controls effect-controls flexrow">
<a class="effect-control" data-action="toggle" <a
title="{{localize 'UI.effect_toggle'}}"> class="effect-control"
<i data-action="toggle"
class="fas {{#if effect.disabled}}fa-check{{else}}fa-times{{/if}}"></i> title="{{localize 'UI.effect_toggle'}}"
>
<i class="fas {{#if effect.disabled}}fa-check{{else}}fa-times{{/if}}"></i>
</a> </a>
<a class="effect-control" data-action="delete" <a
title="{{localize 'UI.effect_delete'}}"> class="effect-control"
data-action="delete"
title="{{localize 'UI.effect_delete'}}"
>
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
</a> </a>
</div> </div>