Fix #94 agitators hindrance

This commit is contained in:
sladecraven 2022-10-05 09:19:59 +02:00
parent 076945c76f
commit ef740f4c0d

View File

@ -1258,11 +1258,11 @@ export class PegasusUtility {
applyDef.actor.removeAgitatorHindrance() applyDef.actor.removeAgitatorHindrance()
} }
} }
// Delete all effects if no more tacticians (ie deleted case) // Delete all effects if no more agtators (ie deleted case)
if (agitatorTokens.length == 0) { if (agitatorTokens.length == 0) {
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character") let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
for (let token of allTokens) { for (let token of allTokens) {
if (token.actor.addAgitatorHindrance()) { if (token.actor.hasAgitatorHindrance()) {
token.actor.removeAgitatorHindrance() token.actor.removeAgitatorHindrance()
} }
} }