added 'limited' character sheet

This commit is contained in:
The Last Scrub
2020-11-19 21:06:19 -08:00
parent 24879b5b4a
commit 5220ca5ec8
2 changed files with 101 additions and 0 deletions
+40
View File
@@ -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 */