army sheet : added ability to drop a actor for commander & warlord, and some fixes

This commit is contained in:
Vlyan
2021-12-02 10:09:47 +01:00
parent 1b1dbbdb2d
commit c265e741b9
12 changed files with 261 additions and 70 deletions

View File

@@ -8,19 +8,19 @@
<ul>
<li>
<strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong>
<input name="data.battle_readiness.casualties_strength.value" type="text" value="{{data.data.battle_readiness.casualties_strength.value}}" />
<input name="data.battle_readiness.casualties_strength.value" type="number" value="{{data.data.battle_readiness.casualties_strength.value}}" />
</li>
<li>
<strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong>
<input name="data.battle_readiness.casualties_strength.max" type="text" value="{{data.data.battle_readiness.casualties_strength.max}}" />
<input name="data.battle_readiness.casualties_strength.max" type="number" value="{{data.data.battle_readiness.casualties_strength.max}}" />
</li>
<li>
<strong>{{localize 'l5r5e.army.battle_readiness.panic'}}</strong>
<input name="data.battle_readiness.panic_discipline.value" type="text" value="{{data.data.battle_readiness.panic_discipline.value}}" />
<input name="data.battle_readiness.panic_discipline.value" type="number" value="{{data.data.battle_readiness.panic_discipline.value}}" />
</li>
<li>
<strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong>
<input name="data.battle_readiness.panic_discipline.max" type="text" value="{{data.data.battle_readiness.panic_discipline.max}}" />
<input name="data.battle_readiness.panic_discipline.max" type="number" value="{{data.data.battle_readiness.panic_discipline.max}}" />
</li>
</ul>
</div>

View File

