Open cstby opened 9 months ago
I changed this function in damage.js to fix this issue on my end. I just removed the else section for synthetic actors. I believe this change only works for Foundry V11
const tokenDoc = canvas.scene.tokens.get(target);
const armor = tokenDoc.actor.system.armor;
const hp = tokenDoc.actor.system.hp.value;
const str = tokenDoc.actor.system.abilities.STR.value;
let {dmg, newHp, newStr} = this._calculateHpAndStr(damage, armor, hp, str);
tokenDoc.actor.update({'system.hp.value': newHp, 'system.abilities.STR.value': newStr});
const actor = tokenDoc.actor;
return { actor, dmg, damage, armor, hp, str, newHp, newStr };
}```
Cheers! I appreciate you commenting with a fix!
By chance, do you know how Foundry changed in v11 in regard to synthetic actors?
Not really no, I’m pretty unfamiliar with foundry’s workings, I was just looking to fix a bug that my friends were experiencing and was bored and decided to look into yours as well lol. Looks like actorData is no longer a thing and you just access actor now, but I could be wrong.
System Info
Bug description
When I click the "apply damage" button in the chat after an attack on an NPC, nothing happens and the following error appears in the console: