diff --git a/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json b/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json index 085758a5d2626..f32521d85a40d 100644 --- a/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json @@ -19,28 +19,7 @@ "if": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "==", "0" ] }, "then": { "u_add_effect": "effect_lilin_no_ruach", "duration": "PERMANENT", "intensity": 1 } }, - { - "if": { - "math": [ - "u_vitamin('lilin_ruach_vitamin')", - ">=", - "1680 + (u_has_trait('LILIN_HOLD_MORE_RUACH') * 1680) + (u_has_trait('LILIN_HOLD_MORE_RUACH_2') * 3360) + (u_has_trait('LILIN_HOLD_MORE_RUACH_3') * 5040)" - ] - }, - "then": { - "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH_3" }, - "then": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "6720" ] }, - "else": { - "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH_2" }, - "then": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "5040" ] }, - "else": { - "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH" }, - "then": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "3360" ] }, - "else": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "1680" ] } - } - } - } - } + { "run_eocs": "EOC_LILIN_UPDATE_MAX_RUACH_LEVELS" } ], "false_effect": [ { @@ -55,6 +34,30 @@ } ] }, + { + "type": "effect_on_condition", + "id": "EOC_LILIN_UPDATE_MAX_RUACH_LEVELS", + "condition": { + "math": [ + "u_vitamin('lilin_ruach_vitamin')", + ">=", + "1680 + (u_has_trait('LILIN_HOLD_MORE_RUACH') * 1680) + (u_has_trait('LILIN_HOLD_MORE_RUACH_2') * 3360) + (u_has_trait('LILIN_HOLD_MORE_RUACH_3') * 5040)" + ] + }, + "effect": { + "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH_3" }, + "then": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "6720" ] }, + "else": { + "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH_2" }, + "then": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "5040" ] }, + "else": { + "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH" }, + "then": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "3360" ] }, + "else": { "math": [ "u_vitamin('lilin_ruach_vitamin')", "=", "1680" ] } + } + } + } + }, { "type": "effect_on_condition", "id": "EOC_LILIN_SPEND_RUACH_FOR_POWERS", @@ -186,5 +189,40 @@ "type": "effect_on_condition", "id": "EOC_LILIN_GAINS_STRENGTH_TO_STRENGTH_CHOOSE_PERCEPTION", "effect": [ { "u_add_trait": "LILIN_ATTRIBUTE_BONUSES_PERCEPTION" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_LILIN_RUACH_UI_UPDATER", + "//": "Not great but required for now", + "recurrence": 1, + "condition": { "u_has_trait": "LILIN_TRAITS" }, + "deactivate_condition": { "not": { "u_has_trait": "LILIN_TRAITS" } }, + "effect": [ + { + "if": { "not": { "u_has_any_trait": [ "LILIN_HOLD_MORE_RUACH", "LILIN_HOLD_MORE_RUACH_2", "LILIN_HOLD_MORE_RUACH_3" ] } }, + "then": { "math": [ "u_ruach_amount_for_graph", "=", "min(u_vitamin('lilin_ruach_vitamin'),1680)" ] }, + "else": { + "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH" }, + "then": { "math": [ "u_ruach_amount_for_graph", "=", "min(u_vitamin('lilin_ruach_vitamin'),3360)" ] }, + "else": { + "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH_2" }, + "then": { "math": [ "u_ruach_amount_for_graph", "=", "min(u_vitamin('lilin_ruach_vitamin'),5040)" ] }, + "else": { + "if": { "u_has_trait": "LILIN_HOLD_MORE_RUACH_3" }, + "then": { "math": [ "u_ruach_amount_for_graph", "=", "min(u_vitamin('lilin_ruach_vitamin'),6720)" ] } + } + } + } + }, + { + "math": [ + "u_ruach_max_amount_for_graph", + "=", + "1680 + (u_has_trait('LILIN_HOLD_MORE_RUACH') * 1680) + (u_has_trait('LILIN_HOLD_MORE_RUACH_2') * 3360) + (u_has_trait('LILIN_HOLD_MORE_RUACH_3') * 5040)" + ] + }, + { "math": [ "u_ruach_days_left", "=", "trunc(u_vitamin('lilin_ruach_vitamin') / 240)" ] }, + { "run_eocs": "EOC_LILIN_UPDATE_MAX_RUACH_LEVELS" } + ] } ] diff --git a/data/mods/Xedra_Evolved/ui/ruach_counter.json b/data/mods/Xedra_Evolved/ui/ruach_counter.json index 4044ff6ea9a73..d61a121d3f8f8 100644 --- a/data/mods/Xedra_Evolved/ui/ruach_counter.json +++ b/data/mods/Xedra_Evolved/ui/ruach_counter.json @@ -3,11 +3,20 @@ "id": "spacebar_ruach_counter_block", "type": "widget", "style": "layout", - "label": "Ruach", + "label": "Ruach Descriptor", "arrange": "minimum_columns", "width": 58, "widgets": [ "spacebar_separator_2", "ruach_counter_meter" ] }, + { + "id": "spacebar_ruach_numbers_block", + "type": "widget", + "style": "layout", + "label": "Ruach Numbers", + "arrange": "minimum_columns", + "width": 58, + "widgets": [ "spacebar_separator_2", "ruach_counter_spacebar_numbers" ] + }, { "id": "ruach_counter_meter", "type": "widget", @@ -79,5 +88,37 @@ } ], "padding": 0 + }, + { + "id": "ruach_counter_numbers", + "type": "widget", + "style": "text", + "label": "Ruach", + "flags": [ "W_DISABLED_WHEN_EMPTY" ], + "clauses": [ + { + "id": "ruach_numbers", + "text": " Max: Days: ", + "parse_tags": true, + "condition": { "u_has_trait": "LILIN_TRAITS" } + } + ], + "padding": 0 + }, + { + "id": "ruach_counter_spacebar_numbers", + "type": "widget", + "style": "text", + "label": "Ruach", + "flags": [ "W_DISABLED_WHEN_EMPTY" ], + "clauses": [ + { + "id": "ruach_numbers", + "text": " Max: Days: ", + "parse_tags": true, + "condition": { "u_has_trait": "LILIN_TRAITS" } + } + ], + "padding": 0 } ] diff --git a/data/mods/Xedra_Evolved/ui/sidebar.json b/data/mods/Xedra_Evolved/ui/sidebar.json index dee5365aa0167..3cef9d1a1eacd 100644 --- a/data/mods/Xedra_Evolved/ui/sidebar.json +++ b/data/mods/Xedra_Evolved/ui/sidebar.json @@ -79,7 +79,8 @@ "xe_mana_graph_layout", "xe_mana_pool_layout", "vampire_blood_levels", - "ruach_counter_meter" + "ruach_counter_meter", + "ruach_counter_numbers" ] } }, @@ -94,7 +95,8 @@ "xe_mana_graph_layout", "xe_mana_pool_layout", "vampire_blood_levels", - "ruach_counter_meter" + "ruach_counter_meter", + "ruach_counter_numbers" ] } }, @@ -109,7 +111,8 @@ "xe_mana_graph_layout", "xe_mana_pool_layout", "vampire_blood_levels", - "ruach_counter_meter" + "ruach_counter_meter", + "ruach_counter_numbers" ] } }, @@ -124,7 +127,8 @@ "xe_mana_graph_layout", "xe_mana_pool_layout", "vampire_blood_levels", - "ruach_counter_meter" + "ruach_counter_meter", + "ruach_counter_numbers" ] } }, @@ -139,7 +143,8 @@ "xe_mana_graph_layout", "xe_mana_pool_layout", "vampire_blood_levels", - "ruach_counter_meter" + "ruach_counter_meter", + "ruach_counter_numbers" ] } }, @@ -226,7 +231,8 @@ "xe_spacebar_mana_numbers_block", "xe_spacebar_mana_bar_block", "vampire_blood_levels", - "spacebar_ruach_counter_block" + "spacebar_ruach_counter_block", + "spacebar_ruach_numbers_block" ] } },