Fix #24 : Add SAN rolls

This commit is contained in:
2025-01-07 21:38:50 +01:00
parent dfe4aa0c56
commit 2c3a92994a
11 changed files with 230 additions and 58 deletions

View File

@ -32,29 +32,51 @@
<fieldset class="san">
<legend>{{localize "CTHULHUETERNAL.Label.SAN"}}</legend>
<div class="flexrow">
<span class="label-field">{{localize "CTHULHUETERNAL.Label.current"}}</span>
{{formField systemFields.san.fields.value value=system.san.value}}
<span class="label-field">{{localize "CTHULHUETERNAL.Label.max"}}</span>
{{formField systemFields.san.fields.max value=system.san.max rootId=partId disabled=true}}
<span class="label-field">{{localize "CTHULHUETERNAL.Label.recovery"}}</span>
{{formField systemFields.san.fields.recovery value=system.san.recovery disabled=true}}
<span class="label-field" data-tooltip='{{localize "CTHULHUETERNAL.Tooltip.sanBP"}}'>{{localize
"CTHULHUETERNAL.Label.breakingPoint"}}</span>
{{formField systemFields.san.fields.breakingPoint value=system.san.breakingPoint disabled=true}}
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="label-field rollable" data-roll-type="san" >{{localize "CTHULHUETERNAL.Label.current"}}</label>
{{formInput systemFields.san.fields.value value=system.san.value}}
<span class="label-field label-recovery">{{localize "CTHULHUETERNAL.Label.recovery"}}</span>
{{formInput systemFields.san.fields.recovery value=system.san.recovery disabled=true}}
<span class="label-bp" data-tooltip='{{localize "CTHULHUETERNAL.Tooltip.sanBPShort"}}'>{{localize
"CTHULHUETERNAL.Label.sanBPShort"}}</span>
{{formInput systemFields.san.fields.breakingPoint value=system.san.breakingPoint disabled=true}}
</div>
<div class="flexrow">
<div class="flexrow">
<span class="label-short-field">{{localize "CTHULHUETERNAL.Label.max"}}</span>
{{formInput systemFields.san.fields.max value=system.san.max rootId=partId disabled=true}}
</div>
<span class="label-insanity" >
{{localize "CTHULHUETERNAL.Label.tempInsanity"}}
</span>
{{formInput systemFields.san.fields.insanity value=system.san.insanity localize=true}}
</div>
<div class="flexrow">
{{localize "CTHULHUETERNAL.Label.violence"}}
<span class="label-field">{{localize "CTHULHUETERNAL.Label.violence"}}</span>
{{#each system.san.violence as |violence idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="violence" {{#if violence}} checked {{/if}}>
{{/each}}
<span class="spacing"></span>
{{localize "CTHULHUETERNAL.Label.helplessness"}}
<span class="label-field">{{localize "CTHULHUETERNAL.Label.helplessness"}}</span>
{{#each system.san.helplessness as |helplessness idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="helplessness" {{#if helplessness}} checked {{/if}}>
{{/each}}
</div>
</fieldset>
<fieldset class="willpower">