Fixed armor healing (#600)

This commit is contained in:
WBHarry 2025-08-05 14:39:24 +02:00 committed by GitHub
parent 3984417a17
commit d80b5d158d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 27 additions and 27 deletions

View file

@ -897,7 +897,7 @@
"name": "Hope",
"abbreviation": "HO"
},
"armorSlot": {
"armor": {
"name": "Armor Slot",
"abbreviation": "AS"
},

View file

@ -148,10 +148,10 @@ export const healingTypes = {
label: 'DAGGERHEART.CONFIG.HealingType.hope.name',
abbreviation: 'DAGGERHEART.CONFIG.HealingType.hope.abbreviation'
},
armorSlot: {
id: 'armorSlot',
label: 'DAGGERHEART.CONFIG.HealingType.armorSlot.name',
abbreviation: 'DAGGERHEART.CONFIG.HealingType.armorSlot.abbreviation'
armor: {
id: 'armor',
label: 'DAGGERHEART.CONFIG.HealingType.armor.name',
abbreviation: 'DAGGERHEART.CONFIG.HealingType.armor.abbreviation'
},
fear: {
id: 'fear',
@ -262,7 +262,7 @@ export const defaultRestOptions = {
actionType: 'action',
chatDisplay: false,
healing: {
applyTo: healingTypes.armorSlot.id,
applyTo: healingTypes.armor.id,
value: {
custom: {
enabled: true,
@ -350,7 +350,7 @@ export const defaultRestOptions = {
actionType: 'action',
chatDisplay: false,
healing: {
applyTo: healingTypes.armorSlot.id,
applyTo: healingTypes.armor.id,
value: {
custom: {
enabled: true,

View file

@ -675,7 +675,7 @@ export const weaponFeatures = {
},
cost: [
{
type: 'armorSlot',
type: 'armor',
value: 1
}
],

View file

@ -68,7 +68,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
getTargetList() {
const targets = this.system.hitTargets;
return targets.map(target => game.canvas.tokens.documentCollection.find(t => t.actor.uuid === target.actorId));
return targets.map(target => game.canvas.tokens.documentCollection.find(t => t.actor?.uuid === target.actorId));
}
async onDamage(event) {
@ -88,7 +88,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
if (targets.length === 0)
return ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected'));
for (let target of targets) {
let damages = foundry.utils.deepClone(this.system.damage);
if (
@ -139,9 +139,9 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
}
consumeOnSuccess() {
if(!this.system.successConsumed && !this.system.targetSelection) {
if (!this.system.successConsumed && !this.system.targetSelection) {
const action = this.system.action;
if(action) action.consume(this.system, true);
if (action) action.consume(this.system, true);
}
}
}

View file

@ -490,7 +490,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -255,7 +255,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -291,7 +291,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"type": [],
"base": false,
"resultBased": false,

View file

@ -298,7 +298,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -296,7 +296,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"type": [],
"base": false,
"resultBased": false,

View file

@ -365,7 +365,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -250,7 +250,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"type": [],
"base": false,
"resultBased": false,

View file

@ -42,7 +42,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -36,7 +36,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -123,7 +123,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -36,7 +36,7 @@
"dice": "d6",
"bonus": null
},
"applyTo": "armorSlot",
"applyTo": "armor",
"base": false,
"resultBased": false,
"valueAlt": {

View file

@ -55,10 +55,10 @@
<div class="status-section">
<div class="status-number">
<div class='status-value'>
<p>{{document.system.proficiency}}</p>
<p>{{document.system.evasion}}</p>
</div>
<div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.proficiency"}}</h4>
<h4>{{localize "DAGGERHEART.GENERAL.evasion"}}</h4>
</div>
</div>
@ -91,10 +91,10 @@
<div class="status-number">
<div class='status-value'>
<p>{{document.system.evasion}}</p>
<p>{{document.system.proficiency}}</p>
</div>
<div class="status-label">
<h4>{{localize "DAGGERHEART.GENERAL.evasion"}}</h4>
<h4>{{localize "DAGGERHEART.GENERAL.proficiency"}}</h4>
</div>
</div>
</div>