@@ -2,7 +2,14 @@
<fieldset>
<p>
<strong>{{localize 'l5r5e.army.warlord'}}</strong>
<input name="data.warlord" type="text" value="{{data.data.warlord}}" />
</p>
<p>
{{#if data.data.warlord_actor_id}}
<span data-actor-id="{{actor.id}}" data-type="warlord" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
<a data-actor-id="{{data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{data.data.warlord}}</a>
{{else}}
<input name="data.warlord" type="text" value="{{data.data.warlord}}" />
{{/if}}
</p>
<p>
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
@@ -18,21 +25,26 @@
<fieldset>
<label>
<strong>{{localize 'l5r5e.army.commander'}}</strong>
<input name="data.commander" type="text" value="{{data.data.commander}}" />
</label>
{{#if data.data.commander_actor_id}}
<span data-actor-id="{{actor.id}}" data-type="commander" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
<a data-actor-id="{{data.data.commander_actor_id}}" class="open-sheet-actor-id">{{data.data.commander}}</a>
{{else}}
<input name="data.commander" type="text" value="{{data.data.commander}}" />
{{/if}}
<div class="standing">
<ul>
<li>
<strong>{{localize 'l5r5e.social.honor'}}</strong>
<input name="data.commander_standing.honor" type="text" value="{{data.data.commander_standing.honor}}" />
<input name="data.commander_standing.honor" type="number" value="{{data.data.commander_standing.honor}}" />
</li>
<li>
<strong>{{localize 'l5r5e.social.glory'}}</strong>
<input name="data.commander_standing.glory" type="text" value="{{data.data.commander_standing.glory}}" />
<input name="data.commander_standing.glory" type="number" value="{{data.data.commander_standing.glory}}" />
</li>
<li>
<strong>{{localize 'l5r5e.social.status'}}</strong>
<input name="data.commander_standing.status" type="text" value="{{data.data.commander_standing.status}}" />
<input name="data.commander_standing.status" type="number" value="{{data.data.commander_standing.status}}" />
</li>
</ul>
</div>

View File

@@ -1,25 +1,23 @@
<div>
{{!-- Supplies and Logistics --}}
<fieldset class="supplies_logistics">
<legend class="text-block-header">{{localize 'l5r5e.army.supplies_logistics'}}</legend>
{{editor content=data.data.supplies_logistics target="data.supplies_logistics" button=true editable=options.editable}}
</fieldset>
{{!-- Supplies and Logistics --}}
<fieldset class="supplies_logistics">
<legend class="text-block-header">{{localize 'l5r5e.army.supplies_logistics'}}</legend>
{{editor content=data.data.supplies_logistics target="data.supplies_logistics" button=true editable=options.editable}}
</fieldset>
{{!-- Past Battles --}}
<fieldset class="past_battles">
<legend class="text-block-header">{{localize 'l5r5e.army.past_battles'}}</legend>
{{editor content=data.data.past_battles target="data.past_battles" button=true editable=options.editable}}
</fieldset>
{{!-- Past Battles --}}
<fieldset class="past_battles">
<legend class="text-block-header">{{localize 'l5r5e.army.past_battles'}}</legend>
{{editor content=data.data.past_battles target="data.past_battles" button=true editable=options.editable}}
</fieldset>
{{!-- Description (public) --}}
<fieldset class="description">
<legend class="text-block-header">{{localize 'l5r5e.description'}}</legend>
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
</fieldset>
{{!-- Description (public) --}}
<fieldset class="description">
<legend class="text-block-header">{{localize 'l5r5e.description'}}</legend>
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
</fieldset>
{{!-- Notes (private) --}}
<fieldset class="note">
<legend class="text-block-header">{{localize 'l5r5e.notes'}}</legend>
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
</fieldset>
</div>
{{!-- Notes (private) --}}
<fieldset class="note">
<legend class="text-block-header">{{localize 'l5r5e.notes'}}</legend>
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
</fieldset>

View File

@@ -23,7 +23,7 @@
<tr>
<td><img class="profile actor-profile" title="{{actor.name}}" src="{{actor.img}}"></td>
<td>
<a data-actor-id="{{actor.id}}" class="actor-sheet-control">{{actor.name}}</a>
<a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a>
{{#if actor.data.data.attitude}}<p>({{actor.data.data.attitude}})</p>{{/if}}
</td>
<td><i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.data.data.stance}})</h2>{{localizeStanceTip actor.data.data.stance}}" class="i_{{actor.data.data.stance}} actor-infos-control"></i></td>
@@ -92,8 +92,14 @@
{{#each data.actors as |actor|}}
<tr>
<td><img class="profile actor-profile" title="{{actor.name}}" src="{{actor.img}}"></td>
<td><a data-actor-id="{{actor.id}}" class="actor-sheet-control">{{actor.name}}</a></td>
<td>{{actor.data.data.warlord}}</td>
<td><a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a></td>
<td>
{{#if actor.data.data.warlord_actor_id}}
<a data-actor-id="{{actor.data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.warlord}}</a>
{{else}}
{{actor.data.data.warlord}}
{{/if}}
</td>
<td>
<span class="{{#ifCond actor.data.data.battle_readiness.casualties_strength.value '>' actor.data.data.battle_readiness.casualties_strength.max}}badvalue{{/ifCond}}">{{actor.data.data.battle_readiness.casualties_strength.value}}</span>
/ {{actor.data.data.battle_readiness.casualties_strength.max}}
@@ -103,7 +109,12 @@
/ {{actor.data.data.battle_readiness.panic_discipline.max}}
</td>
<td>
{{actor.data.data.commander}}<br>
{{#if actor.data.data.commander_actor_id}}
<a data-actor-id="{{actor.data.data.commander_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.commander}}</a>
{{else}}
{{actor.data.data.commander}}
{{/if}}
<br>
<span class="{{#ifCond actor.data.data.commander_standing.honor '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.data.data.commander_standing.honor '<' 30}}badvalue{{/ifCond}}">{{actor.data.data.commander_standing.honor}}</span>
/ <span class="{{#ifCond actor.data.data.commander_standing.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.data.data.commander_standing.glory '<' 20}}badvalue{{/ifCond}}">{{actor.data.data.commander_standing.glory}}</span>
/ {{actor.data.data.commander_standing.status}}

View File

@@ -9,15 +9,15 @@
<article class="attributes" data-group="primary" data-tab="description">
<label class="attribute army-cohort-types">
{{localize 'l5r5e.army.cohort.leader'}}
<input class="select-on-focus" type="number" name="data.leader" value="{{data.data.leader}}" data-dtype="Number"/>
<input class="select-on-focus" type="text" name="data.leader" value="{{data.data.leader}}" data-dtype="String"/>
</label>
<label class="attribute army-cohort-types">
{{localize 'l5r5e.equipment'}}
<input class="select-on-focus" type="number" name="data.equipment" value="{{data.data.equipment}}" data-dtype="Number"/>
<input class="select-on-focus" type="text" name="data.equipment" value="{{data.data.equipment}}" data-dtype="String"/>
</label>
<label class="attribute army-cohort-types">
{{localize 'l5r5e.army.cohort.abilities'}}
<input class="select-on-focus" type="number" name="data.abilities" value="{{data.data.abilities}}" data-dtype="Number"/>
<input class="select-on-focus" type="text" name="data.abilities" value="{{data.data.abilities}}" data-dtype="String"/>
</label>
{{!-- battle readiness --}}

View File

@@ -8,10 +8,10 @@
<li><strong>{{localize 'l5r5e.equipment'}}</strong> : {{data.data.equipment}}</li>
<li><strong>{{localize 'l5r5e.army.cohort.abilities'}}</strong> : {{data.data.abilities}}</li>
{{!-- battle readiness --}}
<li><strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong> : {{data.data.battle_readiness.casualties_strength.max}}</li>
<li><strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong> : {{data.data.battle_readiness.casualties_strength.value}}</li>
<li><strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong> : {{data.data.battle_readiness.panic_discipline.max}}</li>
<li><strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong> : {{data.data.battle_readiness.casualties_strength.max}}</li>
<li><strong>{{localize 'l5r5e.army.battle_readiness.panic'}}</strong> : {{data.data.battle_readiness.panic_discipline.value}}</li>
<li><strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong> : {{data.data.battle_readiness.panic_discipline.max}}</li>
</ul>
{{!--item-infos--}}
<p><strong>{{localize 'l5r5e.description'}}</strong> : {{{data.data.description}}}</p>