Compare commits

...

5 Commits

Author SHA1 Message Date
45332702dc Fix #99 effect stat for vehicle 2022-10-05 21:14:46 +02:00
d8215301b4 Fix #99 effect stat for vehicle 2022-10-05 21:14:15 +02:00
932573c9ae Fix #98 hindrance stuff 2022-10-05 14:44:35 +02:00
d6a57de134 Fix #98 hindrance stuff 2022-10-05 14:44:12 +02:00
e2d5a0ec74 Fix #96 hindrance stuff 2022-10-05 14:38:31 +02:00
4 changed files with 1919 additions and 1893 deletions

File diff suppressed because it is too large Load Diff

View File

@ -146,10 +146,10 @@ export class PegasusUtility {
static updateEffectsBonusDice(rollData) {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-bonus-dice")
for (let effect of rollData.effectsList) {
if (effect && effect.applied && effect.type == "effect" && effect.effect && effect.effect.system.bonusdice) {
if (effect && effect.applied && effect.type == "effect" && !effect.effect?.system?.hindrance && effect.effect && effect.effect.system.bonusdice) {
newDicePool = newDicePool.concat(this.buildDicePool("effect-bonus-dice", effect.effect.system.effectlevel, 0, effect.effect.name))
}
if (effect && effect.applied && effect.type == "effect" && effect.value && effect.isdynamic) {
if (effect && effect.applied && effect.type == "effect" && effect.value && effect.isdynamic && !effect.effect?.system?.hindrance) {
newDicePool = newDicePool.concat(this.buildDicePool("effect-bonus-dice", effect.value, 0, effect.name))
}
}
@ -161,7 +161,9 @@ export class PegasusUtility {
let newDicePool = rollData.dicePool.filter(dice => dice.name != "effect-hindrance")
for (let hindrance of rollData.effectsList) {
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.system?.hindrance))) {
console.log("Adding Hindrance 1", hindrance, newDicePool)
newDicePool = newDicePool.concat(this.buildDicePool("effect-hindrance", (hindrance.value) ? hindrance.value : hindrance.effect.system.effectlevel, 0, hindrance.name))
console.log("Adding Hindrance 2", newDicePool)
}
}
rollData.dicePool = newDicePool
@ -1211,11 +1213,15 @@ export class PegasusUtility {
if (token.document.disposition == 0) {
continue
}
let disposition = ( token.document.disposition == -1) ? 1 : -1
let ennemies = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == disposition)
let neutrals = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && newToken.document.disposition == 0)
if (neutrals ) {
ennemies = ennemies.concat(neutrals)
let ennemies = []
if (token.document.disposition == -1) {
ennemies = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && (newToken.document.disposition == 1 || newToken.document.disposition == 0 ))
}
if (token.document.disposition == 1) {
ennemies = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && (newToken.document.disposition == -1 || newToken.document.disposition == 0 ))
}
if (token.document.disposition == 0) {
ennemies = canvas.tokens.placeables.filter(newToken => newToken.actor.type == "character" && !newToken.document.hidden && (newToken.document.disposition == -1 || newToken.document.disposition == 1 ))
}
for (let ennemy of ennemies) {
if (ennemy.actor.id != token.actor.id) {

View File

@ -23,7 +23,7 @@
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/raw/branch/master/system.json",
"compatibility": {
"minimum": "10",
"verified": "10.285",
"verified": "10.286",
"maximum": "10"
},
"id": "fvtt-pegasus-rpg",
@ -253,7 +253,7 @@
],
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.1.0",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.0.zip",
"version": "10.1.2",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.2.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -14,7 +14,7 @@
</span>
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
value="{{stat.level}}" data-dtype="Number" disabled>
{{#select stat.level}}
{{#select (add stat.level stat.bonuseffect)}}
{{#if (eq key "ad")}}
{{{@root.optionsLevel}}}
{{else}}