Add HP TEMP
This commit is contained in:
@@ -1126,6 +1126,10 @@ i.prismrpg {
|
||||
border: 2px solid #6b6b6b;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.prismrpg .character-main-v2 .character-left-column .hp-shields-section .hp-shields .hp-item.hp-temp-item .hp-value input {
|
||||
background: rgba(255, 230, 160, 0.85);
|
||||
border-color: #b8860b;
|
||||
}
|
||||
.prismrpg .character-main-v2 .character-left-column .character-attributes {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -522,6 +522,7 @@
|
||||
"combatDetails": "Combat details",
|
||||
"Challenges": "Challenges",
|
||||
"HP": "HP",
|
||||
"HPTemp": "Temporary Hit Points",
|
||||
"Movement": "Movement",
|
||||
"Saves": "Saves",
|
||||
"app": "APP",
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +143,13 @@
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&.hp-temp-item {
|
||||
.hp-value input {
|
||||
background: rgba(255, 230, 160, 0.85);
|
||||
border-color: #b8860b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,18 @@
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="hp-item hp-temp-item">
|
||||
<div class="hp-label" data-tooltip="{{localize 'PRISMRPG.Label.HPTemp'}}">HP Tmp</div>
|
||||
<a data-action="hpTempMinus"><i class="fa-solid fa-minus"></i></a>
|
||||
<div class="hp-value">
|
||||
{{formInput
|
||||
systemFields.hp.fields.temp
|
||||
value=system.hp.temp
|
||||
disabled=isPlayMode
|
||||
}}
|
||||
</div>
|
||||
<a data-action="hpTempPlus"><i class="fa-solid fa-plus"></i></a>
|
||||
</div>
|
||||
<div class="hp-item">
|
||||
<div class="hp-label">MANA</div>
|
||||
<a data-action="manaPointsMinus"><i class="fa-solid fa-minus"></i></a>
|
||||
|
||||
Reference in New Issue
Block a user