Skip to content

Commit 99121a5

Browse files
[Xedra Evolved] Add the Vampire Anathema sun weakness (#82956)
* Initial commit * Actually check for ANATHEMA_WEAKNESS_SUN_BURN * Blotted Sun is shorter for weakened anathema * Check only for weakness where relevant * Missed one weakness condition
1 parent a600d8f commit 99121a5

File tree

3 files changed

+95
-21
lines changed

3 files changed

+95
-21
lines changed

data/mods/Xedra_Evolved/effects/effects.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3748,11 +3748,14 @@
37483748
"id": "effect_slain_by_the_sun",
37493749
"name": [ "Slain by the Sun" ],
37503750
"desc": [ "The sun is burning you like a dry leaf in a wildfire." ],
3751-
"miss_messages": [ [ "The sun is burning you.", 2 ] ],
3752-
"rating": "bad",
3753-
"main_parts_only": true,
3754-
"base_mods": { "pain_min": [ 2 ], "pain_tick": [ 10 ], "hurt_min": [ 1 ], "hurt_max": [ 2 ], "hurt_tick": [ 10 ] },
3755-
"show_in_info": false
3751+
"rating": "bad"
3752+
},
3753+
{
3754+
"type": "effect_type",
3755+
"id": "effect_slain_by_the_sun_limiter",
3756+
"//": "Hidden effect, prevents the sun fire anathema EoC from firing new copies on every step.",
3757+
"name": [ "" ],
3758+
"desc": [ "" ]
37563759
},
37573760
{
37583761
"type": "effect_type",

data/mods/Xedra_Evolved/effects/vampvirus.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -617,20 +617,6 @@
617617
{
618618
"u_roll_remainder": [ "ANATHEMA_WEAKNESS_SUN_BURN", "ANATHEMA_WEAKNESS_MIND_CHAOS", "ANATHEMA_WEAKNESS_NEED_VAMPIRE_BLOOD" ],
619619
"type": "mutation"
620-
},
621-
{
622-
"run_eocs": {
623-
"id": "EOC_VAMPIRE_ANATHEMA_ADD_SUN_GRACE_PERIOD",
624-
"//": "As suddenly gaining this weakness in the wild or otherwise away from shelter is a death sentence, its effects won't trigger instantly after gaining the weakness.",
625-
"condition": { "u_has_trait": "ANATHEMA_WEAKNESS_SUN_BURN" },
626-
"effect": [
627-
{
628-
"u_message": "You have a sudden feeling of dread. In a few hours, the sun will burn you to a crisp if you ever stand under its unblocked rays.",
629-
"type": "bad"
630-
},
631-
{ "u_add_effect": "effect_sun_burn_grace_period", "intensity": 1, "duration": "5 hours" }
632-
]
633-
}
634620
}
635621
]
636622
},

