Set adversary buttosn to type=button. Fixed faulty _onUpdate

This commit is contained in:
WBHarry 2025-08-02 21:35:00 +02:00
parent 2f39e04da5
commit fa0f33872a
3 changed files with 3 additions and 3 deletions

View file

@ -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)