mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Bug] Fixed Manual MaxHP (#532)
* Set adversary buttosn to type=button. Fixed faulty _onUpdate * Fixed
This commit is contained in:
parent
2f39e04da5
commit
cbd176d5bc
4 changed files with 4 additions and 4 deletions
|
|
@ -144,7 +144,7 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
super._onUpdate(changes, options, userId);
|
||||
|
||||
if (game.user.id === userId) {
|
||||
if (changes.system.type) {
|
||||
if (changes.system?.type) {
|
||||
const existingHordeEffect = this.parent.effects.find(x => x.type === 'horde');
|
||||
if (changes.system.type === CONFIG.DH.ACTOR.adversaryTypes.horde.id) {
|
||||
if (!existingHordeEffect)
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@ export default class DhCharacter extends BaseDataActor {
|
|||
: this.levelData.level.current * 2
|
||||
};
|
||||
this.resources.hope.max -= Object.keys(this.scars).length;
|
||||
this.resources.hitPoints.max = this.class.value?.system?.hitPoints ?? 0;
|
||||
this.resources.hitPoints.max += this.class.value?.system?.hitPoints ?? 0;
|
||||
}
|
||||
|
||||
prepareDerivedData() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue