Fix monster attacks per round
parent
c9d111023b
commit
14c9252f07
|
@ -136,13 +136,11 @@ export class AcksActorSheetMonster extends AcksActorSheet {
|
|||
}
|
||||
|
||||
async _resetCounters(event) {
|
||||
const weapons = this.actor.data.items.filter(i => i.type === 'weapon');
|
||||
for (let wp of weapons) {
|
||||
const item = this.actor.items.get(wp._id);
|
||||
await item.update({
|
||||
for (const weapon of this.actor.itemTypes["weapon"]) {
|
||||
await weapon.update({
|
||||
data: {
|
||||
counter: {
|
||||
value: parseInt(wp.data.counter.max),
|
||||
value: parseInt(weapon.data.data.counter.max, 10),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -129,10 +129,10 @@
|
|||
</div>
|
||||
{{#if (eq item.type 'weapon')}}
|
||||
<div class="field-long counter flexrow">
|
||||
<input type="text" value="{{item.data.data.counter.value}}" data-dtype="Number"
|
||||
<input type="text" value="{{item.data.counter.value}}" data-dtype="Number"
|
||||
placeholder="0" data-field="value" title="{{localize 'ACKS.items.roundAttacks'}}">
|
||||
/
|
||||
<input type="text" value="{{item.data.data.counter.max}}" data-field="max"
|
||||
<input type="text" value="{{item.data.counter.max}}" data-field="max"
|
||||
data-dtype="Number" placeholder="0"
|
||||
title="{{localize 'ACKS.items.roundAttacksMax'}}"></div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue