diff --git a/module/applications/sheets-configs/activeEffectConfig.mjs b/module/applications/sheets-configs/activeEffectConfig.mjs index 09ef12d2..fab2f122 100644 --- a/module/applications/sheets-configs/activeEffectConfig.mjs +++ b/module/applications/sheets-configs/activeEffectConfig.mjs @@ -192,10 +192,6 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac ...conditional, ...game.system.api.data.activeEffects.EffectConditional.getConditionalFieldUseage(conditional.type) })); - partContext.statusChoices = Object.values(CONFIG.statusEffects).map(x => ({ - id: x.id, - label: x.name - })); break; case 'changes': const fields = this.document.system.schema.fields.changes.element.fields; @@ -271,19 +267,6 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac event.target.name.endsWith('type') ) { const container = event.target.closest('.conditional-container'); - - const statusSelect = container.querySelector('.form-group.status-select'); - const attributeAuto = container.querySelector('.form-group.attribute-auto'); - if (event.target.value === CONFIG.DH.GENERAL.activeEffectConditionalType.status.id) { - statusSelect.classList.remove('not-visible'); - attributeAuto.classList.add('not-visible'); - } else { - statusSelect.classList.add('not-visible'); - attributeAuto.classList.remove('not-visible'); - } - statusSelect.querySelector('select').selectedIndex = '-1'; - attributeAuto.querySelector('input').value = ''; - const { usesValue, usesComparator } = game.system.api.data.activeEffects.EffectConditional.getConditionalFieldUseage(event.target.value); diff --git a/module/data/activeEffect/effectConditional.mjs b/module/data/activeEffect/effectConditional.mjs index 7ed91e33..6191176b 100644 --- a/module/data/activeEffect/effectConditional.mjs +++ b/module/data/activeEffect/effectConditional.mjs @@ -21,14 +21,12 @@ export class EffectConditionals extends foundry.data.fields.ArrayField { x => !x.disabled && x.statuses.has(conditional.key) ); if (!hasStatus) return true; - break; case CONFIG.DH.GENERAL.activeEffectConditionalType.attribute.id: const actorValue = foundry.utils.getProperty(actor, conditional.key); const conditionalValue = game.system.api.documents.DhActiveEffect.effectSafeEval( itemAbleRollParse(conditional.value, actor) ); if (!compareValues(actorValue, conditionalValue, conditional.comparator)) return true; - break; } } diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index ad664f15..f407ac4d 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -8,9 +8,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { /**@override */ get isSuppressed() { - const conditionalSuspended = game.system.api.data.activeEffects.EffectConditionals.isConditionalSuspended(this); - if (conditionalSuspended) return true; - // If this is a copied effect from an attachment, never suppress it // (These effects have attachmentSource metadata) if (this.flags?.daggerheart?.attachmentSource) { @@ -29,6 +26,9 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { return isVaultSupressed || domainTouchedSupressed; } + const conditionalSuspended = game.system.api.data.activeEffects.EffectConditionals.isConditionalSuspended(this); + if (conditionalSuspended) return true; + return super.isSuppressed; } diff --git a/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json b/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json index bdfda213..e5f90fe4 100644 --- a/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json +++ b/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json @@ -28,36 +28,27 @@ "type": "withinRange", "target": "hostile", "range": "melee" - }, - "changes": [ - { - "key": "system.rules.damageReduction.thresholdImmunities.minor", - "value": 1, - "priority": null, - "type": "override" - } - ], - "duration": { - "type": "" - }, - "conditionals": [ - { - "type": "attribute", - "key": "system.resources.hitPoints.value", - "value": "@system.resources.hitPoints.max - 2", - "comparator": "gte", - "target": "self" - } - ] + } }, "_id": "UJTsJlnhi5Zi0XQ2", "img": "systems/daggerheart/assets/icons/domains/domain-card/bone.png", - "disabled": false, + "changes": [ + { + "key": "system.rules.damageReduction.thresholdImmunities.minor", + "mode": 5, + "value": "1", + "priority": null + } + ], + "disabled": true, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "description": "

When you have 2 or fewer Hit Points unmarked, you don’t take Minor damage.

", "origin": null, @@ -69,16 +60,6 @@ "_stats": { "compendiumSource": null }, - "start": { - "time": 0, - "combat": null, - "combatant": null, - "initiative": null, - "round": null, - "turn": null - }, - "showIcon": 1, - "folder": null, "_key": "!items.effects!zbxPl81kbWEegKQN.UJTsJlnhi5Zi0XQ2" } ], diff --git a/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json b/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json index 8b9524f5..dc25498b 100644 --- a/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json +++ b/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json @@ -30,40 +30,31 @@ "type": "withinRange", "target": "hostile", "range": "melee" - }, - "changes": [ - { - "key": "system.bonuses.damage.physical.bonus", - "value": "@system.levelData.level.current", - "priority": null, - "type": "add" - }, - { - "key": "system.bonuses.damage.magical.bonus", - "value": "@system.levelData.level.current", - "priority": null, - "type": "add" - } - ], - "duration": { - "type": "" - }, - "conditionals": [ - { - "type": "status", - "key": "vulnerable", - "value": "", - "comparator": "eq", - "target": "self" - } - ] + } }, - "disabled": false, + "changes": [ + { + "key": "system.bonuses.damage.physical.bonus", + "mode": 2, + "value": "@system.levelData.level.current", + "priority": null + }, + { + "key": "system.bonuses.damage.magical.bonus", + "mode": 2, + "value": "@system.levelData.level.current", + "priority": null + } + ], + "disabled": true, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "description": "

While you're Vulnerable, add your level to your damage rolls.

", "tint": "#ffffff", @@ -73,16 +64,6 @@ "_stats": { "compendiumSource": null }, - "start": { - "time": 0, - "combat": null, - "combatant": null, - "initiative": null, - "round": null, - "turn": null - }, - "showIcon": 1, - "folder": null, "_key": "!items.effects!uByM34yQlw38yf1V.HMx9uZ54mvMiH95x" } ], diff --git a/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json b/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json index 27a4f0d0..99b04487 100644 --- a/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json +++ b/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json @@ -26,36 +26,27 @@ "type": "withinRange", "target": "hostile", "range": "melee" - }, - "changes": [ - { - "key": "system.evasion", - "value": "@system.proficiency", - "priority": 21, - "type": "add" - } - ], - "duration": { - "type": "" - }, - "conditionals": [ - { - "type": "attribute", - "key": "system.resources.hope.value", - "value": "2", - "comparator": "gte", - "target": "self" - } - ] + } }, "_id": "0i7GVOvjH6bK5AUM", "img": "icons/magic/defensive/barrier-shield-dome-blue-purple.webp", + "changes": [ + { + "key": "system.evasion", + "mode": 2, + "value": "@system.proficiency", + "priority": 21 + } + ], "disabled": false, "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null }, "description": "

While you have at least 2 Hope, you add your Proficiency to your Evasion.

", "origin": null, @@ -67,16 +58,6 @@ "_stats": { "compendiumSource": null }, - "start": { - "time": 0, - "combat": null, - "combatant": null, - "initiative": null, - "round": null, - "turn": null - }, - "showIcon": 1, - "folder": null, "_key": "!items.effects!oirsCnN66GOlK3Fa.0i7GVOvjH6bK5AUM" } ], diff --git a/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json b/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json index dfd3223c..5421f1fd 100644 --- a/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json +++ b/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json @@ -16,72 +16,7 @@ "artist": "" } }, - "effects": [ - { - "name": "Rise To The Challenge", - "type": "base", - "system": { - "changes": [ - { - "key": "system.rules.dualityRoll.defaultHopeDice", - "type": "upgrade", - "value": 20, - "priority": null, - "phase": "initial" - } - ], - "conditionals": [ - { - "type": "attribute", - "key": "system.resources.hitPoints.value", - "value": "@system.resources.hitPoints.max - 2", - "comparator": "gte", - "target": "self" - } - ], - "duration": { - "description": "", - "type": "" - }, - "rangeDependence": { - "enabled": false, - "type": "withinRange", - "target": "hostile", - "range": "melee" - } - }, - "_id": "MA744uJrGMQCDywg", - "img": "icons/magic/control/debuff-energy-hold-levitate-yellow.webp", - "disabled": false, - "start": { - "time": 0, - "combat": null, - "combatant": null, - "initiative": null, - "round": null, - "turn": null - }, - "duration": { - "value": null, - "units": "seconds", - "expiry": null, - "expired": false - }, - "description": "

While you have 2 or fewer Hit Points unmarked, you can roll a d20 as your Hope Die.

", - "origin": null, - "tint": "#ffffff", - "transfer": true, - "statuses": [], - "showIcon": 1, - "folder": null, - "sort": 0, - "flags": {}, - "_stats": { - "compendiumSource": null - }, - "_key": "!items.effects!dcutk8RVOJ2sEkO1.MA744uJrGMQCDywg" - } - ], + "effects": [], "sort": 0, "ownership": { "default": 0, diff --git a/templates/sheets/activeEffect/conditionals.hbs b/templates/sheets/activeEffect/conditionals.hbs index 0265eaae..80fdf445 100644 --- a/templates/sheets/activeEffect/conditionals.hbs +++ b/templates/sheets/activeEffect/conditionals.hbs @@ -9,24 +9,7 @@
{{!-- {{formGroup ../systemFields.conditionals.element.fields.target value=conditional.target name=(concat "system.conditionals." index ".target") localize=true }} --}} {{formGroup ../systemFields.conditionals.element.fields.type value=conditional.type name=(concat "system.conditionals." index ".type") localize=true }} - -
- - -
- -
-
- -
- - -
- -
-
+ {{formGroup ../systemFields.conditionals.element.fields.key value=conditional.key name=(concat "system.conditionals." index ".key") localize=true }}