Add spells rolls and enhance CSS styling
This commit is contained in:
@@ -18,6 +18,10 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
||||
rollInitiative: PrismRPGCharacterSheet.#onRollInitiative,
|
||||
armorHitPointsPlus: PrismRPGCharacterSheet.#onArmorHitPointsPlus,
|
||||
armorHitPointsMinus: PrismRPGCharacterSheet.#onArmorHitPointsMinus,
|
||||
manaPointsPlus: PrismRPGCharacterSheet.#onManaPointsPlus,
|
||||
manaPointsMinus: PrismRPGCharacterSheet.#onManaPointsMinus,
|
||||
hpPlus: PrismRPGCharacterSheet.#onHpPlus,
|
||||
hpMinus: PrismRPGCharacterSheet.#onHpMinus,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -166,6 +170,30 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
||||
this.actor.update({ "system.combat.armorHitPoints": Math.max(armorHP, 0) })
|
||||
}
|
||||
|
||||
static #onManaPointsPlus(event, target) {
|
||||
let mana = this.actor.system.manaPoints.value
|
||||
mana += 1
|
||||
this.actor.update({ "system.manaPoints.value": Math.min(mana, this.actor.system.manaPoints.max) })
|
||||
}
|
||||
|
||||
static #onManaPointsMinus(event, target) {
|
||||
let mana = this.actor.system.manaPoints.value
|
||||
mana -= 1
|
||||
this.actor.update({ "system.manaPoints.value": Math.max(mana, 0) })
|
||||
}
|
||||
|
||||
static #onHpPlus(event, target) {
|
||||
let hp = this.actor.system.hp.value
|
||||
hp += 1
|
||||
this.actor.update({ "system.hp.value": Math.min(hp, this.actor.system.hp.max) })
|
||||
}
|
||||
|
||||
static #onHpMinus(event, target) {
|
||||
let hp = this.actor.system.hp.value
|
||||
hp -= 1
|
||||
this.actor.update({ "system.hp.value": Math.max(hp, 0) })
|
||||
}
|
||||
|
||||
static #onCreateEquipment(event, target) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user