From 058bc9042a5d7a518382537ea54a3cc2277b50e0 Mon Sep 17 00:00:00 2001 From: phBalance Date: Fri, 5 Jan 2024 19:35:39 -0700 Subject: [PATCH] fix(description): improve contact and disadvantage descriptions --- CHANGELOG.md | 3 ++- module/item/item.js | 64 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 502ccec8..bf7eb2ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,11 @@ - Fix for movement powers toggles. [#533](https://github.com/dmdorman/hero6e-foundryvtt/issues/533) - Compound powers now show proper indices, small description and cost changes for numerous, mostly 5e, powers. - Mental defense is now correctly calculated for 5e. +- Improve disadvantage descriptions although they still have some extra parentheses. - Damage calculations with an additional term (i.e 1/2 die) are no longer short changed for regular damage but they are still a few other situations. Partially resolves [#508](https://github.com/dmdorman/hero6e-foundryvtt/issues/508) but there are still situations that aren't fixed (e.g. 0d6+1 or partial terms in explosions). - Add explosions for 5e (without proper drop off calculations). - Movement power improvements for 5e (pointing, description, and added gliding). -- Description improvements for invisibility and darkness. [#573](https://github.com/dmdorman/hero6e-foundryvtt/issues/573) +- Description improvements for contact, invisibility and darkness. [#573](https://github.com/dmdorman/hero6e-foundryvtt/issues/573) - Endurance tracking improvements - No free recovery during combat - The first character to act in combat won't get dinged for active endurance using powers twice. diff --git a/module/item/item.js b/module/item/item.js index c89671bf..6f5b126e 100644 --- a/module/item/item.js +++ b/module/item/item.js @@ -1867,10 +1867,32 @@ export class HeroSystem6eItem extends Item { break; + case "CONTACT": + system.description = `${system.ALIAS}: `; + break; + + case "ACCIDENTALCHANGE": + case "DEPENDENCE": + case "DEPENDENTNPC": + case "DISTINCTIVEFEATURES": + case "ENRAGED": + case "HUNTED": + case "MONEYDISAD": + case "PSYCHOLOGICALLIMITATION": + case "PHYSICALLIMITATION": + case "RIVALRY": + case "REPUTATION": + case "SOCIALLIMITATION": + case "SUSCEPTIBILITY": + case "UNLUCK": + // Disadvantage: blah blah blah + system.description = `${system.ALIAS}: `; + break; + case "TRANSPORT_FAMILIARITY": //TF: Custom Adder, Small Motorized Ground Vehicles //TF: Equines, Small Motorized Ground Vehicles - system.description = system.ALIAS + ": "; + system.description = `${system.ALIAS}: `; break; case "MENTAL_COMBAT_LEVELS": @@ -2167,7 +2189,13 @@ export class HeroSystem6eItem extends Item { for (let adder of system?.ADDER || []) { switch (adder.XMLID) { case "DIMENSIONS": - system.description += ", " + adder.ALIAS; + system.description += `, ${adder.ALIAS}`; + break; + + case "ATTACK": + case "USEFUL": + case "EXTENDEDBREATHING": + system.description += `${adder.ALIAS} ${adder.OPTION_ALIAS}`; break; case "ADDITIONALPD": @@ -2175,18 +2203,34 @@ export class HeroSystem6eItem extends Item { case "DEFBONUS": break; - case "EXTENDEDBREATHING": - system.description += - adder.ALIAS + " " + adder.OPTION_ALIAS; - break; - + case "APPEARANCE": + case "CAPABILITIES": + case "CHANCETOGO": + case "CHANCETORECOVER": + case "CIRCUMSTANCES": case "CONCEALABILITY": + case "CONDITION": + case "DAMAGE": + case "DESCRIPTION": + case "DICE": + case "EFFECT": + case "EFFECTS": + case "FIERCENESS": + case "IMPAIRS": + case "INTENSITY": + case "KNOWLEDGE": + case "LEVEL": + case "MOTIVATION": + case "OCCUR": + case "OCCURS": + case "POWER": + case "RECOGNIZED": case "REACTION": case "SENSING": case "SITUATION": - case "INTENSITY": - case "EFFECTS": - case "OCCUR": + case "SUBSTANCE": + case "TIME": + case "USEFULNESS": _adderArray.push(adder.OPTION_ALIAS.replace("(", "")); break;