Fix #77
This commit is contained in:
parent
7bcd4d9c06
commit
e06572c221
@ -1148,6 +1148,16 @@ export class PegasusUtility {
|
||||
applyDef.actor.removeTacticianEffect()
|
||||
}
|
||||
}
|
||||
//Delete all effects if no more tacticians (ie deleted case)
|
||||
if (tacticianTokens.length == 0) {
|
||||
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
|
||||
for (let token of allTokens) {
|
||||
if (token.actor.hasTacticianBonus()) {
|
||||
token.actor.removeTacticianEffect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1188,6 +1198,15 @@ export class PegasusUtility {
|
||||
applyDef.actor.removeEnhancerEffect()
|
||||
}
|
||||
}
|
||||
// Delete all effects if no more tacticians (ie deleted case)
|
||||
if (enhancerTokens.length == 0) {
|
||||
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
|
||||
for (let token of allTokens) {
|
||||
if (token.actor.hasEnhancerBonus()) {
|
||||
token.actor.removeEnhancerEffect()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1227,6 +1246,16 @@ export class PegasusUtility {
|
||||
applyDef.actor.removeAgitatorHindrance()
|
||||
}
|
||||
}
|
||||
// Delete all effects if no more tacticians (ie deleted case)
|
||||
if (agitatorTokens.length == 0) {
|
||||
let allTokens = canvas.tokens.placeables.filter(token => token.actor.type == "character")
|
||||
for (let token of allTokens) {
|
||||
if (token.actor.addAgitatorHindrance()) {
|
||||
token.actor.removeAgitatorHindrance()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1234,7 +1263,7 @@ export class PegasusUtility {
|
||||
|
||||
// Small optimization
|
||||
let now = Date.now()
|
||||
if ( now - this.lastRoleEffectProcess < 300 ) {
|
||||
if (now - this.lastRoleEffectProcess < 300) {
|
||||
return // Save some processing
|
||||
}
|
||||
this.lastRoleEffectProcess = now
|
||||
|
@ -253,7 +253,7 @@
|
||||
],
|
||||
"title": "Pegasus RPG",
|
||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||
"version": "10.0.29",
|
||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.29.zip",
|
||||
"version": "10.0.30",
|
||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.30.zip",
|
||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||
}
|
Loading…
Reference in New Issue
Block a user