Review fight automation + alchimie
This commit is contained in:
@ -126,7 +126,7 @@ export class BoLRoll {
|
||||
ui.notifications.warn("Unable to find Alchemy !");
|
||||
return;
|
||||
}
|
||||
alchemy = dupicate(alchemy)
|
||||
alchemy = duplicate(alchemy)
|
||||
let alchemyData = alchemy.data
|
||||
if (alchemyData.properties.pccurrent < alchemyData.properties.pccost) {
|
||||
ui.notifications.warn("Pas assez de Points de Cration investis dans la Préparation !")
|
||||
@ -156,7 +156,6 @@ export class BoLRoll {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static spellCheckWithSpell( actor, spell ) {
|
||||
let spellData = spell.data
|
||||
let spellDef = {
|
||||
mode: "spell",
|
||||
actorId: actor.id,
|
||||
@ -168,14 +167,14 @@ export class BoLRoll {
|
||||
ppCurrent: Number(actor.data.data.resources.power.value),
|
||||
careerBonus: actor.getSorcererBonus(),
|
||||
ppCostArmor: actor.getPPCostArmor(),
|
||||
ppCost: Number(spell.data.data.properties.ppcost),
|
||||
mod: Number(spellData.properties.difficulty),
|
||||
ppCost: Number(spell.data.properties.ppcost),
|
||||
mod: Number(spell.data.properties.difficulty),
|
||||
armorAgiMalus: actor.getArmorAgiMalus(),
|
||||
armorInitMalus: actor.getArmorInitMalus(),
|
||||
label: spell.name,
|
||||
description: game.i18n.localize('BOL.ui.focusSpell') + " : " + spell.name,
|
||||
}
|
||||
console.log("SPELL!", spellDef)
|
||||
//console.log("SPELL!", spellDef)
|
||||
return this.displayRollDialog(spellDef)
|
||||
}
|
||||
|
||||
@ -464,10 +463,10 @@ export class BoLDefaultRoll {
|
||||
this.rollData.isFumble = false;
|
||||
}
|
||||
if (this.rollData.optionsId) {
|
||||
$(`#${this.rollData.optionsId}`).hide() // Hide the options roll buttons
|
||||
BoLUtility.cleanupButtons( this.rollData.optionsId)
|
||||
}
|
||||
if (this.rollData.applyId) {
|
||||
$(`#${this.rollData.applyId}`).hide() // Hide the options roll buttons
|
||||
BoLUtility.cleanupButtons( this.rollData.applyId)
|
||||
}
|
||||
this.rollData.optionsId = randomID(16)
|
||||
this.rollData.applyId = randomID(16)
|
||||
@ -499,7 +498,7 @@ export class BoLDefaultRoll {
|
||||
actor.registerInit(r.total, this.rollData.isCritical, this.rollData.isFumble)
|
||||
}
|
||||
if (this.rollData.isSuccess && this.rollData.mode == "spell") { // PP cost management
|
||||
actor.spendPowerPoint(this.rollData.ppCost + this.rollData.ppCostArmor)
|
||||
this.rollData.remainingPP = actor.spendPowerPoint(this.rollData.ppCost + this.rollData.ppCostArmor)
|
||||
}
|
||||
if (this.rollData.mode == "alchemy") { // PP cost management
|
||||
actor.resetAlchemyStatus(this.rollData.alchemy._id)
|
||||
@ -598,7 +597,6 @@ export class BoLDefaultRoll {
|
||||
if (this.rollData.damageMode == 'damage-plus-12') {
|
||||
bonusDmg = 12
|
||||
}
|
||||
console.log("ROLLWEAPON: ", this.rollData)
|
||||
let attrDamageValue = this.getDamageAttributeValue(this.rollData.weapon.data.properties.damageAttribute)
|
||||
let weaponFormula = BoLUtility.getDamageFormula(this.rollData.weapon.data, this.rollData.fightOption)
|
||||
|
||||
@ -611,7 +609,7 @@ export class BoLDefaultRoll {
|
||||
await this.rollData.damageRoll.roll({ "async": false })
|
||||
this.rollData.damageTotal = this.rollData.damageRoll.total
|
||||
}
|
||||
$(`#${this.rollData.optionsId}`).hide() // Hide the options roll buttons
|
||||
BoLUtility.cleanupButtons(this.rollData.optionsId)
|
||||
this.sendDamageMessage()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user