From d125178f67fef37d9187b4576f3cd34be6c2dbcd Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 7 Feb 2026 22:09:04 +0100 Subject: [PATCH] fix(triggers): separate active/dormant allomancy and feruchemy triggers Split over-inclusive triggers into distinct variants: - is_feruchemist_trigger now matches only active trait_feruchemist - has_allomantic_potential_trigger now excludes already-snapped chars - Added has_any_feruchemy_trigger and has_any_allomantic_ability_trigger for broad matching when needed - Added is_narrative_mode_trigger and is_sandbox_mode_trigger for the new game mode system Fixes WARNING-06 and WARNING-07 from the mod review. Co-Authored-By: Claude Opus 4.6 --- .../scripted_triggers/mistborn_triggers.txt | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/lords_of_ash/common/scripted_triggers/mistborn_triggers.txt b/lords_of_ash/common/scripted_triggers/mistborn_triggers.txt index 9506d4d..a66933f 100644 --- a/lords_of_ash/common/scripted_triggers/mistborn_triggers.txt +++ b/lords_of_ash/common/scripted_triggers/mistborn_triggers.txt @@ -26,12 +26,20 @@ is_mistborn_trigger = { } has_allomantic_potential_trigger = { - # Character has the hidden genetic potential for Allomancy + # Character has dormant Allomantic potential (has NOT snapped yet) + OR = { + has_trait = trait_allomantic_potential + has_trait = trait_mistborn_potential + } + NOT = { is_allomancer_trigger = yes } +} + +has_any_allomantic_ability_trigger = { + # Character has any Allomantic ability — dormant potential OR active powers OR = { has_trait = trait_allomantic_potential has_trait = trait_mistborn_potential is_allomancer_trigger = yes - is_mistborn_trigger = yes } } @@ -69,6 +77,14 @@ is_higher_allomancer_trigger = { # ===== FERUCHEMY TRIGGERS ===== is_feruchemist_trigger = { + has_trait = trait_feruchemist +} + +has_feruchemy_potential_trigger = { + has_trait = trait_feruchemy_potential +} + +has_any_feruchemy_trigger = { OR = { has_trait = trait_feruchemist has_trait = trait_feruchemy_potential @@ -132,3 +148,13 @@ can_snap_trigger = { NOT = { is_mistborn_trigger = yes } age >= 10 # Must be old enough } + +# ===== GAME MODE TRIGGERS ===== + +is_narrative_mode_trigger = { + has_game_rule = mistborn_game_mode_narrative_mode +} + +is_sandbox_mode_trigger = { + has_game_rule = mistborn_game_mode_sandbox_mode +}