Add worstfear/desires
This commit is contained in:
@ -177,6 +177,35 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
return comp;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async manageWorstFear(flag) {
|
||||
if (flag) {
|
||||
let effect = await PegasusUtility.getEffectFromCompendium( "Worst Fear" )
|
||||
console.log("got effect", effect)
|
||||
effect.data.worstfear = true
|
||||
this.createEmbeddedDocuments( 'Item', [effect])
|
||||
} else {
|
||||
let effect = this.data.items.find( item => item.type == "effect" && item.data.data.worstfear )
|
||||
if (effect) {
|
||||
this.deleteEmbeddedDocuments( 'Item', [ effect.id ])
|
||||
}
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async manageDesires(flag) {
|
||||
if (flag) {
|
||||
let effect = await PegasusUtility.getEffectFromCompendium( "Desires" )
|
||||
effect.data.desires = true
|
||||
this.createEmbeddedDocuments( 'Item', [effect])
|
||||
} else {
|
||||
let effect = this.data.items.find( item => item.type == "effect" && item.data.data.desires )
|
||||
if (effect) {
|
||||
this.deleteEmbeddedDocuments( 'Item', [ effect.id ])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getRelevantSpec(statKey) {
|
||||
let comp = duplicate(this.data.items.filter(item => item.type == 'specialisation' && item.data.data.statistic == statKey) || []);
|
||||
@ -197,10 +226,43 @@ export class PegasusActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async activatePower(itemId) {
|
||||
let item = this.data.items.find(item => item.id == itemId);
|
||||
let item = this.data.items.find(item => item.id == itemId)
|
||||
if (item && item.data.data) {
|
||||
let update = { _id: item.id, "data.activated": !item.data.data.activated };
|
||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||
|
||||
let nrg = duplicate(this.data.data.nrg)
|
||||
if ( !item.data.data.activated) { // Current value
|
||||
|
||||
if ( item.data.data.cost > nrg.value) {
|
||||
return ui.notifications.warn("Not enough NRG to activate the Power " + item.name )
|
||||
}
|
||||
nrg.activated += item.data.data.cost
|
||||
nrg.value -= item.data.data.cost
|
||||
this.update({ 'data.nrg': nrg })
|
||||
|
||||
let effects = []
|
||||
for (let effect of item.data.data.effectsgained) {
|
||||
effect.data.powerId = itemId // Link to the perk, in order to dynamically remove them
|
||||
effects.push(effect)
|
||||
}
|
||||
if (effects.length) {
|
||||
await this.createEmbeddedDocuments('Item', effects)
|
||||
}
|
||||
} else {
|
||||
nrg.activated -= item.data.data.cost
|
||||
this.update({ 'data.nrg': nrg })
|
||||
|
||||
let toRem = []
|
||||
for( let item of this.data.items) {
|
||||
if (item.type == 'effect' && item.data.data.powerId == itemId) {
|
||||
toRem.push( item.id)
|
||||
}
|
||||
}
|
||||
if (toRem.length) {
|
||||
await this.deleteEmbeddedDocuments('Item', toRem)
|
||||
}
|
||||
}
|
||||
let update = { _id: item.id, "data.activated": !item.data.data.activated }
|
||||
await this.updateEmbeddedDocuments('Item', [update]) // Updates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +292,7 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
/* ------------------------------------------- */
|
||||
getEquipmentsOnly() {
|
||||
return duplicate( this.data.items.filter(item => item.type == "equipment") || [] )
|
||||
return duplicate(this.data.items.filter(item => item.type == "equipment") || [])
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -253,17 +315,17 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async preprocessItem( event, item, onDrop = false) {
|
||||
if ( item.data.type == 'race') {
|
||||
async preprocessItem(event, item, onDrop = false) {
|
||||
if (item.data.type == 'race') {
|
||||
this.applyRace(item.data)
|
||||
} else if ( item.data.type == 'ability') {
|
||||
} else if (item.data.type == 'ability') {
|
||||
this.applyAbility(item.data, [], true)
|
||||
if ( !onDrop) {
|
||||
await this.createEmbeddedDocuments('Item', [item.data] )
|
||||
if (!onDrop) {
|
||||
await this.createEmbeddedDocuments('Item', [item.data])
|
||||
}
|
||||
} else {
|
||||
if ( !onDrop) {
|
||||
await this.createEmbeddedDocuments('Item', [item.data] )
|
||||
if (!onDrop) {
|
||||
await this.createEmbeddedDocuments('Item', [item.data])
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -277,7 +339,7 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getInitiativeScore( combatId, combatantId) {
|
||||
getInitiativeScore(combatId, combatantId) {
|
||||
if (this.type == 'character') {
|
||||
this.rollMR(true, combatId, combatantId)
|
||||
}
|
||||
@ -334,7 +396,7 @@ export class PegasusActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getOneSpec(specId) {
|
||||
let spec = this.data.items.find(item => item.type == 'specialisation' && item.id == specId);
|
||||
let spec = this.data.items.find(item => item.type == 'specialisation' && item.id == specId)
|
||||
if (spec) {
|
||||
spec = duplicate(spec);
|
||||
spec.data.dice = PegasusUtility.getDiceFromLevel(spec.data.level);
|
||||
@ -343,14 +405,66 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async perkEffectUsed( itemId) {
|
||||
specPowerActivate(specId) {
|
||||
let spec = this.getOneSpec(specId)
|
||||
if (spec) {
|
||||
let powers = []
|
||||
for (let power of spec.data.powers) {
|
||||
power.data.specId = specId
|
||||
powers.push(power)
|
||||
}
|
||||
if (powers.length > 0) {
|
||||
this.createEmbeddedDocuments('Item', powers)
|
||||
}
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: specId, 'data.powersactivated': true }])
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
specPowerDeactivate(specId) {
|
||||
let toRem = []
|
||||
for (let power of this.data.items) {
|
||||
if (power.type == "power" && power.data.data.specId && power.data.data.specId == specId) {
|
||||
toRem.push(power.id)
|
||||
}
|
||||
}
|
||||
if (toRem.length > 0) {
|
||||
this.deleteEmbeddedDocuments('Item', toRem)
|
||||
}
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: specId, 'data.powersactivated': false }])
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async perkEffectUsed(itemId) {
|
||||
let effect = this.items.get(itemId)
|
||||
if (effect) {
|
||||
PegasusUtility.createChatWithRollMode(effect.name, {
|
||||
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-effect-used.html`, effect.data)
|
||||
});
|
||||
|
||||
this.deleteEmbeddedDocuments('Item', [ effect.id] )
|
||||
this.deleteEmbeddedDocuments('Item', [effect.id])
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
disableWeaverPerk(perk) {
|
||||
if (perk.data.data.isweaver) {
|
||||
for (let spec of this.data.items) {
|
||||
if (spec.type == 'specialisation' && spec.data.data.ispowergroup) {
|
||||
this.specPowerDeactivate(spec.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
enableWeaverPerk(perk) {
|
||||
if (perk.data.data.isweaver) {
|
||||
for (let spec of this.data.items) {
|
||||
if (spec.type == 'specialisation' && spec.data.data.ispowergroup) {
|
||||
this.specPowerActivate(spec.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,57 +474,58 @@ export class PegasusActor extends Actor {
|
||||
if (item) {
|
||||
|
||||
if (item.data.data.status == status) return;// Ensure we are really changing the status
|
||||
|
||||
|
||||
let updateOK = true
|
||||
if ( status == "ready") {
|
||||
if (status == "ready") {
|
||||
let effects = []
|
||||
for( let item of this.data.items) {
|
||||
if ( item.type == "effect" && item.data.data.perkId == itemId) {
|
||||
effects.push( item.id)
|
||||
for (let item of this.data.items) {
|
||||
if (item.type == "effect" && item.data.data.perkId == itemId) {
|
||||
effects.push(item.id)
|
||||
}
|
||||
}
|
||||
if ( effects.length) {
|
||||
await this.deleteEmbeddedDocuments('Item', effects )
|
||||
if (effects.length) {
|
||||
await this.deleteEmbeddedDocuments('Item', effects)
|
||||
}
|
||||
if ( item.data.data.features.nrgcost.flag ) {
|
||||
if (item.data.data.features.nrgcost.flag) {
|
||||
let nrg = duplicate(this.data.data.nrg)
|
||||
nrg.activated -= item.data.data.features.nrgcost.value
|
||||
this.update( {'data.nrg': nrg } )
|
||||
this.update({ 'data.nrg': nrg })
|
||||
}
|
||||
if (item.data.data.features.bonushealth.flag) {
|
||||
let health = duplicate(this.data.data.secondary.health)
|
||||
health.bonus -= item.data.data.features.bonushealth.value
|
||||
this.update( {'data.secondary.health': health } )
|
||||
this.update({ 'data.secondary.health': health })
|
||||
}
|
||||
if (item.data.data.features.bonusdelirium.flag) {
|
||||
let delirium = duplicate(this.data.data.delirium.delirium)
|
||||
delirium.bonus -= item.data.data.features.bonusdelirium.value
|
||||
this.update( {'data.secondary.delirium': delirium } )
|
||||
this.update({ 'data.secondary.delirium': delirium })
|
||||
}
|
||||
if (item.data.data.features.bonusnrg.flag) {
|
||||
let nrg = duplicate(this.data.data.nrg)
|
||||
nrg.mod -= item.data.data.features.bonusnrg.value
|
||||
this.update( {'data.nrg': nrg } )
|
||||
this.update({ 'data.nrg': nrg })
|
||||
}
|
||||
this.disableWeaverPerk(item)
|
||||
}
|
||||
if ( status == "activated") {
|
||||
if (status == "activated") {
|
||||
// Add effects linked to the perk
|
||||
let effects = []
|
||||
for( let effect of item.data.data.effectsgained) {
|
||||
for (let effect of item.data.data.effectsgained) {
|
||||
effect.data.perkId = itemId // Link to the perk, in order to dynamically remove them
|
||||
effect.data.isUsed = false // Flag to indicate removal when used in a roll window
|
||||
effects.push( effect )
|
||||
effects.push(effect)
|
||||
}
|
||||
if ( effects.length) {
|
||||
await this.createEmbeddedDocuments('Item', effects )
|
||||
if (effects.length) {
|
||||
await this.createEmbeddedDocuments('Item', effects)
|
||||
}
|
||||
// Manage additional flags
|
||||
if ( item.data.data.features.nrgcost.flag ) {
|
||||
if (this.data.data.nrg.value >= item.data.data.features.nrgcost.value) {
|
||||
if (item.data.data.features.nrgcost.flag) {
|
||||
if (this.data.data.nrg.value >= item.data.data.features.nrgcost.value) {
|
||||
let nrg = duplicate(this.data.data.nrg)
|
||||
nrg.activated += item.data.data.features.nrgcost.value
|
||||
nrg.value -= item.data.data.features.nrgcost.value
|
||||
this.update( {'data.nrg': nrg } )
|
||||
this.update({ 'data.nrg': nrg })
|
||||
} else {
|
||||
updateOK = false
|
||||
ui.notifications.warn("Not enough NRG to activate the Perk " + item.name)
|
||||
@ -419,18 +534,19 @@ export class PegasusActor extends Actor {
|
||||
if (item.data.data.features.bonushealth.flag) {
|
||||
let health = duplicate(this.data.data.secondary.health)
|
||||
health.bonus += item.data.data.features.bonushealth.value
|
||||
this.update( {'data.secondary.health': health } )
|
||||
this.update({ 'data.secondary.health': health })
|
||||
}
|
||||
if (item.data.data.features.bonusdelirium.flag) {
|
||||
let delirium = duplicate(this.data.data.delirium.delirium)
|
||||
delirium.bonus += item.data.data.features.bonusdelirium.value
|
||||
this.update( {'data.secondary.delirium': delirium } )
|
||||
this.update({ 'data.secondary.delirium': delirium })
|
||||
}
|
||||
if (item.data.data.features.bonusnrg.flag) {
|
||||
let nrg = duplicate(this.data.data.nrg)
|
||||
nrg.mod += item.data.data.features.bonusnrg.value
|
||||
this.update( {'data.nrg': nrg } )
|
||||
this.update({ 'data.nrg': nrg })
|
||||
}
|
||||
this.enableWeaverPerk(item)
|
||||
}
|
||||
if (updateOK) {
|
||||
this.updateEmbeddedDocuments('Item', [{ _id: item.id, 'data.status': status }])
|
||||
@ -454,7 +570,7 @@ export class PegasusActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async computeNRGHealth() {
|
||||
if ( this.isToken ) return
|
||||
if (this.isToken) return
|
||||
if (this.isOwner || game.user.isGM) {
|
||||
let updates = {}
|
||||
let phyDiceValue = PegasusUtility.getDiceValue(this.data.data.statistics.phy.value) + this.data.data.secondary.health.bonus + this.data.data.statistics.phy.mod;
|
||||
@ -515,10 +631,10 @@ export class PegasusActor extends Actor {
|
||||
|
||||
// Update current hindrance level
|
||||
let hindrance = this.data.data.combat.hindrancedice
|
||||
if ( this.data.data.secondary.health.value < 0) {
|
||||
if (this.data.data.secondary.health.value < 0) {
|
||||
hindrance += Math.abs(this.data.data.secondary.health.value)
|
||||
}
|
||||
if ( this.data.data.secondary.delirium.value < 0) {
|
||||
if (this.data.data.secondary.delirium.value < 0) {
|
||||
hindrance += Math.abs(this.data.data.secondary.delirium.value)
|
||||
}
|
||||
this.data.data.combat.hindrancedice = hindrance
|
||||
@ -573,23 +689,23 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
// manage status bonus
|
||||
if (ability.data.statusaffected != "notapplicable") {
|
||||
if ( ability.data.statusaffected == 'nrg' ) {
|
||||
let nrg = duplicate( this.data.data.nrg)
|
||||
if (ability.data.statusaffected == 'nrg') {
|
||||
let nrg = duplicate(this.data.data.nrg)
|
||||
nrg.mod += Number(ability.data.statusmodifier)
|
||||
updates[`data.nrg`] = nrg
|
||||
}
|
||||
if ( ability.data.statusaffected == 'health' ) {
|
||||
let health = duplicate( this.data.data.secondary.health)
|
||||
if (ability.data.statusaffected == 'health') {
|
||||
let health = duplicate(this.data.data.secondary.health)
|
||||
health.bonus += Number(ability.data.statusmodifier)
|
||||
updates[`data.secondary.health`] = health
|
||||
}
|
||||
if ( ability.data.statusaffected == 'delirium' ) {
|
||||
let delirium = duplicate( this.data.data.secondary.delirium)
|
||||
if (ability.data.statusaffected == 'delirium') {
|
||||
let delirium = duplicate(this.data.data.secondary.delirium)
|
||||
delirium.bonus += Number(ability.data.statusmodifier)
|
||||
updates[`data.secondary.delirium`] = delirium
|
||||
}
|
||||
}
|
||||
if ( directUpdate ) {
|
||||
if (directUpdate) {
|
||||
await this.update(updates)
|
||||
}
|
||||
let newItems = []
|
||||
@ -617,7 +733,7 @@ export class PegasusActor extends Actor {
|
||||
for (let armor of ability.data.armorgained) {
|
||||
newItems.push(armor);
|
||||
}
|
||||
}
|
||||
}
|
||||
await this.createEmbeddedDocuments('Item', newItems)
|
||||
}
|
||||
|
||||
@ -672,18 +788,18 @@ export class PegasusActor extends Actor {
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
addHindrancesList( effectsList ) {
|
||||
addHindrancesList(effectsList) {
|
||||
if (this.data.data.combat.stunlevel > 0) {
|
||||
effectsList.push( { label: "Stun Hindrance", type: "hindrance", applied: false, value: this.data.data.combat.stunlevel } )
|
||||
effectsList.push({ label: "Stun Hindrance", type: "hindrance", applied: false, value: this.data.data.combat.stunlevel })
|
||||
}
|
||||
if (this.data.data.combat.hindrancedice > 0) {
|
||||
effectsList.push( { label: "Health/Delirium Hindrance", type: "hindrance", applied: false, value: this.data.data.combat.hindrancedice } )
|
||||
effectsList.push({ label: "Health/Delirium Hindrance", type: "hindrance", applied: false, value: this.data.data.combat.hindrancedice })
|
||||
}
|
||||
let effects = this.data.items.filter( item => item.type == 'effect' )
|
||||
for( let effect of effects) {
|
||||
let effects = this.data.items.filter(item => item.type == 'effect')
|
||||
for (let effect of effects) {
|
||||
effect = duplicate(effect)
|
||||
if (effect.data.hindrance) {
|
||||
effectsList.push( { label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel } )
|
||||
effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -693,52 +809,52 @@ export class PegasusActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------- */
|
||||
addEffects( rollData) {
|
||||
let effects = this.data.items.filter( item => item.type == 'effect' )
|
||||
for( let effect of effects) {
|
||||
addEffects(rollData) {
|
||||
let effects = this.data.items.filter(item => item.type == 'effect')
|
||||
for (let effect of effects) {
|
||||
effect = duplicate(effect)
|
||||
if ( !effect.data.hindrance
|
||||
&& effect.data.stataffected != "notapplicable"
|
||||
&& effect.data.stataffected != "special") {
|
||||
rollData.effectsList.push( { label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel } )
|
||||
if (!effect.data.hindrance
|
||||
&& effect.data.stataffected != "notapplicable"
|
||||
&& effect.data.stataffected != "special") {
|
||||
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
addArmorsShields( rollData, statKey = "none", useShield = false) {
|
||||
addArmorsShields(rollData, statKey = "none", useShield = false) {
|
||||
if (statKey == 'phy') {
|
||||
let armors = this.getArmors()
|
||||
for (let armor of armors) {
|
||||
rollData.armorsList.push( {label: `Armor ${armor.name}`, type: "other", applied: false, value: armor.data.resistance } )
|
||||
rollData.armorsList.push({ label: `Armor ${armor.name}`, type: "other", applied: false, value: armor.data.resistance })
|
||||
}
|
||||
}
|
||||
if (useShield ) {
|
||||
if (useShield) {
|
||||
let shields = this.data.items.filter(item => item.type == "shield" && item.data.data.equipped)
|
||||
for (let sh of shields) {
|
||||
rollData.armorsList.push( {label: `Shield ${sh.name}`, type: "other", applied: false, value: sh.data.data.level } )
|
||||
rollData.armorsList.push({ label: `Shield ${sh.name}`, type: "other", applied: false, value: sh.data.data.level })
|
||||
}
|
||||
}
|
||||
}
|
||||
addWeapons(rollData, statKey) {
|
||||
let weapons = this.getWeapons()
|
||||
let weapons = this.getWeapons()
|
||||
for (let weapon of weapons) {
|
||||
if (weapon.data.equipped && weapon.data.statistic == statKey) {
|
||||
rollData.weaponsList.push( {label: `Attack ${weapon.name}`, type: "attack", applied: false, weapon: weapon, value: 0 } )
|
||||
rollData.weaponsList.push({ label: `Attack ${weapon.name}`, type: "attack", applied: false, weapon: weapon, value: 0 })
|
||||
}
|
||||
if (weapon.data.equipped && weapon.data.enhanced && weapon.data.enhancedstat == statKey) {
|
||||
rollData.weaponsList.push( {label: `Enhanced Attack ${weapon.name}`, type: "enhanced", applied: false, weapon: weapon, value: weapon.data.enhancedlevel } )
|
||||
if (weapon.data.equipped && weapon.data.enhanced && weapon.data.enhancedstat == statKey) {
|
||||
rollData.weaponsList.push({ label: `Enhanced Attack ${weapon.name}`, type: "enhanced", applied: false, weapon: weapon, value: weapon.data.enhancedlevel })
|
||||
}
|
||||
if (weapon.data.equipped && weapon.data.damagestatistic == statKey) {
|
||||
rollData.weaponsList.push( {label: `Damage ${weapon.name}`, type: "damage", applied: false, weapon: weapon, value: weapon.data.damage } )
|
||||
rollData.weaponsList.push({ label: `Damage ${weapon.name}`, type: "damage", applied: false, weapon: weapon, value: weapon.data.damage })
|
||||
}
|
||||
}
|
||||
}
|
||||
addEquipments(rollData, statKey) {
|
||||
let equipments = this.getEquipmentsOnly()
|
||||
let equipments = this.getEquipmentsOnly()
|
||||
for (let equip of equipments) {
|
||||
if (equip.data.equipped && equip.data.stataffected == statKey) {
|
||||
rollData.equipmentsList.push( {label: `Item ${equip.name}`, type: "item", applied: false, equip: equip, value: equip.data.level } )
|
||||
rollData.equipmentsList.push({ label: `Item ${equip.name}`, type: "item", applied: false, equip: equip, value: equip.data.level })
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -752,20 +868,20 @@ export class PegasusActor extends Actor {
|
||||
rollData.img = this.img
|
||||
rollData.activePerks = duplicate(this.getActivePerks())
|
||||
|
||||
if ( statKey) {
|
||||
if (statKey) {
|
||||
rollData.statKey = statKey
|
||||
rollData.stat = this.getStat(statKey)
|
||||
rollData.statDicesLevel = rollData.stat.value
|
||||
rollData.statMod = rollData.stat.mod
|
||||
rollData.statMod = rollData.stat.mod
|
||||
rollData.specList = this.getRelevantSpec(statKey)
|
||||
rollData.selectedSpec = "0"
|
||||
}
|
||||
}
|
||||
|
||||
this.addEffects( rollData)
|
||||
this.addEffects(rollData)
|
||||
this.addArmorsShields(rollData, statKey, useShield)
|
||||
this.addWeapons(rollData, statKey, useShield)
|
||||
this.addEquipments(rollData, statKey)
|
||||
|
||||
|
||||
return rollData
|
||||
}
|
||||
|
||||
@ -828,7 +944,7 @@ export class PegasusActor extends Actor {
|
||||
let rollData = this.getCommonRollData(spec.data.statistic)
|
||||
rollData.mode = "spec"
|
||||
rollData.title = `Spec. : ${spec.name} `
|
||||
rollData.specList = [ spec ]
|
||||
rollData.specList = [spec]
|
||||
rollData.selectedSpec = spec._id
|
||||
rollData.specDicesLevel = spec.data.level
|
||||
this.startRoll(rollData)
|
||||
@ -838,7 +954,7 @@ export class PegasusActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollMR( isInit = false, combatId = 0, combatantId = 0) {
|
||||
async rollMR(isInit = false, combatId = 0, combatantId = 0) {
|
||||
let mr = duplicate(this.data.data.mr)
|
||||
if (mr) {
|
||||
mr.dice = PegasusUtility.getDiceFromLevel(mr.value);
|
||||
|
Reference in New Issue
Block a user