Skip to content

Commit

Permalink
Make sure opposite season failure has a floor
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Feb 6, 2025
1 parent 29a8057 commit 8d6aeef
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions data/mods/Xedra_Evolved/jmath.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,50 @@
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_spring_failure_chance",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 3 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.08 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.03) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_SPRING') * 0.04) )"
"return": "global_what_is_the_season == 3 ? max(xe_fey_seasonal_magick_spring_failure_chance_actual(), 0.05) : xe_fey_seasonal_magick_spring_failure_chance_actual()"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_spring_failure_chance_actual",
"//": "This and below separations are necessary to keep the 'You cannot go below 5% chance to fail in the opposite season' logic",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 3 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.09 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.06) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_SPRING') * 0.04) )"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_summer_failure_chance",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 4 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.08 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.03) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_SUMMER') * 0.04) )"
"return": "global_what_is_the_season == 4 ? max(xe_fey_seasonal_magick_summer_failure_chance_actual(), 0.05) : xe_fey_seasonal_magick_summer_failure_chance_actual()"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_summer_failure_chance_actual",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 4 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.09 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.06) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_SUMMER') * 0.04) )"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_autumn_failure_chance",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 1 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.08 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.03) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_AUTUMN') * 0.04) )"
"return": "global_what_is_the_season == 1 ? max(xe_fey_seasonal_magick_autumn_failure_chance_actual(), 0.05) : xe_fey_seasonal_magick_autumn_failure_chance_actual()"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_autumn_failure_chance_actual",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 1 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.09 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.06) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_AUTUMN') * 0.04) )"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_winter_failure_chance",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 2 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.08 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.03) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_WINTER') * 0.04) )"
"return": "global_what_is_the_season == 2 ? max(xe_fey_seasonal_magick_winter_failure_chance_actual(), 0.05) : xe_fey_seasonal_magick_winter_failure_chance_actual()"
},
{
"type": "jmath_function",
"id": "xe_fey_seasonal_magick_winter_failure_chance_actual",
"num_args": 0,
"return": "(0.15 + (global_what_is_the_season == 2 ? 0.2 : 0 ) + (u_spell_difficulty(_spell_id) * 0.09 ) + xe_fey_magick_mana_penalty() - ( (u_skill('deduction') * 0.06) + (u_spell_count('school': 'CHANGELING_SEASONAL_MAGIC_WINTER') * 0.04) )"
},
{
"type": "jmath_function",
Expand Down

0 comments on commit 8d6aeef

Please sign in to comment.