Fix #62 armors
This commit is contained in:
parent
c49289b88f
commit
a763efe873
@ -175,12 +175,13 @@ export class PegasusUtility {
|
|||||||
newDicePool = newDicePool.concat(this.buildDicePool("armor-shield", armor.value, 0))
|
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) {
|
for (let shield of rollData.vehicleShieldList) {
|
||||||
if (shield.applied) {
|
if (shield.applied) {
|
||||||
newDicePool = newDicePool.concat(this.buildDicePool("vehicle-shield", shield.value, 0))
|
newDicePool = newDicePool.concat(this.buildDicePool("vehicle-shield", shield.value, 0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(">>>>Dicepoool", newDicePool)
|
||||||
rollData.dicePool = newDicePool
|
rollData.dicePool = newDicePool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1117,7 +1118,7 @@ export class PegasusUtility {
|
|||||||
static async processTactician() {
|
static async processTactician() {
|
||||||
// Tactician management
|
// Tactician management
|
||||||
let toApply = {}
|
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) {
|
for (let token of tacticianTokens) {
|
||||||
token.refresh()
|
token.refresh()
|
||||||
let friends = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == token.document.disposition)
|
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() {
|
static async processEnhancer() {
|
||||||
// Enhancer management
|
// Enhancer management
|
||||||
let toApply = {}
|
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) {
|
for (let token of enhancerTokens) {
|
||||||
token.refresh()
|
token.refresh()
|
||||||
let friends = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == token.document.disposition)
|
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() {
|
static async processAgitator() {
|
||||||
// Agitator management
|
// Agitator management
|
||||||
let toApply = {}
|
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) {
|
for (let token of agitatorTokens) {
|
||||||
token.refresh()
|
token.refresh()
|
||||||
if (token.document.disposition == 0) {
|
if (token.document.disposition == 0) {
|
||||||
|
@ -34,6 +34,27 @@
|
|||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.effectstatlevel" {{checked data.effectstatlevel}}/></label>
|
||||||
|
</li>
|
||||||
|
{{#if data.effectstatlevel}}
|
||||||
|
<li class="flexrow"><label class="generic-label">Stat to use for Effect Level</label>
|
||||||
|
<select class="competence-base flexrow" type="text" name="system.effectstat" value="{{data.effectstat}}" data-dtype="String">
|
||||||
|
{{#select data.effectstat}}
|
||||||
|
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=true all=false}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
{{else}}
|
||||||
|
<li class="flexrow"><label class="generic-label">Effect Level</label>
|
||||||
|
<input type="text" class="input-numeric-short padd-right" name="system.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="generic-label">Affect size ?</label>
|
||||||
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectsize" {{checked data.affectsize}}/></label>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
<li class="flexrow"><label class="generic-label">One use?</label>
|
<li class="flexrow"><label class="generic-label">One use?</label>
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.oneuse" {{checked data.oneuse}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.oneuse" {{checked data.oneuse}}/></label>
|
||||||
</li>
|
</li>
|
||||||
@ -65,26 +86,6 @@
|
|||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.locked" {{checked data.locked}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.locked" {{checked data.locked}}/></label>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="flexrow"><label class="generic-label">Effect Level is a Stat?</label>
|
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.effectstatlevel" {{checked data.effectstatlevel}}/></label>
|
|
||||||
</li>
|
|
||||||
{{#if data.effectstatlevel}}
|
|
||||||
<li class="flexrow"><label class="generic-label">Stat to use for Effect Level</label>
|
|
||||||
<select class="competence-base flexrow" type="text" name="system.effectstat" value="{{data.effectstat}}" data-dtype="String">
|
|
||||||
{{#select data.effectstat}}
|
|
||||||
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html notapplicable=false mr=true all=false}}
|
|
||||||
{{/select}}
|
|
||||||
</select>
|
|
||||||
</li>
|
|
||||||
{{else}}
|
|
||||||
<li class="flexrow"><label class="generic-label">Effect Level</label>
|
|
||||||
<input type="text" class="input-numeric-short padd-right" name="system.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
|
|
||||||
</li>
|
|
||||||
<li class="flexrow"><label class="generic-label">Affect size ?</label>
|
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectsize" {{checked data.affectsize}}/></label>
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<li class="flexrow"><label class="generic-label">Affect Status?</label>
|
<li class="flexrow"><label class="generic-label">Affect Status?</label>
|
||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectstatus" {{checked data.affectstatus}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectstatus" {{checked data.affectstatus}}/></label>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user