Skip to content

Commit

Permalink
[MoM] Jmathify and variable-ize power learning times (#73529)
Browse files Browse the repository at this point in the history
* Initial commit

* Reduce insight proficiency learning time

* Implement variables for biokinesis

* Clair + Electro + Photo

* Pyro + telekin + telepathy

* Didn't commit the Teleportation/Vitakinesis changes, oops
  • Loading branch information
Standing-Storm authored May 7, 2024
1 parent 3bb1d34 commit 08a8580
Show file tree
Hide file tree
Showing 14 changed files with 611 additions and 232 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,21 @@
"required_event": "game_start",
"condition": { "u_has_trait": "VITAKINETIC" },
"effect": [ { "math": [ "u_awakening_countup", "+=", "1" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_MOM_GAMESTART_POWER_LEARNING_VARIABLES",
"eoc_type": "EVENT",
"required_event": "game_start",
"effect": [
{ "math": [ "global_insight_power_learning_time_low", "=", "43200" ] },
{ "math": [ "global_insight_power_learning_time_high", "=", "604800" ] },
{ "math": [ "global_tier_one_power_learning_time_low", "=", "43200" ] },
{ "math": [ "global_tier_one_power_learning_time_high", "=", "86400" ] },
{ "math": [ "global_tier_two_power_learning_time_low", "=", "129600" ] },
{ "math": [ "global_tier_two_power_learning_time_high", "=", "259200" ] },
{ "math": [ "global_tier_three_power_learning_time_low", "=", "345600" ] },
{ "math": [ "global_tier_three_power_learning_time_high", "=", "604800" ] }
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,10 @@
{
"type": "effect_on_condition",
"id": "EOC_PSI_LEARNING_VITAMIN_COUNTER",
"recurrence": [ "12 hours", "168 hours" ],
"recurrence": [
{ "math": [ "jmath_psi_learning_counter_time_low(global_insight_power_learning_time_low)" ] },
{ "math": [ "jmath_psi_learning_counter_time_high(global_insight_power_learning_time_high)" ] }
],
"condition": {
"and": [
{
Expand Down
49 changes: 28 additions & 21 deletions data/mods/MindOverMatter/jmath.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"type": "jmath_function",
"id": "contemplation_factor",
"num_args": 1,
"return": "(u_val('focus') * 9) * (_0)"
"return": "(u_val('focus') * 18) * (_0)"
},
{
"type": "jmath_function",
Expand All @@ -73,62 +73,69 @@
},
{
"type": "jmath_function",
"id": "difficulty_one_contemplation",
"id": "jmath_psi_learning_counter_time_low",
"num_args": 1,
"return": "_0 * 49417"
"//": "Reduces time between insight moments by 3% per point of Intelligence above 10 (increase by 3% per point below 10), to a max of 60% faster from intelligence, and by 5% per point of Metaphysics skill above 5.",
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * clamp(( 1 - (((u_skill('metaphysics') - 4) + 20 ) / 21) + 1),0.75,1)"
},
{
"type": "jmath_function",
"id": "difficulty_two_contemplation",
"id": "jmath_psi_learning_counter_time_high",
"num_args": 1,
"return": "_0 * 49417"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * clamp(( 1 - (((u_skill('metaphysics') - 4) + 20 ) / 21) + 1),0.75,1)"
},
{
"type": "jmath_function",
"id": "difficulty_three_contemplation",
"id": "jmath_biokinesis_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 49417"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_biokinesis')))"
},
{
"type": "jmath_function",
"id": "difficulty_four_contemplation",
"id": "jmath_clairsentience_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 35278"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_clairsentience')))"
},
{
"type": "jmath_function",
"id": "difficulty_five_contemplation",
"id": "jmath_electrokinesis_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 35278"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_electrokinesis')))"
},
{
"type": "jmath_function",
"id": "difficulty_six_contemplation",
"id": "jmath_photokinesis_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 20513"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_photokinesis')))"
},
{
"type": "jmath_function",
"id": "difficulty_seven_contemplation",
"id": "jmath_pyrokinesis_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 20513"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_pyrokinesis')))"
},
{
"type": "jmath_function",
"id": "difficulty_eight_contemplation",
"id": "jmath_telekinesis_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 13722"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_telekinesis')))"
},
{
"type": "jmath_function",
"id": "difficulty_nine_contemplation",
"id": "jmath_telepathy_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 13722"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_telepathy')))"
},
{
"type": "jmath_function",
"id": "difficulty_ten_contemplation",
"id": "jmath_teleportation_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * 13722"
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_teleportation')))"
},
{
"type": "jmath_function",
"id": "jmath_vitakinesis_learning_eocs_modifiers",
"num_args": 1,
"return": "_0 * max(( 1 - ( ( ( u_val('intelligence') + 23.33) / 33.33 ) ) + 1 ),0.4) * (1 - (0.2 * u_has_proficiency('prof_contemplation_vitakinesis')))"
}
]
20 changes: 20 additions & 0 deletions data/mods/MindOverMatter/obsolete/eocs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"type": "effect_on_condition",
"id": "EOC_MOM_GAMELOAD_POWER_LEARNING_VARIABLES_UPDATER",
"eoc_type": "EVENT",
"required_event": "game_load",
"condition": { "math": [ "global_updated_power_learning_variables", "!=", "1" ] },
"effect": [
{ "math": [ "global_insight_power_learning_time_low", "=", "43200" ] },
{ "math": [ "global_insight_power_learning_time_high", "=", "604800" ] },
{ "math": [ "global_tier_one_power_learning_time_low", "=", "43200" ] },
{ "math": [ "global_tier_one_power_learning_time_high", "=", "86400" ] },
{ "math": [ "global_tier_two_power_learning_time_low", "=", "129600" ] },
{ "math": [ "global_tier_two_power_learning_time_high", "=", "259200" ] },
{ "math": [ "global_tier_three_power_learning_time_low", "=", "345600" ] },
{ "math": [ "global_tier_three_power_learning_time_high", "=", "604800" ] },
{ "math": [ "global_updated_power_learning_variables", "=", "1" ] }
]
}
]
70 changes: 56 additions & 14 deletions data/mods/MindOverMatter/powers/learning_eocs/biokinesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_OXYGEN_ABSORPTION",
"recurrence": [ "12 hours", "24 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_one_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_one_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -38,7 +41,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_FLEXIBILITY",
"recurrence": [ "12 hours", "24 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_one_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_one_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -66,7 +72,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_DASH",
"recurrence": [ "12 hours", "24 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_one_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_one_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -110,7 +119,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_ARMOR_SKIN",
"recurrence": [ "36 hours", "72 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -156,7 +168,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_CLIMATE_CONTROL",
"recurrence": [ "36 hours", "72 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -197,7 +212,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_ADRENALINE",
"recurrence": [ "36 hours", "72 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -238,7 +256,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_ENHANCE_MOBILITY",
"recurrence": [ "36 hours", "72 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -286,7 +307,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_HAMMERHAND",
"recurrence": [ "36 hours", "72 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -322,7 +346,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_REFLEX_ENHANCE",
"recurrence": [ "36 hours", "72 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_two_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -364,7 +391,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_SEALED_SYSTEM",
"recurrence": [ "96 hours", "168 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -410,7 +440,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_METABOLISM_ENHANCE",
"recurrence": [ "96 hours", "168 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -451,7 +484,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_COMBAT_DANCE",
"recurrence": [ "96 hours", "168 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -493,7 +529,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_PERFECTED_MOTION",
"recurrence": [ "96 hours", "168 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down Expand Up @@ -529,7 +568,10 @@
{
"type": "effect_on_condition",
"id": "EOC_BIOKIN_LEARNING_HURRICANE_BLOWS",
"recurrence": [ "96 hours", "168 hours" ],
"recurrence": [
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_low)" ] },
{ "math": [ "jmath_biokinesis_learning_eocs_modifiers(global_tier_three_power_learning_time_high)" ] }
],
"condition": {
"and": [
{ "u_has_trait": "BIOKINETIC" },
Expand Down
Loading

0 comments on commit 08a8580

Please sign in to comment.