Skip to content

Commit

Permalink
Merge pull request #77657 from Standing-Storm/rework-werewolf-healing
Browse files Browse the repository at this point in the history
[Xedra Evolved] Move werewolf healing over to EoC
  • Loading branch information
Night-Pryanik authored Nov 8, 2024
2 parents b9642e2 + a4ec7e0 commit cd7da94
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 21 deletions.
88 changes: 88 additions & 0 deletions data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 },
{ "math": [ "u_transformed_mana", "=", "u_val('mana') - 50" ] },
{ "math": [ "u_calories('dont_affect_weariness': true)", "*=", "3" ] },
{ "math": [ "u_werewolf_healing_tick_counter", "=", "0" ] },
{ "u_add_trait": "WEREWOLF_HYBRID_FORM_TRAITS" },
{ "u_add_trait": "CARNIVORE" },
{
Expand Down Expand Up @@ -133,5 +134,92 @@
"id": "EOC_WEREWOLF_HYBRID_FORM_deactivated_future",
"//": "This is necessary because calling u_deactivate_trait from within the trait EoC to deactivate that trait does not work",
"effect": { "u_deactivate_trait": "WEREWOLF_ANIMAL_FORM" }
},
{
"type": "effect_on_condition",
"id": "EOC_WEREWOLF_HYBRID_FORM_healing",
"effect": [
{ "math": [ "u_werewolf_healing_tick_counter", "++" ] },
{
"if": { "math": [ "u_werewolf_healing_tick_counter", ">=", "6" ] },
"then": [
{ "math": [ "u_werewolf_healing_tick_counter", "-=", "6" ] },
{ "if": { "math": [ "u_pain()", ">=", "1" ] }, "then": { "math": [ "u_pain()", "--" ] } },
{
"if": { "math": [ "u_vitamin('redcells')", "<", "0" ] },
"then": { "math": [ "u_vitamin('redcells')", "+=", "150" ] }
},
{
"if": { "math": [ "u_vitamin('redcells')", "<", "-1000" ] },
"then": { "math": [ "u_vitamin('redcells')", "+=", "500" ] }
},
{
"if": { "math": [ "u_vitamin('redcells')", "<", "-10000" ] },
"then": { "math": [ "u_vitamin('redcells')", "+=", "2500" ] }
},
{
"if": { "math": [ "u_vitamin('blood')", "<", "0" ] },
"then": { "math": [ "u_vitamin('blood')", "+=", "150" ] }
},
{
"if": { "math": [ "u_vitamin('blood')", "<", "-1000" ] },
"then": { "math": [ "u_vitamin('blood')", "+=", "500" ] }
},
{
"if": { "math": [ "u_vitamin('blood')", "<", "-10000" ] },
"then": { "math": [ "u_vitamin('blood')", "+=", "2500" ] }
},
{
"if": {
"or": [
{ "math": [ "u_hp('arm_l')", "<", "u_hp_max('arm_l')" ] },
{ "math": [ "u_hp('arm_r')", "<", "u_hp_max('arm_r')" ] },
{ "math": [ "u_hp('leg_l')", "<", "u_hp_max('leg_l')" ] },
{ "math": [ "u_hp('leg_r')", "<", "u_hp_max('leg_r')" ] },
{ "math": [ "u_hp('torso')", "<", "u_hp_max('torso')" ] },
{ "math": [ "u_hp('head')", "<", "u_hp_max('head')" ] }
]
},
"then": {
"foreach": "array",
"target": [ "arm_l", "arm_r", "leg_l", "leg_r", "torso", "head" ],
"var": { "context_val": "id" },
"effect": [
{
"if": { "math": [ "u_hp(_id)", "<", "u_hp_max(_id)" ] },
"then": {
"math": [ "u_hp(_id)", "+=", "max(( 1 * scaling_factor(u_val('intelligence') ) * u_nether_attunement_power_scaling), 1)" ]
}
}
]
}
},
{
"if": { "math": [ "u_effect_intensity('bleed', 'bodypart': 'arm_l')", ">=", "1" ] },
"then": { "u_add_effect": "bleed", "target_part": "arm_l", "duration": 0, "intensity": -1 }
},
{
"if": { "math": [ "u_effect_intensity('bleed', 'bodypart': 'arm_r')", ">=", "1" ] },
"then": { "u_add_effect": "bleed", "target_part": "arm_r", "duration": 0, "intensity": -1 }
},
{
"if": { "math": [ "u_effect_intensity('bleed', 'bodypart': 'leg_l')", ">=", "1" ] },
"then": { "u_add_effect": "bleed", "target_part": "leg_l", "duration": 0, "intensity": -1 }
},
{
"if": { "math": [ "u_effect_intensity('bleed', 'bodypart': 'leg_r')", ">=", "1" ] },
"then": { "u_add_effect": "bleed", "target_part": "leg_r", "duration": 0, "intensity": -1 }
},
{
"if": { "math": [ "u_effect_intensity('bleed', 'bodypart': 'torso')", ">=", "1" ] },
"then": { "u_add_effect": "bleed", "target_part": "torso", "duration": 0, "intensity": -1 }
},
{
"if": { "math": [ "u_effect_intensity('bleed', 'bodypart': 'head')", ">=", "1" ] },
"then": { "u_add_effect": "bleed", "target_part": "head", "duration": 0, "intensity": -1 }
}
]
}
]
}
]
22 changes: 1 addition & 21 deletions data/mods/Xedra_Evolved/mutations/shapeshifters.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"active": true,
"activated_is_setup": true,
"activated_eocs": [ "EOC_WEREWOLF_HYBRID_FORM_activated" ],
"processed_eocs": [ "EOC_WEREWOLF_HYBRID_FORM_healing" ],
"deactivated_eocs": [ "EOC_WEREWOLF_HYBRID_FORM_deactivated" ]
},
{
Expand Down Expand Up @@ -112,27 +113,6 @@
{
"condition": { "and": [ { "not": "is_day" }, { "math": [ "moon_phase() == 4" ] } ] },
"values": [ { "value": "DEXTERITY", "add": 2 }, { "value": "STRENGTH", "add": 2 }, { "value": "SPEED", "multiply": 0.05 } ]
},
{
"condition": {
"or": [
{ "math": [ "u_pain()", ">", "0" ] },
{ "math": [ "u_hp('arm_l')", "<", "u_hp_max('arm_l')" ] },
{ "math": [ "u_hp('arm_r')", "<", "u_hp_max('arm_r')" ] },
{ "math": [ "u_hp('leg_l')", "<", "u_hp_max('leg_l')" ] },
{ "math": [ "u_hp('leg_r')", "<", "u_hp_max('leg_r')" ] },
{ "math": [ "u_hp('torso')", "<", "u_hp_max('torso')" ] },
{ "math": [ "u_hp('head')", "<", "u_hp_max('head')" ] }
]
},
"intermittent_activation": {
"effects": [
{
"frequency": "6 seconds",
"spell_effects": [ { "id": "goblin_fruit_regeneration_spell" }, { "id": "shapeshifter_remove_pain_spell" } ]
}
]
}
}
],
"flags": [ "NO_SPELLCASTING", "PRED3", "TOUGH_FEET", "TEMPORARY_SHAPESHIFT", "SHAPESHIFT_SIZE_HUGE" ],
Expand Down

0 comments on commit cd7da94

Please sign in to comment.