Skip to content

Commit

Permalink
[Xedra Evolved] Add (very small) chance of being attacked by a lilit …
Browse files Browse the repository at this point in the history
…in your sleep (#77614)

* Add health/fatigue penalty to having your ruach drained on waking up

* Create eoc_strange_events.json

* Add biological damage

* Damage limiter for damage

* Add lilin attack dreams

* Update data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Linting

* Add warning EoC and flag

* Fixes

* Update to add sick chance

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Standing-Storm and github-actions[bot] authored Nov 10, 2024
1 parent 27ae7dd commit 9148ca4
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 0 deletions.
15 changes: 15 additions & 0 deletions data/mods/Xedra_Evolved/effects/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -2296,6 +2296,21 @@
"Triggering your abilities that way has taken their toll on you. You cannot save yourself from death that way a second time yet."
]
},
{
"type": "effect_type",
"id": "effect_lilin_attack_warning_cooldown",
"//": "Hidden effect, used as a blocker",
"name": [ "" ],
"desc": [ "" ]
},
{
"type": "effect_type",
"id": "effect_lilin_health_effects_of_draining",
"name": [ "" ],
"desc": [ "" ],
"rating": "bad",
"base_mods": { "health_min": [ -1 ], "health_chance": [ 2 ] }
},
{
"type": "effect_type",
"id": "effect_lilin_vampire_immune",
Expand Down
72 changes: 72 additions & 0 deletions data/mods/Xedra_Evolved/eocs/eoc_strange_events.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{
"type": "effect_on_condition",
"id": "EOC_SLEEPING_SEIZED_BY_LILIT_WARNING",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": {
"and": [
{ "not": { "u_has_trait": "LILIN_TRAITS" } },
{ "math": [ "u_characters_nearby('radius': 45)", "==", "0" ] },
{ "not": "u_is_outside" },
{ "x_in_y_chance": { "x": 1, "y": 2 } },
{ "math": [ "time_since('cataclysm', 'unit':'days')", "<=", "20" ] },
{ "not": { "u_has_effect": "effect_lilin_attack_warning_cooldown" } }
]
},
"effect": [
{
"u_message": "The night was a little rough. You tossed and turned, aware of every single noise and creak of wood in a way you never were before all of this happened, before you finally fell asleep. You weren't attacked and woke up without trouble, but you have to wonder if it's really safe, sleeping alone like this in an abandoned building?",
"popup": true
},
{ "u_add_effect": "effect_lilin_attack_warning_cooldown", "duration": "20 days" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_SLEEPING_SEIZED_BY_LILIT",
"eoc_type": "EVENT",
"required_event": "character_falls_asleep",
"condition": {
"and": [
{ "not": { "u_has_trait": "LILIN_TRAITS" } },
{ "math": [ "u_characters_nearby('radius': 45)", "==", "0" ] },
{ "not": "is_day" },
{ "not": "u_is_outside" },
{
"x_in_y_chance": {
"x": {
"math": [
"1 + min( (u_effect_intensity('effect_lilin_ruach_drain_side_effects') * 90 ), 180) + (u_effect_intensity('common_cold') > -1 ? 15 : 0) + (u_effect_intensity('influenza') > -1 ? 25 : 0) + (u_effect_intensity('pre_common_cold') > -1 ? 7 : 0) + (u_effect_intensity('pre_flu') > -1 ? 12 : 0)"
]
},
"y": 365
}
},
{ "not": { "u_has_worn_with_flag": "WARDING_SYMBOL" } }
]
},
"effect": [ { "run_eocs": "EOC_SLEEPING_SEIZED_BY_LILIT_EFFECTS", "time_in_future": [ "3 hours", "5 hours" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_SLEEPING_SEIZED_BY_LILIT_EFFECTS",
"condition": {
"and": [
{ "math": [ "u_characters_nearby('radius': 45)", "==", "0" ] },
{ "u_has_effect": "sleep" },
{ "not": "is_day" },
{ "not": { "u_has_effect": "effect_sleep_shield" } }
]
},
"effect": [
{
"u_add_effect": "effect_lilin_ruach_drain_side_effects",
"intensity": { "math": [ "rand(2) + 1" ] },
"duration": 259200
},
{ "u_message": "snippet_drained_by_lilit", "snippet": true, "type": "bad" },
{ "math": [ "u_lilin_ruach_drained_recently", "=", "1" ] }
]
}
]
5 changes: 5 additions & 0 deletions data/mods/Xedra_Evolved/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
"type": "json_flag",
"info": "You are immune to the evil eye."
},
{
"id": "WARDING_SYMBOL",
"type": "json_flag",
"info": "Wearing this is <good>comforting</good>."
},
{
"id": "EVIL_EYE_IMMUNE_MONSTER",
"type": "monster_flag"
Expand Down
14 changes: 14 additions & 0 deletions data/mods/Xedra_Evolved/items/clothes.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,5 +430,19 @@
"flags": [ "OVERSIZE", "HOOD", "BELTED" ],
"armor": [ { "encumbrance": 4, "coverage": 65, "covers": [ "torso", "arm_l", "arm_r", "leg_l", "leg_r" ] } ],
"relic_data": { "passive_effects": [ { "id": "ench_verdant_cloak" } ] }
},
{
"id": "holy_symbol",
"type": "ARMOR",
"copy-from": "holy_symbol",
"name": { "str": "holy symbol" },
"extend": { "flags": [ "WARDING_SYMBOL" ] }
},
{
"id": "holy_symbol_wood",
"type": "ARMOR",
"copy-from": "holy_symbol_wood",
"name": { "str": "handmade holy symbol" },
"extend": { "flags": [ "WARDING_SYMBOL" ] }
}
]
50 changes: 50 additions & 0 deletions data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
[
{
"type": "effect_on_condition",
"id": "EOC_RUACH_DRAINED_AWAKENING_PENALTIES",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": { "u_has_effect": "effect_lilin_ruach_drain_side_effects" },
"effect": [
{ "math": [ "u_val('sleepiness')", "+=", "40 + (u_effect_intensity('effect_lilin_ruach_drain_side_effects') * 20)" ] },
{
"u_add_effect": "effect_lilin_health_effects_of_draining",
"duration": { "math": [ "10 + (u_effect_intensity('effect_lilin_ruach_drain_side_effects') * rng(10,20) )" ] }
},
{
"if": { "math": [ "u_lilin_ruach_drained_recently", "==", "1" ] },
"then": [
{ "math": [ "u_lilin_ruach_drained_recently", "=", "0" ] },
{
"u_deal_damage": "biological",
"amount": { "math": [ "max(((u_effect_intensity('effect_lilin_ruach_drain_side_effects') / 2)- 3), 0 )" ] },
"bodypart": "head"
},
{
"u_deal_damage": "biological",
"amount": { "math": [ "max(((u_effect_intensity('effect_lilin_ruach_drain_side_effects') / 2)- 3), 0 )" ] },
"bodypart": "arm_l"
},
{
"u_deal_damage": "biological",
"amount": { "math": [ "max(((u_effect_intensity('effect_lilin_ruach_drain_side_effects') / 2)- 3), 0 )" ] },
"bodypart": "arm_r"
},
{
"u_deal_damage": "biological",
"amount": { "math": [ "max(((u_effect_intensity('effect_lilin_ruach_drain_side_effects') / 2)- 3), 0 )" ] },
"bodypart": "torso"
},
{
"u_deal_damage": "biological",
"amount": { "math": [ "max(((u_effect_intensity('effect_lilin_ruach_drain_side_effects') / 2)- 3), 0 )" ] },
"bodypart": "leg_r"
},
{
"u_deal_damage": "biological",
"amount": { "math": [ "max(((u_effect_intensity('effect_lilin_ruach_drain_side_effects') / 2)- 3), 0 )" ] },
"bodypart": "leg_l"
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_LILIN_RUACH_DRAIN_SELF",
Expand Down
13 changes: 13 additions & 0 deletions data/mods/Xedra_Evolved/snippets/dreams.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,18 @@
"You are in a field where the scarecrows come to life and chase you with knives.",
"You are in a house where the paintings change every time you look away, showing your worst fears."
]
},
{
"type": "snippet",
"category": "snippet_drained_by_lilit",
"text": [
"You dream of falling through darkness.",
"You dream of whistling winds as you stand on a mountaintop.",
"You dream of the moon growing larger and larger, filling the sky.",
"You dream of walking through the forest and suddenly seeing an owl fly past you, so close you could touch it.",
"You dream of something sitting on your chest, suffocating you.",
"You dream of slipping under dark water, none of your attempts to swim keeping you afloat.",
"You dream of standing in a dark room, being buffeted by silent wings."
]
}
]
1 change: 1 addition & 0 deletions data/mods/Xedra_Evolved/spells/lilin_spell_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"effect": [
{ "math": [ "n_vitamin('lilin_ruach_vitamin')", "+=", "rng(200,300)" ] },
{ "npc_message": "You feel a rush of warmth as you absorb the ruach.", "type": "good" },
{ "math": [ "u_lilin_ruach_drained_recently", "=", "1" ] },
{ "run_eocs": "EOC_LILIN_RUACH_DRAIN_SIDE_EFFECTS" }
],
"false_effect": [
Expand Down

0 comments on commit 9148ca4

Please sign in to comment.