Skip to content

Commit

Permalink
[MoM] Add some more nether attunement consequences (#79159)
Browse files Browse the repository at this point in the history
* Reroll Observed effects if you're not Observed

* Add extra KCAL attunement effect

* Add vomiting

* Implement suggestions from code review

* Fix VSC merging idiocy

* Add possibility of Observed from backlash (except when using extended channeling)

* Fix looping conditions

* Add biokinetic inversion

* Metabolic Inversion makes Metabolic Hyperefficiency a pure deficit

* Force wave requires telekinesis

---------

Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>
  • Loading branch information
Standing-Storm and GuardianDll authored Jan 24, 2025
1 parent 5ad4199 commit 6f03c5a
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,18 @@
[ "EOC_DRAIN_EFFECT_CHECK_EXTRA_ATTUNEMENT", 9 ],
[ "EOC_NETHER_EFFECT_CHECK_COLD_WIND", 6 ],
[ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 6 ],
[ "EOC_NETHER_EFFECT_CHECK_VOMIT", 9 ],
[ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 12 ],
[ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 8 ],
[ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 5 ],
[ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 5 ],
[ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 11 ],
[ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 8 ],
[ "EOC_NETHER_EFFECT_CHECK_OBSERVED", 6 ],
[ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 5 ],
[ "EOC_NETHER_EFFECT_CHECK_BIOKIN_METABOLIC_INVERSION", 5 ],
[ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 5 ],
[ "EOC_NETHER_EFFECT_CHECK_EXTRA_KCAL", 6 ],
[ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 8 ],
[ "EOC_NETHER_EFFECT_CHECK_BREATHING", 5 ],
[ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 5 ],
Expand Down Expand Up @@ -459,6 +463,31 @@
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_EFFECT_CHECK_VOMIT",
"//": "Base is 2% chance from 50 attunement to 80 attunement, then scaling up 0.125% per attunement up to 10.75% chance at 150 attunement, then scaling up 0.25% chance per attunement up to 35.75% chance at max, plus 1/10th the Difficulty squared.",
"condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 50" ] },
"effect": [
{
"if": {
"x_in_y_chance": {
"x": {
"math": [
"( clamp( ( ( u_vitamin('vitamin_psionic_drain') * 1.25)- 50), 0, 200) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 150) * 2.5 ), 0, 300) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 20)"
]
},
"y": 1000
}
},
"then": [
{ "u_message": "As you unleash your powers, your stomach churns!", "type": "bad" },
{ "u_cast_spell": { "id": "nether_attunement_vomit", "hit_self": true } }
]
}
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED",
Expand All @@ -470,7 +499,7 @@
"x_in_y_chance": {
"x": {
"math": [
"( clamp( ( u_vitamin('vitamin_psionic_drain') - 60), 0, 90) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 160) * 2.5 ), 0, 300) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 10)"
"( clamp( ( u_vitamin('vitamin_psionic_drain') - 60), 0, 90) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 150) * 2.5 ), 0, 300) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 10)"
]
},
"y": 1000
Expand Down Expand Up @@ -624,11 +653,49 @@
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_EFFECT_CHECK_OBSERVED",
"//": "Base is 2% chance from 80 attunement to 130 attunement, then scaling up 0.15% per attunement up to 11% chance at 190 attunement, then scaling up 0.3% chance per attunement up to 29% chance at max, plus 1/10th the Difficulty squared.",
"condition": {
"and": [
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 75" ] },
{ "not": { "u_has_trait": "PSI_EXTENDED_CHANNELING_active" } }
]
},
"effect": [
{
"if": {
"x_in_y_chance": {
"x": {
"math": [
"( clamp( ( (u_vitamin('vitamin_psionic_drain') - 130) * 1.5), 0, 100) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 190) * 3 ), 0, 250) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 20)"
]
},
"y": 1000
}
},
"then": [
{ "u_message": "You feel like you're being watched.", "type": "bad" },
{
"u_add_effect": "psi_nether_attention",
"duration": { "math": [ "(u_vitamin('vitamin_psionic_drain') * rng(150,600)) + 86400" ] }
}
]
}
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK",
"//": "Base is 1% chance from 85 attunement to 120 attunement, then scaling up 0.1% per attunement up to 8% chance at 190 attunement, then scaling up 0.35% chance per attunement up to 29% chance at max, plus 1/10th the Difficulty squared.",
"condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] },
"condition": {
"and": [
{ "compare_string": [ "TELEPORTER", { "context_val": "school" } ] },
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }
]
},
"effect": [
{
"if": {
Expand All @@ -654,6 +721,41 @@
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_EFFECT_CHECK_BIOKIN_METABOLIC_INVERSION",
"//": "Base is 1% chance from 85 attunement to 120 attunement, then scaling up 0.1% per attunement up to 8% chance at 190 attunement, then scaling up 0.35% chance per attunement up to 29% chance at max, plus 1/10th the Difficulty squared.",
"condition": {
"and": [
{ "compare_string": [ "BIOKINETIC", { "context_val": "school" } ] },
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }
]
},
"effect": [
{
"if": {
"x_in_y_chance": {
"x": {
"math": [
"( clamp( (u_vitamin('vitamin_psionic_drain') - 120), 0, 130) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 190) * 2.5 ), 0, 375) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 10)"
]
},
"y": 1000
}
},
"then": [
{ "u_message": "Your throat and stomach feel warm.", "type": "bad" },
{
"u_add_effect": "effect_nether_attunement_biokinetic_inversion",
"duration": {
"math": [ "time(' 10 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ]
}
}
]
}
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_DRAIN_EFFECT_CHECK_WEAKNESS",
Expand Down Expand Up @@ -684,6 +786,31 @@
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_EFFECT_CHECK_EXTRA_KCAL",
"//": "Base is 3% chance from 110 attunement to 150 attunement, then scaling up 0.2% per attunement up to 9% chance at 180 attunement, then scaling up 0.3% chance per attunement up to 30% chance at max, plus 1/10th the Difficulty squared.",
"condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 110" ] },
"effect": [
{
"if": {
"x_in_y_chance": {
"x": {
"math": [
"( clamp( (( u_vitamin('vitamin_psionic_drain') * 2) - 150), 0, 100) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 180) * 4 ), 0, 150) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 30)"
]
},
"y": 1000
}
},
"then": [
{ "u_message": "As you unleash your powers, your stomach rumbles!", "type": "bad" },
{ "u_add_effect": "effect_nether_attunement_extra_kcal", "duration": { "math": [ "7200 + rand(86400)" ] } }
]
}
],
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_NETHER_EFFECT_CHECK_ATTENUATION",
Expand Down Expand Up @@ -778,7 +905,12 @@
"type": "effect_on_condition",
"id": "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE",
"//": "Base is 3% chance from 125 attunement to 160 attunement, then scaling up 0.15% per attunement up to 9.75% chance at 205 attunement, then scaling up 0.45% chance per attunement up to 29.75% chance at max, plus 1/10th the Difficulty squared.",
"condition": { "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] },
"condition": {
"and": [
{ "compare_string": [ "TELEKINETIC", { "context_val": "school" } ] },
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 125" ] }
]
},
"effect": [
{
"if": {
Expand Down
33 changes: 14 additions & 19 deletions data/mods/MindOverMatter/effects/effects_nether_attunement.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,6 @@
"dur_add_perc": 25,
"int_dur_factor": "3 days"
},
{
"type": "effect_type",
"id": "effect_nether_attunement_health_bonus",
"//": "Hidden effect, used as a tracker",
"name": [ "" ],
"desc": [ "" ],
"rating": "good",
"max_duration": "30 seconds",
"base_mods": { "health_min": [ 1 ], "health_chance": [ 2 ] }
},
{
"type": "effect_type",
"id": "effect_nether_attunement_health_penalty",
"name": [ "" ],
"desc": [ "" ],
"rating": "bad",
"max_duration": "30 seconds",
"base_mods": { "health_min": [ -1 ], "health_chance": [ 2 ] }
},
{
"type": "effect_type",
"id": "effect_nether_attunement_raiser",
Expand All @@ -91,13 +72,27 @@
"remove_message": "Your difficulty in drawing on the Nether fades.",
"enchantments": [ { "values": [ { "value": "CASTING_TIME_MULTIPLIER", "multiply": 4 } ] } ]
},
{
"type": "effect_type",
"id": "effect_nether_attunement_extra_kcal",
"name": [ "Gnawing Hunger" ],
"desc": [ "Whenever you use your powers, your stomach rumbles." ],
"remove_message": "Your stomach finally calms down."
},
{
"type": "effect_type",
"id": "effect_nether_attunement_feedback",
"name": [ "Feedback" ],
"desc": [ "You feel a persistent itching that will not go away." ],
"rating": "bad"
},
{
"type": "effect_type",
"id": "effect_nether_attunement_biokinetic_inversion",
"name": [ "Metabolic Inversion" ],
"desc": [ "You getting pretty hungry and thirsty." ],
"rating": "bad"
},
{
"type": "effect_type",
"id": "effect_in_the_nether_warning_timer",
Expand Down
8 changes: 4 additions & 4 deletions data/mods/MindOverMatter/effects/effects_psionic.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,31 +703,31 @@
"value": "KCAL",
"multiply": {
"math": [
"min((( 0.33 + ( u_spell_level('biokin_metabolism_enhance') * 0.07 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 3)"
"min((( 0.33 + ( u_spell_level('biokin_metabolism_enhance') * 0.07 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 3) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
},
{
"value": "VITAMIN_ABSORB_MOD",
"multiply": {
"math": [
"min((( 0.33 + ( u_spell_level('biokin_metabolism_enhance') * 0.07 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 3)"
"min((( 0.33 + ( u_spell_level('biokin_metabolism_enhance') * 0.07 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 3) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -0.32 : 1)"
]
}
},
{
"value": "METABOLISM",
"multiply": {
"math": [
"max((( -0.10 + ( u_spell_level('biokin_metabolism_enhance') * -0.01 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), -0.4)"
"max((( -0.10 + ( u_spell_level('biokin_metabolism_enhance') * -0.01 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), -0.4) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
},
{
"value": "SLEEPINESS",
"multiply": {
"math": [
"max((( -0.25 + ( u_spell_level('biokin_metabolism_enhance') * -0.02 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), -0.7)"
"max((( -0.25 + ( u_spell_level('biokin_metabolism_enhance') * -0.02 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), -0.7) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions data/mods/MindOverMatter/jmath.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
"type": "jmath_function",
"id": "psionics_kcal_cost",
"num_args": 1,
"return": "(4 * _0) * rng( 0.3, 1.7) * u_nether_attunement_power_scaling"
"return": "(4 * _0) * rng( 0.3, 1.7) * u_nether_attunement_power_scaling * (u_effect_intensity('effect_nether_attunement_extra_kcal') > 0 ? 3 : 1)"
},
{
"type": "jmath_function",
"id": "psionics_contemplation_kcal_cost",
"num_args": 1,
"return": "(1.2 * _0) * rng( 0.3, 1.7) * u_nether_attunement_power_scaling"
"return": "(1.2 * _0) * rng( 0.3, 1.7) * u_nether_attunement_power_scaling * (u_effect_intensity('effect_nether_attunement_extra_kcal') > 0 ? 3 : 1)"
},
{
"type": "jmath_function",
Expand Down
27 changes: 23 additions & 4 deletions data/mods/MindOverMatter/mutations/psi_passives.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,37 @@
{
"condition": { "not": { "u_has_flag": "NO_PSIONICS" } },
"values": [
{ "value": "HUNGER", "multiply": { "math": [ "(-0.03 - (0.00075 * u_spell_level_sum('school': 'BIOKINETIC')))" ] } },
{
"value": "HUNGER",
"multiply": {
"math": [
"(-0.03 - (0.00075 * u_spell_level_sum('school': 'BIOKINETIC'))) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
},
{
"value": "THIRST",
"multiply": { "math": [ "(-0.03 - (0.00075 * u_spell_level_sum('school': 'BIOKINETIC')))" ] }
"multiply": {
"math": [
"(-0.03 - (0.00075 * u_spell_level_sum('school': 'BIOKINETIC'))) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
},
{
"value": "METABOLISM",
"multiply": { "math": [ "(-0.03 - (0.00075 * u_spell_level_sum('school': 'BIOKINETIC')))" ] }
"multiply": {
"math": [
"(-0.03 - (0.00075 * u_spell_level_sum('school': 'BIOKINETIC'))) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
},
{
"value": "VITAMIN_ABSORB_MOD",
"multiply": { "math": [ "(0.03 + (0.00075 * u_spell_level_sum('school': 'BIOKINETIC')))" ] }
"multiply": {
"math": [
"(0.03 + (0.00075 * u_spell_level_sum('school': 'BIOKINETIC'))) * (u_effect_intensity('effect_nether_attunement_biokinetic_inversion') > 0 ? -1 : 1)"
]
}
}
]
}
Expand Down
19 changes: 19 additions & 0 deletions data/mods/MindOverMatter/obsolete/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,24 @@
"max_intensity": 106,
"limb_score_mods": [ { "limb_score": "night_vis", "modifier": 16 } ],
"flags": [ "EFFECT_LIMB_SCORE_MOD" ]
},
{
"type": "effect_type",
"id": "effect_nether_attunement_health_bonus",
"//": "Hidden effect, used as a tracker",
"name": [ "" ],
"desc": [ "" ],
"rating": "good",
"max_duration": "30 seconds",
"base_mods": { "health_min": [ 1 ], "health_chance": [ 2 ] }
},
{
"type": "effect_type",
"id": "effect_nether_attunement_health_penalty",
"name": [ "" ],
"desc": [ "" ],
"rating": "bad",
"max_duration": "30 seconds",
"base_mods": { "health_min": [ -1 ], "health_chance": [ 2 ] }
}
]
10 changes: 10 additions & 0 deletions data/mods/MindOverMatter/powers/nether_attunement_spells.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"id": "nether_attunement_vomit",
"type": "SPELL",
"name": { "str": "Nether Attunement Vomit", "//~": "NO_I18N" },
"valid_targets": [ "self" ],
"description": { "str": "Vomits when you use your powers.", "//~": "NO_I18N" },
"flags": [ "SILENT" ],
"effect": "vomit",
"shape": "blast"
},
{
"id": "nether_attunement_cold_chill",
"type": "SPELL",
Expand Down

0 comments on commit 6f03c5a

Please sign in to comment.