From ad4cdccab39278dfece266f94e2e35d48671efd7 Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:48:01 -0500 Subject: [PATCH] [Xedra Evolved] Add vampire transformation powers (#74965) * Initial commit * And wolf and bat * Add mist form * Fix spacing --- data/mods/Xedra_Evolved/effects/effects.json | 17 ++ .../mods/Xedra_Evolved/effects/vampvirus.json | 11 +- .../Xedra_Evolved/mutations/mutations.json | 121 ++++++++++ .../mutations/vampire_trait_eocs.json | 209 ++++++++++++++++++ data/mods/Xedra_Evolved/recipes/vampire.json | 11 +- .../Xedra_Evolved/spells/vampire_spells.json | 49 ++++ 6 files changed, 416 insertions(+), 2 deletions(-) diff --git a/data/mods/Xedra_Evolved/effects/effects.json b/data/mods/Xedra_Evolved/effects/effects.json index 96d54829feac6..929c45272f602 100644 --- a/data/mods/Xedra_Evolved/effects/effects.json +++ b/data/mods/Xedra_Evolved/effects/effects.json @@ -616,6 +616,23 @@ "remove_message": "You're sure you could try to learn a new blood gift now.", "rating": "bad" }, + { + "type": "effect_type", + "id": "effect_vampire_bat_form_levitation", + "//": "Hidden effect, used to make sure bat form can fly.", + "name": [ "" ], + "desc": [ "" ], + "flags": [ "LEVITATION" ] + }, + { + "type": "effect_type", + "id": "effect_vampire_mist_form", + "//": "Hidden effect, used to make sure mist form doesn't drop items.", + "name": [ "" ], + "desc": [ "" ], + "enchantments": [ { "values": [ { "value": "EVASION", "add": 1 } ] } ], + "flags": [ "ETHEREAL", "INVISIBLE" ] + }, { "id": "eater_lump_pool", "type": "effect_type", diff --git a/data/mods/Xedra_Evolved/effects/vampvirus.json b/data/mods/Xedra_Evolved/effects/vampvirus.json index 2f2fd4f22bc32..3f3c67b3f71f6 100644 --- a/data/mods/Xedra_Evolved/effects/vampvirus.json +++ b/data/mods/Xedra_Evolved/effects/vampvirus.json @@ -318,7 +318,16 @@ "condition": { "u_has_trait": "VAMPIRE4" }, "effect": [ { - "u_roll_remainder": [ "TRUE_VAMPIRE_POWER", "VAMPIRE_TORPOR", "VAMPIRE_DOMINATE", "VAMPIRE_NO_BREATHE", "VAMPIRE_NO_ILLNESS" ], + "u_roll_remainder": [ + "TRUE_VAMPIRE_POWER", + "VAMPIRE_TORPOR", + "VAMPIRE_DOMINATE", + "VAMPIRE_NO_BREATHE", + "VAMPIRE_NO_ILLNESS", + "VAMPIRE_BAT_FORM", + "VAMPIRE_WOLF_FORM", + "VAMPIRE_MIST_FORM" + ], "type": "mutation", "true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ], "false_eocs": [ "EOC_COMPLETED_VAMPIRE4" ] diff --git a/data/mods/Xedra_Evolved/mutations/mutations.json b/data/mods/Xedra_Evolved/mutations/mutations.json index 6cdeab9c610af..2a6ebb9644d6b 100644 --- a/data/mods/Xedra_Evolved/mutations/mutations.json +++ b/data/mods/Xedra_Evolved/mutations/mutations.json @@ -568,6 +568,127 @@ "description": "Your undead body is now much more dead than alive. It prevents mundane illnesses and parasites from affecting you, while granting you a total immunity against radiation.", "flags": [ "PARAIMMUNE", "NO_DISEASE", "NO_RADIATION", "INFECTION_IMMUNE" ] }, + { + "type": "mutation", + "id": "VAMPIRE_BAT_FORM", + "name": { "str": "Shape of the Night Flier" }, + "points": 0, + "description": "You can transform yourself into a bat and take wing on the night air.", + "starting_trait": false, + "purifiable": false, + "valid": false, + "active": true, + "activated_is_setup": true, + "activated_eocs": [ "EOC_VAMPIRE_BAT_FORM_activated" ], + "deactivated_eocs": [ "EOC_VAMPIRE_BAT_FORM_deactivated" ] + }, + { + "type": "mutation", + "id": "VAMPIRE_BAT_FORM_TRAITS", + "name": { "str": "Bat Form" }, + "points": 0, + "description": "You are a bat. This provides the actual effects of bat form. Should not be player-visible.", + "starting_trait": false, + "purifiable": false, + "valid": false, + "player_display": false, + "enchantments": [ + { + "condition": "ALWAYS", + "values": [ + { "value": "SPEED", "multiply": 0.1 }, + { "value": "MELEE_DAMAGE", "multiply": -0.95 }, + { "value": "NIGHT_VIS", "add": 6 }, + { "value": "DEXTERITY", "add": 8 } + ], + "ench_effects": [ { "effect": "effect_vampire_bat_form_levitation", "intensity": 1 } ], + "skills": [ { "value": "dodge", "add": 8 } ] + }, + { + "condition": "u_has_weapon", + "values": [ { "value": "MELEE_DAMAGE", "multiply": -1 }, { "value": "RANGE", "multiply": -1 } ] + }, + { "condition": { "u_is_on_terrain": "t_open_air" }, "values": [ { "value": "MOVE_COST", "multiply": -0.6 } ] } + ], + "flags": [ "DRACULIN_VENOM", "LEVITATION", "TINY" ], + "override_look": { "id": "mon_bat", "tile_category": "monster" } + }, + { + "type": "mutation", + "id": "VAMPIRE_WOLF_FORM", + "name": { "str": "Shape of the Pack Hunter" }, + "points": 0, + "description": "You can transform yourself into a wolf and stalk your enemies.", + "starting_trait": false, + "purifiable": false, + "valid": false, + "active": true, + "activated_is_setup": true, + "activated_eocs": [ "EOC_VAMPIRE_WOLF_FORM_activated" ], + "deactivated_eocs": [ "EOC_VAMPIRE_WOLF_FORM_deactivated" ] + }, + { + "type": "mutation", + "id": "VAMPIRE_WOLF_FORM_TRAITS", + "name": { "str": "Wolf Form" }, + "points": 0, + "description": "You are a wolf. This provides the actual effects of wolf form. Should not be player-visible.", + "starting_trait": false, + "purifiable": false, + "valid": false, + "player_display": false, + "enchantments": [ + { + "condition": "ALWAYS", + "values": [ + { "value": "SPEED", "multiply": 0.2 }, + { "value": "RANGE", "multiply": -1 }, + { "value": "DEXTERITY", "add": 2 }, + { "value": "NIGHT_VIS", "add": 8 }, + { "value": "MELEE_DAMAGE", "multiply": 0.2 } + ], + "mutations": [ "FANGS", "MUZZLE", "TAIL_FLUFFY", "PAWS", "LUPINE_FUR", "LUPINE_EARS", "PERSISTENCE_HUNTER2", "PRED3" ] + }, + { + "condition": { "and": [ { "u_has_flag": "QUADRUPED_CROUCH" }, { "u_has_flag": "QUADRUPED_RUN" }, { "not": "u_can_drop_weapon" } ] }, + "values": [ { "value": "MOVE_COST", "multiply": -0.15 } ], + "ench_effects": [ { "effect": "natural_stance", "intensity": 1 }, { "effect": "quadruped_full", "intensity": 1 } ] + }, + { "condition": { "u_has_move_mode": "run" }, "values": [ { "value": "MOVE_COST", "multiply": -0.25 } ] }, + { + "condition": "u_has_weapon", + "values": [ { "value": "MELEE_DAMAGE", "multiply": -1 }, { "value": "RANGE", "multiply": -1 } ] + } + ], + "flags": [ "PRED3", "QUADRUPED_CROUCH", "QUADRUPED_RUN" ], + "override_look": { "id": "mon_wolf", "tile_category": "monster" }, + "integrated_armor": [ "integrated_fangs" ] + }, + { + "type": "mutation", + "id": "VAMPIRE_MIST_FORM", + "name": { "str": "Shape of the Billowing Mists" }, + "points": 0, + "description": "You can transform yourself into a cloud of mist and flee any dangers.", + "starting_trait": false, + "purifiable": false, + "valid": false, + "active": true, + "activated_is_setup": true, + "activated_eocs": [ "EOC_VAMPIRE_MIST_FORM_activated" ], + "deactivated_eocs": [ "EOC_VAMPIRE_MIST_FORM_deactivated" ] + }, + { + "type": "mutation", + "id": "VAMPIRE_MIST_FORM_TRAITS", + "name": { "str": "Mist form traits" }, + "points": 1, + "description": "This mutation carries the traits for mist form. You shouldn't be able to see it in-game.", + "valid": false, + "player_display": false, + "enchantments": [ { "ench_effects": [ { "effect": "effect_vampire_mist_form", "intensity": 1 } ] } ], + "override_look": { "id": "fd_extinguisher", "tile_category": "field" } + }, { "type": "mutation", "id": "BLOOD_DRINKER", diff --git a/data/mods/Xedra_Evolved/mutations/vampire_trait_eocs.json b/data/mods/Xedra_Evolved/mutations/vampire_trait_eocs.json index 884145a984fe8..5696c0dc07854 100644 --- a/data/mods/Xedra_Evolved/mutations/vampire_trait_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/vampire_trait_eocs.json @@ -993,5 +993,214 @@ } ], "false_effect": [ { "npc_message": "You don't have enough blood to activate your dominating gaze.", "type": "bad" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_BAT_FORM_activated", + "condition": { "not": { "u_has_trait": "VAMPIRE_BAT_FORM_TRAITS" } }, + "effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_BAT_FORM_activated_2", + "condition": { "math": [ "u_vitamin('human_blood_vitamin')", ">=", "-500" ] }, + "effect": [ + { "u_assign_activity": "ACT_GENERIC_EOC", "duration": 1.5 }, + { "math": [ "u_vitamin('human_blood_vitamin')", "-=", "600" ] }, + { "u_add_trait": "VAMPIRE_BAT_FORM_TRAITS" }, + { "u_add_trait": "ECHOLOCATION" }, + { "math": [ "u_calories()", "/=", "4" ] }, + { "math": [ "u_spell_level('vampire_bat_form_fly_upward')", "=", "0" ] }, + { + "u_message": "Your fingers lengthen as flaps of skin grow between them and as your legs shorten, you take to the air.", + "type": "good" + } + ], + "false_effect": [ + { "u_message": "You don't have enough blood to transform into a bat.", "type": "bad" }, + { "queue_eocs": "EOC_VAMPIRE_BAT_FORM_deactivate_future", "time_in_future": 0 } + ] + } + ] + } + ], + "false_effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_BAT_FORM_deactivated", + "condition": { "u_has_trait": "VAMPIRE_BAT_FORM_TRAITS" }, + "effect": [ + { "u_message": "Your wings recede and you land on now-humanoid legs.", "type": "neutral" }, + { "u_lose_trait": "VAMPIRE_BAT_FORM_TRAITS" }, + { "u_lose_trait": "ECHOLOCATION" }, + { "math": [ "u_calories()", "*=", "4" ] }, + { "math": [ "u_spell_level('vampire_bat_form_fly_upward')", "=", "-1" ] } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_BAT_FORM_deactivate_future", + "//": "This is necessary because calling u_deactivate_trait from within the trait EoC does not work", + "effect": { "u_deactivate_trait": "VAMPIRE_BAT_FORM" } + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_BAT_FORM_ASCEND", + "condition": "u_is_outside", + "effect": [ + { "u_location_variable": { "context_val": "vampire_bat_fly_up_location" }, "z_adjust": 1, "outdoor_only": true }, + { "u_message": "Your wings carry you upward.", "type": "good" }, + { "u_teleport": { "context_val": "vampire_bat_fly_up_location" } } + ], + "false_effect": [ { "u_message": "You cannot fly up with a ceiling above you!", "type": "bad" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_WOLF_FORM_activated", + "condition": { "not": { "u_has_trait": "VAMPIRE_WOLF_FORM_TRAITS" } }, + "effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_WOLF_FORM_activated_2", + "condition": { "math": [ "u_vitamin('human_blood_vitamin')", ">=", "-500" ] }, + "effect": [ + { "u_assign_activity": "ACT_GENERIC_EOC", "duration": 1.5 }, + { "math": [ "u_vitamin('human_blood_vitamin')", "-=", "600" ] }, + { "u_add_trait": "VAMPIRE_WOLF_FORM_TRAITS" }, + { + "u_message": "Your nose pushes out into a muzzle as you fall forward on all fours and let out a snarl.", + "type": "good" + } + ], + "false_effect": [ + { "u_message": "You don't have enough blood to transform into a wolf.", "type": "bad" }, + { "queue_eocs": "EOC_VAMPIRE_WOLF_FORM_deactivate_future", "time_in_future": 0 } + ] + } + ] + } + ], + "false_effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_WOLF_FORM_deactivated", + "condition": { "u_has_trait": "VAMPIRE_WOLF_FORM_TRAITS" }, + "effect": [ + { "u_message": "Your fur disappears and you walk once again on two legs.", "type": "neutral" }, + { "u_lose_trait": "VAMPIRE_WOLF_FORM_TRAITS" } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_WOLF_FORM_deactivate_future", + "//": "This is necessary because calling u_deactivate_trait from within the trait EoC does not work", + "effect": { "u_deactivate_trait": "VAMPIRE_WOLF_FORM" } + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_MIST_FORM_activated", + "condition": { "not": { "u_has_trait": "VAMPIRE_MIST_FORM_TRAITS" } }, + "effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_MIST_FORM_activated_2", + "condition": { "math": [ "u_vitamin('human_blood_vitamin')", ">=", "-500" ] }, + "effect": [ + { "u_assign_activity": "ACT_GENERIC_EOC", "duration": 1.5 }, + { "math": [ "u_vitamin('human_blood_vitamin')", "-=", "600" ] }, + { "u_add_trait": "VAMPIRE_MIST_FORM_TRAITS" }, + { "u_add_effect": "effect_vampire_mist_form", "duration": "PERMANENT" }, + { "u_add_effect": "incorporeal", "duration": "PERMANENT" }, + { "math": [ "u_spell_level('vampire_mist_form_pass_through_doors_and_windows')", "=", "0" ] }, + { "u_message": "Your body falls apart into billowing mist.", "type": "good" } + ], + "false_effect": [ + { "u_message": "You don't have enough blood to transform into mist.", "type": "bad" }, + { "queue_eocs": "EOC_VAMPIRE_MIST_FORM_deactivate_future", "time_in_future": 0 } + ] + } + ] + } + ], + "false_effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_MIST_FORM_deactivated", + "condition": { "u_has_trait": "VAMPIRE_MIST_FORM_TRAITS" }, + "effect": [ + { "u_message": "You reconstitute yourself from the billowing mists.", "type": "neutral" }, + { "u_lose_effect": "effect_vampire_mist_form" }, + { "u_lose_effect": "incorporeal" }, + { "u_lose_trait": "VAMPIRE_MIST_FORM_TRAITS" }, + { "math": [ "u_spell_level('vampire_mist_form_pass_through_doors_and_windows')", "=", "-1" ] } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_MIST_FORM_deactivate_future", + "//": "This is necessary because calling u_deactivate_trait from within the trait EoC does not work", + "effect": { "u_deactivate_trait": "VAMPIRE_MIST_FORM" } + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_MIST_FORM_BLOOD_COST", + "eoc_type": "EVENT", + "required_event": "avatar_moves", + "condition": { "u_has_trait": "VAMPIRE_MIST_FORM_TRAITS" }, + "effect": [ + { + "run_eocs": [ + { + "id": "EOC_VAMPIRE_MIST_FORM_BLOOD_COST_2", + "condition": { "math": [ "u_vitamin('human_blood_vitamin')", ">=", "-500" ] }, + "effect": { "math": [ "u_vitamin('human_blood_vitamin')", "-=", "2" ] }, + "false_effect": [ + { "u_message": "You don't have enough blood to maintain your mist form.", "type": "bad" }, + { "run_eocs": "EOC_VAMPIRE_MIST_FORM_deactivated" }, + { "queue_eocs": "EOC_VAMPIRE_MIST_FORM_deactivate_future", "time_in_future": 0 } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_VAMPIRE_MIST_FORM_SEEP_THROUGH_DOOR_WINDOW", + "effect": [ + { + "if": { + "u_query_tile": "around", + "target_var": { "context_val": "vampire_mist_door_or_window_seep" }, + "message": "Select door or window, then target the space beyond it." + }, + "then": { + "if": { "map_terrain_with_flag": "DOOR", "loc": { "context_val": "vampire_mist_door_or_window_seep" } }, + "then": { "u_cast_spell": { "id": "vampire_mist_form_pass_through_doors_and_windows_teleport" }, "targeted": true }, + "else": { + "if": { "map_terrain_with_flag": "WINDOW", "loc": { "context_val": "vampire_mist_door_or_window_seep" } }, + "then": { "u_cast_spell": { "id": "vampire_mist_form_pass_through_doors_and_windows_teleport" }, "targeted": true }, + "else": { "u_message": "You must be near a door or window to seep through." } + } + } + } + ] } ] diff --git a/data/mods/Xedra_Evolved/recipes/vampire.json b/data/mods/Xedra_Evolved/recipes/vampire.json index ea33dc5d3c632..2d1b2b56d19f2 100644 --- a/data/mods/Xedra_Evolved/recipes/vampire.json +++ b/data/mods/Xedra_Evolved/recipes/vampire.json @@ -147,7 +147,16 @@ "effect": [ { "u_lose_effect": "effect_vampire_studying_blood_gifts" }, { - "u_roll_remainder": [ "TRUE_VAMPIRE_POWER", "VAMPIRE_TORPOR", "VAMPIRE_DOMINATE", "VAMPIRE_NO_BREATHE", "VAMPIRE_NO_ILLNESS" ], + "u_roll_remainder": [ + "TRUE_VAMPIRE_POWER", + "VAMPIRE_TORPOR", + "VAMPIRE_DOMINATE", + "VAMPIRE_NO_BREATHE", + "VAMPIRE_NO_ILLNESS", + "VAMPIRE_BAT_FORM", + "VAMPIRE_WOLF_FORM", + "VAMPIRE_MIST_FORM" + ], "type": "mutation", "true_eocs": [ "EOC_XE_VAMPIRE_BLOOD_RESEARCH_SUCCESS" ], "false_eocs": [ "EOC_XE_VAMPIRE_BLOOD_RESEARCH_RESULTS_03" ] diff --git a/data/mods/Xedra_Evolved/spells/vampire_spells.json b/data/mods/Xedra_Evolved/spells/vampire_spells.json index 37ba7d2d6cdd6..e858072616c8f 100644 --- a/data/mods/Xedra_Evolved/spells/vampire_spells.json +++ b/data/mods/Xedra_Evolved/spells/vampire_spells.json @@ -302,6 +302,7 @@ "shape": "blast", "flags": [ "NO_HANDS", "SILENT", "NO_FAIL" ], "spell_class": "VAMPIRE", + "skill": "deduction", "difficulty": 8, "max_level": 1, "min_range": 60, @@ -327,5 +328,53 @@ ] }, "targeted_monster_species": [ "HUMAN", "FERAL", "CYBORG" ] + }, + { + "id": "vampire_bat_form_fly_upward", + "type": "SPELL", + "name": "(Bat Form) Ascend", + "description": "Flap your wings and fly upward.", + "message": "", + "teachable": false, + "valid_targets": [ "self" ], + "effect": "effect_on_condition", + "effect_str": "EOC_VAMPIRE_BAT_FORM_ASCEND", + "shape": "blast", + "flags": [ "NO_HANDS", "SILENT", "NO_FAIL" ], + "spell_class": "VAMPIRE", + "skill": "deduction", + "base_casting_time": 75 + }, + { + "id": "vampire_mist_form_pass_through_doors_and_windows", + "type": "SPELL", + "name": "(Mist Form) Pass Through Barrier", + "description": "Seep through a door or a window.", + "message": "", + "teachable": false, + "valid_targets": [ "self" ], + "effect": "effect_on_condition", + "effect_str": "EOC_VAMPIRE_MIST_FORM_SEEP_THROUGH_DOOR_WINDOW", + "shape": "blast", + "flags": [ "NO_HANDS", "SILENT", "NO_FAIL" ], + "spell_class": "VAMPIRE", + "skill": "deduction", + "base_casting_time": 500 + }, + { + "id": "vampire_mist_form_pass_through_doors_and_windows_teleport", + "type": "SPELL", + "name": "(Mist Form) Pass Through Barrier Real", + "description": "The actual spell that lets you seep through a barrier. It's a bug if you have it.", + "message": "", + "teachable": false, + "valid_targets": [ "ground" ], + "spell_class": "VAMPIRE", + "skill": "deduction", + "flags": [ "NO_HANDS", "NO_LEGS", "TARGET_TELEPORT", "NO_FAIL", "IGNORE_WALLS" ], + "effect": "short_range_teleport", + "shape": "blast", + "min_range": 2, + "max_range": 2 } ]