From 10801ced430a94c7bb19f4e2898a933ef85f847d Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:41:26 -0500 Subject: [PATCH] [Xedra Evolved] New Arvore spell--Verdant Imprisonment (#72784) * Initial commit * Begin updates * Re-add ter-transform * Fixes * Work for NPCs too * Check target is outdoors * Kick tests * Fix duplicate EoC id --- .../mutations/paraclesians/arvore_eocs.json | 61 +++++++++++++++++-- .../paraclesians/arvore_mutation_spells.json | 53 ++++++++++++++-- .../arvore_spell_learning_eocs.json | 20 ++++++ .../ter_transforms/arvore_ter_transforms.json | 35 +++++++++++ 4 files changed, 161 insertions(+), 8 deletions(-) diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json index 2974967f199a8..b76aca09d8e25 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json @@ -701,15 +701,68 @@ { "type": "effect_on_condition", "id": "EOC_ARVORE_VERDANT_IMPRISONMENT", + "condition": "u_is_outside", + "effect": [ { "run_eocs": "EOC_ARVORE_VERDANT_IMPRISONMENT_2" } ], + "false_effect": [ { "npc_message": "Your target must be outdoors to transform them into a tree." } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_ARVORE_VERDANT_IMPRISONMENT_2", + "condition": { "not": "u_is_npc" }, "effect": [ + { "math": [ "u_arvore_turn_into_tree_intelligence", "=", "( ( n_val('intelligence') + 10) / 20 )" ] }, + { "math": [ "u_arvore_turn_into_tree_spell_level", "=", "n_spell_level('arvore_turn_into_tree')" ] }, { - "npc_location_variable": { "global_val": "arvore_tree_transform_target" }, + "u_location_variable": { "global_val": "arvore_tree_transform_target" }, "x_adjust": 0, "y_adjust": 0, - "z_adjust": 0, - "monster": "", + "z_adjust": 0 + }, + { "u_cast_spell": { "id": "arvore_turn_into_tree_banish", "message": "" } }, + { + "run_eoc_with": "EOC_NULL", + "beta_loc": { "global_val": "arvore_tree_transform_target" }, "false_eocs": "EOC_ARVORE_VERDANT_IMPRISONMENT_SUCCESS" } + ], + "false_effect": [ + { + "math": [ + "u_arvore_turn_into_tree_damage", + "=", + "rng(((25 + (n_spell_level('arvore_turn_into_tree') * 5)) * ( ( n_val('intelligence') + 10) / 20 )),((100 + (n_spell_level('arvore_turn_into_tree') * 15)) * ( ( n_val('intelligence') + 10) / 20 )))" + ] + }, + { + "math": [ + "u_health_comparison", + "=", + "(u_hp('arm_l') + u_hp('arm_r') + u_hp('leg_l') + u_hp('leg_r') + u_hp('torso') + u_hp('head')) / 3" + ] + }, + { + "u_location_variable": { "global_val": "arvore_tree_transform_target" }, + "x_adjust": 0, + "y_adjust": 0, + "z_adjust": 0 + }, + { + "if": { "math": [ "u_arvore_turn_into_tree_damage", ">", "u_health_comparison" ] }, + "then": [ + "u_die", + { + "u_map_run_item_eocs": "all", + "min_radius": 0, + "max_radius": 0, + "true_eocs": [ { "id": "EOC_ARVORE_VERDANT_IMPRISONMENT_DELETE_NPC_ITEMS", "effect": [ "npc_die" ] } ] + }, + { + "run_eoc_with": "EOC_NULL", + "beta_loc": { "global_val": "arvore_tree_transform_target" }, + "false_eocs": "EOC_ARVORE_VERDANT_IMPRISONMENT_SUCCESS" + } + ] + } ] }, { @@ -718,7 +771,7 @@ "effect": [ { "u_transform_radius": 0, - "ter_furn_transform": "ter_arvore_tree_transform", + "ter_furn_transform": "ter_arvore_verdant_tree_transform", "target_var": { "global_val": "arvore_tree_transform_target" } } ] diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json index e0ba29db70261..060769744f9b0 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json @@ -301,7 +301,7 @@ "min_duration": 30000, "max_duration": 1080000, "duration_increment": 16500, - "learn_spells": { "arvore_summon_preservation_container": 9 } + "learn_spells": { "arvore_summon_preservation_container": 9, "arvore_turn_into_tree": 18 } }, { "id": "arvore_roots_crack_the_foundation", @@ -506,7 +506,8 @@ "energy_increment": -10, "base_casting_time": 200, "final_casting_time": 100, - "casting_time_increment": -5 + "casting_time_increment": -5, + "learn_spells": { "arvore_turn_into_tree": 15 } }, { "id": "arvore_anti_plant_spell_fungicide", @@ -591,7 +592,7 @@ "base_energy_cost": 600, "final_energy_cost": 350, "energy_increment": -15, - "learn_spells": { "arvore_tree_singing_spell": 6 } + "learn_spells": { "arvore_tree_singing_spell": 6, "arvore_turn_into_tree": 12 } }, { "id": "arvore_growing_wood_walls_wall", @@ -759,7 +760,7 @@ "base_casting_time": 500, "final_casting_time": 250, "casting_time_increment": -8, - "learn_spells": { "arvore_tree_singing_spell": 5, "arvore_damage_zombies_heal_living": 8 } + "learn_spells": { "arvore_tree_singing_spell": 5, "arvore_turn_into_tree": 9, "arvore_damage_zombies_heal_living": 12 } }, { "id": "arvore_overgrowth_spell_real", @@ -936,6 +937,50 @@ "shape": "blast", "min_range": 1 }, + { + "id": "arvore_turn_into_tree", + "type": "SPELL", + "name": "Verdant Imprisonment", + "description": "The ultimate expression of nature's power, you can turn your target into a tree that might have stood for a century or more. It works best on an already-weakened target, and does not work at all on non-organic targets.", + "valid_targets": [ "hostile" ], + "skill": "deduction", + "flags": [ "VERBAL", "SOMATIC", "SILENT", "RANDOM_DAMAGE" ], + "effect": "effect_on_condition", + "effect_str": "EOC_ARVORE_VERDANT_IMPRISONMENT", + "shape": "blast", + "difficulty": 10, + "spell_class": "ARVORE", + "teachable": false, + "max_level": { "math": [ "int_to_level(1)" ] }, + "min_range": { "math": [ "(3 + (u_spell_level('arvore_turn_into_tree') * 1.2) * (scaling_factor(u_val('perception') ) ) )" ] }, + "max_range": 70, + "energy_source": "MANA", + "base_energy_cost": 1750, + "energy_increment": -50, + "final_energy_cost": 850, + "base_casting_time": 200, + "casting_time_increment": -5, + "final_casting_time": 100, + "ignored_monster_species": [ "NETHER_EMANATION", "ROBOT" ] + }, + { + "id": "arvore_turn_into_tree_banish", + "type": "SPELL", + "name": "Verdant Imprisonment Self", + "description": "This is the banishment that the target casts on themselves.", + "valid_targets": [ "self" ], + "skill": "deduction", + "flags": [ "VERBAL", "SOMATIC", "SILENT", "RANDOM_DAMAGE" ], + "effect": "banishment", + "shape": "blast", + "spell_class": "ARVORE", + "teachable": false, + "min_damage": { "math": [ "(25 + (u_arvore_turn_into_tree_spell_level * 5)) * u_arvore_turn_into_tree_intelligence" ] }, + "max_damage": { "math": [ "(100 + (u_arvore_turn_into_tree_spell_level * 15)) * u_arvore_turn_into_tree_intelligence" ] }, + "min_range": 0, + "max_range": 0, + "ignored_monster_species": [ "NETHER_EMANATION", "ROBOT" ] + }, { "id": "arvore_reduce_thirst_spell", "type": "SPELL", diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json index 688def9c0e8e9..56f357b7a3ee9 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json @@ -116,6 +116,7 @@ { "math": [ "u_spell_level('arvore_climbing_vine_spell')", "<", "int_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_anti_plant_spell')", "<", "per_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_damage_zombies_heal_living')", "<", "per_to_level(1)" ] }, + { "math": [ "u_spell_level('arvore_turn_into_tree')", "<", "int_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_tree_singing_spell')", "<", "int_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_cultivate_goblin_fruit')", "<", "int_to_level(1)" ] }, { "math": [ "u_spell_level('paraclesian_spell_dodge_bonus')", "<", "25" ] }, @@ -140,6 +141,7 @@ [ "EOC_LEVELER_ARVORE_CLIMBING_VINE_SPELL", 8 ], [ "EOC_LEVELER_ARVORE_ANTI_PLANT_SPELL", 7 ], [ "EOC_LEVELER_ARVORE_DAMAGE_ZOMBIES_HEAL_LIVING", 1 ], + [ "EOC_LEVELER_ARVORE_TREE_TRANSFORM", 1 ], [ "EOC_LEVELER_ARVORE_TREE_SINGING_SPELL", 5 ], [ "EOC_LEVELER_ARVORE_CULTIVATE_GOBLIN_FRUIT", 3 ], [ "EOC_LEVELER_ARVORE_WIND_BLOWS_WILLOW_BENDS", 6 ], @@ -435,6 +437,24 @@ ], "false_effect": [ { "run_eocs": "EOC_ARVORE_SPELL_EXPERIENCE_INCREASER_SELECTOR" } ] }, + { + "type": "effect_on_condition", + "id": "EOC_LEVELER_ARVORE_TREE_TRANSFORM", + "condition": { + "and": [ + { "math": [ "u_spell_level('arvore_turn_into_tree')", ">=", "0" ] }, + { "math": [ "u_spell_level('arvore_turn_into_tree')", "<", "int_to_level(1)" ] } + ] + }, + "effect": [ + { + "u_message": "Your time spent under the shadows of the trees has increased your facility with your fae magicks.", + "type": "good" + }, + { "math": [ "u_spell_exp('arvore_turn_into_tree')", "+=", "paraclesian_passive_spell_exp(1)" ] } + ], + "false_effect": [ { "run_eocs": "EOC_ARVORE_SPELL_EXPERIENCE_INCREASER_SELECTOR" } ] + }, { "type": "effect_on_condition", "id": "EOC_LEVELER_ARVORE_TREE_SINGING_SPELL", diff --git a/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json b/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json index 4f8d78dca8da4..172cdbf1a9e31 100644 --- a/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json +++ b/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json @@ -333,5 +333,40 @@ } ], "furniture": [ { "result": "f_null", "valid_flags": [ "MOUNTABLE", "BLOCK_WIND", "ORGANIC" ] } ] + }, + { + "type": "ter_furn_transform", + "id": "ter_arvore_verdant_tree_transform", + "terrain": [ + { + "result": [ + [ "t_tree_birch", 32 ], + [ "t_tree_elm", 32 ], + [ "t_tree_cottonwood", 32 ], + [ "t_tree_basswood", 32 ], + [ "t_tree_alder", 32 ], + [ "t_tree_pine", 64 ], + [ "t_tree_maple", 64 ], + [ "t_tree_willow", 64 ], + [ "t_tree_hickory", 32 ], + [ "t_tree_walnut", 16 ], + [ "t_tree_butternut", 4 ], + [ "t_tree_chestnut", 8 ], + [ "t_tree_hazelnut", 2 ], + [ "t_tree_beech", 4 ], + [ "t_tree_blackjack", 8 ], + [ "t_tree_apple", 2 ], + [ "t_tree_cherry", 2 ], + [ "t_tree_juniper", 2 ], + [ "t_tree_pear", 2 ], + [ "t_tree_plum", 2 ], + [ "t_tree_elderberry", 2 ], + [ "t_tree_mulberry", 2 ], + [ "t_tree_sassafras", 3 ] + ], + "valid_flags": [ "BURROWABLE", "DIGGABLE", "COLLAPSES", "DOOR", "FLAT_SURF", "FUNGUS", "PLANTABLE", "ROAD", "ROUGH", "SHALLOW_WATER" ], + "message": "The target's limbs begin stretching and spreading toward the sky as their body elongates, and in moments, a tree that could have stood for a hundred years stands in their place." + } + ] } ]