Fix #62 armors
This commit is contained in:
@@ -175,12 +175,13 @@ export class PegasusUtility {
|
||||
newDicePool = newDicePool.concat(this.buildDicePool("armor-shield", armor.value, 0))
|
||||
}
|
||||
}
|
||||
newDicePool = rollData.dicePool.filter(dice => dice.name != "vehicle-shield")
|
||||
newDicePool = newDicePool.filter(dice => dice.name != "vehicle-shield")
|
||||
for (let shield of rollData.vehicleShieldList) {
|
||||
if (shield.applied) {
|
||||
newDicePool = newDicePool.concat(this.buildDicePool("vehicle-shield", shield.value, 0))
|
||||
}
|
||||
}
|
||||
console.log(">>>>Dicepoool", newDicePool)
|
||||
rollData.dicePool = newDicePool
|
||||
}
|
||||
|
||||
@@ -1117,7 +1118,7 @@ export class PegasusUtility {
|
||||
static async processTactician() {
|
||||
// Tactician management
|
||||
let toApply = {}
|
||||
let tacticianTokens = canvas.tokens.placeables.filter(token => token.actor.isTactician() && !newToken.document.hidden)
|
||||
let tacticianTokens = canvas.tokens.placeables.filter(token => token.actor.isTactician() && !token.document.hidden)
|
||||
for (let token of tacticianTokens) {
|
||||
token.refresh()
|
||||
let friends = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == token.document.disposition)
|
||||
@@ -1165,7 +1166,7 @@ export class PegasusUtility {
|
||||
static async processEnhancer() {
|
||||
// Enhancer management
|
||||
let toApply = {}
|
||||
let enhancerTokens = canvas.tokens.placeables.filter(token => token.actor.isEnhancer() && !newToken.document.hidden)
|
||||
let enhancerTokens = canvas.tokens.placeables.filter(token => token.actor.isEnhancer() && !token.document.hidden)
|
||||
for (let token of enhancerTokens) {
|
||||
token.refresh()
|
||||
let friends = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == token.document.disposition)
|
||||
@@ -1215,7 +1216,7 @@ export class PegasusUtility {
|
||||
static async processAgitator() {
|
||||
// Agitator management
|
||||
let toApply = {}
|
||||
let agitatorTokens = canvas.tokens.placeables.filter(token => token.actor.isAgitator())
|
||||
let agitatorTokens = canvas.tokens.placeables.filter(token => token.actor.isAgitator() && !token.document.hidden)
|
||||
for (let token of agitatorTokens) {
|
||||
token.refresh()
|
||||
if (token.document.disposition == 0) {
|
||||
|
Reference in New Issue
Block a user