Allow items

This commit is contained in:
sladecraven 2022-02-17 19:17:24 +01:00
parent a6a0586347
commit 7ff89c34b8
4 changed files with 12 additions and 19 deletions

View File

@ -60,15 +60,6 @@ export class PegasusActor extends Actor {
prepareDerivedData() {
if (this.type == 'character') {
let h = 0;
let updates = [];
for (let key in this.data.data.statistics) {
let attr = this.data.data.statistics[key];
}
if (updates.length > 0) {
this.update(updates);
}
this.computeNRGHealth();
}
@ -910,12 +901,7 @@ export class PegasusActor extends Actor {
&& (effect.data.stataffected != "notapplicable" || effect.data.specaffected.length > 0)
&& effect.data.stataffected != "special") {
if (effect.data.effectstatlevel) {
if (effect.data.effectstat == rollData.statKey) {
effect.data.effectlevel = rollData.statDicesLevel
}
if (effect.data.stataffected == "all") { // Real nightmare
effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value
}
effect.data.effectlevel = this.data.data.statistics[effect.data.effectstat].value
}
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
}

View File

@ -21,10 +21,14 @@ export class PegasusCombat extends Combat {
}
/* -------------------------------------------- */
static decInitBy10( combatantId, value) {
static async decInitBy10( combatantId, value) {
const combatant = game.combat.combatants.get(combatantId)
let initValue = combatant.initiative + value
game.combat.setInitiative(combatantId, initValue)
await game.combat.setInitiative(combatantId, initValue)
while (game.combat.turn > 0) {
await game.combat.previousTurn()
}
console.log("COMBAT", game.combat )
}
}

View File

@ -183,6 +183,6 @@
"templateVersion": 80,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "0.4.17",
"version": "0.4.18",
"background" : "./images/ui/pegasus_welcome_page.webp"
}

View File

@ -52,7 +52,7 @@
{{/each}}
</ul>
<div class="flexrow">
<span class="generic-label packed-left"><a class="generic-pool-roll"><button class="chat-card-button">Pool Roll</button></a></span>
<span class="generic-label packed-left"><a class="generic-pool-roll"><button class="chat-card-button">Dice Pool</button></a></span>
</div>
</div>
@ -202,6 +202,9 @@
<span class="generic-label"><a class="damage-resistance"><button class="chat-card-button">Damage Resistance</button></a></span>
</li>
<li class="item stat flexrow list-item">
<span class="generic-label"></span>
<span class="generic-label"><a class="generic-pool-roll"><button class="chat-card-button">Dice Pool</button></a></span>
<span class="generic-label"></span>
</li>
</ul>