Skip to content

Commit 437a9be

Browse files
[MoM] Add more specific Nether Attunement backlash effects (#80226)
* Initial commit * Add incorporeality * Add EMP * Add Power Void * Misjump fixes * Fix incorporeality
1 parent 0a39941 commit 437a9be

File tree

3 files changed

+300
-5
lines changed

3 files changed

+300
-5
lines changed

data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json

Lines changed: 272 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,17 +337,21 @@
337337
[ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 8 ],
338338
[ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 5 ],
339339
[ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 5 ],
340-
[ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 11 ],
341-
[ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 8 ],
340+
[ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 9 ],
341+
[ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 9 ],
342342
[ "EOC_NETHER_EFFECT_CHECK_OBSERVED", 6 ],
343+
[ "EOC_NETHER_EFFECT_CHECK_TELEPORTATION_INCORPOREALITY", 4 ],
343344
[ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 5 ],
344345
[ "EOC_NETHER_EFFECT_CHECK_BIOKIN_METABOLIC_INVERSION", 5 ],
346+
[ "EOC_NETHER_EFFECT_CHECK_ELECTROKINETIC_POWER_DRAIN", 5 ],
345347
[ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 5 ],
346348
[ "EOC_NETHER_EFFECT_CHECK_PYROKINETIC_FOG", 5 ],
347349
[ "EOC_NETHER_EFFECT_CHECK_EXTRA_KCAL", 6 ],
348350
[ "EOC_NETHER_EFFECT_CHECK_ATTENUATION", 8 ],
349351
[ "EOC_NETHER_EFFECT_CHECK_BREATHING", 5 ],
350352
[ "EOC_NETHER_EFFECT_CHECK_FORCE_WAVE", 5 ],
353+
[ "EOC_NETHER_EFFECT_CHECK_TELEPORT_MISJUMP", 4 ],
354+
[ "EOC_NETHER_EFFECT_CHECK_PHOTOKIN_EMP", 3 ],
351355
[ "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING", 3 ],
352356
[ "EOC_NETHER_EFFECT_CHECK_NO_PSIONICS", 3 ],
353357
[ "EOC_NETHER_EFFECT_CHECK_SUMMON_HOUNDS", 2 ],
@@ -657,7 +661,7 @@
657661
{
658662
"type": "effect_on_condition",
659663
"id": "EOC_NETHER_EFFECT_CHECK_OBSERVED",
660-
"//": "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.",
664+
"//": "Base is 2% chance from 75 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.",
661665
"condition": {
662666
"and": [
663667
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 75" ] },
@@ -687,6 +691,41 @@
687691
],
688692
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
689693
},
694+
{
695+
"type": "effect_on_condition",
696+
"id": "EOC_NETHER_EFFECT_CHECK_TELEPORTATION_INCORPOREALITY",
697+
"//": "Base is 4% chance from 80 attunement to 125 attunement, then scaling up 0.15% per attunement up to 11.5% chance at 175 attunement, then scaling up 0.3% chance per attunement up to 29.5% chance at 235 attunement, then scaling up 0.5% up to 37% chance at max, plus 1/10th the Difficulty squared.",
698+
"condition": {
699+
"and": [
700+
{ "compare_string": [ "teleport_ephemeral_walk", { "context_val": "spell" } ] },
701+
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }
702+
]
703+
},
704+
"effect": [
705+
{
706+
"if": {
707+
"x_in_y_chance": {
708+
"x": {
709+
"math": [
710+
"( clamp( ( (u_vitamin('vitamin_psionic_drain') - 125) * 1.5), 0, 130) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 175) * 3 ), 0, 375) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 235) * 5 ), 0, 375) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 40)"
711+
]
712+
},
713+
"y": 1000
714+
}
715+
},
716+
"then": [
717+
{ "u_message": "Your body has as much substance as smoke!", "type": "bad" },
718+
{
719+
"u_add_effect": "incorporeal",
720+
"duration": {
721+
"math": [ "time(' 1 s') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ]
722+
}
723+
}
724+
]
725+
}
726+
],
727+
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
728+
},
690729
{
691730
"type": "effect_on_condition",
692731
"id": "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK",
@@ -757,6 +796,42 @@
757796
],
758797
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
759798
},
799+
{
800+
"type": "effect_on_condition",
801+
"id": "EOC_NETHER_EFFECT_CHECK_ELECTROKINETIC_POWER_DRAIN",
802+
"//": "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.",
803+
"condition": {
804+
"and": [
805+
{ "compare_string": [ "ELECTROKINETIC", { "context_val": "school" } ] },
806+
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 85" ] }
807+
]
808+
},
809+
"effect": [
810+
{
811+
"if": {
812+
"x_in_y_chance": {
813+
"x": {
814+
"math": [
815+
"( 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)"
816+
]
817+
},
818+
"y": 1000
819+
}
820+
},
821+
"then": [
822+
{ "u_message": "Your skin breaks out in goosebumps.", "type": "bad" },
823+
{
824+
"u_add_effect": "effect_nether_attunement_electrokinetic_power_drain",
825+
"duration": {
826+
"math": [ "time(' 15 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) )" ]
827+
}
828+
},
829+
{ "run_eocs": "EOC_NETHER_EFFECT_ELECTROKINETIC_POWER_DRAIN" }
830+
]
831+
}
832+
],
833+
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
834+
},
760835
{
761836
"type": "effect_on_condition",
762837
"id": "EOC_DRAIN_EFFECT_CHECK_WEAKNESS",
@@ -1001,6 +1076,152 @@
10011076
],
10021077
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
10031078
},
1079+
{
1080+
"type": "effect_on_condition",
1081+
"id": "EOC_NETHER_EFFECT_CHECK_TELEPORT_MISJUMP",
1082+
"//": "Base is 3% chance from 150 attunement to 190 attunement, then scaling up 0.2% per attunement up to 9% chance at 220 attunement, then scaling up 0.4% chance per attunement up to 21% chance at max, plus 1/10th the Difficulty squared.",
1083+
"condition": {
1084+
"and": [
1085+
{
1086+
"or": [
1087+
{ "compare_string": [ "teleport_blink", { "context_val": "spell" } ] },
1088+
{ "compare_string": [ "teleport_phase", { "context_val": "spell" } ] },
1089+
{ "compare_string": [ "teleport_transpose", { "context_val": "spell" } ] },
1090+
{ "compare_string": [ "teleport_farstep", { "context_val": "spell" } ] },
1091+
{ "compare_string": [ "teleport_loci_technique", { "context_val": "spell" } ] },
1092+
{ "compare_string": [ "teleport_gateway", { "context_val": "spell" } ] },
1093+
{ "compare_string": [ "teleport_dilated_gateway", { "context_val": "spell" } ] }
1094+
]
1095+
},
1096+
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 150" ] }
1097+
]
1098+
},
1099+
"effect": [
1100+
{ "u_add_effect": "effect_psi_teleport_lock", "duration": 1 },
1101+
{ "u_add_effect": "blind", "duration": 1 },
1102+
{
1103+
"if": {
1104+
"x_in_y_chance": {
1105+
"x": {
1106+
"math": [
1107+
"( clamp( ((u_vitamin('vitamin_psionic_drain') - 190) * 2), 0, 190) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 220) * 4 ), 0, 375) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 30)"
1108+
]
1109+
},
1110+
"y": 1000
1111+
}
1112+
},
1113+
"then": [
1114+
{
1115+
"switch": { "math": [ "rand(2)" ] },
1116+
"cases": [
1117+
{
1118+
"case": 0,
1119+
"effect": [
1120+
{
1121+
"u_location_variable": { "context_val": "teleport_mishap_location" },
1122+
"target_params": {
1123+
"om_terrain": "field",
1124+
"om_terrain_match_type": "CONTAINS",
1125+
"search_range": { "math": [ "300 + (50 * clamp( ( (u_vitamin('vitamin_psionic_drain') - 149 ) / 10 ), 1, 15) )" ] },
1126+
"min_distance": { "math": [ "100 + (10 * clamp( ( (u_vitamin('vitamin_psionic_drain') - 149 ) / 10 ), 1, 15) )" ] },
1127+
"z": 0,
1128+
"random": true
1129+
}
1130+
}
1131+
]
1132+
},
1133+
{
1134+
"case": 1,
1135+
"effect": [
1136+
{
1137+
"u_location_variable": { "context_val": "teleport_mishap_location" },
1138+
"target_params": {
1139+
"om_terrain": "forest",
1140+
"om_terrain_match_type": "CONTAINS",
1141+
"search_range": { "math": [ "300 + (50 * clamp( ( (u_vitamin('vitamin_psionic_drain') - 149 ) / 10 ), 1, 15) )" ] },
1142+
"min_distance": { "math": [ "100 + (10 * clamp( ( (u_vitamin('vitamin_psionic_drain') - 149 ) / 10 ), 1, 15) )" ] },
1143+
"z": 0,
1144+
"random": true
1145+
}
1146+
}
1147+
]
1148+
},
1149+
{
1150+
"case": 2,
1151+
"effect": [
1152+
{
1153+
"u_location_variable": { "context_val": "teleport_mishap_location" },
1154+
"target_params": {
1155+
"om_terrain": "house",
1156+
"om_terrain_match_type": "CONTAINS",
1157+
"search_range": { "math": [ "300 + (50 * clamp( ( (u_vitamin('vitamin_psionic_drain') - 149 ) / 10 ), 1, 15) )" ] },
1158+
"min_distance": { "math": [ "100 + (10 * clamp( ( (u_vitamin('vitamin_psionic_drain') - 149 ) / 10 ), 1, 15) )" ] },
1159+
"z": 0,
1160+
"random": true
1161+
}
1162+
}
1163+
]
1164+
}
1165+
]
1166+
},
1167+
{ "u_teleport": { "context_val": "teleport_mishap_location" }, "force_safe": true },
1168+
{
1169+
"u_message": "The world around you abruptly vanishes, and you careen wildly through a darkness so cold you feel like your bones will freeze before abruptly emerging somewhere unfamiliar.",
1170+
"type": "bad"
1171+
},
1172+
{
1173+
"run_eocs": [
1174+
{
1175+
"id": "EOC_NETHER_EFFECT_CHECK_TELEPORT_MISJUMP_APPLY_HOUNDS",
1176+
"effect": [
1177+
{
1178+
"u_add_effect": "effect_teleport_mishap_tindrift_warning",
1179+
"duration": {
1180+
"math": [
1181+
"time(' 3 h') + ( time(' 10 m') * rng( ( u_vitamin('vitamin_psionic_drain') / 2 ), ( u_vitamin('vitamin_psionic_drain') * 2 ) ) )"
1182+
]
1183+
}
1184+
}
1185+
]
1186+
}
1187+
],
1188+
"time_in_future": 0
1189+
}
1190+
]
1191+
}
1192+
],
1193+
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
1194+
},
1195+
{
1196+
"type": "effect_on_condition",
1197+
"id": "EOC_NETHER_EFFECT_CHECK_PHOTOKIN_EMP",
1198+
"//": "Base is 2% chance from 160 attunement to 195 attunement, then scaling up 0.25% per attunement up to 10.75% chance at 230 attunement, then scaling up 0.4% chance per attunement up to 18.75% chance at max, plus 1/10th the Difficulty squared.",
1199+
"condition": {
1200+
"and": [
1201+
{ "compare_string": [ "PHOTOKINETIC", { "context_val": "school" } ] },
1202+
{ "math": [ "u_vitamin('vitamin_psionic_drain') >= 160" ] }
1203+
]
1204+
},
1205+
"effect": [
1206+
{
1207+
"if": {
1208+
"x_in_y_chance": {
1209+
"x": {
1210+
"math": [
1211+
"( clamp( ((u_vitamin('vitamin_psionic_drain') - 200) * 2.5), 0, 195) + clamp( ( (u_vitamin('vitamin_psionic_drain') - 230) * 4 ), 0, 375) + (nether_attune_difficulty_scaler(u_latest_channeled_power_difficulty)) + 20)"
1212+
]
1213+
},
1214+
"y": 1000
1215+
}
1216+
},
1217+
"then": [
1218+
{ "u_message": "There's a sudden burst of light and your hair stands on end!", "type": "bad" },
1219+
{ "u_explosion": { "power": 10 }, "emp_blast": true }
1220+
]
1221+
}
1222+
],
1223+
"false_effect": [ { "run_eocs": "EOC_PSIONICS_NETHER_ATTUNEMENT_CONSEQUENCES" } ]
1224+
},
10041225
{
10051226
"type": "effect_on_condition",
10061227
"id": "EOC_NETHER_EFFECT_CHECK_NETHER_LIGHTNING",
@@ -1525,5 +1746,53 @@
15251746
]
15261747
},
15271748
"effect": [ { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(2) + 1" ] } ]
1749+
},
1750+
{
1751+
"type": "effect_on_condition",
1752+
"id": "EOC_CHANNEL_TELEPORTER_POWERS_WHILE_THE_HOUNDS_ARE_WATCHING",
1753+
"eoc_type": "EVENT",
1754+
"required_event": "spellcasting_finish",
1755+
"condition": {
1756+
"and": [
1757+
{ "compare_string": [ "TELEPORTER", { "context_val": "school" } ] },
1758+
{ "u_has_effect": "effect_teleport_mishap_tindrift_warning" }
1759+
]
1760+
},
1761+
"effect": [
1762+
{ "u_lose_effect": "effect_teleport_mishap_tindrift_warning" },
1763+
{ "u_message": "…but it's because the hunters have found you.", "type": "bad" },
1764+
{ "u_add_effect": "tindrift", "duration": "1 day" },
1765+
{
1766+
"u_spawn_monster": "mon_hound_tindalos",
1767+
"real_count": { "math": [ "rand(3) + 2" ] },
1768+
"min_radius": 2,
1769+
"max_radius": 8
1770+
},
1771+
{
1772+
"if": { "math": [ "rand(100) >= 96" ] },
1773+
"then": [ { "u_spawn_monster": "mon_tindalos", "real_count": 1, "min_radius": 1, "max_radius": 4 } ]
1774+
}
1775+
]
1776+
},
1777+
{
1778+
"type": "effect_on_condition",
1779+
"id": "EOC_NETHER_EFFECT_ELECTROKINETIC_POWER_DRAIN",
1780+
"condition": { "u_has_effect": "effect_nether_attunement_electrokinetic_power_drain" },
1781+
"effect": [
1782+
{
1783+
"run_eocs": "EOC_NETHER_EFFECT_ELECTROKINETIC_POWER_DRAIN",
1784+
"time_in_future": [ { "math": [ "rng(30,120)" ] }, { "math": [ "rng(90,360)" ] } ]
1785+
},
1786+
{
1787+
"u_run_inv_eocs": "all",
1788+
"search_data": [ { "uses_energy": true, "excluded_flags": [ "USES_BIONIC_POWER" ] } ],
1789+
"true_eocs": [
1790+
{
1791+
"id": "EOC_NETHER_EFFECT_ELECTROKINETIC_POWER_DRAIN_ACTIVE",
1792+
"effect": [ { "math": [ "n_val('power')", "-=", "rand(2) + 1" ] } ]
1793+
}
1794+
]
1795+
}
1796+
]
15281797
}
15291798
]

