From 9148ca4b92319c9c68bd6aed342d066d9b956166 Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:35:13 -0600 Subject: [PATCH] [Xedra Evolved] Add (very small) chance of being attacked by a lilit 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> --- data/mods/Xedra_Evolved/effects/effects.json | 15 ++++ .../eocs/eoc_strange_events.json | 72 +++++++++++++++++++ data/mods/Xedra_Evolved/flags.json | 5 ++ data/mods/Xedra_Evolved/items/clothes.json | 14 ++++ .../mutations/xe_lilin_eocs.json | 50 +++++++++++++ data/mods/Xedra_Evolved/snippets/dreams.json | 13 ++++ .../spells/lilin_spell_eocs.json | 1 + 7 files changed, 170 insertions(+) create mode 100644 data/mods/Xedra_Evolved/eocs/eoc_strange_events.json diff --git a/data/mods/Xedra_Evolved/effects/effects.json b/data/mods/Xedra_Evolved/effects/effects.json index 1437562a04990..2d0dbed6e5bbf 100644 --- a/data/mods/Xedra_Evolved/effects/effects.json +++ b/data/mods/Xedra_Evolved/effects/effects.json @@ -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", diff --git a/data/mods/Xedra_Evolved/eocs/eoc_strange_events.json b/data/mods/Xedra_Evolved/eocs/eoc_strange_events.json new file mode 100644 index 0000000000000..92dccaf11a32f --- /dev/null +++ b/data/mods/Xedra_Evolved/eocs/eoc_strange_events.json @@ -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" ] } + ] + } +] diff --git a/data/mods/Xedra_Evolved/flags.json b/data/mods/Xedra_Evolved/flags.json index 1ac98330f5733..930e37b2c6709 100644 --- a/data/mods/Xedra_Evolved/flags.json +++ b/data/mods/Xedra_Evolved/flags.json @@ -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 comforting." + }, { "id": "EVIL_EYE_IMMUNE_MONSTER", "type": "monster_flag" diff --git a/data/mods/Xedra_Evolved/items/clothes.json b/data/mods/Xedra_Evolved/items/clothes.json index e29bff333c675..8e96eba81bedb 100644 --- a/data/mods/Xedra_Evolved/items/clothes.json +++ b/data/mods/Xedra_Evolved/items/clothes.json @@ -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" ] } } ] diff --git a/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json b/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json index f32521d85a40d..5d0025643260e 100644 --- a/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json @@ -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", diff --git a/data/mods/Xedra_Evolved/snippets/dreams.json b/data/mods/Xedra_Evolved/snippets/dreams.json index fbc3b23ecfb53..12d585c61d701 100644 --- a/data/mods/Xedra_Evolved/snippets/dreams.json +++ b/data/mods/Xedra_Evolved/snippets/dreams.json @@ -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." + ] } ] diff --git a/data/mods/Xedra_Evolved/spells/lilin_spell_eocs.json b/data/mods/Xedra_Evolved/spells/lilin_spell_eocs.json index f99e7efa855c2..1cd99259efa46 100644 --- a/data/mods/Xedra_Evolved/spells/lilin_spell_eocs.json +++ b/data/mods/Xedra_Evolved/spells/lilin_spell_eocs.json @@ -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": [