diff --git a/src/module/actor/actor.js b/src/module/actor/actor.js index ff00843f..90066568 100644 --- a/src/module/actor/actor.js +++ b/src/module/actor/actor.js @@ -180,8 +180,6 @@ export class DemonlordActor extends Actor { // Health and Healing Rate system.characteristics.health.max += system.attributes.strength.value - - // Armor system.characteristics.defense = (system.bonuses.armor.fixed || system.attributes.agility.value + system.bonuses.armor.agility) // + system.characteristics.defense // Applied as ActiveEffect further down } @@ -190,6 +188,9 @@ export class DemonlordActor extends Actor { system.characteristics.defense = system.characteristics.defense || system.bonuses.armor.fixed || system.attributes.agility.value + system.bonuses.armor.agility } + // Insanity + if (this.type !== 'vehicle') system.characteristics.insanity.max += system.attributes.will.value + // --- Valid for all type of actors // Healing Rate system.characteristics.health.healingrate = system.characteristics.health.max / 4 @@ -200,8 +201,6 @@ export class DemonlordActor extends Actor { } // And then round down system.characteristics.health.healingrate = Math.floor(system.characteristics.health.healingrate) - // Insanity - system.characteristics.insanity.max += system.attributes.will.value // Final armor computation system.characteristics.defense += system.bonuses.armor.defense @@ -592,7 +591,8 @@ getTargetAttackBane(target) { for (let effect of this.appliedEffects) { const specialDuration = foundry.utils.getProperty(effect, `flags.${game.system.id}.specialDuration`) - if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete() + const animate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? true: false + if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete({animate:animate}) } Hooks.call('DL.RollAttack', { @@ -678,11 +678,8 @@ getTargetAttackBane(target) { for (let effect of this.appliedEffects) { const specialDuration = foundry.utils.getProperty(effect, `flags.${game.system.id}.specialDuration`) - const doNotAnimate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? false: true - if (specialDuration === 'NextD20Roll' || specialDuration === 'NextChallengeRoll') { - if (doNotAnimate) await effect?.delete({animate: false}) - else await effect?.delete() - } + const animate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? true: false + if (specialDuration === 'NextD20Roll' || specialDuration === 'NextChallengeRoll') await effect?.delete({animate:animate}) } return challengeRoll @@ -737,7 +734,8 @@ getTargetAttackBane(target) { for (let effect of this.appliedEffects) { const specialDuration = foundry.utils.getProperty(effect, `flags.${game.system.id}.specialDuration`) - if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete() + const animate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? true: false + if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete({animate:animate}) } return attackRoll @@ -823,7 +821,8 @@ getTargetAttackBane(target) { for (let effect of this.appliedEffects) { const specialDuration = foundry.utils.getProperty(effect, `flags.${game.system.id}.specialDuration`) - if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete() + const animate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? true: false + if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete({animate:animate}) } if (itemMacroEnabled) { @@ -945,7 +944,8 @@ getTargetAttackBane(target) { for (let effect of this.appliedEffects) { const specialDuration = foundry.utils.getProperty(effect, `flags.${game.system.id}.specialDuration`) - if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete() + const animate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? true: false + if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete({animate:animate}) } // Add concentration if it's in the spell duration @@ -1081,7 +1081,8 @@ getTargetAttackBane(target) { for (let effect of this.appliedEffects) { const specialDuration = foundry.utils.getProperty(effect, `flags.${game.system.id}.specialDuration`) - if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete() + const animate = foundry.utils.getProperty(effect, `flags.${game.system.id}.doNotAnimate`) === undefined ? true: false + if (specialDuration === 'NextD20Roll' || specialDuration === 'NextAttackRoll') await effect?.delete({animate:animate}) } if (itemMacroEnabled) { const defender = target?.actor diff --git a/src/templates/actor/tabs/creature-reference.hbs b/src/templates/actor/tabs/creature-reference.hbs index 515e3f45..77757912 100644 --- a/src/templates/actor/tabs/creature-reference.hbs +++ b/src/templates/actor/tabs/creature-reference.hbs @@ -2,7 +2,11 @@
{{actor.name}}
- {{localize "DL.CreatureDifficulty"}} {{system.difficulty}} + {{#unless (eq actor.type 'vehicle')}} + {{localize "DL.CreatureDifficulty"}} {{system.difficulty}} + {{else}} + {{localize "DL.VehiclePrice"}} {{system.price}} + {{/unless}}
@@ -17,29 +21,33 @@
- {{#if system.attributes.perception.immune}} - {{localize "DL.AttributePerception"}} – ; - {{else}} - {{localize "DL.AttributePerception"}}  {{system.attributes.perception.value}} ({{plusify system.attributes.perception.modifier}}); - {{/if}} - {{system.perceptionsenses}} + {{#unless (eq actor.type 'vehicle')}} + {{#if system.attributes.perception.immune}} + {{localize "DL.AttributePerception"}} – ; + {{else}} + {{localize "DL.AttributePerception"}}  {{system.attributes.perception.value}} ({{plusify system.attributes.perception.modifier}}); + {{/if}} + {{system.perceptionsenses}} + {{/unless}}
{{localize "DL.ArmorDefense"}} {{system.characteristics.defense}}{{#if system.armor}} ({{system.armor}}){{/if}};  {{localize "DL.CreatureHealth"}} {{system.characteristics.health.max}};  - {{localize "DL.CharInsanity"}} - {{#if system.characteristics.insanity.immune}} - –;  - {{else}} - {{system.characteristics.insanity.value}};  - {{/if}} - {{localize "DL.CharCorruption"}} - {{#if system.characteristics.corruption.immune}} - –  - {{else}} - {{system.characteristics.corruption.value}}  - {{/if}} + {{#unless (eq actor.type 'vehicle')}} + {{localize "DL.CharInsanity"}} + {{#if system.characteristics.insanity.immune}} + –;  + {{else}} + {{system.characteristics.insanity.value}};  + {{/if}} + {{localize "DL.CharCorruption"}} + {{#if system.characteristics.corruption.immune}} + –  + {{else}} + {{system.characteristics.corruption.value}}  + {{/if}} + {{/unless}}
{{#if system.attributes.strength.immune}} @@ -64,8 +72,19 @@ {{/if}}
- {{localize "DL.CharSpeed"}} {{system.characteristics.speed}} - {{system.speedtraits}} + {{#unless (eq actor.type 'vehicle')}} + {{localize "DL.CharSpeed"}} {{system.characteristics.speed}} + {{system.speedtraits}} + {{else}} + {{localize "DL.VehicleSpace"}} {{system.space}} {{localize "DL.VehicleMaximumSpeed"}} {{system.maximumspeed}}; + {{system.speedtraits}} +
+ {{localize "DL.VehicleCrew"}} {{system.crew}} +
+
+ {{localize "DL.VehicleCargo"}} {{system.cargo}} +
+ {{/unless}}
{{#each actor.features as |item id|}} {{#unless (dlHideItem2025Trait item.name)}}