Fix #169 Add new ability stuff
This commit is contained in:
@@ -146,6 +146,9 @@ export class PegasusActor extends Actor {
|
||||
modifier -= effect.system.effectlevel
|
||||
}
|
||||
}
|
||||
if (effect.type == "ability" && effect.system.statusaffected && effect.system.statusaffected == "mt") {
|
||||
modifier += effect.system.statusmodifier
|
||||
}
|
||||
}
|
||||
return PegasusUtility.getDiceValue(this.system.statistics.mnd.value) + this.system.statistics.mnd.mod + PegasusUtility.getDiceValue(this.system.statistics.mnd.bonuseffect) + modifier
|
||||
}
|
||||
@@ -162,6 +165,9 @@ export class PegasusActor extends Actor {
|
||||
modifier -= effect.system.effectlevel
|
||||
}
|
||||
}
|
||||
if (effect.type == "ability" && effect.system.statusaffected && effect.system.statusaffected == "kbv") {
|
||||
modifier += effect.system.statusmodifier
|
||||
}
|
||||
}
|
||||
return this.system.statistics.phy.value + this.system.statistics.phy.mod + this.system.statistics.phy.bonuseffect + modifier
|
||||
}
|
||||
@@ -1726,6 +1732,16 @@ export class PegasusActor extends Actor {
|
||||
delirium.bonus += Number(ability.system.statusmodifier)
|
||||
updates[`system.secondary.delirium`] = delirium
|
||||
}
|
||||
if (ability.system.statusaffected == 'socialhealth') {
|
||||
let socialhealth = duplicate(this.system.secondary.socialhealth)
|
||||
socialhealth.bonus += Number(ability.system.statusmodifier)
|
||||
updates[`system.secondary.socialhealth`] = delirium
|
||||
}
|
||||
if (ability.system.statusaffected == 'stealthhealth') {
|
||||
let stealthhealth = duplicate(this.system.secondary.stealthhealth)
|
||||
stealthhealth.bonus += Number(ability.system.statusmodifier)
|
||||
updates[`system.secondary.stealthhealth`] = delirium
|
||||
}
|
||||
}
|
||||
if (directUpdate) {
|
||||
await this.update(updates)
|
||||
|
@@ -60,7 +60,6 @@ export class PegasusItemSheet extends ItemSheet {
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
optionsDiceList: PegasusUtility.getOptionsDiceList(),
|
||||
optionsStatusList: PegasusUtility.getOptionsStatusList(),
|
||||
data: itemData.system,
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
limited: this.object.limited,
|
||||
|
@@ -369,14 +369,9 @@ export class PegasusUtility {
|
||||
this.optionsDiceList = optionsDiceList;
|
||||
this.optionsLevel = optionsLevel;
|
||||
|
||||
this.optionsStatusList = '<option value="notapplicable">Not applicable</option><option value="health">Health</option><option value="nrg">NRG</option><option value="delirium">Delirium</option>';
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getOptionsStatusList() {
|
||||
return this.optionsStatusList;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static getOptionsDiceList() {
|
||||
return this.optionsDiceList;
|
||||
|
Reference in New Issue
Block a user