diff --git a/data/mods/Aftershock/EOC/esper_eoc.json b/data/mods/Aftershock/EOC/esper_eoc.json index b6fa35dc81a03..1c148c7c54632 100644 --- a/data/mods/Aftershock/EOC/esper_eoc.json +++ b/data/mods/Aftershock/EOC/esper_eoc.json @@ -107,6 +107,7 @@ "EOC_AFS_ELECTROKIN_REMOVE_SEE_ELECTRICITY", "EOC_AFS_ELECTROKIN_REMOVE_HACKING_INTERFACE", "EOC_AFS_ELECTROKIN_REMOVE_PERSONAL_BATTERY", + "EOC_AFS_TELEKIN_REMOVE_MOMENTUM", "EOC_AFS_TELEPATH_REMOVE_TELEPATHIC_SHIELD", "EOC_AFS_TELEPATH_REMOVE_SENSE_MINDS", "EOC_AFS_TELEPATH_REMOVE_TELEPATHIC_SUGGESTION" diff --git a/data/mods/Aftershock/EOC/esper_recipe_learning_eoc.json b/data/mods/Aftershock/EOC/esper_recipe_learning_eoc.json index 9e53770252926..71e8d2cde1188 100644 --- a/data/mods/Aftershock/EOC/esper_recipe_learning_eoc.json +++ b/data/mods/Aftershock/EOC/esper_recipe_learning_eoc.json @@ -74,6 +74,61 @@ }, "effect": [ { "u_learn_recipe": "practice_afs_electrokinetic_recharge_vehicle" } ] }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKINETIC_RECIPE_TEACHER", + "eoc_type": "EVENT", + "required_event": "game_begin", + "condition": { "u_has_trait": "AFS_TELEKINETIC" }, + "effect": [ { "run_eocs": "EOC_TEACH_AFS_TELEKINETIC_CONTEMPLATE_RECIPES" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_TEACH_AFS_TELEKINETIC_CONTEMPLATE_RECIPES", + "effect": [ + { + "run_eocs": [ + "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MOVE_ITEM", + "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MOVE_CREATURE", + "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MOMENTUM", + "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_WAVE_OF_FORCE", + "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MINDHAMMER" + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MOVE_ITEM", + "condition": { "and": [ { "u_has_trait": "AFS_TELEKINETIC" }, { "math": [ "u_spell_level('afs_telekinetic_move_item') >= 0" ] } ] }, + "effect": [ { "u_learn_recipe": "practice_afs_telekinetic_move_items" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MOVE_CREATURE", + "condition": { + "and": [ { "u_has_trait": "AFS_TELEKINETIC" }, { "math": [ "u_spell_level('afs_telekinetic_move_creature') >= 0" ] } ] + }, + "effect": [ { "u_learn_recipe": "practice_afs_telekinetic_move_creatures" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MOMENTUM", + "condition": { "and": [ { "u_has_trait": "AFS_TELEKINETIC" }, { "math": [ "u_spell_level('afs_telekinetic_momentum') >= 0" ] } ] }, + "effect": [ { "u_learn_recipe": "practice_afs_telekinetic_momentum" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_WAVE_OF_FORCE", + "condition": { "and": [ { "u_has_trait": "AFS_TELEKINETIC" }, { "math": [ "u_spell_level('afs_telekinetic_wave') >= 0" ] } ] }, + "effect": [ { "u_learn_recipe": "practice_afs_telekinetic_wave" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_CHECK_GAMEBEGIN_AFS_TELEKINETIC_RECIPE_MINDHAMMER", + "condition": { "and": [ { "u_has_trait": "AFS_TELEKINETIC" }, { "math": [ "u_spell_level('afs_telekinetic_hammer') >= 0" ] } ] }, + "effect": [ { "u_learn_recipe": "practice_afs_telekinetic_hammer" } ] + }, { "type": "effect_on_condition", "id": "EOC_AFS_TELEPATH_RECIPE_TEACHER", diff --git a/data/mods/Aftershock/damage_types.json b/data/mods/Aftershock/damage_types.json index 0fad04370d098..225b6085de366 100644 --- a/data/mods/Aftershock/damage_types.json +++ b/data/mods/Aftershock/damage_types.json @@ -98,6 +98,40 @@ "melee_combat_info": { "order": 401, "show_type": false }, "ablative_info": { "order": 301, "show_type": false } }, + { + "id": "psi_telekinetic_damage", + "type": "damage_type", + "physical": false, + "magic_color": "yellow", + "name": "telekinetic", + "skill": "metaphysics", + "derived_from": [ "bash", 0.9 ], + "immune_flags": { "character": [ "TELEKIN_SHIELD" ], "monster": [ "TELEKIN_IMMUNE" ] }, + "ondamage_eocs": [ "EOC_TELEKINETIC_DAMAGE_KNOCKDOWN_CHANCE", "EOC_TELEKINETIC_DAMAGE_STAGGER_CHANCE" ] + }, + { + "type": "effect_on_condition", + "id": "EOC_TELEKINETIC_DAMAGE_STAGGER_CHANCE", + "condition": { "and": [ { "x_in_y_chance": { "x": { "math": [ "2" ] }, "y": 5 } }, { "math": [ "_damage_taken > 0" ] } ] }, + "effect": [ { "npc_add_effect": "staggered", "duration": "2 s" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_TELEKINETIC_DAMAGE_KNOCKDOWN_CHANCE", + "condition": { "and": [ { "x_in_y_chance": { "x": { "math": [ "1" ] }, "y": 5 } }, { "math": [ "_damage_taken > 0" ] } ] }, + "effect": [ { "npc_add_effect": "downed", "duration": "1 s" } ] + }, + { + "id": "psi_telekinetic_damage", + "type": "damage_info_order", + "info_display": "detailed", + "verb": "buffeting", + "bionic_info": { "order": 999899, "show_type": false }, + "protection_info": { "order": 999899, "show_type": false }, + "pet_prot_info": { "order": 999899, "show_type": false }, + "melee_combat_info": { "order": 999899, "show_type": false }, + "ablative_info": { "order": 999899, "show_type": false } + }, { "id": "psi_telepathic_damage", "type": "damage_type", diff --git a/data/mods/Aftershock/effects_esper.json b/data/mods/Aftershock/effects_esper.json index 505c8e1994087..be9816564f358 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", @@ -93,9 +101,7 @@ { "condition": { "test_eoc": "EOC_IS_ELECTRIC" }, "distance": { - "math": [ - "( ( u_spell_level('electrokinesis_see_electric') * 1.5) + 6 ) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling" - ] + "math": [ "( ( u_spell_level('electrokinesis_see_electric') * 1.5) + 6 ) * (scaling_factor(u_val('intelligence') ) )" ] }, "descriptions": [ { @@ -146,6 +152,53 @@ "rating": "good", "max_duration": "7 days" }, + { + "type": "effect_type", + "id": "effect_afs_telekinetic_momentum", + "name": [ "Altered Momentum" ], + "desc": [ "Your powers are affecting movement around you; dangerous objects are slowed and your own speed is increased." ], + "apply_message": "", + "remove_message": "Nearby movement returns to normal.", + "rating": "good", + "max_duration": "7 days", + "enchantments": [ + { + "incoming_damage_mod": [ + { + "type": "bash", + "multiply": { "math": [ "( u_spell_level('afs_telekinetic_momentum') * -0.01 ) * scaling_factor(u_val('intelligence') )" ] } + }, + { + "type": "stab", + "multiply": { "math": [ "( u_spell_level('afs_telekinetic_momentum') * -0.005 ) * scaling_factor(u_val('intelligence') )" ] } + }, + { + "type": "cut", + "multiply": { "math": [ "( u_spell_level('afs_telekinetic_momentum') * -0.005 ) * scaling_factor(u_val('intelligence') ) " ] } + }, + { + "type": "bullet", + "multiply": { "math": [ "( u_spell_level('afs_telekinetic_momentum') * -0.02 ) * scaling_factor(u_val('intelligence') )" ] } + } + ], + "values": [ + { + "value": "MOVE_COST", + "multiply": { + "math": [ + "max( ( ( ( u_spell_level('afs_telekinetic_momentum') * -0.005 ) * scaling_factor(u_val('intelligence') ) ) ), -0.15)" + ] + } + }, + { + "value": "ATTACK_SPEED", + "multiply": { "math": [ "( u_spell_level('afs_telekinetic_momentum') * -0.01 ) * scaling_factor(u_val('intelligence') )" ] } + } + ] + } + ], + "flags": [ "MUSCLE_VEH_BOOST" ] + }, { "type": "effect_type", "id": "effect_telepath_sense_minds", diff --git a/data/mods/Aftershock/flags.json b/data/mods/Aftershock/flags.json index b89da487905ac..5ccd551276422 100644 --- a/data/mods/Aftershock/flags.json +++ b/data/mods/Aftershock/flags.json @@ -18,6 +18,16 @@ "type": "json_flag", "info": "You are immune to telepathy." }, + { + "id": "TELEKIN_SHIELD", + "type": "json_flag", + "//": "Immune to telekinetic damage" + }, + { + "id": "TELEKIN_IMMUNE", + "type": "monster_flag", + "//": "Immune to telekinetic damage" + }, { "id": "SHIELD_GENERATOR", "type": "json_flag", diff --git a/data/mods/Aftershock/mutations/esper.json b/data/mods/Aftershock/mutations/esper.json index 39b7204d86a11..8c64efcf986e3 100644 --- a/data/mods/Aftershock/mutations/esper.json +++ b/data/mods/Aftershock/mutations/esper.json @@ -26,6 +26,19 @@ "player_display": false, "spells_learned": [ [ "afs_classless_toggleable_concentration_end", 1 ] ] }, + { + "type": "mutation", + "id": "AFS_TELEKINETIC", + "name": "Telekinetic", + "points": 0, + "description": "The ability to move objects without touching them.", + "types": [ "ESPER" ], + "starting_trait": false, + "purifiable": false, + "valid": false, + "player_display": false, + "spells_learned": [ [ "afs_classless_toggleable_concentration_end", 1 ] ] + }, { "type": "mutation", "id": "AFS_TELEPATH", 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/player/hobbies.json b/data/mods/Aftershock/player/hobbies.json index b0694d84fb09a..2734dfe748ca6 100644 --- a/data/mods/Aftershock/player/hobbies.json +++ b/data/mods/Aftershock/player/hobbies.json @@ -64,5 +64,15 @@ "points": 5, "traits": [ "ESPER", "AFS_TELEPATH" ], "spells": [ { "id": "afs_telepathic_mind_sense", "level": 3 }, { "id": "afs_telepathic_shield", "level": 2 } ] + }, + { + "type": "profession", + "subtype": "hobby", + "id": "afs_telekinetic_hobby", + "name": "Esper Inheritance (Geist)", + "description": "Some long-distant member of your family received psi treatments during the Hyperspace Era and somehow it stuck in their DNA. Always unpredictable, skipping multiple generations at a time, that inheritance has been passed down to you. You have no training and little idea what you're doing, but you've developed a trick or two.", + "points": 5, + "traits": [ "ESPER", "AFS_TELEKINETIC" ], + "spells": [ { "id": "afs_telekinetic_move_item", "level": 3 }, { "id": "afs_telekinetic_move_creature", "level": 2 } ] } ] diff --git a/data/mods/Aftershock/player/professions.json b/data/mods/Aftershock/player/professions.json index 25b737364707d..636a60057b4dd 100644 --- a/data/mods/Aftershock/player/professions.json +++ b/data/mods/Aftershock/player/professions.json @@ -704,5 +704,41 @@ "male": { "entries": [ { "item": "briefs" } ] }, "female": { "entries": [ { "item": "sports_bra" }, { "item": "boy_shorts" } ] } } + }, + { + "type": "profession", + "id": "afs_esper_telekinetic", + "name": "Geist", + "description": "You are a telekinetic, able to move objects without touching them. You aren't entirely sure how you got your powers, but you seem to have an instinctive sense of how to use them. That's not sinister at all, right?", + "points": 7, + "traits": [ "AFS_TELEKINETIC" ], + "flags": [ "SCEN_ONLY" ], + "skills": [ { "level": 4, "name": "metaphysics" } ], + "spells": [ + { "id": "afs_telekinetic_move_item", "level": 8 }, + { "id": "afs_telekinetic_move_creature", "level": 6 }, + { "id": "afs_telekinetic_momentum", "level": 6 }, + { "id": "afs_telekinetic_wave", "level": 5 }, + { "id": "afs_telekinetic_hammer", "level": 3 } + ], + "proficiencies": [ "prof_concentration_basic" ], + "items": { + "both": { + "entries": [ + { "item": "spacer_jumpsuit" }, + { "item": "spacer_cap" }, + { "item": "socks" }, + { "item": "boots" }, + { "item": "wristwatch" }, + { "item": "cream_prot_cold" }, + { "item": "cream_prot_cold" }, + { "group": "charged_smart_phone" }, + { "item": "XL_holster" }, + { "item": "afs_cartridge", "ammo-item": "battery", "charges": [ 900, 1485 ], "container-item": "afs_v29" } + ] + }, + "male": { "entries": [ { "item": "briefs" } ] }, + "female": { "entries": [ { "item": "sports_bra" }, { "item": "boy_shorts" } ] } + } } ] 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..c7e4cf4ed6202 --- /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_afs_esper_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..00fea230f0ba7 --- /dev/null +++ b/data/mods/Aftershock/recipes/esper/telekinesis_practice.json @@ -0,0 +1,140 @@ +[ + { + "id": "afs_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_telekinetic_move_creatures", + "practice_afs_telekinetic_momentum", + "practice_afs_telekinetic_wave", + "practice_afs_telekinetic_hammer" + ], + "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" ] } + ] + } + ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "name": "[Ψ]momentum alteration", + "id": "practice_afs_telekinetic_momentum", + "description": "Contemplate your powers and improve your control of momentum.", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "metaphysics", + "difficulty": 3, + "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_MOMENTUM", + "effect": [ + { "set_string_var": "afs_telekinetic_momentum", "target_var": { "u_val": "latest_studied_power_name" } }, + { "math": [ "u_latest_studied_power_difficulty = 4" ] }, + { "run_eocs": [ "EOC_AFS_ESPER_STUDYING_POWER_BEGIN", "EOC_AFS_ESPER_STUDYING_POWER_SIDE_EFFECTS" ] } + ] + } + ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "name": "[Ψ]wave of force", + "id": "practice_afs_telekinetic_wave", + "description": "Contemplate your powers and develop your ability to control bursts of telekinetic force.", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "metaphysics", + "difficulty": 4, + "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_WAVE", + "effect": [ + { "set_string_var": "afs_telekinetic_wave", "target_var": { "u_val": "latest_studied_power_name" } }, + { "math": [ "u_latest_studied_power_difficulty = 5" ] }, + { "run_eocs": [ "EOC_AFS_ESPER_STUDYING_POWER_BEGIN", "EOC_AFS_ESPER_STUDYING_POWER_SIDE_EFFECTS" ] } + ] + } + ] + }, + { + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "name": "[Ψ]mindhammer", + "id": "practice_afs_telekinetic_hammer", + "description": "Contemplate your powers and improve your ability to smash a small area with telekinetic force.", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "metaphysics", + "difficulty": 6, + "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_HAMMER", + "effect": [ + { "set_string_var": "afs_telekinetic_hammer", "target_var": { "u_val": "latest_studied_power_name" } }, + { "math": [ "u_latest_studied_power_difficulty = 7" ] }, + { "run_eocs": [ "EOC_AFS_ESPER_STUDYING_POWER_BEGIN", "EOC_AFS_ESPER_STUDYING_POWER_SIDE_EFFECTS" ] } + ] + } + ] + } +] diff --git a/data/mods/Aftershock/scenarios.json b/data/mods/Aftershock/scenarios.json index 902045bcaf092..fcb8bf2bc0cc0 100644 --- a/data/mods/Aftershock/scenarios.json +++ b/data/mods/Aftershock/scenarios.json @@ -216,7 +216,7 @@ "description": "There are stories that before the Discontinuity, scientists had developed treatments to unlock the powers of the human mind. To read thoughts, move objects at a distance, control computers by the power of will alone, and even stranger things. Just one more lost secret of the Golden Age.\n\nOr so you thought, but recently you had heard some tantalizing rumors about espers, centered on a backwater planet on the edge of known civilization. You remember buying passage to the Salus system, arriving at Port Augustmoon and buying supplies, and descending to the surface, and after that…things get hazy. You're not entirely sure where you are, and you've clearly been through it, but somehow you've rediscovered that lost secret. Now you just need to make it back alive.", "forced_traits": [ "ESPER" ], "allowed_locs": [ "sloc_afs_glacial_tunnels" ], - "professions": [ "afs_esper_electrokinetic", "afs_esper_telepath" ], + "professions": [ "afs_esper_electrokinetic", "afs_esper_telepath", "afs_esper_telekinetic" ], "flags": [ "LONE_START" ], "start_name": "Lost on the Surface", "reveal_locale": false, diff --git a/data/mods/Aftershock/spells/psionics/telekinesis.json b/data/mods/Aftershock/spells/psionics/telekinesis.json new file mode 100644 index 0000000000000..a063ebda6b492 --- /dev/null +++ b/data/mods/Aftershock/spells/psionics/telekinesis.json @@ -0,0 +1,308 @@ +[ + { + "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 + }, + { + "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_AFS_TELEKINETIC_FORCE_SHOVE_PUSH_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 + }, + { + "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 + }, + { + "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 + }, + { + "id": "afs_telekinetic_momentum", + "type": "SPELL", + "name": "[Ψ]Momentum Alteration (C)", + "description": "Edit the momentum of yourself and nearby objects to your benefit, slowing damaging force and slightly increasing your speed.\n\nThis power is maintained by concentration and may fail if concentration is interrupted.", + "message": "", + "teachable": false, + "valid_targets": [ "self" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION" ], + "difficulty": 4, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "effect_on_condition", + "effect_str": "EOC_AFS_TELEKIN_MOMENTUM_INITIATE", + "shape": "blast", + "min_duration": { "math": [ "( (u_spell_level('afs_telekinetic_momentum') * 1000) + 9000) * scaling_factor(u_val('intelligence') )" ] }, + "max_duration": { "math": [ "( (u_spell_level('afs_telekinetic_momentum') * 2000) + 60000) * scaling_factor(u_val('intelligence') )" ] }, + "energy_source": "STAMINA", + "base_energy_cost": { + "math": [ + "u_effect_intensity('effect_afs_telekinetic_momentum') > -1 ? 0 : max((3500 - (u_spell_level('afs_telekinetic_momentum') * 125)), 1750)" + ] + }, + "base_casting_time": { + "math": [ + "u_effect_intensity('effect_afs_telekinetic_momentum') > -1 ? 10 : max((300 -(u_spell_level('afs_telekinetic_momentum') * 7.5)), 125)" + ] + } + }, + { + "id": "afs_telekinetic_wave", + "type": "SPELL", + "name": "[Ψ]Wave of Force", + "description": "Unleash a telekinetic wave around you that indiscriminately knocks everything back.", + "message": "You knock everything nearby backwards!", + "teachable": false, + "valid_targets": [ "self" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "WONDER", "NO_HANDS", "NO_LEGS" ], + "difficulty": 5, + "max_level": { "math": [ "int_to_level(1)" ] }, + "effect": "attack", + "extra_effects": [ { "id": "afs_telekinetic_wavepush", "hit_self": true } ], + "shape": "blast", + "min_damage": 12, + "max_damage": 12, + "energy_source": "STAMINA", + "base_energy_cost": 5500, + "final_energy_cost": 2500, + "energy_increment": -125, + "base_casting_time": 50, + "final_casting_time": 20, + "casting_time_increment": -4 + }, + { + "id": "afs_telekinetic_wavepush", + "type": "SPELL", + "name": { "str": "[Ψ]Telekinetic Wave Push", "//~": "NO_I18N" }, + "description": { "str": "Part of Wave of Force. If you see this it's a bug.", "//~": "NO_I18N" }, + "message": "", + "valid_targets": [ "ally", "hostile", "item" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS", "RANDOM_TARGET", "NO_EXPLOSION_SFX" ], + "effect": "directed_push", + "shape": "blast", + "max_level": { "math": [ "int_to_level(1)" ] }, + "damage_type": "psi_telekinetic_damage", + "min_damage": { + "math": [ "min( ( ( (u_spell_level('afs_telekinetic_wave') * 0.1) + 2) * scaling_factor(u_val('intelligence') ) ), 15)" ] + }, + "max_damage": { "math": [ "( (u_spell_level('afs_telekinetic_wave') * 0.25) + 6) * (scaling_factor(u_val('intelligence') ) )" ] }, + "min_range": 1, + "max_range": 1 + }, + { + "id": "afs_telekinetic_hammer", + "type": "SPELL", + "name": "[Ψ]Mindhammer", + "description": "Smash a single target or small area with a fist of telekinetic force.", + "message": "You smash your target with a fist of force.", + "teachable": false, + "valid_targets": [ "hostile", "ground" ], + "spell_class": "AFS_TELEKINETIC", + "skill": "metaphysics", + "flags": [ "PSIONIC", "CONCENTRATE", "NO_PROJECTILE", "RANDOM_DAMAGE", "NO_HANDS", "NO_LEGS" ], + "difficulty": 7, + "max_level": { "math": [ "int_to_level(1)" ] }, + "damage_type": "psi_telekinetic_damage", + "effect": "attack", + "shape": "blast", + "min_damage": { "math": [ "( (u_spell_level('afs_telekinetic_hammer') * 1.25) + 18) * scaling_factor(u_val('intelligence') )" ] }, + "max_damage": { "math": [ "( (u_spell_level('afs_telekinetic_hammer') * 3.5) + 55) * scaling_factor(u_val('intelligence') )" ] }, + "min_bash_scaling": 1, + "max_bash_scaling": 1, + "min_range": { + "math": [ "min( ( ( (u_spell_level('afs_telekinetic_hammer') * 0.9) + 3) * scaling_factor(u_val('intelligence') ) ), 70)" ] + }, + "max_range": 70, + "energy_source": "STAMINA", + "base_energy_cost": 5750, + "final_energy_cost": 2750, + "energy_increment": -135, + "base_casting_time": 50, + "final_casting_time": 25, + "casting_time_increment": -2.5, + "sound_type": "combat", + "sound_description": "a heavy thud!" + } +] 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..9d7cc86872276 --- /dev/null +++ b/data/mods/Aftershock/spells/psionics/telekinesis_concentration_eocs.json @@ -0,0 +1,56 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKIN_MOMENTUM_INITIATE", + "condition": { "not": { "u_has_effect": "effect_afs_telekinetic_momentum" } }, + "effect": [ + { "u_message": "The air around you feels more yielding.", "type": "good" }, + { "run_eocs": "EOC_AFS_POWER_MAINTENANCE_PLUS_ONE" }, + { "u_add_effect": "effect_afs_telekinetic_momentum", "duration": "PERMANENT" }, + { + "run_eocs": "EOC_AFS_TELEKIN_MOMENTUM_MAINTENANCE", + "time_in_future": [ + { "math": [ "( (u_spell_level('afs_telekinetic_momentum') * 10) + 90) * scaling_factor(u_val('intelligence') )" ] }, + { + "math": [ "( (u_spell_level('afs_telekinetic_momentum') * 20) + 600) * scaling_factor(u_val('intelligence') )" ] + } + ] + } + ], + "false_effect": [ { "run_eocs": "EOC_AFS_TELEKIN_REMOVE_MOMENTUM" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKIN_REMOVE_MOMENTUM", + "condition": { "u_has_effect": "effect_afs_telekinetic_momentum" }, + "effect": [ { "run_eocs": "EOC_AFS_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_afs_telekinetic_momentum" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_AFS_TELEKIN_MOMENTUM_MAINTENANCE", + "condition": { "u_has_effect": "effect_afs_telekinetic_momentum" }, + "effect": [ + { "math": [ "u_latest_channeled_power_difficulty = 4" ] }, + { + "math": [ "u_spell_exp('afs_electrokinetic_see_electric')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] + }, + { + "run_eocs": [ + "EOC_AFS_CONCENTRATION_SUCCESS_PROFICIENCY", + "EOC_AFS_PSI_SKILL_INCREASE_ON_USE_FINALIZE", + "EOC_AFS_CONCENTRATION_COSTS_FOCUS" + ] + }, + { + "run_eocs": "EOC_AFS_TELEKIN_MOMENTUM_MAINTENANCE", + "time_in_future": [ + { "math": [ "( (u_spell_level('afs_telekinetic_momentum') * 10) + 90) * scaling_factor(u_val('intelligence') )" ] }, + { + "math": [ "( (u_spell_level('afs_telekinetic_momentum') * 20) + 600) * scaling_factor(u_val('intelligence') )" ] + } + ] + } + ], + "false_effect": [ ] + } +] 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..9d409979d0dda --- /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_AFS_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_AFS_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_AFS_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_AFS_TELEKINETIC_PUSH_DOWN_CHECKER" } + ] + } + ] + } +]