data/mods/MindOverMatter/effects/effects_nether_attunement.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,31 @@
8686
"desc": [ "You feel a persistent itching that will not go away." ],
8787
"rating": "bad"
8888
},
89+
{
90+
"type": "effect_type",
91+
"id": "effect_nether_attunement_electrokinetic_power_drain",
92+
"name": [ "Power Void" ],
93+
"desc": [ "Is it cold in here?" ],
94+
"rating": "bad",
95+
"remove_message": "The unearthly chill fades away."
96+
},
8997
{
9098
"type": "effect_type",
9199
"id": "effect_nether_attunement_biokinetic_inversion",
92100
"name": [ "Metabolic Inversion" ],
93-
"desc": [ "You getting pretty hungry and thirsty." ],
94-
"rating": "bad"
101+
"desc": [ "You're getting pretty hungry and thirsty." ],
102+
"rating": "bad",
103+
"remove_message": "Your gnawing hunger finally fades away."
104+
},
105+
{
106+
"type": "effect_type",
107+
"id": "effect_teleport_mishap_tindrift_warning",
108+
"name": [ "Hunted" ],
109+
"desc": [
110+
"You feel the sensation of watching eyes and see prowling forms out of the corners of your vision. Using further teleportation powers would be very unwise."
111+
],
112+
"rating": "bad",
113+
"remove_message": "The prowling forms finally fade away."
95114
},
96115
{
97116
"type": "effect_type",

data/mods/MindOverMatter/powers/electrokinesis_concentration_eocs.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,13 @@
275275
{
276276
"type": "effect_on_condition",
277277
"id": "EOC_ELECTROKIN_PERSONAL_BATTERY_INITIATE",
278+
"condition": { "not": { "u_has_effect": "effect_nether_attunement_electrokinetic_power_drain" } },
279+
"effect": [ { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_INITIATE_REAL" } ],
280+
"false_effect": [ { "u_message": "The power you channel vanishes into nothingness.", "type": "bad" } ]
281+
},
282+
{
283+
"type": "effect_on_condition",
284+
"id": "EOC_ELECTROKIN_PERSONAL_BATTERY_INITIATE_REAL",
278285
"condition": { "not": { "u_has_effect": "effect_electrokin_personal_battery" } },
279286
"effect": [
280287
{ "u_message": "The hair on your body stands up on end.", "type": "good" },

0 commit comments

Comments
 (0)