diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 795deb5..df49aab 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -18,6 +18,18 @@ export class DeltaGreenActorSheet extends ActorSheet { /* -------------------------------------------- */ + /** @override */ + get template() { + if ( !game.user.isGM && this.actor.limited ) { + return "systems/deltagreen/templates/actor/limited-sheet.html"; + } + else{ + //return `systems/deltagreen/templates/actor/${this.actor.data.type}-sheet.html`; + return `systems/deltagreen/templates/actor/actor-sheet.html`; + } + + } + /** @override */ getData() { const data = super.getData(); @@ -84,9 +96,37 @@ export class DeltaGreenActorSheet extends ActorSheet { onclick: (ev) => sendPercentileTestToChat(this.actor, "Luck", 50) }].concat(buttons); + //buttons = [ + // { + // label: "Active Effect", + // class: "test-extra-icon", + // icon: "fas fa-bolt", + // onclick: (ev) => this.activeEffectTest(this) + // }].concat(buttons); + return buttons; } + activeEffectTest(sheet){ + console.log(sheet.actor.uuid); + let owner = sheet.actor; + + let effect = ActiveEffect.create({ + label: "Custom Effect", + tint: "#008000", + icon: "icons/svg/aura.svg", + origin: owner.uuid, + //duration: {"rounds": 1, "seconds": null, "startTime": null, "turns": null, "startRound": null, "startTurn": null}, + disabled: false, + changes: [{ + "key": "data.skills.firearms.proficiency", //"data.statistics.str.value", //"data.health.max", + "mode": 2, // 0 = custom, 1 = multiply, 2 = add, 3 = upgrade, 4 = downgrade, 5 = override + "value": -20, + "priority": "20" + }] + }, owner).create(); + } + /* -------------------------------------------- */ /** @override */ diff --git a/templates/actor/limited-sheet.html b/templates/actor/limited-sheet.html new file mode 100644 index 0000000..dd522e9 --- /dev/null +++ b/templates/actor/limited-sheet.html @@ -0,0 +1,61 @@ +