data/mods/Xedra_Evolved/mutations/vampire_trait_eocs.json

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,83 @@
654654
"condition": { "compare_string": [ "ANATHEMA_WEAKNESS_NEED_VAMPIRE_BLOOD", { "context_val": "trait" } ] },
655655
"effect": [ { "u_message": "You feel a growing thirst for the blood of vampires.", "type": "bad" } ]
656656
},
657+
{
658+
"type": "effect_on_condition",
659+
"id": "EOC_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT",
660+
"eoc_type": "EVENT",
661+
"required_event": "avatar_moves",
662+
"condition": {
663+
"and": [
664+
{ "u_has_trait": "ANATHEMA_WEAKNESS_SUN_BURN" },
665+
"is_day",
666+
"u_is_outside",
667+
{ "not": { "is_weather": "blotted_sun" } }
668+
]
669+
},
670+
"effect": [
671+
{ "u_add_effect": "effect_slain_by_the_sun", "duration": "PERMANENT" },
672+
{
673+
"if": { "not": { "u_has_effect": "effect_slain_by_the_sun_limiter" } },
674+
"then": [ { "run_eocs": "EOC_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT_CONTINUAL" } ]
675+
}
676+
]
677+
},
678+
{
679+
"type": "effect_on_condition",
680+
"id": "EOC_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT_GO_INDOORS",
681+
"eoc_type": "EVENT",
682+
"required_event": "avatar_moves",
683+
"condition": {
684+
"and": [
685+
{ "u_has_trait": "ANATHEMA_WEAKNESS_SUN_BURN" },
686+
{ "or": [ { "not": "is_day" }, { "not": "u_is_outside" }, { "is_weather": "blotted_sun" } ] }
687+
]
688+
},
689+
"effect": [ { "u_lose_effect": "effect_slain_by_the_sun" }, { "u_lose_effect": "effect_slain_by_the_sun_limiter" } ]
690+
},
691+
{
692+
"type": "effect_on_condition",
693+
"id": "EOC_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT_CONTINUAL",
694+
"condition": { "u_has_effect": "effect_slain_by_the_sun" },
695+
"effect": [
696+
{ "u_add_effect": "effect_slain_by_the_sun_limiter", "duration": "PERMANENT" },
697+
{
698+
"math": [ "_vampire_burning_chance = (30 * (u_effect_intensity('effect_vampiric_resilience') > -1 ? 4 : 1) )" ]
699+
},
700+
{
701+
"foreach": "array",
702+
"target": [ "arm_l", "arm_r", "leg_l", "leg_r", "torso", "head" ],
703+
"var": { "context_val": "id" },
704+
"effect": [
705+
{
706+
"if": { "x_in_y_chance": { "x": 1, "y": { "math": [ "_vampire_burning_chance" ] } } },
707+
"then": [ { "u_add_effect": "onfire", "duration": 30, "target_part": { "context_val": "id" } } ]
708+
}
709+
]
710+
},
711+
{
712+
"u_message": "You are burning in the sunlight! Your burn chance is 1 in <context_val:vampire_burning_chance>.",
713+
"type": "debug"
714+
},
715+
{ "run_eocs": "EOC_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT_CONTINUAL", "time_in_future": 1 }
716+
]
717+
},
718+
{
719+
"type": "effect_on_condition",
720+
"id": "EOC_XE_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT_AT_SUNRISE",
721+
"recurrence": { "math": [ "time_until('sunrise')" ] },
722+
"global": true,
723+
"run_for_npcs": false,
724+
"condition": {
725+
"and": [
726+
{ "u_has_trait": "ANATHEMA_WEAKNESS_SUN_BURN" },
727+
"is_day",
728+
"u_is_outside",
729+
{ "not": { "is_weather": "blotted_sun" } }
730+
]
731+
},
732+
"effect": [ { "run_eocs": "EOC_VAMPIRE_ANATHEMA_BURN_IN_SUNLIGHT_CONTINUAL" } ]
733+
},
657734
{
658735
"type": "effect_on_condition",
659736
"id": "EOC_SET_VAMPIRE_TRAIT_NUMBERS_FOR_NPC_USE",
@@ -2210,11 +2287,19 @@
22102287
"rng(0.75,1.25) * (300 + (vampire_total_tier_one_traits_plus_potency() * 33) + (vampire_total_tier_two_traits() * 75) + (vampire_total_tier_three_traits() * 125) + (vampire_total_tier_four_traits_plus_potence() * 200) + (vampire_total_tier_five_traits_plus_cauldron() * 270))"
22112288
]
22122289
},
2290+
{ "if": { "u_has_trait": "ANATHEMA_WEAKNESS_SUN_BURN" }, "then": { "math": [ "sunless_time /= 100" ] } },
22132291
{ "run_eocs": [ "EOC_BLOT_THE_SUN" ] },
22142292
{ "run_eocs": "EOC_UNBLOT_THE_SUN", "time_in_future": { "math": [ "sunless_time" ] } },
22152293
{
2216-
"u_message": "Using your mastery over the Shadowed Path, you blot out the sun, covering the region around you in darkness for a short period of time.",
2217-
"type": "good"
2294+
"if": { "u_has_trait": "ANATHEMA_WEAKNESS_SUN_BURN" },
2295+
"then": {
2296+
"u_message": "Using your mastery over the Shadowed Path, you blot out the sun, covering the region around you in darkness for a short period of time. But you can already see the hateful sun burning through the shadows; you had better find shelter immediately.",
2297+
"type": "mixed"
2298+
},
2299+
"else": {
2300+
"u_message": "Using your mastery over the Shadowed Path, you blot out the sun, covering the region around you in darkness for a short period of time.",
2301+
"type": "good"
2302+
}
22182303
}
22192304
]
22202305
}

0 commit comments

Comments
 (0)