Skip to content

Commit

Permalink
[Xedra Evolved] Vampire Powers overhaul (#74729)
Browse files Browse the repository at this point in the history
* Initial commit

* Merge upstream

* Updates

* Spelling

* *sigh* spelling

* Earthen Slumber no longer traps you underground forever

* Add base duration for Hypnotic Gaze

* Fix crashing
  • Loading branch information
Standing-Storm authored Jun 25, 2024
1 parent 6edd3c7 commit 0ed4d8a
Show file tree
Hide file tree
Showing 7 changed files with 1,450 additions and 199 deletions.
127 changes: 122 additions & 5 deletions data/mods/Xedra_Evolved/effects/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,89 @@
{
"type": "effect_type",
"id": "eyegleam",
"name": [ "Eye gleam" ],
"name": [ "Eye Gleam" ],
"desc": [ "You can see in the dark." ],
"apply_message": "Your sight adjusts to the darkness.",
"remove_message": "The darkness loses its shape.",
"rating": "good",
"flags": [ "NIGHT_VISION" ]
"enchantments": [
{
"values": [
{
"value": "NIGHT_VIS",
"add": {
"math": [
"5 + (vampire_total_tier_one_traits() * 1) + (vampire_total_tier_two_traits() * 2) + (vampire_total_tier_three_traits() * 3) + + (vampire_total_tier_four_traits() * 4)"
]
}
}
]
}
]
},
{
"type": "effect_type",
"id": "effect_vampiric_strength",
"name": [ "Vigor Mortis" ],
"desc": [ "You have the strength of the damned." ],
"rating": "good",
"enchantments": [
{
"values": [
{
"value": "STRENGTH",
"add": {
"math": [
"1 + (vampire_total_tier_one_traits() * 0.25) + (vampire_total_tier_two_traits() * 0.33) + (vampire_total_tier_three_traits() * 0.5) + + (vampire_total_tier_four_traits() * 0.75)"
]
}
}
]
}
]
},
{
"type": "effect_type",
"id": "effect_vampiric_resilience",
"name": [ "Sanguine Resilience" ],
"desc": [ "You have the fortitude of the grave." ],
"rating": "good",
"enchantments": [
{
"values": [
{
"value": "ARMOR_BASH",
"multiply": {
"math": [
"max(((vampire_total_tier_one_traits() * -0.01) + (vampire_total_tier_two_traits() * -0.02) + (vampire_total_tier_three_traits() * -0.04) + + (vampire_total_tier_four_traits() * -0.06)), -0.66)"
]
}
},
{
"value": "ARMOR_CUT",
"multiply": {
"math": [
"max(((vampire_total_tier_one_traits() * -0.005) + (vampire_total_tier_two_traits() * -0.01) + (vampire_total_tier_three_traits() * -0.02) + + (vampire_total_tier_four_traits() * -0.03)), -0.33)"
]
}
},
{
"value": "ARMOR_STAB",
"multiply": {
"math": [
"max(((vampire_total_tier_one_traits() * -0.003) + (vampire_total_tier_two_traits() * -0.007) + (vampire_total_tier_three_traits() * -0.015) + + (vampire_total_tier_four_traits() * -0.025)), -0.25)"
]
}
},
{
"value": "ARMOR_BULLET",
"multiply": {
"math": [
"max(((vampire_total_tier_one_traits() * -0.012) + (vampire_total_tier_two_traits() * -0.025) + (vampire_total_tier_three_traits() * -0.05) + + (vampire_total_tier_four_traits() * -0.075)), -0.85)"
]
}
}
]
}
]
},
{
"type": "effect_type",
Expand All @@ -480,7 +557,47 @@
"health_chance": [ 4 ],
"stamina_min": [ 40 ],
"stamina_chance": [ 2 ]
}
},
"flags": [ "BLEED_IMMUNE" ]
},
{
"type": "effect_type",
"id": "effect_vampiric_dodge",
"name": [ "Flow Like Blood" ],
"desc": [ "You can move so quickly you might even be able to dodge bullets." ],
"rating": "good",
"blocks_effects": [ "grabbed" ],
"enchantments": [
{
"values": [
{
"value": "EVASION",
"add": {
"math": [
"min(0.15 + ((vampire_total_tier_one_traits() * 0.012) + (vampire_total_tier_two_traits() * 0.025) + (vampire_total_tier_three_traits() * 0.05) + + (vampire_total_tier_four_traits() * 0.075)), 0.7)"
]
}
},
{
"value": "DODGE_CHANCE",
"add": {
"math": [
"min(1 + ((vampire_total_tier_one_traits() * 0.25) + (vampire_total_tier_two_traits() * 0.45) + (vampire_total_tier_three_traits() * 0.65) + + (vampire_total_tier_four_traits() * 0.95)), 15)"
]
}
},
{ "value": "BONUS_DODGE", "add": 2 }
]
}
],
"flags": [ "HARDTOHIT" ]
},
{
"type": "effect_type",
"id": "effect_vampire_fear_gazed",
"//": "Hidden effect, used to prevent spamming fear gaze repeatedly.",
"name": [ "" ],
"desc": [ "" ]
},
{
"id": "eater_lump_pool",
Expand Down
156 changes: 104 additions & 52 deletions data/mods/Xedra_Evolved/effects/vampvirus.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
{ "u_lose_trait": "STAMINAFORBLOOD" },
{ "u_lose_trait": "BLOODBANK" },
{ "u_lose_trait": "COMMUNE_NIGHT" },
{ "u_lose_trait": "VAMPIRIC_STRENGTH" },
{ "u_lose_trait": "VAMPIRIC_RESILIENCE" },
{ "u_lose_trait": "VAMPIRE_HEIGHTENED_SENSES" },
{ "u_lose_trait": "VAMPIRE_SILENT_MOVE" },
{ "math": [ "u_spell_level('vampire_smell_nearby_blood_spell')", "=", "-1" ] },
{ "math": [ "u_spell_level('vampire_stamina_for_blood_spell')", "=", "-1" ] },
{ "u_message": "The light seems less bright and the air fresher.", "type": "good" }
]
},
Expand All @@ -34,6 +40,13 @@
{ "u_lose_trait": "VAMPIRE2" },
{ "u_lose_trait": "COAGULANTWEAVE" },
{ "u_lose_trait": "BLOODHEAL" },
{ "u_lose_trait": "VAMPIRIC_DODGE" },
{ "u_lose_trait": "VAMPIRE_FEAR_GAZE" },
{ "u_lose_trait": "VAMPIRE_WALK_ON_WALLS" },
{ "u_lose_trait": "VAMPIRE_BEAST_CLAWS" },
{ "u_lose_trait": "VAMPIRE_SEE_HEAT" },
{ "math": [ "u_spell_level('spell_blood_heal')", "=", "-1" ] },
{ "math": [ "u_spell_level('vampire_fear_gaze_spell')", "=", "-1" ] },
{
"u_message": "You seem to be feeling a little better, but the thirst for blood remains.",
"type": "good"
Expand All @@ -49,6 +62,10 @@
{ "u_lose_trait": "BLOODBANK" },
{ "u_lose_trait": "HYPNOTIC_GAZE" },
{ "u_lose_trait": "BLOODHASTE" },
{ "u_lose_trait": "VAMPIRE_COMMAND_BEAST" },
{ "u_lose_trait": "VAMPIRE_EARTH_SLUMBER" },
{ "math": [ "u_spell_level('spell_hypnotic_gaze')", "=", "-1" ] },
{ "math": [ "u_spell_level('vampire_command_beast_spell')", "=", "-1" ] },
{
"u_message": "You no longer instantly turn red in sunlight, but your skin is still concerningly pale.",
"type": "good"
Expand Down Expand Up @@ -114,13 +131,13 @@
{
"type": "effect_on_condition",
"id": "EOC_ADD_VAMPIRUS_INTENSITY1",
"condition": { "and": [ { "u_has_trait": "EYEGLEAM" }, { "u_has_trait": "STAMINAFORBLOOD" }, { "u_has_trait": "COMMUNE_NIGHT" } ] },
"condition": { "math": [ "vampire_total_tier_one_traits()", ">=", "4" ] },
"effect": { "u_add_effect": "vampire_virus", "intensity": 2, "duration": "PERMANENT" }
},
{
"type": "effect_on_condition",
"id": "EOC_ADD_VAMPIRUS_INTENSITY2",
"condition": { "and": [ { "u_has_trait": "COAGULANTWEAVE" }, { "u_has_trait": "BLOODHEAL" } ] },
"condition": { "math": [ "vampire_total_tier_two_traits()", ">=", "4" ] },
"effect": { "u_add_effect": "vampire_virus", "intensity": 3, "duration": "PERMANENT" }
},
{
Expand All @@ -136,7 +153,6 @@
"//": "This EOC controls the speed at which vampires mutate and evolve.",
"recurrence": [ "48 hours", "72 hours 15 minutes" ],
"condition": { "and": [ { "u_has_effect": "vampire_virus" }, { "not": { "u_has_effect": "blood_treatment" } } ] },
"deactivate_condition": { "not": { "u_has_effect": "vampire_virus" } },
"effect": {
"run_eocs": [
{
Expand All @@ -149,23 +165,39 @@
},
"effect": {
"run_eocs": {
"id": "eoc_vampvirus_1_trait",
"condition": { "u_has_trait": "VAMPIRE" },
"effect": [
{
"u_roll_remainder": [ "EYEGLEAM", "STAMINAFORBLOOD", "COMMUNE_NIGHT" ],
"type": "mutation",
"true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ],
"false_eocs": [ "EOC_COMPLETED_ROLL_REMAINDER_VAMPVIRUS", "EOC_VAMPVIRUS1" ]
},
{ "queue_eocs": "EOC_ADD_VAMPIRUS_INTENSITY1", "time_in_future": [ "5 days", "8 hours" ] }
],
"false_effect": [
{ "u_add_trait": "VAMPIRE" },
{
"u_message": "You suddenly understand that drinking someones blood will make you feel better than you've ever felt before in your life."
}
]
"id": "eoc_vampvirus_1_math_checker",
"condition": { "math": [ "vampire_total_tier_one_traits()", "<", "4" ] },
"effect": {
"run_eocs": [
{
"id": "eoc_vampvirus_1_trait",
"condition": { "u_has_trait": "VAMPIRE" },
"effect": [
{
"u_roll_remainder": [
"EYEGLEAM",
"STAMINAFORBLOOD",
"COMMUNE_NIGHT",
"VAMPIRIC_STRENGTH",
"VAMPIRIC_RESILIENCE",
"VAMPIRE_HEIGHTENED_SENSES",
"VAMPIRE_SILENT_MOVE"
],
"type": "mutation",
"true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ],
"false_eocs": [ "EOC_COMPLETED_ROLL_REMAINDER_VAMPVIRUS", "EOC_VAMPVIRUS1" ]
},
{ "queue_eocs": "EOC_ADD_VAMPIRUS_INTENSITY1", "time_in_future": [ "5 days", "8 hours" ] }
],
"false_effect": [
{ "u_add_trait": "VAMPIRE" },
{
"u_message": "You suddenly understand that drinking someones blood will make you feel better than you've ever felt before in your life."
}
]
}
]
}
}
}
},
Expand All @@ -179,23 +211,37 @@
},
"effect": {
"run_eocs": {
"id": "eoc_vampvirus_2_trait",
"condition": { "u_has_trait": "VAMPIRE2" },
"effect": [
{
"u_roll_remainder": [ "BLOODHEAL", "COAGULANTWEAVE" ],
"type": "mutation",
"true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ],
"false_eocs": [ "EOC_COMPLETED_ROLL_REMAINDER_VAMPVIRUS", "EOC_VAMPVIRUS2" ]
},
{ "queue_eocs": "EOC_ADD_VAMPIRUS_INTENSITY2", "time_in_future": [ "15 days", "8 hours" ] }
],
"false_effect": [
{ "u_add_trait": "VAMPIRE2" },
{
"u_message": "With a popping sound several of your teeth fall out but when you put a finger into your mouth to feel the hole, there are new sharp fangs where you expected nothing."
"id": "eoc_vampvirus_2_math_checker",
"condition": { "math": [ "vampire_total_tier_two_traits()", "<", "4" ] },
"effect": {
"run_eocs": {
"id": "eoc_vampvirus_2_trait",
"condition": { "u_has_trait": "VAMPIRE2" },
"effect": [
{
"u_roll_remainder": [
"BLOODHEAL",
"COAGULANTWEAVE",
"VAMPIRIC_DODGE",
"VAMPIRE_FEAR_GAZE",
"VAMPIRE_WALK_ON_WALLS",
"VAMPIRE_BEAST_CLAWS",
"VAMPIRE_SEE_HEAT"
],
"type": "mutation",
"true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ],
"false_eocs": [ "EOC_COMPLETED_ROLL_REMAINDER_VAMPVIRUS", "EOC_VAMPVIRUS2" ]
},
{ "queue_eocs": "EOC_ADD_VAMPIRUS_INTENSITY2", "time_in_future": [ "15 days", "8 hours" ] }
],
"false_effect": [
{ "u_add_trait": "VAMPIRE2" },
{
"u_message": "With a popping sound several of your teeth fall out but when you put a finger into your mouth to feel the hole, there are new sharp fangs where you expected nothing."
}
]
}
]
}
}
}
},
Expand All @@ -209,22 +255,29 @@
},
"effect": {
"run_eocs": {
"id": "eoc_vampvirus_3_trait",
"condition": { "u_has_trait": "VAMPIRE3" },
"effect": [
{
"u_roll_remainder": [ "BLOODHASTE", "HYPNOTIC_GAZE", "BLOODBANK" ],
"type": "mutation",
"true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ],
"false_eocs": [ "EOC_COMPLETED_VAMPIRE3" ]
"id": "eoc_vampvirus_3_math_checker",
"condition": { "math": [ "vampire_total_tier_three_traits()", "<", "4" ] },
"effect": {
"run_eocs": {
"id": "eoc_vampvirus_3_trait",
"condition": { "u_has_trait": "VAMPIRE3" },
"effect": [
{
"u_roll_remainder": [ "BLOODHASTE", "HYPNOTIC_GAZE", "BLOODBANK", "VAMPIRE_COMMAND_BEAST", "VAMPIRE_EARTH_SLUMBER" ],
"type": "mutation",
"true_eocs": [ "EOC_SUCCESFUL_ROLL_REMAINDER" ],
"false_eocs": [ "EOC_COMPLETED_VAMPIRE3" ]
}
],
"false_effect": [
{ "u_add_trait": "VAMPIRE3" },
{
"u_message": "You feel the absence of your heart beating for several seconds and then it resumes at this new rhythm."
}
]
}
],
"false_effect": [
{ "u_add_trait": "VAMPIRE3" },
{
"u_message": "You feel the absence of your heart beating for several seconds and then it resumes at this new rhythm."
}
]
},
"false_effect": [ { "run_eocs": "EOC_COMPLETED_VAMPIRE3" } ]
}
}
}
Expand All @@ -237,7 +290,6 @@
"//": "This EOC works on telling the vampire whether they need to consume blood or not.",
"recurrence": [ "8 hours", "14 hours 15 minutes" ],
"condition": { "and": [ { "math": [ "u_vitamin('human_blood_vitamin')", "<=", "-450" ] }, { "u_has_effect": "vampire_virus" } ] },
"deactivate_condition": { "not": { "u_has_effect": "vampire_virus" } },
"effect": {
"run_eocs": [
{
Expand Down
25 changes: 25 additions & 0 deletions data/mods/Xedra_Evolved/jmath.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,30 @@
"//": "Yes, this is horrible, but there's apparently no way to check the total number of mutations in a category otherwise.",
"num_args": 1,
"return": "_0 + u_has_trait('HOMULLUS_DURABILITY_MULT_1') + u_has_trait('HOMULLUS_DURABILITY_MULT_2') + u_has_trait('HOMULLUS_SKIN_1') + u_has_trait('HOMULLUS_SKIN_2') + u_has_trait('HOMULLUS_SKIN_3') + u_has_trait('HOMULLUS_EYES') + u_has_trait('HOMULLUS_BETTER_AT_LYING') + u_has_trait('HOMULLUS_DREAMWALKER') + u_has_trait('HOMULLUS_CHARM_FERALS') + u_has_trait('HOMULLUS_SUMMON_FERALS') + u_has_trait('HOMULLUS_SELF_DECEPTION') + u_has_trait('HOMULLUS_INVISIBLE_TO_HUMANS') + u_has_trait('HOMULLUS_REDUCED_VISIBILITY_ALLY') + u_has_trait('HOMULLUS_RESTORE_POWER') + u_has_trait('HOMULLUS_ADD_LEARNING_FOCUS') + u_has_trait('HOMULLUS_CULTIVATE_GOBLIN_FRUIT') + u_has_trait('NO_TRACE_YET_I_WISH') + u_has_trait('HOMULLUS_BACKSTAGE') + u_has_trait('HOMULLUS_CBM_INSTALL') + u_has_trait('HOMULLUS_CBM_MANA_1') + u_has_trait('HOMULLUS_CBM_MANA_2') + u_has_trait('HOMULLUS_PASSIVE_BIONIC_POWER') + u_has_trait('HOMULLUS_ARMOR_MULT_1') + u_has_trait('HOMULLUS_ARMOR_MULT_2') + u_has_trait('HOMULLUS_GAIN_BIONIC_POWER') + u_has_trait('HOMULLUS_GAIN_BIONIC_POWER_AND_MANA') + u_has_trait('HOMULLUS_CITY_STRIDER') + u_has_trait('HOMULLUS_THE_HUNTER') + u_has_trait('HOMULLUS_EAT_DEMIHUMANS') + u_has_trait('HOMULLUS_TEMPERATURE_TOLERANCE') + u_has_trait('HOMULLUS_CRAFTING_BONUS_1') + u_has_trait('HOMULLUS_CRAFTING_BONUS_2') + u_has_trait('HOMULLUS_CRAFTING_BONUS_3') + u_has_trait('HOMULLUS_GAIN_INTEGRATED_TOOLS') + u_has_trait('HOMULLUS_GAIN_INTEGRATED_HACKER') + u_has_trait('HOMULLUS_EXPANDED_MUTATIONS') + u_has_trait('HOMULLUS_THE_HUNTER2') + u_has_trait('HOMULLUS_DOLL_FORM') + u_has_trait('SOCIAL1') + u_has_trait('SOCIAL2') + u_has_trait('PRETTY') + u_has_trait('BEAUTIFUL') + u_has_trait('BEAUTIFUL2') + u_has_trait('BEAUTIFUL3') + u_has_trait('STR_UP') + u_has_trait('STR_UP_2') + u_has_trait('STR_ALPHA') + u_has_trait('DEX_UP')+ u_has_trait('DEX_UP_2') + u_has_trait('DEX_ALPHA') + u_has_trait('INT_UP') + u_has_trait('INT_UP_2') + u_has_trait('INT_ALPHA') + u_has_trait('PER_UP') + u_has_trait('PER_UP_2') + u_has_trait('PER_ALPHA')"
},
{
"type": "jmath_function",
"id": "vampire_total_tier_one_traits",
"num_args": 0,
"return": "u_has_trait('EYEGLEAM') + u_has_trait('STAMINAFORBLOOD') + u_has_trait('COMMUNE_NIGHT') + u_has_trait('VAMPIRIC_STRENGTH') + u_has_trait('VAMPIRIC_RESILIENCE') + u_has_trait('VAMPIRE_HEIGHTENED_SENSES') + u_has_trait('VAMPIRE_SILENT_MOVE')"
},
{
"type": "jmath_function",
"id": "vampire_total_tier_two_traits",
"num_args": 0,
"return": "u_has_trait('BLOODHEAL') + u_has_trait('COAGULANTWEAVE') + u_has_trait('VAMPIRIC_DODGE') + u_has_trait('VAMPIRE_FEAR_GAZE') + u_has_trait('VAMPIRE_WALK_ON_WALLS') + u_has_trait('VAMPIRE_BEAST_CLAWS') + u_has_trait('VAMPIRE_SEE_HEAT')"
},
{
"type": "jmath_function",
"id": "vampire_total_tier_three_traits",
"num_args": 0,
"return": "u_has_trait('BLOODHASTE') + u_has_trait('HYPNOTIC_GAZE') + u_has_trait('BLOODBANK') + u_has_trait('VAMPIRE_COMMAND_BEAST') + u_has_trait('VAMPIRE_EARTH_SLUMBER')"
},
{
"type": "jmath_function",
"id": "vampire_total_tier_four_traits",
"num_args": 0,
"//": "Tier four is currently impossible to get and has no traits. Jmath is included so that durations don't all have to be scaled when it is implemented",
"return": "0"
}
]
Loading

0 comments on commit 0ed4d8a

Please sign in to comment.