Add initiative and ammo

This commit is contained in:
2023-10-21 10:25:39 +02:00
parent 78edf6b80b
commit 06e265586b
62 changed files with 398 additions and 207 deletions

View File

@@ -40,6 +40,7 @@ export class DarkStarsActorSheet extends ActorSheet {
skills: this.actor.getSkills( ),
perks: this.actor.getPerks( ),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
ammos: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getAmmos()) ),
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
@@ -109,6 +110,11 @@ export class DarkStarsActorSheet extends ActorSheet {
this.actor.delSubActor(actorId);
});
html.find('.edit-weapon-ammo').change(ev => {
const li = $(ev.currentTarget).parents(".item")
let weaponId = li.data("item-id")
this.actor.setWeaponAmmo( weaponId, ev.currentTarget.value )
})
html.find('.skill-used-id').change(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.setSkillUsed( li.data("item-id"), event.currentTarget.checked );