Gods, screen and bugfixes
This commit is contained in:
@@ -312,13 +312,16 @@ export class BoLActor extends Actor {
|
||||
|
||||
/*-------------------------------------------- */
|
||||
async manageHealthState() {
|
||||
if (this.data.data.resources.hp.value <= 0 && this.data.lastHP != this.data.data.resources.hp.value) {
|
||||
this.data.lastHP = this.data.data.resources.hp.value
|
||||
ChatMessage.create({
|
||||
alias: this.name,
|
||||
whisper: BoLUtility.getWhisperRecipientsAndGMs(this.name),
|
||||
content: await renderTemplate('systems/bol/templates/chat/chat-vitality-zero.hbs', { name: this.name, hp: this.data.lastHP} )
|
||||
})
|
||||
let lastHP = await this.getFlag("world", "lastHP")
|
||||
if ( lastHP != this.data.data.resources.hp.value ) {
|
||||
await this.setFlag("world", "lastHP", this.data.data.resources.hp.value)
|
||||
if (this.data.data.resources.hp.value <= 0 ) {
|
||||
ChatMessage.create({
|
||||
alias: this.name,
|
||||
whisper: BoLUtility.getWhisperRecipientsAndGMs(this.name),
|
||||
content: await renderTemplate('systems/bol/templates/chat/chat-vitality-zero.hbs', { name: this.name, hp: this.data.data.resources.hp.value} )
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -94,7 +94,6 @@ export class BoLRoll {
|
||||
mod: 0,
|
||||
label: (weapon.name) ? weapon.name : game.i18n.localize('BOL.ui.noWeaponName'),
|
||||
description: actor.name + " - " + game.i18n.localize('BOL.ui.weaponAttack'),
|
||||
adv: "2",
|
||||
}
|
||||
console.debug("WEAPON!", attackDef, weaponData);
|
||||
return this.displayRollDialog(attackDef);
|
||||
@@ -313,8 +312,8 @@ export class BoLRoll {
|
||||
ui.notifications.warn("Pas assez de Points de Pouvoir !")
|
||||
return
|
||||
}
|
||||
|
||||
rollData.registerInit = (rollData.aptKey == 'init') ? $('#register-init').is(":checked") : false;
|
||||
|
||||
rollData.registerInit = (rollData.aptitude && rollData.aptitude.key == 'init') ? $('#register-init').is(":checked") : false;
|
||||
|
||||
const isMalus = rollData.mDice > 0
|
||||
rollData.nbDice += (rollData.attackBonusDice) ? 1 : 0
|
||||
@@ -374,7 +373,7 @@ export class BoLDefaultRoll {
|
||||
}
|
||||
|
||||
if (this.rollData.registerInit) {
|
||||
this.rollData.actor.registerInit(r.total, this.rollData.isCritical);
|
||||
this.rollData.actor.registerInit(r.total, this.rollData.isCritical, this.rollData.isFumble)
|
||||
}
|
||||
if (this.rollData.isSuccess && this.rollData.mode == "spell") { // PP cost management
|
||||
this.rollData.actor.spendPowerPoint(this.rollData.ppCost)
|
||||
|
@@ -25,7 +25,8 @@ export class BoLCombatManager extends Combat {
|
||||
const combatant = this.combatants.get(ids[cId]);
|
||||
let fvttInit = 5
|
||||
if (combatant.actor.type == 'character') {
|
||||
let initData = combatant.actor.getLastInitData();
|
||||
let initData = combatant.actor.getLastInitData()
|
||||
console.log("Init data !!!", initData)
|
||||
if (initData.isLegendary) {
|
||||
fvttInit = 10
|
||||
} else if (initData.isCritical) {
|
||||
|
@@ -253,7 +253,8 @@ BOL.featureSubtypes = {
|
||||
"career" : "BOL.featureSubtypes.career",
|
||||
"boon" : "BOL.featureSubtypes.boon",
|
||||
"flaw" : "BOL.featureSubtypes.flaw",
|
||||
"language" : "BOL.featureSubtypes.language"
|
||||
"language" : "BOL.featureSubtypes.language",
|
||||
"godsfaith" : "BOL.featureSubtypes.gods"
|
||||
}
|
||||
|
||||
BOL.itemIcons = {
|
||||
|
Reference in New Issue
Block a user