v10 branch - Update manifest
This commit is contained in:
@ -857,6 +857,18 @@ export class PegasusActor extends Actor {
|
||||
return this.traumaState
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getLevelRemaining() {
|
||||
return this.data.data.biodata.currentlevelremaining
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
modifyHeroLevelRemaining( incDec) {
|
||||
let biodata = duplicate(this.data.data.biodata)
|
||||
biodata.currentlevelremaining = Math.max(biodata.currentlevelremaining+incDec, 0)
|
||||
this.update( {"data.biodata": biodata} )
|
||||
return biodata.currentlevelremaining
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async computeNRGHealth() {
|
||||
if (this.isToken) return
|
||||
@ -1205,6 +1217,7 @@ export class PegasusActor extends Actor {
|
||||
rollData.actorId = this.id
|
||||
rollData.img = this.img
|
||||
rollData.traumaState = this.getTraumaState()
|
||||
rollData.levelRemaining = this.getLevelRemaining()
|
||||
rollData.activePerks = duplicate(this.getActivePerks())
|
||||
rollData.diceList = PegasusUtility.getDiceList()
|
||||
rollData.dicePool = []
|
||||
@ -1223,7 +1236,7 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
let diceKey = PegasusUtility.getDiceFromLevel(rollData.stat.value)
|
||||
rollData.dicePool.push({
|
||||
name: "stat", key: diceKey,
|
||||
name: "stat", key: diceKey, mod: rollData.stat.mod,
|
||||
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
|
||||
})
|
||||
}
|
||||
@ -1236,6 +1249,15 @@ export class PegasusActor extends Actor {
|
||||
return rollData
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getLevelRemainingList( ) {
|
||||
let options = []
|
||||
for (let i=0; i<=this.data.data.biodata.maxlevelremaining; i++) {
|
||||
options.push( `<option value="${i}">${i}</option>`)
|
||||
}
|
||||
return options.join("\n")
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async startRoll(rollData) {
|
||||
this.syncRoll(rollData);
|
||||
@ -1251,7 +1273,7 @@ export class PegasusActor extends Actor {
|
||||
let power = this.data.items.get(itemId)
|
||||
if (power) {
|
||||
power = duplicate(power)
|
||||
this.rollPool(power.data.dmgstatistic)
|
||||
this.rollPool(power.data.dmgstatistic, false, "power-dmg")
|
||||
}
|
||||
}
|
||||
|
||||
@ -1264,7 +1286,9 @@ export class PegasusActor extends Actor {
|
||||
rollData.subKey = subKey
|
||||
rollData.title = `Roll : ${stat.label} `
|
||||
rollData.img = "icons/dice/d12black.svg"
|
||||
|
||||
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
|
||||
rollData.isDamage = true
|
||||
}
|
||||
this.startRoll(rollData)
|
||||
} else {
|
||||
ui.notifications.warn("Statistic not found !");
|
||||
@ -1312,6 +1336,7 @@ export class PegasusActor extends Actor {
|
||||
rollData.specName = spec.name
|
||||
rollData.img = spec.img
|
||||
rollData.specDicesLevel = spec.data.level
|
||||
PegasusUtility.updateSpecDicePool(rollData)
|
||||
this.startRoll(rollData)
|
||||
} else {
|
||||
ui.notifications.warn("Specialisation not found !");
|
||||
@ -1355,7 +1380,7 @@ export class PegasusActor extends Actor {
|
||||
rollData.title = `Armor : ${armor.name}`
|
||||
rollData.isResistance = true;
|
||||
rollData.img = armor.img
|
||||
rollData.otherDicesLevel = armor.data.resistance
|
||||
rollData.damageDiceLevel = armor.data.resistance
|
||||
|
||||
this.startRoll(rollData);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user