Data model change

This commit is contained in:
2022-07-25 21:33:00 +02:00
parent 1de5086efa
commit 732d51b8b3
7 changed files with 73 additions and 533 deletions

View File

@@ -16,7 +16,7 @@ export class CrucibleActorSheet extends ActorSheet {
template: "systems/fvtt-crucible-rpg/templates/actor-sheet.html",
width: 960,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "combat" }],
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: true
});
@@ -213,29 +213,15 @@ export class CrucibleActorSheet extends ActorSheet {
this.actor.rollPool( 'phy', false, "dmg-res");
});
html.find('.roll-stat').click((event) => {
const statId = $(event.currentTarget).data("stat-key");
this.actor.rollStat(statId);
html.find('.roll-ability').click((event) => {
const abilityKey = $(event.currentTarget).data("ability-key");
this.actor.rollAbility(abilityKey);
});
html.find('.roll-mr').click((event) => {
this.actor.rollMR();
});
html.find('.roll-idr').click((event) => {
const diceValue = $(event.currentTarget).data("dice-value")
const li = $(event.currentTarget).parents(".item")
this.rollIDR( li.data("item-id"), diceValue)
})
html.find('.roll-spec').click((event) => {
html.find('.roll-skill').click((event) => {
const li = $(event.currentTarget).parents(".item");
const specId = li.data("item-id");
this.actor.rollSpec(specId);
const skillId = li.data("item-id")
this.actor.rollSkill(skillId)
});
html.find('.power-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const powerId = li.data("item-id");
this.actor.rollPower(powerId);
});
html.find('.weapon-roll').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weaponId = li.data("item-id");