diff --git a/lang/en.json b/lang/en.json index c85c41f3..fc41ce86 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1016,7 +1016,7 @@ "physicalDamage": "Physical Damage", "magicalDamage": "Magical Damage", "primaryDamageBonus": "Primary Weapon Damage", - "primaryDamageDice": "Primary Weapon Extra Dice" + "primaryDamageDice": "Primary Weapon Extra Damage Dice" }, "DamageResistance": { "none": "None", @@ -1115,13 +1115,28 @@ }, "Rules": { "damageReduction": { - "increasePerArmorMark": "Damage Reduction per Armor Slot", + "increasePerArmorMark": { + "label": "Damage Reduction per Armor Slot", + "hint": "A used armor slot normally reduces damage by one step. This value increases the number of steps damage is reduced by." + }, "maxArmorMarkedBonus": "Max Armor Used", - "maxArmorMarkedStress": "Max Armor Used With Stress", + "maxArmorMarkedStress": { + "label": "Max Armor Used With Stress", + "hint": "If this value is set you can use up to that much stress to spend additional Armor Marks beyond your normal maximum." + }, "stress": { - "severe": "Stress Damage Reduction: Severe", - "major": "Stress Damage Reduction: Major", - "minor": "Stress Damage Reduction: Minor" + "severe": { + "label": "Stress Damage Reduction: Severe", + "hint": "The cost in stress you can pay to reduce severe damage down to major." + }, + "major": { + "label": "Stress Damage Reduction: Major", + "hint": "The cost in stress you can pay to reduce major damage down to minor." + }, + "minor": { + "label": "Stress Damage Reduction: Minor", + "hint": "The cost in stress you can pay to reduce minor damage to none." + } } } }, diff --git a/module/applications/sheets-configs/activeEffectConfig.mjs b/module/applications/sheets-configs/activeEffectConfig.mjs index 1d2787ec..8574a5db 100644 --- a/module/applications/sheets-configs/activeEffectConfig.mjs +++ b/module/applications/sheets-configs/activeEffectConfig.mjs @@ -73,6 +73,9 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac const element = document.createElement('li'); element.innerHTML = `${beforeText}${matchText ? `${matchText}` : ''}${after}`; + if (item.hint) { + element.dataset.tooltip = game.i18n.localize(item.hint); + } return element; }, diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index 10731b3b..b4647e4e 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -179,7 +179,8 @@ export default class DhCharacter extends BaseDataActor { required: true, integer: true, initial: 0, - label: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedStress' + label: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedStress.label', + hint: 'DAGGERHEART.GENERAL.Rules.damageReduction.maxArmorMarkedStress.hint' }) }), stressDamageReduction: new fields.SchemaField({ @@ -190,7 +191,8 @@ export default class DhCharacter extends BaseDataActor { increasePerArmorMark: new fields.NumberField({ integer: true, initial: 1, - label: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark' + label: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark.label', + hint: 'DAGGERHEART.GENERAL.Rules.damageReduction.increasePerArmorMark.hint' }), magical: new fields.BooleanField({ initial: false }), physical: new fields.BooleanField({ initial: false }) diff --git a/module/documents/token.mjs b/module/documents/token.mjs index edb0e404..4592c843 100644 --- a/module/documents/token.mjs +++ b/module/documents/token.mjs @@ -21,8 +21,10 @@ export default class DHToken extends TokenDocument { const a = v.join('.'); if (invalidAttributes.some(x => a.startsWith(x))) return acc; - const modelLabel = model ? game.i18n.localize(model.schema.getField(a).label) : null; - acc.push({ group: valueGroup, value: a, label: modelLabel ? modelLabel : a }); + const field = model ? model.schema.getField(a) : null; + const modelLabel = field ? game.i18n.localize(field.label) : null; + const hint = field ? game.i18n.localize(field.hint) : null; + acc.push({ group: valueGroup, value: a, label: modelLabel ? modelLabel : a, hint: hint }); return acc; }, []);