From 1ffa388cb3b2a959b67f4959c7c640459e49e1d1 Mon Sep 17 00:00:00 2001 From: "Standing-StormStanding-Storm git config --global user.name Standing-Storm git config --global user.name Standing-Storm" Date: Tue, 7 Jan 2025 16:59:05 -0600 Subject: [PATCH] Initial commit --- data/mods/Aftershock/effects_esper.json | 8 + data/mods/Aftershock/player/activities.json | 11 + .../recipes/esper/practice_eocs.json | 97 +++++++++ .../recipes/esper/telekinesis_practice.json | 70 ++++++ .../spells/psionics/telekinesis.json | 200 ++++++++++++++++++ .../telekinesis_concentration_eocs.json | 0 .../spells/psionics/telekinesis_eocs.json | 110 ++++++++++ 7 files changed, 496 insertions(+) create mode 100644 data/mods/Aftershock/player/activities.json create mode 100644 data/mods/Aftershock/recipes/esper/practice_eocs.json create mode 100644 data/mods/Aftershock/recipes/esper/telekinesis_practice.json create mode 100644 data/mods/Aftershock/spells/psionics/telekinesis.json create mode 100644 data/mods/Aftershock/spells/psionics/telekinesis_concentration_eocs.json create mode 100644 data/mods/Aftershock/spells/psionics/telekinesis_eocs.json diff --git a/data/mods/Aftershock/effects_esper.json b/data/mods/Aftershock/effects_esper.json index 505c8e1994087..d35efbc0090b6 100644 --- a/data/mods/Aftershock/effects_esper.json +++ b/data/mods/Aftershock/effects_esper.json @@ -1,4 +1,12 @@ [ + { + "type": "effect_type", + "id": "effect_afs_esper_studying_power", + "//": "Hidden effect, used as a tracker", + "name": [ "" ], + "desc": [ "" ], + "rating": "good" + }, { "type": "effect_type", "id": "effect_afs_esper_headache", diff --git a/data/mods/Aftershock/player/activities.json b/data/mods/Aftershock/player/activities.json new file mode 100644 index 0000000000000..10683ee3fdba9 --- /dev/null +++ b/data/mods/Aftershock/player/activities.json @@ -0,0 +1,11 @@ +[ + { + "id": "ACT_AFS_ESPER_STUDYING_POWER", + "type": "activity_type", + "activity_level": "LIGHT_EXERCISE", + "verb": "meditating", + "based_on": "time", + "rooted": true, + "do_turn_eoc": "EOC_AFS_ESPER_STUDYING_POWER" + } +] diff --git a/data/mods/Aftershock/recipes/esper/practice_eocs.json b/data/mods/Aftershock/recipes/esper/practice_eocs.json new file mode 100644 index 0000000000000..7946b6aa9f1eb --- /dev/null +++ b/data/mods/Aftershock/recipes/esper/practice_eocs.json @@ -0,0 +1,97 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_STUDYING_POWER", + "condition": { "u_has_effect": "effect_psi_studying_power" }, + "effect": [ + { "math": [ "u_afs_esper_studying_tick_experience_counter", "+=", "contemplation_factor(1)" ] }, + { + "if": { "math": [ "u_afs_esper_studying_tick_experience_counter >= 1" ] }, + "then": [ + { "math": [ "u_spell_exp(u_latest_studied_power_name)", "+=", "1" ] }, + { "math": [ "u_afs_esper_studying_tick_experience_counter", "-=", "1" ] } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_STUDYING_POWER_BEGIN", + "condition": { "not": { "u_has_any_effect": [ "weary_5", "weary_6", "weary_7", "weary_8" ] } }, + "effect": [ + { "u_message": "You spend some time meditating and developing your powers.", "type": "good" }, + { "math": [ "u_afs_esper_studying_tick_experience_counter = 0" ] }, + { "u_add_effect": "effect_afs_esper_studying_power", "duration": "24 hours" }, + { "u_assign_activity": "ACT_AFS_ESPER_STUDYING_POWER", "duration": "24 hours" }, + { "run_eocs": "EOC_AFS_ESPER_STUDYING_POWER_METAPHYSICS_GAIN", "time_in_future": [ "30 seconds", "5 minutes" ] } + ], + "false_effect": [ { "u_message": "You are too exhausted to develop your powers.", "type": "bad" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_STUDYING_POWER_METAPHYSICS_GAIN", + "condition": { + "and": [ + { "u_has_effect": "effect_afs_esper_studying_power" }, + { "math": [ "u_latest_studied_power_difficulty > u_skill('metaphysics')" ] } + ] + }, + "effect": [ + { "math": [ "u_skill_exp('metaphysics', 'format': 'raw')", "+=", "(35 * u_latest_studied_power_difficulty)" ] }, + { "run_eocs": "EOC_AFS_ESPER_STUDYING_POWER_METAPHYSICS_GAIN", "time_in_future": [ "30 seconds", "5 minutes" ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_STUDYING_POWER_SIDE_EFFECTS", + "effect": [ { "run_eocs": "EOC_AFS_ESPER_STUDYING_POWER_FOCUS_REDUCTION", "time_in_future": [ "1 minutes", "1 minutes" ] } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_STUDYING_POWER_FOCUS_REDUCTION", + "condition": { "u_has_effect": "effect_afs_esper_studying_power" }, + "effect": [ + { "if": { "math": [ "u_val('focus') >= 25" ] }, "then": { "math": [ "u_val('focus')", "-=", "rand(1)" ] } }, + { "run_eocs": "EOC_AFS_ESPER_STUDYING_POWER_FOCUS_REDUCTION", "time_in_future": [ "1 minutes", "1 minutes" ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_CANCELLING_ACTIVITY_CANCELS_RESEARCH", + "eoc_type": "EVENT", + "required_event": "character_finished_activity", + "condition": { + "and": [ + { "compare_string": [ "ACT_AFS_ESPER_STUDYING_POWER", { "context_val": "activity" } ] }, + { "u_has_effect": "effect_afs_esper_studying_power" } + ] + }, + "effect": [ { "u_lose_effect": "effect_afs_esper_studying_power" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_ESPER_TOO_TIRED_TO_STUDY", + "eoc_type": "EVENT", + "required_event": "character_gains_effect", + "condition": { + "and": [ + { + "or": [ + { "compare_string": [ "weary_5", { "context_val": "effect" } ] }, + { "compare_string": [ "weary_6", { "context_val": "effect" } ] }, + { "compare_string": [ "weary_7", { "context_val": "effect" } ] }, + { "compare_string": [ "weary_8", { "context_val": "effect" } ] } + ] + }, + { "u_has_effect": "effect_afs_esper_studying_power" } + ] + }, + "effect": [ + { "u_lose_effect": "effect_afs_esper_studying_power" }, + { + "u_message": "You're so exhausted you can barely think straight, and certainly can't concentrate on studying your powers.", + "popup": true + } + ] + } +] diff --git a/data/mods/Aftershock/recipes/esper/telekinesis_practice.json b/data/mods/Aftershock/recipes/esper/telekinesis_practice.json new file mode 100644 index 0000000000000..d1580cb8a55a7 --- /dev/null +++ b/data/mods/Aftershock/recipes/esper/telekinesis_practice.json @@ -0,0 +1,70 @@ +[ + { + "id": "telekinesis_practice", + "type": "nested_category", + "activity_level": "LIGHT_EXERCISE", + "category": "CC_PRACTICE", + "subcategory": "CSC_PRACTICE_PSI", + "name": "[Ψ]practice: telekinesis", + "description": "Recipes related to practicing telekinesis.", + "skill_used": "metaphysics", + "nested_category_data": [ + "practice_afs_telekinetic_move_items", + "practice_afs_elekinetic_move_creatures", + "practice_afs_telekinetic_slam_down", + "practice_afs_telekinetic_momentum", + "practice_afs_telekinetic_wave", + "practice_afs_telekinetic_hammer", + "practice_afs_telekinetic_shield" + ], + "difficulty": 1 + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "name": "[Ψ]far hand", + "id": "practice_afs_telekinetic_move_items", + "description": "Contemplate your powers and improve your ability to pick up and move items.", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "metaphysics", + "difficulty": 1, + "time": "0 s", + "autolearn": false, + "flags": [ "SECRET", "BLIND_EASY", "NO_MANIP", "AFFECTED_BY_PAIN", "NO_BENCH", "NO_ENCHANTMENT" ], + "result_eocs": [ + { + "id": "EOC_PRACTICE_AFS_TELEKIN_MOVE_ITEMS", + "effect": [ + { "set_string_var": "afs_telekinetic_move_item", "target_var": { "u_val": "latest_studied_power_name" } }, + { "math": [ "u_latest_studied_power_difficulty = 2" ] }, + { "run_eocs": [ "EOC_AFS_ESPER_STUDYING_POWER_BEGIN", "EOC_AFS_ESPER_STUDYING_POWER_SIDE_EFFECTS" ] } + ] + } + ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "name": "[Ψ]force shove", + "id": "practice_afs_telekinetic_move_creatures", + "description": "Contemplate your powers and improve your ability to pick up and move beings.", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "metaphysics", + "difficulty": 2, + "time": "0 s", + "autolearn": false, + "flags": [ "SECRET", "BLIND_EASY", "NO_MANIP", "AFFECTED_BY_PAIN", "NO_BENCH", "NO_ENCHANTMENT" ], + "result_eocs": [ + { + "id": "EOC_PRACTICE_AFS_TELEKIN_MOVE_CREATURES", + "effect": [ + { "set_string_var": "afs_telekinetic_move_creature", "target_var": { "u_val": "latest_studied_power_name" } }, + { "math": [ "u_latest_studied_power_difficulty = 3" ] }, + { "run_eocs": [ "EOC_AFS_ESPER_STUDYING_POWER_BEGIN", "EOC_AFS_ESPER_STUDYING_POWER_SIDE_EFFECTS" ] } + ] + } + ] + } +] diff --git a/data/mods/Aftershock/spells/psionics/telekinesis.json b/data/mods/Aftershock/spells/psionics/telekinesis.json new file mode 100644 index 0000000000000..af25cd15a662c --- /dev/null +++ b/data/mods/Aftershock/spells/psionics/telekinesis.json @@ -0,0 +1,200 @@ +[ + { + "id": "afs_telekinetic_move_item", + "type": "SPELL", + "name": "[Ψ]Far Hand", + "description": "Move a set of items towards or away from you.", + "message": "", + "teachable": false, + "valid_targets": [ "self" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 2, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "effect_on_condition", + "effect_str": "EOC_AFS_TELEKINETIC_FAR_HAND_SELECTOR", + "shape": "blast", + "energy_source": "STAMINA", + "base_energy_cost": 1250, + "final_energy_cost": 500, + "energy_increment": -80, + "base_casting_time": 50, + "final_casting_time": 10, + "casting_time_increment": -4, + "ignored_monster_species": [ "PSI_NULL", "TELEKIN_PUSHPULL_NULL" ] + }, + { + "id": "afs_telekinetic_item_pull_real", + "type": "SPELL", + "name": { "str": "[Ψ]Far Hand Pull Items Real", "//~": "NO_I18N" }, + "description": { "str": "The actual effect that causes the far hand. It's a bug if you have it.", "//~": "NO_I18N" }, + "message": "", + "teachable": false, + "valid_targets": [ "item", "ground" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 1, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "directed_push", + "shape": "blast", + "min_damage": { + "math": [ + "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.4) + 1) * (scaling_factor(u_val('intelligence') ) * -1), 40)" + ] + }, + "max_damage": { + "math": [ + "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.9) + 4) * (scaling_factor(u_val('intelligence') ) * -1), 40)" + ] + }, + "min_range": { + "math": [ "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.9) + 2) * (scaling_factor(u_val('intelligence') ) ), 40)" ] + }, + "max_range": { + "math": [ "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.9) + 2) * (scaling_factor(u_val('intelligence') ) ), 40)" ] + } + }, + { + "id": "afs_telekinetic_item_push_real", + "type": "SPELL", + "name": { "str": "[Ψ]Far Hand Push Items Real", "//~": "NO_I18N" }, + "description": { "str": "The actual effect that causes the far hand. It's a bug if you have it.", "//~": "NO_I18N" }, + "message": "", + "teachable": false, + "valid_targets": [ "item", "ground" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 1, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "directed_push", + "shape": "blast", + "min_damage": { + "math": [ "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.4) + 1) * scaling_factor(u_val('intelligence') ), 40)" ] + }, + "max_damage": { + "math": [ "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.9) + 4) * scaling_factor(u_val('intelligence') ), 40)" ] + }, + "min_range": { + "math": [ "min( ( (u_spell_level('afs_telekinetic_move_item') * 0.9) + 2) * scaling_factor(u_val('intelligence') ), 40)" ] + }, + "max_range": { + "math": [ "min( ( ( (u_spell_level('afs_telekinetic_move_item') * 0.9) + 2) * scaling_factor(u_val('intelligence') ) ), 40)" ] + } + }, + { + "id": "afs_telekinetic_move_creature", + "type": "SPELL", + "name": "[Ψ]Force Shove", + "description": "Shove a target away or pull it towards you with a burst of psionic force. The distance the target can be moved depends on its weight versus your power level; heavier things will not go as far, and if your target is too heavy, you may not be able to move it at all.", + "message": "", + "teachable": false, + "valid_targets": [ "self" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 3, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "effect_on_condition", + "effect_str": "EOC_AFS_TELEKINETIC_FORCE_SHOVE_SELECTOR", + "shape": "blast", + "max_range": 40, + "energy_source": "STAMINA", + "base_energy_cost": 1750, + "final_energy_cost": 750, + "energy_increment": -80, + "base_casting_time": 50, + "final_casting_time": 10, + "casting_time_increment": -4 + }, + { + "id": "afs_telekinetic_force_shove_away_target", + "type": "SPELL", + "name": { "str": "[Ψ]Force Shove Away", "//~": "NO_I18N" }, + "description": { "str": "The power that shoves a target away. It's a bug if you have it.", "//~": "NO_I18N" }, + "message": "", + "teachable": false, + "valid_targets": [ "ally", "hostile" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 1, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "effect_on_condition", + "effect_str": "EOC_TELEKINETIC_FORCE_SHOVE_PUSH_CHECKER", + "shape": "blast", + "min_range": { + "math": [ + "min( ( ( (u_spell_level('telekinetic_push') * 0.9) + 2) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling), 40)" + ] + }, + "max_range": 40, + "ignored_monster_species": [ "PSI_NULL", "TELEKIN_PUSHPULL_NULL" ] + }, + { + "id": "afs_telekinetic_force_shove_toward_target", + "type": "SPELL", + "name": { "str": "[Ψ]Force Shove Toward", "//~": "NO_I18N" }, + "description": { "str": "The power that shoves a target toward. It's a bug if you have it.", "//~": "NO_I18N" }, + "message": "", + "teachable": false, + "valid_targets": [ "ally", "hostile" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 1, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "effect_on_condition", + "effect_str": "EOC_AFS_TELEKINETIC_FORCE_SHOVE_PULL_CHECKER", + "shape": "blast", + "min_range": { + "math": [ "min( ( (u_spell_level('afs_telekinetic_move_creature') * 0.9) + 2) * scaling_factor(u_val('intelligence') ), 40)" ] + }, + "max_range": 40, + "ignored_monster_species": [ "PSI_NULL", "TELEKIN_PUSHPULL_NULL" ] + }, + { + "id": "afs_telekinetic_force_shove_away", + "type": "SPELL", + "name": { "str": "[Ψ]Force Shove Push Real", "//~": "NO_I18N" }, + "description": { "str": "The actual effect that causes the force shove away. It's a bug if you have it.", "//~": "NO_I18N" }, + "message": "", + "teachable": false, + "valid_targets": [ "ally", "hostile" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 1, + "max_level": 30, + "effect": "directed_push", + "shape": "blast", + "min_damage": 0, + "max_damage": 30, + "damage_increment": 1, + "min_range": 50, + "max_range": 50 + }, + { + "id": "afs_telekinetic_force_shove_toward", + "type": "SPELL", + "name": { "str": "[Ψ]Force Shove Pull Real", "//~": "NO_I18N" }, + "description": { "str": "The actual effect that causes the force shove toward. It's a bug if you have it.", "//~": "NO_I18N" }, + "message": "", + "teachable": false, + "valid_targets": [ "ally", "hostile" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ], + "difficulty": 1, + "max_level": 30, + "effect": "directed_push", + "shape": "blast", + "min_damage": 0, + "max_damage": -30, + "damage_increment": -1, + "min_range": 50, + "max_range": 50 + } +] diff --git a/data/mods/Aftershock/spells/psionics/telekinesis_concentration_eocs.json b/data/mods/Aftershock/spells/psionics/telekinesis_concentration_eocs.json new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/data/mods/Aftershock/spells/psionics/telekinesis_eocs.json b/data/mods/Aftershock/spells/psionics/telekinesis_eocs.json new file mode 100644 index 0000000000000..f761c8edb25a0 --- /dev/null +++ b/data/mods/Aftershock/spells/psionics/telekinesis_eocs.json @@ -0,0 +1,110 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FAR_HAND_SELECTOR", + "effect": { + "run_eoc_selector": [ "EOC_AFS_TELEKINETIC_FAR_HAND_SELECTOR_PULL", "EOC_AFS_TELEKINETIC_FAR_HAND_SELECTOR_PUSH" ], + "names": [ "Pull", "Push" ], + "keys": [ "1", "2" ], + "descriptions": [ "Pull a set of items to you.", "Push a set of items away from you." ] + } + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FAR_HAND_SELECTOR_PULL", + "effect": { "u_cast_spell": { "id": "afs_telekinetic_item_pull_real" }, "targeted": true } + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FAR_HAND_SELECTOR_PUSH", + "effect": { "u_cast_spell": { "id": "afs_telekinetic_item_push_real" }, "targeted": true } + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FORCE_SHOVE_SELECTOR", + "effect": { + "run_eoc_selector": [ "EOC_AFS_TELEKINETIC_FORCE_SHOVE_SELECTOR_PUSH", "EOC_AFS_TELEKINETIC_FORCE_SHOVE_SELECTOR_PULL" ], + "names": [ "Push", "Pull" ], + "keys": [ "1", "2" ], + "descriptions": [ "Shove a target away from you.", "Grab a target and pull them towards you." ] + } + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FORCE_SHOVE_SELECTOR_PUSH", + "effect": { "u_cast_spell": { "id": "afs_telekinetic_force_shove_away_target" }, "targeted": true } + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FORCE_SHOVE_SELECTOR_PULL", + "effect": { "u_cast_spell": { "id": "afs_telekinetic_force_shove_toward_target" }, "targeted": true } + }, + { + "type": "effect_on_condition", + "id": "EOC_TELEKINETIC_FORCE_SHOVE_PUSH_CHECKER", + "effect": [ + { "math": [ "u_telekinesis_intelligence = ( ( n_val('intelligence') + 10) / 20 )" ] }, + { "math": [ "u_telekinesis_power_level = n_spell_level('afs_telekinetic_move_creature')" ] }, + { + "math": [ + "u_weight_ratio", + "=", + "(((u_telekinesis_power_level * 25) * u_telekinesis_intelligence) + 10) / (u_weight() / 1000000)" + ] + }, + { "math": [ "u_afs_telekinesis_shove_spell_level = clamp(((u_weight_ratio - 1) * 2), 0, 30)" ] }, + { "u_location_variable": { "context_val": "loc" } }, + { + "if": { "math": [ "u_afs_telekinesis_shove_spell_level < 1" ] }, + "then": { "run_eocs": "EOC_TELEKINETIC_PUSH_DOWN_CHECKER" }, + "else": [ + { + "npc_cast_spell": { "id": "afs_telekinetic_force_shove_away", "min_level": { "math": [ "u_afs_telekinesis_shove_spell_level" ] } }, + "loc": { "context_val": "loc" } + }, + { "npc_message": "You hurl your target away.", "type": "good" }, + { "run_eocs": "EOC_AFS_TELEKINETIC_PUSH_DOWN_CHECKER" } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_PUSH_DOWN_CHECKER", + "condition": { "x_in_y_chance": { "x": { "math": [ "u_weight_ratio * 1000" ] }, "y": 1000 } }, + "effect": [ + { "u_add_effect": "downed", "duration": 2 }, + { "npc_message": "You shove your target off their feet.", "type": "good" } + ], + "false_effect": [ { "npc_message": "You attempt to shove your target but they are too heavy!", "type": "bad" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_FORCE_SHOVE_PULL_CHECKER", + "effect": [ + { "math": [ "u_telekinesis_intelligence = ( ( n_val('intelligence') + 10) / 20 )" ] }, + { "math": [ "u_telekinesis_power_level = n_spell_level('afs_telekinetic_move_creature')" ] }, + { + "math": [ + "u_weight_ratio", + "=", + "(((u_telekinesis_power_level * 25) * u_telekinesis_intelligence ) + 10) / (u_weight() / 1000000)" + ] + }, + { "math": [ "u_telekinesis_pull_spell_level = clamp(((u_weight_ratio - 1) * 2), 0, 30)" ] }, + { "u_location_variable": { "context_val": "loc" } }, + { + "if": { "math": [ "u_telekinesis_pull_spell_level < 1" ] }, + "then": { "run_eocs": "EOC_TELEKINETIC_PUSH_DOWN_CHECKER" }, + "else": [ + { + "npc_cast_spell": { "id": "afs_telekinetic_force_shove_toward", "min_level": { "math": [ "u_telekinesis_shove_spell_level" ] } }, + "loc": { "context_val": "loc" } + }, + { "npc_message": "You pull your target towards you.", "type": "good" }, + { "run_eocs": "EOC_TELEKINETIC_PUSH_DOWN_CHECKER" } + ] + } + ] + } +]