Skip to content

Commit

Permalink
[Xedra Evolved] Add vampire transformation powers (#74965)
Browse files Browse the repository at this point in the history
* Initial commit

* And wolf and bat

* Add mist form

* Fix spacing
  • Loading branch information
Standing-Storm authored Jul 10, 2024
1 parent b65512d commit ad4cdcc
Show file tree
Hide file tree
Showing 6 changed files with 416 additions and 2 deletions.
17 changes: 17 additions & 0 deletions data/mods/Xedra_Evolved/effects/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 10 additions & 1 deletion data/mods/Xedra_Evolved/effects/vampvirus.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
121 changes: 121 additions & 0 deletions data/mods/Xedra_Evolved/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
209 changes: 209 additions & 0 deletions data/mods/Xedra_Evolved/mutations/vampire_trait_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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." }
}
}
}
]
}
]
Loading

0 comments on commit ad4cdcc

Please sign in to comment.