Skip to content

Commit

Permalink
adjust existing eocs to meet new requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
b3brodie committed Dec 15, 2024
1 parent b5d5858 commit 453b3de
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
17 changes: 5 additions & 12 deletions data/mods/Magiclysm/eoc_spell_learn_boost.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
[
{
"type": "jmath_function",
"id": "mc_spell_exp_diff",
"num_args": 1,
"//": "accept the spell level, return a difference in experience between spell's current level and the next level",
"return": "spell_exp_for_level(_0 + 1) - spell_exp_for_level(_0)"
},
{
"type": "jmath_function",
"id": "mc_spell_train_focus_factor",
Expand Down Expand Up @@ -48,7 +41,7 @@
"math": [
"u_spell_exp(_spell)",
"+=",
"mc_spell_exp_diff(u_spell_level(_spell)) / mc_spell_cost_train_factor(_cost, 16, 65) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
"(spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell))) / mc_spell_cost_train_factor(_cost, 16, 65) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
]
}
]
Expand Down Expand Up @@ -107,7 +100,7 @@
"math": [
"u_spell_exp(_spell)",
"+=",
"mc_spell_exp_diff(u_spell_level(_spell)) / mc_spell_cost_train_factor(_cost, 20, 75) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
"(spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell))) / mc_spell_cost_train_factor(_cost, 20, 75) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
]
}
]
Expand All @@ -124,7 +117,7 @@
"math": [
"u_spell_exp(_spell)",
"+=",
"mc_spell_exp_diff(u_spell_level(_spell)) * (_cost / 5000) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
"(spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell))) * (_cost / 5000) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
]
}
]
Expand Down Expand Up @@ -165,14 +158,14 @@
"math": [
"u_spell_exp(_spell)",
"+=",
"mc_spell_exp_diff(u_spell_level(_spell)) / mc_spell_cost_train_factor(_cost, 16, 65) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
"(spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell))) / mc_spell_cost_train_factor(_cost, 16, 65) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
]
},
{
"math": [
"debug_mc_additional_spell_xp",
"=",
"mc_spell_exp_diff(u_spell_level(_spell)) / mc_spell_cost_train_factor(_cost, 16, 65) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
"(spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell))) / mc_spell_cost_train_factor(_cost, 16, 65) * mc_spell_train_focus_factor(u_val('focus'),u_spell_level(_spell))"
]
},
{ "u_message": "debug_mc_additional_spell_xp: <global_val:debug_mc_additional_spell_xp>", "type": "debug" }
Expand Down
20 changes: 17 additions & 3 deletions data/mods/Xedra_Evolved/eocs/spell_learning_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,29 @@
]
},
"effect": [
{ "math": [ "debug_xe_spell_exp_diff = (spell_exp_diff(u_spell_level(_spell)))" ] },
{
"math": [
"debug_xe_spell_exp_diff = spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell))"
]
},
{ "math": [ "debug_xe_spell_train_factor = (spell_train_factor(_cost))" ] },
{ "math": [ "debug_xe_spell_xp_give = spell_exp_diff(u_spell_level(_spell))/spell_train_factor(_cost)" ] },
{
"math": [
"debug_xe_spell_xp_give = (spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell)))/spell_train_factor(_cost)"
]
},
{ "u_message": "school: <context_val:school>", "type": "debug" },
{ "u_message": "spell: <context_val:spell>", "type": "debug" },
{ "u_message": "spell_exp_diff: <global_val:debug_xe_spell_exp_diff>", "type": "debug" },
{ "u_message": "spell_train_factor: <global_val:debug_xe_spell_train_factor>", "type": "debug" },
{ "u_message": "amount of XP added: <global_val:debug_xe_spell_xp_give>", "type": "debug" },
{ "math": [ "u_spell_exp(_spell)", "+=", "spell_exp_diff(u_spell_level(_spell))/spell_train_factor(_cost)" ] }
{
"math": [
"u_spell_exp(_spell)",
"+=",
"(spell_exp_for_level(_spell, u_spell_level(_spell)+1) - spell_exp_for_level(_spell, u_spell_level(_spell)))/spell_train_factor(_cost)"
]
}
]
},
{
Expand Down
7 changes: 0 additions & 7 deletions data/mods/Xedra_Evolved/jmath.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
"//": "used to transform the variable time (the smallest measure is 1 second) to the spell time (the smallest measure is 1 move, 1 second = 100 moves)",
"return": "_0 * 100"
},
{
"type": "jmath_function",
"id": "spell_exp_diff",
"num_args": 1,
"//": "accept the spell level, return a difference in experience between spell's current level and the next level",
"return": "spell_exp_for_level(_0 + 1) - spell_exp_for_level(_0)"
},
{
"type": "jmath_function",
"id": "spell_train_factor",
Expand Down
18 changes: 13 additions & 5 deletions data/mods/Xedra_Evolved/spells/spell_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"math": [
"u_spell_exp('xedra_dreamer_generate_accelerated_time')",
"+=",
"spell_exp_diff(u_spell_level('xedra_dreamer_generate_accelerated_time'))/spell_train_factor(200)"
"(spell_exp_for_level('xedra_dreamer_generate_accelerated_time', u_spell_level('xedra_dreamer_generate_accelerated_time')+1) - spell_exp_for_level('xedra_dreamer_generate_accelerated_time', u_spell_level('xedra_dreamer_generate_accelerated_time')))/spell_train_factor(200)"
]
}
],
Expand Down Expand Up @@ -143,7 +143,7 @@
"math": [
"u_spell_exp('spell_ethereal_wings')",
"+=",
"spell_exp_diff(u_spell_level('spell_ethereal_wings'))/spell_train_factor(200)"
"(spell_exp_for_level('spell_ethereal_wings', u_spell_level('spell_ethereal_wings')+1) - spell_exp_for_level('spell_ethereal_wings', u_spell_level('spell_ethereal_wings')))/spell_train_factor(200)"
]
}
],
Expand Down Expand Up @@ -184,7 +184,11 @@
"time_in_future": { "math": [ "((u_spell_level('spell_karma_arms')+1)*500)" ] }
},
{
"math": [ "u_spell_exp('spell_karma_arms')", "+=", "spell_exp_diff(u_spell_level('spell_karma_arms'))/spell_train_factor(200)" ]
"math": [
"u_spell_exp('spell_karma_arms')",
"+=",
"(spell_exp_for_level('spell_karma_arms', u_spell_level('spell_karma_arms')+1) - spell_exp_for_level('spell_karma_arms', u_spell_level('spell_karma_arms')))/spell_train_factor(200)"
]
}
],
"false_effect": [
Expand Down Expand Up @@ -218,7 +222,11 @@
"time_in_future": { "math": [ "((u_spell_level('spell_devil_tail')+1)*900)" ] }
},
{
"math": [ "u_spell_exp('spell_devil_tail')", "+=", "spell_exp_diff(u_spell_level('spell_devil_tail'))/spell_train_factor(100)" ]
"math": [
"u_spell_exp('spell_devil_tail')",
"+=",
"(spell_exp_for_level('spell_devil_tail', u_spell_level('spell_devil_tail')+1) - spell_exp_for_level('spell_devil_tail', u_spell_level('spell_devil_tail')))/spell_train_factor(100)"
]
}
],
"false_effect": [ { "u_lose_trait": "devil_tail" }, { "u_message": "Your devil tail fades away.", "type": "neutral" } ]
Expand Down Expand Up @@ -258,7 +266,7 @@
"math": [
"u_spell_exp('spell_stalker_eyes')",
"+=",
"spell_exp_diff(u_spell_level('spell_stalker_eyes'))/spell_train_factor(200)"
"(spell_exp_for_level('spell_stalker_eyes', u_spell_level('spell_stalker_eyes')+1) - spell_exp_for_level('spell_stalker_eyes', u_spell_level('spell_stalker_eyes')))/spell_train_factor(200)"
]
}
],
Expand Down

0 comments on commit 453b3de

Please sign in to comment.