Add HP TEMP
This commit is contained in:
@@ -26,6 +26,8 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
||||
manaPointsMinus: PrismRPGCharacterSheet.#onManaPointsMinus,
|
||||
hpPlus: PrismRPGCharacterSheet.#onHpPlus,
|
||||
hpMinus: PrismRPGCharacterSheet.#onHpMinus,
|
||||
hpTempPlus: PrismRPGCharacterSheet.#onHpTempPlus,
|
||||
hpTempMinus: PrismRPGCharacterSheet.#onHpTempMinus,
|
||||
postItemToChat: PrismRPGCharacterSheet.#onPostItemToChat,
|
||||
},
|
||||
}
|
||||
@@ -223,6 +225,16 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
||||
this.actor.update({ "system.hp.value": Math.max(hp, 0) })
|
||||
}
|
||||
|
||||
static async#onHpTempPlus(event, target) {
|
||||
const temp = this.actor.system.hp.temp
|
||||
this.actor.update({ "system.hp.temp": temp + 1 })
|
||||
}
|
||||
|
||||
static async#onHpTempMinus(event, target) {
|
||||
const temp = this.actor.system.hp.temp
|
||||
this.actor.update({ "system.hp.temp": Math.max(temp - 1, 0) })
|
||||
}
|
||||
|
||||
static async #onCreateEquipment(event, target) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user