Added ability to switch between stance/prepared on mouse clic (left/right).
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
- Added SoftLock functionality.
|
||||
- Added a new button bar for system specific buttons.
|
||||
- Added +/- buttons to add or subtract Fatigue and Strife (PC & NPC Sheet), Casualties and Panic (Armies Sheet).
|
||||
- GmMonitor : Added ability to add or subtract fatigue/strife/void/casualties/panic points on mouse clic (left/right).
|
||||
- GmMonitor :
|
||||
- Added ability to add or subtract fatigue/strife/void/casualties/panic points on mouse clic (left/right/middle).
|
||||
- Added ability to switch between stance/prepared on mouse clic (left/right).
|
||||
- Compendiums :
|
||||
- Techniques : QoL - Trying a cheap Rank filter.
|
||||
- Inversion techniques : Updated xp cost from 3 to 6.
|
||||
|
||||
@@ -274,6 +274,15 @@ export class GmMonitor extends FormApplication {
|
||||
// Mouse bt : middle = 0, left +1, right -1
|
||||
const add = event.which === 2 ? -999 : event.which === 1 ? 1 : -1;
|
||||
|
||||
// Stance
|
||||
let stanceIdx =
|
||||
CONFIG.l5r5e.stances.findIndex((s) => s === actor.data.data.stance) + (event.which === 1 ? 1 : -1);
|
||||
if (stanceIdx < 0) {
|
||||
stanceIdx = CONFIG.l5r5e.stances.length - 1;
|
||||
} else if (stanceIdx > CONFIG.l5r5e.stances.length - 1) {
|
||||
stanceIdx = 0;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
// *** Characters ***
|
||||
case "fatigue":
|
||||
@@ -309,6 +318,22 @@ export class GmMonitor extends FormApplication {
|
||||
});
|
||||
break;
|
||||
|
||||
case "stance":
|
||||
await actor.update({
|
||||
data: {
|
||||
stance: CONFIG.l5r5e.stances[stanceIdx],
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
case "prepared":
|
||||
await actor.update({
|
||||
data: {
|
||||
prepared: !actor.data.data.prepared,
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
// *** Armies ***
|
||||
case "casualties":
|
||||
await actor.update({
|
||||
|
||||
@@ -26,8 +26,16 @@
|
||||
<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>
|
||||
<td><i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.initiative.title'}} : {{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=actor.isPrepared)}}</h2>" class="fa fas prepared-icon-{{actor.isPrepared}} {{#ifCond actor.isPrepared '==' 'false'}}badvalue{{/ifCond}} actor-infos-control"></i></td>
|
||||
<td>
|
||||
<a data-actor-id="{{actor.id}}" data-type="stance" class="actor-modify-control">
|
||||
<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>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a data-actor-id="{{actor.id}}" data-type="prepared" class="actor-modify-control">
|
||||
<i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.initiative.title'}} : {{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=actor.isPrepared)}}</h2>" class="fa fas prepared-icon-{{actor.isPrepared}} {{#ifCond actor.isPrepared '==' 'false'}}badvalue{{/ifCond}} actor-infos-control"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{#if actor.haveWeaponEquipped}}<i data-type="weapons" data-actor-id="{{actor.id}}" class="fas fa-fan actor-infos-control {{#if actor.haveWeaponReadied}}badvalue{{/if}}"></i>{{/if}}</td>
|
||||
<td>{{#if actor.haveArmorEquipped}}<i data-type="armors" data-actor-id="{{actor.id}}" class="fas fa-user-shield actor-infos-control"></i>{{/if}}</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user