Skip to content

Commit

Permalink
Merge pull request #77659 from Standing-Storm/lilit-gauge
Browse files Browse the repository at this point in the history
[Xedra Evolved] Add direct number ruach gauge for lilin
  • Loading branch information
Anton Burmistrov authored Nov 8, 2024
2 parents 1625468 + 88b6758 commit b9642e2
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 29 deletions.
82 changes: 60 additions & 22 deletions data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand All @@ -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",
Expand Down Expand Up @@ -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" }
]
}
]
43 changes: 42 additions & 1 deletion data/mods/Xedra_Evolved/ui/ruach_counter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": "<color_green><u_val:ruach_amount_for_graph></color> Max: <color_green><u_val:ruach_max_amount_for_graph></color> Days: <color_green><u_val:ruach_days_left></color>",
"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": "<color_green><u_val:ruach_amount_for_graph></color> Max: <color_green><u_val:ruach_max_amount_for_graph></color> Days: <color_green><u_val:ruach_days_left></color>",
"parse_tags": true,
"condition": { "u_has_trait": "LILIN_TRAITS" }
}
],
"padding": 0
}
]
18 changes: 12 additions & 6 deletions data/mods/Xedra_Evolved/ui/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"xe_mana_graph_layout",
"xe_mana_pool_layout",
"vampire_blood_levels",
"ruach_counter_meter"
"ruach_counter_meter",
"ruach_counter_numbers"
]
}
},
Expand All @@ -94,7 +95,8 @@
"xe_mana_graph_layout",
"xe_mana_pool_layout",
"vampire_blood_levels",
"ruach_counter_meter"
"ruach_counter_meter",
"ruach_counter_numbers"
]
}
},
Expand All @@ -109,7 +111,8 @@
"xe_mana_graph_layout",
"xe_mana_pool_layout",
"vampire_blood_levels",
"ruach_counter_meter"
"ruach_counter_meter",
"ruach_counter_numbers"
]
}
},
Expand All @@ -124,7 +127,8 @@
"xe_mana_graph_layout",
"xe_mana_pool_layout",
"vampire_blood_levels",
"ruach_counter_meter"
"ruach_counter_meter",
"ruach_counter_numbers"
]
}
},
Expand All @@ -139,7 +143,8 @@
"xe_mana_graph_layout",
"xe_mana_pool_layout",
"vampire_blood_levels",
"ruach_counter_meter"
"ruach_counter_meter",
"ruach_counter_numbers"
]
}
},
Expand Down Expand Up @@ -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"
]
}
},
Expand Down

0 comments on commit b9642e2

Please sign in to comment.