From 989ed2d275f291ac16738386b656acc5bea6c381 Mon Sep 17 00:00:00 2001 From: MNG-cataclysm Date: Thu, 21 Sep 2023 10:21:17 -0400 Subject: [PATCH] Move it all and split it up --- data/json/effect_on_condition.json | 1350 ----------------- .../addictions_eocs.json | 0 .../effects_on_condition/bionic_eocs.json | 147 ++ .../effects_on_condition/computer_eocs.json | 18 + .../example_eocs.json | 0 .../generalized_eocs.json | 0 data/json/effects_on_condition/item_eocs.json | 20 + .../mapgen_eocs/godco_mapgen_eocs.json | 85 ++ .../misc_effect_on_condition.json | 117 ++ .../effects_on_condition/mutation_eocs.json | 226 +++ .../nether_glass_effect_on_condition.json | 0 .../portal_dependent_effect_on_condition.json | 0 .../portal_storm_effect_on_condition.json | 189 +++ .../vitrification_effect_on_condition.json | 0 .../npc_eocs/generic_npc_eocs.json | 377 +++++ .../npc_eocs/godco_npc_eocs.json} | 83 - .../scenario_specific_eocs.json | 210 +++ .../effects_on_condition/weather_eocs.json | 60 + 18 files changed, 1449 insertions(+), 1433 deletions(-) delete mode 100644 data/json/effect_on_condition.json rename data/json/{ => effects_on_condition}/addictions_eocs.json (100%) create mode 100644 data/json/effects_on_condition/bionic_eocs.json create mode 100644 data/json/effects_on_condition/computer_eocs.json rename data/json/{ => effects_on_condition}/example_eocs.json (100%) rename data/json/{ => effects_on_condition}/generalized_eocs.json (100%) create mode 100644 data/json/effects_on_condition/item_eocs.json create mode 100644 data/json/effects_on_condition/mapgen_eocs/godco_mapgen_eocs.json create mode 100644 data/json/effects_on_condition/misc_effect_on_condition.json create mode 100644 data/json/effects_on_condition/mutation_eocs.json rename data/json/{ => effects_on_condition/nether_eocs}/nether_glass_effect_on_condition.json (100%) rename data/json/{ => effects_on_condition/nether_eocs}/portal_dependent_effect_on_condition.json (100%) rename data/json/{ => effects_on_condition/nether_eocs}/portal_storm_effect_on_condition.json (85%) rename data/json/{ => effects_on_condition/nether_eocs}/vitrification_effect_on_condition.json (100%) create mode 100644 data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json rename data/json/{mapgen/godco/godco_eocs.json => effects_on_condition/npc_eocs/godco_npc_eocs.json} (51%) create mode 100644 data/json/effects_on_condition/scenario_specific_eocs.json create mode 100644 data/json/effects_on_condition/weather_eocs.json diff --git a/data/json/effect_on_condition.json b/data/json/effect_on_condition.json deleted file mode 100644 index b2f59b9f2888b..0000000000000 --- a/data/json/effect_on_condition.json +++ /dev/null @@ -1,1350 +0,0 @@ -[ - { - "type": "effect_on_condition", - "id": "scenario_bad_day", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { "u_add_effect": "flu", "intensity": 1, "duration": "1000 minutes" }, - { "u_add_effect": "drunk", "intensity": 1, "duration": "270 minutes" }, - { - "u_add_morale": "morale_feeling_bad", - "bonus": -100, - "max_bonus": -100, - "duration": "50 minutes", - "decay_start": "50 minutes" - } - ] - }, - { - "type": "effect_on_condition", - "id": "scenario_infected", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { "u_add_effect": "infected", "intensity": 1, "duration": "PERMANENT", "target_part": "RANDOM" }, - { "assign_mission": "MISSION_INFECTED_START_FIND_ANTIBIOTICS" } - ] - }, - { - "type": "effect_on_condition", - "id": "scenario_fungal_infection", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "u_add_effect": "fungus", "intensity": 1, "duration": "PERMANENT", "target_part": "RANDOM" } ] - }, - { - "type": "effect_on_condition", - "id": "scenario_paralyzepoison", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "u_add_effect": "paralyzepoison", "intensity": 3, "duration": "10 minutes" } ] - }, - { - "type": "effect_on_condition", - "id": "scenario_mansion_pursuit", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { - "u_spawn_monster": "GROUP_MANSION_ARMORED", - "group": true, - "real_count": 1, - "min_radius": 30, - "max_radius": 45, - "indoor_only": true - }, - { - "u_spawn_monster": "GROUP_MANSION_START", - "group": true, - "real_count": 2, - "min_radius": 20, - "max_radius": 35, - "indoor_only": true - }, - { - "u_spawn_monster": "GROUP_MANSION_START", - "group": true, - "real_count": 2, - "min_radius": 25, - "max_radius": 40, - "indoor_only": true - } - ] - }, - { - "type": "effect_on_condition", - "id": "scenario_assassin_convict", - "//": "Determines which prison the assassin is in currently to correctly place the target.", - "recurrence": 1, - "condition": { "u_has_trait": "PROF_ASSASSIN_CONVICT" }, - "deactivate_condition": { "not": { "u_has_trait": "PROF_ASSASSIN_CONVICT" } }, - "effect": [ - { - "run_eocs": { - "id": "EOC_ASSASSIN_CONVICT_PRISON", - "condition": { "u_near_om_location": "prison_1_5" }, - "effect": [ - { "assign_mission": "MISSION_ASSASSIN_CONVICT_PRISON" }, - { "u_message": "Now… Where is your mark?", "type": "warning", "popup": true } - ], - "false_effect": { - "run_eocs": { - "id": "EOC_ASSASSIN_CONVICT_PRISON_ISLAND", - "condition": { "u_near_om_location": "prison_alcatraz_3" }, - "effect": [ - { "assign_mission": "MISSION_ASSASSIN_CONVICT_PRISON_ISLAND1" }, - { "u_message": "Now… Where is your mark?", "type": "warning", "popup": true } - ], - "false_effect": [ - { "assign_mission": "MISSION_ASSASSIN_CONVICT_PRISON_ISLAND2" }, - { "u_message": "Now… Where is your mark?", "type": "warning", "popup": true } - ] - } - } - } - }, - { "u_lose_trait": "PROF_ASSASSIN_CONVICT" } - ] - }, - { - "type": "effect_on_condition", - "id": "faction_camp_start", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "mapgen_update": "faction_start_add" } ] - }, - { - "type": "effect_on_condition", - "id": "get_katana", - "global": true, - "effect": { "u_spawn_item": "katana" } - }, - { - "type": "effect_on_condition", - "id": "get_deagle_44", - "global": true, - "effect": { "u_spawn_item": "deagle_44" } - }, - { - "type": "effect_on_condition", - "id": "get_m4_carbine", - "global": true, - "effect": { "u_spawn_item": "modular_m4_carbine" } - }, - { - "type": "effect_on_condition", - "id": "thunder", - "recurrence": 1, - "global": true, - "condition": { - "and": [ - { "or": [ { "is_weather": "thunder" }, { "is_weather": "lightning" } ] }, - { "one_in_chance": 50 }, - { "compare_num": [ { "u_val": "pos_z" }, ">=", { "const": 0 } ] } - ] - }, - "deactivate_condition": { "not": { "or": [ { "is_weather": "thunder" }, { "is_weather": "lightning" } ] } }, - "effect": [ - { "u_message": "You hear a distant rumble of thunder.", "sound": true }, - { "sound_effect": "thunder_far", "outdoor_event": true, "id": "environment" } - ] - }, - { - "type": "effect_on_condition", - "id": "lightning", - "recurrence": 1, - "global": true, - "condition": { - "and": [ - { "is_weather": "lightning" }, - { "one_in_chance": 600 }, - { "compare_num": [ { "u_val": "pos_z" }, ">=", { "const": 0 } ] } - ] - }, - "deactivate_condition": { "not": { "is_weather": "lightning" } }, - "effect": [ - { "u_message": "A flash of lightning illuminates your surroundings!" }, - { "sound_effect": "thunder_near", "id": "environment" }, - "lightning", - { "custom_light_level": 100, "length": [ "1 seconds", "1 seconds" ] } - ] - }, - { - "type": "effect_on_condition", - "id": "snow", - "recurrence": 6, - "global": true, - "run_for_npcs": true, - "condition": { "and": [ { "is_weather": "snowing" }, "u_is_outside" ] }, - "deactivate_condition": { "not": { "is_weather": "snowing" } }, - "effect": [ { "u_add_wet": 10 } ] - }, - { - "type": "effect_on_condition", - "id": "snowstorm", - "recurrence": 6, - "global": true, - "run_for_npcs": true, - "condition": { "and": [ { "is_weather": "snowstorm" }, "u_is_outside" ] }, - "deactivate_condition": { "not": { "is_weather": "snowstorm" } }, - "effect": [ { "u_add_wet": 40 } ] - }, - { - "type": "effect_on_condition", - "id": "bio_drain", - "recurrence": [ "30 minutes", "1 hours 30 minutes" ], - "condition": { "and": [ { "u_has_bionics": "bio_drain" }, { "compare_num": [ { "u_val": "power" }, ">=", { "power": "25 kJ" } ] } ] }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_drain" } }, - "effect": [ - { "u_message": "Your batteries discharge slightly.", "type": "bad" }, - { "sound_effect": "elec_crackle_low", "id": "bionics", "volume": 100 }, - { "arithmetic": [ { "u_val": "power" }, "-=", { "power": "25 kJ" } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_SLEEP", - "effect": [ { "u_message": "You feel very sleepy…" }, { "arithmetic": [ { "u_val": "fatigue" }, "+=", { "const": 40 } ] } ] - }, - { - "type": "effect_on_condition", - "id": "EOC_MINOR_SLEEP", - "effect": [ { "u_message": "You feel sleepy…" }, { "arithmetic": [ { "u_val": "fatigue" }, "+=", { "const": 20 } ] } ] - }, - { - "type": "effect_on_condition", - "id": "ambient_subway", - "recurrence": [ "1 hours", "2 hours" ], - "global": true, - "condition": { "or": [ { "u_at_om_location": "subway_ns" }, { "u_at_om_location": "subway_ew" } ] }, - "effect": [ { "u_message": "", "snippet": true, "sound": true } ] - }, - { - "type": "effect_on_condition", - "id": "ambient_lab_subway", - "recurrence": [ "1 hours", "2 hours" ], - "global": true, - "condition": { "or": [ { "u_at_om_location": "lab_subway_ns" }, { "u_at_om_location": "lab_subway_ew" } ] }, - "effect": [ { "u_message": "AMBIENT_LAB_SUBWAY", "snippet": true, "sound": true } ] - }, - { - "type": "effect_on_condition", - "id": "robofac_surveillance", - "recurrence": [ "1 days", "7 days" ], - "global": true, - "condition": { "or": [ { "u_has_trait": "PROF_HUB01_ANCILLIARY" }, { "u_has_effect": "robofac_surveillance" } ] }, - "effect": [ - { "u_spawn_monster": "mon_robofac_camspy", "real_count": 1, "min_radius": 15, "max_radius": 40, "outdoor_only": true } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_mininuke_record", - "eoc_type": "EVENT", - "required_event": "activates_mininuke", - "effect": [ { "math": [ "u_mininuke_activated", "++" ] } ] - }, - { - "type": "effect_on_condition", - "id": "bio_trip", - "recurrence": [ "25 minutes", "1 hours 15 minutes" ], - "condition": { - "and": [ - { "u_has_bionics": "bio_trip" }, - { "not": { "or": [ { "u_has_effect": "visuals" }, { "u_has_effect": "narcosis" } ] } } - ] - }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_trip" } }, - "effect": [ - { "u_message": "Your vision pixelates!", "type": "bad" }, - { "sound_effect": "pixelated", "id": "bionics", "volume": 100 }, - { "u_add_effect": "visuals", "duration": "10 minutes" } - ] - }, - { - "type": "effect_on_condition", - "id": "mut_eyestalk", - "recurrence": [ "2 hours 15 minutes", "10 hours 15 minutes" ], - "condition": { - "and": [ - { "u_has_trait": "EYESTALKS1" }, - { "not": { "or": [ { "u_has_effect": "visuals" }, { "u_has_effect": "narcosis" } ] } } - ] - }, - "deactivate_condition": { "not": { "u_has_trait": "EYESTALKS1" } }, - "effect": [ - { "u_message": "Your vision inverts!", "type": "bad" }, - { "sound_effect": "pixelated", "id": "bionics", "volume": 50 }, - { "u_add_effect": "visuals", "duration": "10 minutes" } - ] - }, - { - "type": "effect_on_condition", - "id": "bio_spasm", - "recurrence": [ "2 hours 30 minutes", "7 hours 30 minutes" ], - "condition": { - "and": [ - { "u_has_bionics": "bio_spasm" }, - { "not": { "or": [ { "u_has_effect": "downed" }, { "u_has_effect": "narcosis" } ] } } - ] - }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_spasm" } }, - "effect": [ - { "u_message": "Your malfunctioning bionic causes you to spasm and fall to the floor!", "type": "bad" }, - { "sound_effect": "elec_crackle_high", "id": "bionics", "volume": 100 }, - { "math": [ "u_pain()", "++" ] }, - { "u_add_effect": "stunned", "duration": 1 }, - { "u_add_effect": "downed", "duration": 1, "force": true } - ] - }, - { - "type": "effect_on_condition", - "id": "bio_shakes", - "recurrence": [ "1 hours", "3 hours" ], - "condition": { - "and": [ { "u_has_bionics": "bio_shakes" }, { "compare_num": [ { "u_val": "power" }, ">=", { "power": "25 kJ" } ] } ] - }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_shakes" } }, - "effect": [ - { "u_message": "Your bionics short-circuit, causing you to tremble and shiver.", "type": "bad" }, - { "sound_effect": "elec_crackle_med", "id": "bionics", "volume": 100 }, - { "u_add_effect": "shakes", "duration": "5 minutes" }, - { "arithmetic": [ { "u_val": "power" }, "-=", { "power": "25kJ" } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "bio_glowy", - "recurrence": [ "25 minutes", "1 hours 15 minutes" ], - "condition": { - "and": [ - { "u_has_bionics": "bio_glowy" }, - { "not": { "u_has_effect": "glowy_led" } }, - { "compare_num": [ { "u_val": "power" }, ">=", { "power": "1 kJ" } ] } - ] - }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_glowy" } }, - "effect": [ - { "u_message": "Your malfunctioning bionic starts to glow!", "type": "bad" }, - { "u_add_effect": "glowy_led", "duration": "5 minutes" }, - { "arithmetic": [ { "u_val": "power" }, "-=", { "power": "1kJ" } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "bio_sleepy", - "recurrence": [ "25 minutes", "1 hours 15 minutes" ], - "condition": { "and": [ { "u_has_bionics": "bio_sleepy" }, { "not": { "u_has_effect": "sleep" } } ] }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_sleepy" } }, - "effect": [ { "arithmetic": [ { "u_val": "fatigue" }, "++" ] } ] - }, - { - "type": "effect_on_condition", - "id": "bio_itchy", - "recurrence": [ "25 minutes", "1 hours 15 minutes" ], - "condition": { - "and": [ - { "u_has_bionics": "bio_itchy" }, - { "not": { "u_has_effect": "formication" } }, - { "not": { "u_has_effect": "narcosis" } }, - { "not": { "and": [ { "u_has_effect": "sleep" }, { "u_has_bionics": "bio_sleep_shutdown" } ] } } - ] - }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_itchy" } }, - "effect": [ - { "u_message": "Your malfunctioning bionic itches!", "type": "bad" }, - { "u_add_effect": "formication", "duration": "10 minutes", "target_part": "RANDOM" } - ] - }, - { - "type": "effect_on_condition", - "id": "bio_noise", - "recurrence": [ "30 minutes", "1 hours 30 minutes" ], - "condition": { "and": [ { "u_has_bionics": "bio_noise" }, { "not": { "u_has_effect": "narcosis" } } ] }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_noise" } }, - "effect": [ - { "u_make_sound": "Crackle!", "volume": 60, "type": "movement" }, - { - "run_eocs": [ - { - "id": "bio_noise_hearing", - "condition": { "not": "u_is_deaf" }, - "effect": [ - { "u_message": "Your faulty bionic emits a crackle of noise!", "type": "bad" }, - { "sound_effect": "elec_blast", "id": "bionics", "volume": 100 } - ] - }, - { - "id": "bio_noise_deaf", - "condition": "u_is_deaf", - "effect": [ - { "u_message": "You feel your faulty bionic shuddering.", "type": "bad" }, - { "sound_effect": "elec_blast_muffled", "id": "bionics", "volume": 100 } - ] - } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "bio_leaky", - "recurrence": [ "3 minutes", "9 minutes" ], - "condition": { "u_has_bionics": "bio_leaky" }, - "deactivate_condition": { "not": { "u_has_bionics": "bio_leaky" } }, - "effect": [ { "u_mod_healthy": -1, "cap": -200 } ] - }, - { - "id": "EOC_DEATH_PORTAL_DUNGEON", - "type": "effect_on_condition", - "eoc_type": "AVATAR_DEATH", - "condition": { "compare_num": [ { "global_val": "var", "var_name": "portal_dungeon_level" }, "!=", { "const": 0 } ] }, - "effect": [ - { - "u_message": "Your ultimate fate is hard to sum up in words but suffice to say, the thing that used to be you wishes it had hidden from the storm.", - "popup": true - }, - { "run_eocs": "EOC_PORTAL_STORM_DUNGEON_EXIT" } - ] - }, - { - "id": "EOC_DEATH_SWITCH", - "type": "effect_on_condition", - "eoc_type": "AVATAR_DEATH", - "condition": { - "and": [ { "npc_allies_global": 1 }, { "u_query": "You have died. Continue as one of your followers?", "default": false } ] - }, - "effect": [ "take_control_menu" ] - }, - { - "type": "effect_on_condition", - "id": "MAKAYLA_MUTATOR_portal_storm", - "recurrence": "15 minutes", - "//": "The assumption is that Makayla controls this normally, so the effects are only active when she's the avatar. Thus global:true.", - "global": true, - "condition": { - "and": [ - { "is_weather": "portal_storm" }, - { "u_has_trait": "MAKAYLA_MUTATOR" }, - { "not": { "u_has_worn_with_flag": "PORTAL_PROOF" } }, - "u_is_outside" - ] - }, - "deactivate_condition": { "not": { "is_weather": "portal_storm" } }, - "effect": [ - { "u_message": "Everything feels fuzzy.", "type": "info" }, - { "arithmetic": [ { "u_val": "vitamin", "name": "mutagen_feline" }, "=", { "const": 450 } ] }, - { "arithmetic": [ { "u_val": "vitamin", "name": "mutagen" }, "=", { "const": 750 } ] }, - { - "run_eocs": [ - { - "id": "cat_ears_portal_storm", - "condition": { "not": { "u_has_trait": "FELINE_EARS" } }, - "effect": [ - { "u_message": "It didn't take very long for the ears to be back.", "type": "info" }, - { "u_add_trait": "FELINE_EARS" } - ] - } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "record_portal_storm_data", - "recurrence": "5 minutes", - "global": true, - "condition": { - "and": [ - { - "or": [ - { "is_weather": "portal_storm" }, - { "and": [ { "is_weather": "distant_portal_storm" }, { "one_in_chance": 12 } ] }, - { "is_weather": "close_portal_storm" } - ] - }, - { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, - "u_is_outside" - ] - }, - "deactivate_condition": { - "not": { - "or": [ { "is_weather": "portal_storm" }, { "is_weather": "distant_portal_storm" }, { "is_weather": "close_portal_storm" } ] - } - }, - "effect": [ - { "math": [ "u_portal_storm_record", "++" ] }, - { - "run_eocs": [ - { - "id": "large_printout_portal_storm_data_ping", - "condition": { "math": [ "u_portal_storm_record", ">=", "25" ] }, - "effect": [ { "u_message": "The NRE recorder emits a three beep sequence!", "type": "info" } ], - "false_effect": [ - { - "run_eocs": [ - { - "id": "medium_printout_portal_storm_data_ping", - "condition": { "math": [ "u_portal_storm_record", ">=", "3" ] }, - "effect": [ { "u_message": "The NRE recorder emits a two beep sequence!", "type": "info" } ], - "false_effect": [ - { - "run_eocs": [ - { - "id": "small_printout_portal_storm_data_ping", - "condition": { "math": [ "u_portal_storm_record", ">=", "1" ] }, - "effect": [ { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "capture_generic_nre_anomaly", - "global": true, - "condition": { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, - "effect": [ - { "math": [ "u_generic_nre_anomaly", "++" ] }, - { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_on_kill_capture_generic_nre_anomaly", - "eoc_type": "EVENT", - "required_event": "character_kills_monster", - "//": "Only add monsters with significant reality altering powers, not just anything in the nether species.", - "condition": { - "and": [ - { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, - { - "or": [ - { "compare_string": [ "mon_hound_tindalos", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_darkman", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_zombie_phase_shrike", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_swarm_structure", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_better_half", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_hallucinator", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_archunk_strong", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_void_spider", { "context_val": "victim_type" } ] }, - { "compare_string": [ "mon_XEDRA_officer", { "context_val": "victim_type" } ] } - ] - } - ] - }, - "effect": [ - { "math": [ "u_generic_nre_anomaly", "++" ] }, - { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } - ] - }, - { - "type": "effect_on_condition", - "id": "print_nre_data", - "condition": { "or": [ { "math": [ "u_portal_storm_record", ">", "0" ] }, { "math": [ "u_generic_nre_anomaly", ">", "0" ] } ] }, - "effect": { - "run_eocs": [ - { - "id": "large_printout_portal_storm_data", - "condition": { "math": [ "u_portal_storm_record", ">=", "25" ] }, - "effect": [ - { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, - { "u_spawn_item": "large_printout_portal_storm_data", "count": 1 }, - { "math": [ "u_portal_storm_record", "=", "0" ] } - ] - }, - { - "id": "medium_printout_portal_storm_data", - "condition": { "math": [ "u_portal_storm_record", ">=", "3" ] }, - "effect": [ - { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, - { "u_spawn_item": "medium_printout_portal_storm_data", "count": 1 }, - { "math": [ "u_portal_storm_record", "=", "0" ] } - ] - }, - { - "id": "small_printout_portal_storm_data", - "condition": { "math": [ "u_portal_storm_record", ">=", "1" ] }, - "effect": [ - { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, - { "u_spawn_item": "small_printout_portal_storm_data", "count": 1 }, - { "math": [ "u_portal_storm_record", "=", "0" ] } - ] - }, - { - "id": "printout_nre_anomaly_data", - "condition": { "math": [ "u_generic_nre_anomaly", ">=", "1" ] }, - "effect": [ - { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, - { "u_spawn_item": "nre_anomaly_printout_data", "count": { "u_val": "generic_nre_anomaly", "default": 1 } }, - { "math": [ "u_generic_nre_anomaly", "=", "0" ] } - ] - } - ] - }, - "false_effect": { "u_message": "The recorder prints: \"NO DATA\" in a short piece of paper", "type": "info" } - }, - { - "type": "effect_on_condition", - "id": "EOC_last_amigara_death", - "condition": { "math": [ "u_monsters_nearby('mon_amigara_horror')", "<", "1" ] }, - "effect": [ - { "mapgen_update": "amigara_death" }, - { "u_lose_effect": "effect_amigara" }, - { - "u_message": "As the last of the horrors fell dead, you notice a strange thing popped up from nowhere and dropped on the ground.", - "type": "info" - }, - { "u_add_var": "clearead_amigara_mine", "type": "general", "context": "talk", "value": "yes" } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_GIVE_RANDOM_MISSION", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": [ - { - "weighted_list_eocs": [ - [ - { - "id": "give_MISSION_GET_RELIC", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_GET_RELIC" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_RECORD_ACCOUNTING", - "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, - "effect": { "offer_mission": "MISSION_GET_RECORD_ACCOUNTING" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_INHALER", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_GET_INHALER" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_ANTIBIOTICS", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_GET_ANTIBIOTICS" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_FLAG", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_GET_FLAG" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_RECORD_WEATHER", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_GET_RECORD_WEATHER" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_SOFTWARE", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_GET_SOFTWARE" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_GET_RECORD_PATIENT", - "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, - "effect": { "offer_mission": "MISSION_GET_RECORD_PATIENT" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_KILL_JABBERWOCK", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_KILL_JABBERWOCK" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_KILL_ZOMBIE_MOM", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_KILL_ZOMBIE_MOM" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_RESCUE_DOG", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_RESCUE_DOG" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_PROVE_YOU_ARE_A_SURVIVOR", - "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, - "effect": { "offer_mission": "MISSION_PROVE_YOU_ARE_A_SURVIVOR" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_LEARN_ABOUT_CATTAIL_JELLY", - "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, - "effect": { "offer_mission": "MISSION_LEARN_ABOUT_CATTAIL_JELLY" } - }, - { "const": 1 } - ], - [ - { - "id": "give_MISSION_PYROMANIAC", - "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, - "effect": { "offer_mission": "MISSION_PYROMANIAC" } - }, - { "const": 1 } - ] - ] - }, - { "u_lose_trait": "GETS_RANDOM_MISSION" }, - { "u_lose_trait": "GETS_RANDOM_MISSION_NOMOVE" } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_PLAY_PIANO", - "effect": [ - { "u_add_morale": "morale_music", "bonus": 5, "max_bonus": 10 }, - { "u_make_sound": "music", "type": "music", "volume": 10 }, - { "u_message": "play_piano", "snippet": true } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_RANDOM_HALLUCINATIONS", - "recurrence": [ "1 hours", "3 hours" ], - "condition": { "and": [ { "u_has_effect": "hallucination_attacks" }, { "x_in_y_chance": { "x": 1, "y": 6 } } ] }, - "effect": [ - { - "run_eocs": { - "id": "EOC_HALLUCINATION_ATTACKS", - "condition": { "math": [ "u_monsters_nearby()", ">", "1" ] }, - "effect": [ - { - "u_spawn_monster": "GROUP_YOUR_FEARS", - "group": true, - "real_count": 0, - "hallucination_count": { "arithmetic": [ { "const": 1 }, "+", { "rand": 2 } ] }, - "outdoor_only": false, - "min_radius": 10, - "max_radius": 40, - "lifespan": [ "1 hours", "4 hours" ] - } - ] - } - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_MISSION_GET_DRIVEBELTS_done", - "global": true, - "condition": { "u_has_items": { "item": "drivebelt", "count": 3 } }, - "effect": [ { "u_sell_item": "drivebelt", "count": 3 } ], - "false_effect": [ { "u_sell_item": "drivebelt_makeshift", "count": 3 } ] - }, - { - "type": "effect_on_condition", - "id": "EOC_MISSION_LUMBERMILL_GET_6_BLANKETS_done", - "global": true, - "condition": { - "or": [ - { "u_has_items": { "item": "blanket", "count": 6 } }, - { "u_has_items": { "item": "fur_blanket", "count": 6 } }, - { "u_has_items": { "item": "electric_blanket", "count": 6 } }, - { "u_has_items": { "item": "quilt", "count": 6 } }, - { "u_has_items": { "item": "quilt_patchwork", "count": 6 } } - ] - }, - "effect": [ - { - "run_eocs": [ - { - "id": "sell_blanket", - "condition": { "u_has_items": { "item": "blanket", "count": 6 } }, - "effect": { "u_sell_item": "blanket", "count": 6 } - }, - { - "id": "sell_fur_blanket", - "condition": { "u_has_items": { "item": "fur_blanket", "count": 6 } }, - "effect": { "u_sell_item": "fur_blanket", "count": 6 } - }, - { - "id": "sell_electric_blanket", - "condition": { "u_has_items": { "item": "electric_blanket", "count": 6 } }, - "effect": { "u_sell_item": "electric_blanket", "count": 6 } - }, - { - "id": "sell_quilt", - "condition": { "u_has_items": { "item": "quilt", "count": 6 } }, - "effect": { "u_sell_item": "quilt", "count": 6 } - }, - { - "id": "sell_quilt_patchwork", - "condition": { "u_has_items": { "item": "quilt_patchwork", "count": 6 } }, - "effect": { "u_sell_item": "quilt_patchwork", "count": 6 } - } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_discover_zomborg", - "condition": { "math": [ "u_monsters_nearby('mon_zomborg')", ">=", "1" ] }, - "effect": [ { "u_add_var": "seen_zomborg", "type": "dialogue", "context": "exodii", "value": "yes" } ] - }, - { - "type": "effect_on_condition", - "id": "EOC_BANDIT_ASSASSIN", - "recurrence": [ "60 days", "100 days" ], - "condition": { - "and": [ - { "compare_int": [ { "faction_like": "hells_raiders" }, "<", { "const": -40 } ] }, - { "compare_int": [ { "faction_like": "hells_raiders" }, ">", { "const": -60 } ] }, - { "compare_num": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "<=", { "const": 10 } ] }, - { "days_since_cataclysm": 9 }, - { "not": { "is_weather": "portal_storm" } }, - { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, - { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, - { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, - { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, - { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } - ] - }, - "effect": [ - { "u_spawn_npc": "hells_raiders_assassin", "real_count": 1, "min_radius": 15, "max_radius": 25 }, - { "arithmetic": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "+=", { "const": 1 } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_BANDIT_ASSASSIN_2", - "recurrence": [ "60 days", "100 days" ], - "condition": { - "and": [ - { "compare_int": [ { "faction_like": "hells_raiders" }, "<", { "const": -60 } ] }, - { "compare_int": [ { "faction_like": "hells_raiders" }, ">", { "const": -90 } ] }, - { "compare_num": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "<=", { "const": 10 } ] }, - { "days_since_cataclysm": 15 }, - { "not": { "is_weather": "portal_storm" } }, - { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, - { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, - { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, - { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, - { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } - ] - }, - "effect": [ - { "u_spawn_npc": "hells_raiders_assassin", "real_count": 2, "min_radius": 15, "max_radius": 25 }, - { "arithmetic": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "+=", { "const": 2 } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_BANDIT_ASSASSIN_3", - "recurrence": [ "60 days", "100 days" ], - "condition": { - "and": [ - { "compare_int": [ { "faction_like": "hells_raiders" }, "<", { "const": -90 } ] }, - { "compare_num": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "<=", { "const": 10 } ] }, - { "days_since_cataclysm": 21 }, - { "not": { "is_weather": "portal_storm" } }, - { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, - { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, - { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, - { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, - { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } - ] - }, - "effect": [ - { "u_spawn_npc": "hells_raiders_assassin", "real_count": 3, "min_radius": 15, "max_radius": 25 }, - { "arithmetic": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "+=", { "const": 3 } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_OLD_GUARD_ASSASSIN", - "recurrence": [ "60 days", "100 days" ], - "condition": { - "and": [ - { "compare_int": [ { "faction_like": "old_guard" }, "<", { "const": -45 } ] }, - { "compare_num": [ { "u_val": "var", "var_name": "government_assassins_sent" }, "<=", { "const": 6 } ] }, - { "days_since_cataclysm": 9 }, - { "not": { "is_weather": "portal_storm" } }, - { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, - { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, - { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, - { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, - { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } - ] - }, - "effect": [ - { "u_spawn_npc": "old_guard_assassin", "real_count": 2, "min_radius": 15, "max_radius": 25 }, - { "arithmetic": [ { "u_val": "var", "var_name": "government_assassins_sent" }, "+=", { "const": 2 } ] } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_MISSION_GODCO_TROPHY2_done", - "global": true, - "condition": { - "or": [ - { "u_has_items": { "item": "egg_spider_cellar", "count": 1 } }, - { "u_has_items": { "item": "egg_spider_jumping", "count": 1 } }, - { "u_has_items": { "item": "egg_spider_trapdoor", "count": 1 } }, - { "u_has_items": { "item": "egg_spider_web", "count": 1 } }, - { "u_has_items": { "item": "egg_spider_widow", "count": 1 } }, - { "u_has_items": { "item": "egg_spider_wolf", "count": 1 } } - ] - }, - "effect": [ - { - "run_eocs": [ - { - "id": "sell_egg_spider_cellar", - "condition": { "u_has_items": { "item": "egg_spider_cellar", "count": 1 } }, - "effect": { "u_sell_item": "egg_spider_cellar", "count": 1 } - }, - { - "id": "sell_egg_spider_jumping", - "condition": { "u_has_items": { "item": "egg_spider_jumping", "count": 1 } }, - "effect": { "u_sell_item": "egg_spider_jumping", "count": 1 } - }, - { - "id": "sell_egg_spider_trapdoor", - "condition": { "u_has_items": { "item": "egg_spider_trapdoor", "count": 1 } }, - "effect": { "u_sell_item": "egg_spider_trapdoor", "count": 1 } - }, - { - "id": "sell_egg_spider_web", - "condition": { "u_has_items": { "item": "egg_spider_web", "count": 1 } }, - "effect": { "u_sell_item": "egg_spider_web", "count": 1 } - }, - { - "id": "sell_egg_spider_widow", - "condition": { "u_has_items": { "item": "egg_spider_widow", "count": 1 } }, - "effect": { "u_sell_item": "egg_spider_widow", "count": 1 } - }, - { - "id": "sell_egg_spider_wolf", - "condition": { "u_has_items": { "item": "egg_spider_wolf", "count": 1 } }, - "effect": { "u_sell_item": "egg_spider_wolf", "count": 1 } - } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_READ_LOCAL_FILES", - "condition": { "and": [ { "math": [ "u_skill('computer')", ">=", "2" ] }, { "one_in_chance": 2 } ] }, - "effect": [ { "u_message": "local_files_simple", "snippet": true, "same_snippet": true, "popup": true } ], - "false_effect": { - "run_eocs": [ - { - "id": "EOC_READ_LOCAL_FILES_MESSAGE", - "condition": { "math": [ "u_skill('computer')", ">=", "2" ] }, - "effect": { "u_message": "You found nothing interesting" }, - "false_effect": { "u_message": "You understanding of computer devices is not good enough to find anything.", "type": "bad" } - } - ] - } - }, - { - "type": "effect_on_condition", - "id": "scenario_surrounded_zombie", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 12, "max_radius": 20 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 12, "max_radius": 20 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 15, "max_radius": 22 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 15, "max_radius": 22 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 30 } - ] - }, - { - "type": "effect_on_condition", - "id": "scenario_surrounded_zombie_heavy", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 20, "max_radius": 30 }, - { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 20, "max_radius": 30 } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_lone_survivor", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { - "u_message": "They are all dead. The group you were surviving with has been annihilated. Their bodies are still nearby. You are the last one left alive and their screams will haunt you.", - "type": "warning", - "popup": true - }, - { - "u_add_morale": "morale_feeling_bad", - "bonus": -100, - "max_bonus": -100, - "duration": "1440 minutes", - "decay_start": "180 minutes" - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_scenario_drunk", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ - { "u_add_effect": "drunk", "intensity": 1, "duration": "270 minutes" }, - { - "u_add_morale": "morale_feeling_bad", - "bonus": -50, - "max_bonus": -50, - "duration": "50 minutes", - "decay_start": "50 minutes" - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_scenario_blood", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "mapgen_update": "SCENARIO_BLOOD" } ] - }, - { - "type": "mapgen", - "update_mapgen_id": "SCENARIO_BLOOD", - "method": "json", - "object": { "place_fields": [ { "field": "fd_blood", "x": [ 5, 20 ], "y": [ 5, 20 ], "intensity": [ 1, 3 ], "repeat": 10 } ] } - }, - { - "type": "effect_on_condition", - "id": "EOC_scenario_fire", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "mapgen_update": "SCENARIO_FIRE" } ] - }, - { - "type": "mapgen", - "update_mapgen_id": "SCENARIO_FIRE", - "method": "json", - "object": { "place_fields": [ { "field": "fd_fire", "x": [ 3, 20 ], "y": [ 3, 20 ], "intensity": [ 1, 3 ], "repeat": 15 } ] } - }, - { - "type": "effect_on_condition", - "id": "EOC_scenario_smoke", - "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "mapgen_update": "SCENARIO_SMOKE" } ] - }, - { - "type": "mapgen", - "update_mapgen_id": "SCENARIO_SMOKE", - "method": "json", - "object": { "place_fields": [ { "field": "fd_smoke", "x": [ 3, 20 ], "y": [ 3, 20 ], "intensity": [ 1, 3 ], "repeat": 60 } ] } - }, - { - "type": "effect_on_condition", - "id": "EOC_REFUGEE_CENTER_NPC_MOVEMENT", - "//": "Runs once an hour and moves refugee center npcs around based on what hour it is.", - "global": true, - "recurrence": "1 hours", - "effect": [ - { - "switch": "hour", - "cases": [ - { "case": 0, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, - { "case": 2, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, - { "case": 4, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, - { "case": 6, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, - { "case": 8, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, - { "case": 10, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, - { "case": 12, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, - { "case": 14, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, - { "case": 16, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, - { "case": 18, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, - { "case": 20, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, - { "case": 22, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } } - ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION", - "effect": [ - { - "u_run_npc_eocs": [ - { - "id": "EOC_REFUGEE_CENTER_GUARD_FIRST_SHIFT", - "effect": { "u_set_guard_pos": { "global_val": "_First" }, "unique_id": true } - } - ], - "unique_ids": [ "GUARD1", "GUARD2", "GUARD3", "GUARD4", "GUARD5", "GUARD6", "GUARD7" ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION", - "effect": [ - { - "u_run_npc_eocs": [ - { - "id": "EOC_REFUGEE_CENTER_GUARD_SECOND_SHIFT", - "effect": { "u_set_guard_pos": { "global_val": "_Second" }, "unique_id": true } - } - ], - "unique_ids": [ "GUARD1", "GUARD2", "GUARD3", "GUARD4", "GUARD5", "GUARD6", "GUARD7" ] - } - ] - }, - { - "type": "effect_on_condition", - "id": "chitin2_molt_timer1", - "recurrence": [ "24 days", "42 days" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2" }, - { "not": { "u_has_effect": "molting" } }, - { "not": { "u_has_effect": "molting_imminent" } }, - { "not": { "u_has_trait": "CHITIN3" } }, - { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE" } } - ] - }, - "effect": [ { "u_add_effect": "molting", "intensity": 1, "duration": "PERMANENT" } ] - }, - { - "type": "effect_on_condition", - "id": "chitin2_molt_timer2", - "recurrence": [ "1 days", "2 days" ], - "condition": { - "and": [ - { "u_has_effect": "molting" }, - { "not": { "u_has_effect": "molting_imminent" } }, - { "not": { "u_has_trait": "CHITIN3" } }, - { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE" } } - ] - }, - "effect": [ { "u_add_effect": "molting_imminent", "intensity": 1, "duration": "PERMANENT" }, { "u_lose_effect": "molting" } ] - }, - { - "type": "effect_on_condition", - "id": "chitin2_molt_timer_3", - "recurrence": [ "1 hours", "3 hours" ], - "condition": { - "and": [ - { "u_has_effect": "molting_imminent" }, - { "not": { "u_has_effect": "molting" } }, - { "not": { "u_has_trait": "CHITIN3" } }, - { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE" } } - ] - }, - "effect": [ - { "u_add_effect": "narcosis", "duration": "5 minutes" }, - { "u_add_effect": "sleep", "duration": "5 minutes" }, - { - "u_message": "Your exoskeleton grows steadily more rigid until you can no longer move. You strain against it for a few minutes, and it peels and cracks away in chunks like a plaster mold, revealing a soft and tender new layer beneath.", - "type": "bad" - }, - { "u_lose_trait": "CHITIN2" }, - { "u_lose_trait": "CHITIN" }, - { "u_lose_effect": "molting_imminent" }, - { "u_spawn_item": "chitin_piece", "count": 3 }, - { "u_add_trait": "CHITIN_MOLTED" }, - { "u_add_trait": "CHITIN2_MOLTED" } - ] - }, - { - "type": "effect_on_condition", - "id": "chitin2_molt_timer4", - "recurrence": [ "8 hours", "12 hours" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2_MOLTED" }, - { "not": { "u_has_effect": "molting" } }, - { "not": { "u_has_effect": "molting_imminent" } }, - { "not": { "u_has_trait": "CHITIN3_MOLTED" } }, - { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE_MOLTED" } } - ] - }, - "effect": [ - { "u_message": "Your exoskeleton has finished hardening.", "type": "good" }, - { "u_lose_trait": "CHITIN_MOLTED" }, - { "u_lose_trait": "CHITIN2_MOLTED" }, - { "u_add_trait": "CHITIN" }, - { "u_add_trait": "CHITIN2" } - ] - }, - { - "type": "effect_on_condition", - "id": "chitin3_molt_timer1", - "recurrence": [ "24 days", "42 days" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2" }, - { "or": [ { "u_has_trait": "CHITIN3" }, { "u_has_trait": "CRUSTACEAN_CARAPACE" } ] }, - { "not": { "u_has_effect": "molting" } }, - { "not": { "u_has_effect": "molting_imminent" } } - ] - }, - "effect": [ { "u_add_effect": "molting", "intensity": 1, "duration": "PERMANENT" } ] - }, - { - "type": "effect_on_condition", - "id": "chitin3_molt_timer2", - "recurrence": [ "1 days", "2 days" ], - "condition": { - "and": [ - { "u_has_effect": "molting" }, - { "u_has_trait": "CHITIN2" }, - { "or": [ { "u_has_trait": "CHITIN3" }, { "u_has_trait": "CRUSTACEAN_CARAPACE" } ] }, - { "not": { "u_has_effect": "molting_imminent" } } - ] - }, - "effect": [ { "u_add_effect": "molting_imminent", "intensity": 1, "duration": "PERMANENT" }, { "u_lose_effect": "molting" } ] - }, - { - "type": "effect_on_condition", - "id": "chitin3_molt_timer3", - "recurrence": [ "1 hours", "3 hours" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2" }, - { "u_has_trait": "CHITIN3" }, - { "u_has_effect": "molting_imminent" }, - { "not": { "u_has_effect": "molting" } } - ] - }, - "effect": [ - { "u_add_effect": "narcosis", "duration": "15 minutes" }, - { "u_add_effect": "sleep", "duration": "15 minutes" }, - { - "u_message": "Your exoskeleton locks up around you like a straitjacket, completely immobilizing you. As you try to move, you begin to feel it painlessly rip, opening a hole through which you can slowly emerge, raw, soft, and vulnerable.", - "type": "bad" - }, - { "u_lose_trait": "CHITIN3" }, - { "u_lose_trait": "CHITIN2" }, - { "u_lose_trait": "CHITIN" }, - { "u_lose_effect": "molting_imminent" }, - { "u_spawn_item": "chitin_piece", "count": 4 }, - { "u_add_trait": "CHITIN_MOLTED" }, - { "u_add_trait": "CHITIN2_MOLTED" }, - { "u_add_trait": "CHITIN3_MOLTED" } - ] - }, - { - "type": "effect_on_condition", - "id": "chitin3_molt_timer4", - "recurrence": [ "8 hours", "12 hours" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2_MOLTED" }, - { "u_has_trait": "CHITIN3_MOLTED" }, - { "not": { "u_has_effect": "molting" } }, - { "not": { "u_has_effect": "molting_imminent" } } - ] - }, - "effect": [ - { "u_message": "Your exoskeleton has finished hardening.", "type": "good" }, - { "u_lose_trait": "CHITIN3_MOLTED" }, - { "u_lose_trait": "CHITIN2_MOLTED" }, - { "u_lose_trait": "CHITIN_MOLTED" }, - { "u_add_trait": "CHITIN" }, - { "u_add_trait": "CHITIN2" }, - { "u_add_trait": "CHITIN3" } - ] - }, - { - "type": "effect_on_condition", - "id": "chitin_carapace_molt_timer3", - "recurrence": [ "1 hours", "3 hours" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2" }, - { "u_has_trait": "CRUSTACEAN_CARAPACE" }, - { "u_has_effect": "molting_imminent" }, - { "not": { "u_has_effect": "molting" } } - ] - }, - "effect": [ - { "u_add_effect": "narcosis", "duration": "15 minutes" }, - { "u_add_effect": "sleep", "duration": "15 minutes" }, - { - "u_message": "Your exoskeleton locks up around you like a straitjacket, completely immobilizing you. As you try to move, you begin to feel it painlessly rip, opening a hole through which you can slowly emerge, raw, soft, and vulnerable.", - "type": "bad" - }, - { "u_lose_trait": "CRUSTACEAN_CARAPACE" }, - { "u_lose_trait": "CHITIN2" }, - { "u_lose_trait": "CHITIN" }, - { "u_lose_effect": "molting_imminent" }, - { "u_spawn_item": "chitin_piece", "count": 5 }, - { "u_add_trait": "CHITIN_MOLTED" }, - { "u_add_trait": "CHITIN2_MOLTED" }, - { "u_add_trait": "CRUSTACEAN_CARAPACE_MOLTED" } - ] - }, - { - "type": "effect_on_condition", - "id": "chitin_carapace_molt_timer4", - "recurrence": [ "8 hours", "12 hours" ], - "condition": { - "and": [ - { "u_has_trait": "CHITIN2_MOLTED" }, - { "u_has_trait": "CRUSTACEAN_CARAPACE_MOLTED" }, - { "not": { "u_has_effect": "molting" } }, - { "not": { "u_has_effect": "molting_imminent" } } - ] - }, - "effect": [ - { "u_message": "Your exoskeleton has finished hardening.", "type": "good" }, - { "u_lose_trait": "CRUSTACEAN_CARAPACE_MOLTED" }, - { "u_lose_trait": "CHITIN2_MOLTED" }, - { "u_lose_trait": "CHITIN_MOLTED" }, - { "u_add_trait": "CHITIN" }, - { "u_add_trait": "CHITIN2" }, - { "u_add_trait": "CRUSTACEAN_CARAPACE" } - ] - }, - { - "type": "effect_on_condition", - "id": "yrax_trifacet_activation", - "effect": [ - { "u_spawn_monster": "mon_yrax_trifacet", "real_count": 1, "min_radius": 1, "max_radius": 2 }, - { "u_message": "The hostile trifacet violently unfolds just clear of your hand!", "type": "bad" } - ] - } -] diff --git a/data/json/addictions_eocs.json b/data/json/effects_on_condition/addictions_eocs.json similarity index 100% rename from data/json/addictions_eocs.json rename to data/json/effects_on_condition/addictions_eocs.json diff --git a/data/json/effects_on_condition/bionic_eocs.json b/data/json/effects_on_condition/bionic_eocs.json new file mode 100644 index 0000000000000..0605fc87b3cac --- /dev/null +++ b/data/json/effects_on_condition/bionic_eocs.json @@ -0,0 +1,147 @@ +[ + { + "type": "effect_on_condition", + "id": "bio_drain", + "recurrence": [ "30 minutes", "1 hours 30 minutes" ], + "condition": { "and": [ { "u_has_bionics": "bio_drain" }, { "compare_num": [ { "u_val": "power" }, ">=", { "power": "25 kJ" } ] } ] }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_drain" } }, + "effect": [ + { "u_message": "Your batteries discharge slightly.", "type": "bad" }, + { "sound_effect": "elec_crackle_low", "id": "bionics", "volume": 100 }, + { "arithmetic": [ { "u_val": "power" }, "-=", { "power": "25 kJ" } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_trip", + "recurrence": [ "25 minutes", "1 hours 15 minutes" ], + "condition": { + "and": [ + { "u_has_bionics": "bio_trip" }, + { "not": { "or": [ { "u_has_effect": "visuals" }, { "u_has_effect": "narcosis" } ] } } + ] + }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_trip" } }, + "effect": [ + { "u_message": "Your vision pixelates!", "type": "bad" }, + { "sound_effect": "pixelated", "id": "bionics", "volume": 100 }, + { "u_add_effect": "visuals", "duration": "10 minutes" } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_spasm", + "recurrence": [ "2 hours 30 minutes", "7 hours 30 minutes" ], + "condition": { + "and": [ + { "u_has_bionics": "bio_spasm" }, + { "not": { "or": [ { "u_has_effect": "downed" }, { "u_has_effect": "narcosis" } ] } } + ] + }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_spasm" } }, + "effect": [ + { "u_message": "Your malfunctioning bionic causes you to spasm and fall to the floor!", "type": "bad" }, + { "sound_effect": "elec_crackle_high", "id": "bionics", "volume": 100 }, + { "math": [ "u_pain()", "++" ] }, + { "u_add_effect": "stunned", "duration": 1 }, + { "u_add_effect": "downed", "duration": 1, "force": true } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_shakes", + "recurrence": [ "1 hours", "3 hours" ], + "condition": { + "and": [ { "u_has_bionics": "bio_shakes" }, { "compare_num": [ { "u_val": "power" }, ">=", { "power": "25 kJ" } ] } ] + }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_shakes" } }, + "effect": [ + { "u_message": "Your bionics short-circuit, causing you to tremble and shiver.", "type": "bad" }, + { "sound_effect": "elec_crackle_med", "id": "bionics", "volume": 100 }, + { "u_add_effect": "shakes", "duration": "5 minutes" }, + { "arithmetic": [ { "u_val": "power" }, "-=", { "power": "25kJ" } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_glowy", + "recurrence": [ "25 minutes", "1 hours 15 minutes" ], + "condition": { + "and": [ + { "u_has_bionics": "bio_glowy" }, + { "not": { "u_has_effect": "glowy_led" } }, + { "compare_num": [ { "u_val": "power" }, ">=", { "power": "1 kJ" } ] } + ] + }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_glowy" } }, + "effect": [ + { "u_message": "Your malfunctioning bionic starts to glow!", "type": "bad" }, + { "u_add_effect": "glowy_led", "duration": "5 minutes" }, + { "arithmetic": [ { "u_val": "power" }, "-=", { "power": "1kJ" } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_sleepy", + "recurrence": [ "25 minutes", "1 hours 15 minutes" ], + "condition": { "and": [ { "u_has_bionics": "bio_sleepy" }, { "not": { "u_has_effect": "sleep" } } ] }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_sleepy" } }, + "effect": [ { "arithmetic": [ { "u_val": "fatigue" }, "++" ] } ] + }, + { + "type": "effect_on_condition", + "id": "bio_itchy", + "recurrence": [ "25 minutes", "1 hours 15 minutes" ], + "condition": { + "and": [ + { "u_has_bionics": "bio_itchy" }, + { "not": { "u_has_effect": "formication" } }, + { "not": { "u_has_effect": "narcosis" } }, + { "not": { "and": [ { "u_has_effect": "sleep" }, { "u_has_bionics": "bio_sleep_shutdown" } ] } } + ] + }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_itchy" } }, + "effect": [ + { "u_message": "Your malfunctioning bionic itches!", "type": "bad" }, + { "u_add_effect": "formication", "duration": "10 minutes", "target_part": "RANDOM" } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_noise", + "recurrence": [ "30 minutes", "1 hours 30 minutes" ], + "condition": { "and": [ { "u_has_bionics": "bio_noise" }, { "not": { "u_has_effect": "narcosis" } } ] }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_noise" } }, + "effect": [ + { "u_make_sound": "Crackle!", "volume": 60, "type": "movement" }, + { + "run_eocs": [ + { + "id": "bio_noise_hearing", + "condition": { "not": "u_is_deaf" }, + "effect": [ + { "u_message": "Your faulty bionic emits a crackle of noise!", "type": "bad" }, + { "sound_effect": "elec_blast", "id": "bionics", "volume": 100 } + ] + }, + { + "id": "bio_noise_deaf", + "condition": "u_is_deaf", + "effect": [ + { "u_message": "You feel your faulty bionic shuddering.", "type": "bad" }, + { "sound_effect": "elec_blast_muffled", "id": "bionics", "volume": 100 } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "bio_leaky", + "recurrence": [ "3 minutes", "9 minutes" ], + "condition": { "u_has_bionics": "bio_leaky" }, + "deactivate_condition": { "not": { "u_has_bionics": "bio_leaky" } }, + "effect": [ { "u_mod_healthy": -1, "cap": -200 } ] + } +] diff --git a/data/json/effects_on_condition/computer_eocs.json b/data/json/effects_on_condition/computer_eocs.json new file mode 100644 index 0000000000000..1dd45b5d2aef9 --- /dev/null +++ b/data/json/effects_on_condition/computer_eocs.json @@ -0,0 +1,18 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_READ_LOCAL_FILES", + "condition": { "and": [ { "math": [ "u_skill('computer')", ">=", "2" ] }, { "one_in_chance": 2 } ] }, + "effect": [ { "u_message": "local_files_simple", "snippet": true, "same_snippet": true, "popup": true } ], + "false_effect": { + "run_eocs": [ + { + "id": "EOC_READ_LOCAL_FILES_MESSAGE", + "condition": { "math": [ "u_skill('computer')", ">=", "2" ] }, + "effect": { "u_message": "You found nothing interesting" }, + "false_effect": { "u_message": "You understanding of computer devices is not good enough to find anything.", "type": "bad" } + } + ] + } + } +] diff --git a/data/json/example_eocs.json b/data/json/effects_on_condition/example_eocs.json similarity index 100% rename from data/json/example_eocs.json rename to data/json/effects_on_condition/example_eocs.json diff --git a/data/json/generalized_eocs.json b/data/json/effects_on_condition/generalized_eocs.json similarity index 100% rename from data/json/generalized_eocs.json rename to data/json/effects_on_condition/generalized_eocs.json diff --git a/data/json/effects_on_condition/item_eocs.json b/data/json/effects_on_condition/item_eocs.json new file mode 100644 index 0000000000000..313d944237929 --- /dev/null +++ b/data/json/effects_on_condition/item_eocs.json @@ -0,0 +1,20 @@ +[ + { + "type": "effect_on_condition", + "id": "get_katana", + "global": true, + "effect": { "u_spawn_item": "katana" } + }, + { + "type": "effect_on_condition", + "id": "get_deagle_44", + "global": true, + "effect": { "u_spawn_item": "deagle_44" } + }, + { + "type": "effect_on_condition", + "id": "get_m4_carbine", + "global": true, + "effect": { "u_spawn_item": "modular_m4_carbine" } + } +] diff --git a/data/json/effects_on_condition/mapgen_eocs/godco_mapgen_eocs.json b/data/json/effects_on_condition/mapgen_eocs/godco_mapgen_eocs.json new file mode 100644 index 0000000000000..79e4370486d9d --- /dev/null +++ b/data/json/effects_on_condition/mapgen_eocs/godco_mapgen_eocs.json @@ -0,0 +1,85 @@ +[ + { + "type": "effect_on_condition", + "id": "godco_place_coop", + "recurrence": 100, + "global": false, + "condition": { + "and": [ + { "compare_num": [ { "global_val": "var", "var_name": "darryl_building_coop" }, "==", { "const": 1 } ] }, + { + "npc_compare_time_since_var": "coop_in_progress", + "type": "timer", + "context": "trade", + "op": ">=", + "time": "7 d" + }, + { "npc_near_om_location": "godco_7", "range": 12 } + ] + }, + "deactivate_condition": { "compare_num": [ { "global_val": "var", "var_name": "darryl_building_coop" }, "==", { "const": 2 } ] }, + "effect": [ + { "mapgen_update": "darryl_place_coop", "om_terrain": "godco_7" }, + { "arithmetic": [ { "global_val": "var", "var_name": "darryl_building_coop" }, "=", { "const": 2 } ] }, + { "npc_lose_var": "coop_in_progress", "type": "timer", "context": "trade" } + ] + }, + { + "type": "effect_on_condition", + "id": "godco_place_herb_garden", + "recurrence": 100, + "global": false, + "condition": { + "and": [ + { "compare_num": [ { "global_val": "var", "var_name": "kostas_building_garden" }, "==", { "const": 1 } ] }, + { + "npc_compare_time_since_var": "herb_garden_in_progress", + "type": "timer", + "context": "trade", + "op": ">=", + "time": "3 d" + }, + { "npc_near_om_location": "godco_1_2", "range": 12 } + ] + }, + "deactivate_condition": { "compare_num": [ { "global_val": "var", "var_name": "kostas_building_garden" }, "==", { "const": 2 } ] }, + "effect": [ + { "mapgen_update": "place_herb_garden", "om_terrain": "godco_1_2" }, + { "arithmetic": [ { "global_val": "var", "var_name": "kostas_building_garden" }, "=", { "const": 2 } ] }, + { "npc_lose_var": "herb_garden_in_progress", "type": "timer", "context": "trade" } + ] + }, + { + "type": "effect_on_condition", + "id": "godco_place_wall", + "recurrence": 100, + "global": false, + "//": "4 hours 20 minutes per wall (from regular ground to full palisade) * 373 walls = ~1,567 hours. Divided into 8-hour work shifts, thats ~196 days, or six and a half months for one person. Presuming we have ~11 people working in a single shift, each building 1 wall, that should be ~18 days to build. Please correct me if I messed up the math.", + "condition": { + "and": [ + { "compare_num": [ { "global_val": "var", "var_name": "wall_in_progress" }, "==", { "const": 1 } ] }, + { + "npc_compare_time_since_var": "wall_started_building", + "type": "timer", + "context": "trade", + "op": ">=", + "time": "18 d" + }, + { "npc_near_om_location": "godco_5", "range": 12 } + ] + }, + "deactivate_condition": { "compare_num": [ { "global_val": "var", "var_name": "wall_in_progress" }, "==", { "const": 2 } ] }, + "effect": [ + { "mapgen_update": "place_right_corner_wall", "om_terrain": "godco_1" }, + { "mapgen_update": "place_gate_wall", "om_terrain": "godco_2" }, + { "mapgen_update": "place_left_corner_wall", "om_terrain": "godco_3" }, + { "mapgen_update": "place_straight_up_wall_right", "om_terrain": "godco_4" }, + { "mapgen_update": "place_straight_up_wall_left", "om_terrain": "godco_6" }, + { "mapgen_update": "place_right_corner_wall_bottom", "om_terrain": "godco_7" }, + { "mapgen_update": "place_straight_bottom_wall", "om_terrain": "godco_8" }, + { "mapgen_update": "place_left_corner_wall_bottom", "om_terrain": "godco_9" }, + { "arithmetic": [ { "global_val": "var", "var_name": "wall_in_progress" }, "=", { "const": 2 } ] }, + { "npc_lose_var": "wall_started_building", "type": "timer", "context": "trade" } + ] + } +] diff --git a/data/json/effects_on_condition/misc_effect_on_condition.json b/data/json/effects_on_condition/misc_effect_on_condition.json new file mode 100644 index 0000000000000..d5cc4778394be --- /dev/null +++ b/data/json/effects_on_condition/misc_effect_on_condition.json @@ -0,0 +1,117 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_SLEEP", + "effect": [ { "u_message": "You feel very sleepy…" }, { "arithmetic": [ { "u_val": "fatigue" }, "+=", { "const": 40 } ] } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MINOR_SLEEP", + "effect": [ { "u_message": "You feel sleepy…" }, { "arithmetic": [ { "u_val": "fatigue" }, "+=", { "const": 20 } ] } ] + }, + { + "type": "effect_on_condition", + "id": "ambient_subway", + "recurrence": [ "1 hours", "2 hours" ], + "global": true, + "condition": { "or": [ { "u_at_om_location": "subway_ns" }, { "u_at_om_location": "subway_ew" } ] }, + "effect": [ { "u_message": "", "snippet": true, "sound": true } ] + }, + { + "type": "effect_on_condition", + "id": "ambient_lab_subway", + "recurrence": [ "1 hours", "2 hours" ], + "global": true, + "condition": { "or": [ { "u_at_om_location": "lab_subway_ns" }, { "u_at_om_location": "lab_subway_ew" } ] }, + "effect": [ { "u_message": "AMBIENT_LAB_SUBWAY", "snippet": true, "sound": true } ] + }, + { + "type": "effect_on_condition", + "id": "robofac_surveillance", + "recurrence": [ "1 days", "7 days" ], + "global": true, + "condition": { "or": [ { "u_has_trait": "PROF_HUB01_ANCILLIARY" }, { "u_has_effect": "robofac_surveillance" } ] }, + "effect": [ + { "u_spawn_monster": "mon_robofac_camspy", "real_count": 1, "min_radius": 15, "max_radius": 40, "outdoor_only": true } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_mininuke_record", + "eoc_type": "EVENT", + "required_event": "activates_mininuke", + "effect": [ { "math": [ "u_mininuke_activated", "++" ] } ] + }, + { + "id": "EOC_DEATH_SWITCH", + "type": "effect_on_condition", + "eoc_type": "AVATAR_DEATH", + "condition": { + "and": [ { "npc_allies_global": 1 }, { "u_query": "You have died. Continue as one of your followers?", "default": false } ] + }, + "effect": [ "take_control_menu" ] + }, + { + "type": "effect_on_condition", + "id": "EOC_last_amigara_death", + "condition": { "math": [ "u_monsters_nearby('mon_amigara_horror')", "<", "1" ] }, + "effect": [ + { "mapgen_update": "amigara_death" }, + { "u_lose_effect": "effect_amigara" }, + { + "u_message": "As the last of the horrors fell dead, you notice a strange thing popped up from nowhere and dropped on the ground.", + "type": "info" + }, + { "u_add_var": "clearead_amigara_mine", "type": "general", "context": "talk", "value": "yes" } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_PLAY_PIANO", + "effect": [ + { "u_add_morale": "morale_music", "bonus": 5, "max_bonus": 10 }, + { "u_make_sound": "music", "type": "music", "volume": 10 }, + { "u_message": "play_piano", "snippet": true } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_RANDOM_HALLUCINATIONS", + "recurrence": [ "1 hours", "3 hours" ], + "condition": { "and": [ { "u_has_effect": "hallucination_attacks" }, { "x_in_y_chance": { "x": 1, "y": 6 } } ] }, + "effect": [ + { + "run_eocs": { + "id": "EOC_HALLUCINATION_ATTACKS", + "condition": { "math": [ "u_monsters_nearby()", ">", "1" ] }, + "effect": [ + { + "u_spawn_monster": "GROUP_YOUR_FEARS", + "group": true, + "real_count": 0, + "hallucination_count": { "arithmetic": [ { "const": 1 }, "+", { "rand": 2 } ] }, + "outdoor_only": false, + "min_radius": 10, + "max_radius": 40, + "lifespan": [ "1 hours", "4 hours" ] + } + ] + } + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_discover_zomborg", + "condition": { "math": [ "u_monsters_nearby('mon_zomborg')", ">=", "1" ] }, + "effect": [ { "u_add_var": "seen_zomborg", "type": "dialogue", "context": "exodii", "value": "yes" } ] + }, + { + "type": "effect_on_condition", + "id": "yrax_trifacet_activation", + "effect": [ + { "u_spawn_monster": "mon_yrax_trifacet", "real_count": 1, "min_radius": 1, "max_radius": 2 }, + { "u_message": "The hostile trifacet violently unfolds just clear of your hand!", "type": "bad" } + ] + } +] diff --git a/data/json/effects_on_condition/mutation_eocs.json b/data/json/effects_on_condition/mutation_eocs.json new file mode 100644 index 0000000000000..4109af20a0b4c --- /dev/null +++ b/data/json/effects_on_condition/mutation_eocs.json @@ -0,0 +1,226 @@ +[ + { + "type": "effect_on_condition", + "id": "mut_eyestalk", + "recurrence": [ "2 hours 15 minutes", "10 hours 15 minutes" ], + "condition": { + "and": [ + { "u_has_trait": "EYESTALKS1" }, + { "not": { "or": [ { "u_has_effect": "visuals" }, { "u_has_effect": "narcosis" } ] } } + ] + }, + "deactivate_condition": { "not": { "u_has_trait": "EYESTALKS1" } }, + "effect": [ + { "u_message": "Your vision inverts!", "type": "bad" }, + { "sound_effect": "pixelated", "id": "bionics", "volume": 50 }, + { "u_add_effect": "visuals", "duration": "10 minutes" } + ] + }, + { + "type": "effect_on_condition", + "id": "chitin2_molt_timer1", + "recurrence": [ "24 days", "42 days" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2" }, + { "not": { "u_has_effect": "molting" } }, + { "not": { "u_has_effect": "molting_imminent" } }, + { "not": { "u_has_trait": "CHITIN3" } }, + { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE" } } + ] + }, + "effect": [ { "u_add_effect": "molting", "intensity": 1, "duration": "PERMANENT" } ] + }, + { + "type": "effect_on_condition", + "id": "chitin2_molt_timer2", + "recurrence": [ "1 days", "2 days" ], + "condition": { + "and": [ + { "u_has_effect": "molting" }, + { "not": { "u_has_effect": "molting_imminent" } }, + { "not": { "u_has_trait": "CHITIN3" } }, + { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE" } } + ] + }, + "effect": [ { "u_add_effect": "molting_imminent", "intensity": 1, "duration": "PERMANENT" }, { "u_lose_effect": "molting" } ] + }, + { + "type": "effect_on_condition", + "id": "chitin2_molt_timer_3", + "recurrence": [ "1 hours", "3 hours" ], + "condition": { + "and": [ + { "u_has_effect": "molting_imminent" }, + { "not": { "u_has_effect": "molting" } }, + { "not": { "u_has_trait": "CHITIN3" } }, + { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE" } } + ] + }, + "effect": [ + { "u_add_effect": "narcosis", "duration": "5 minutes" }, + { "u_add_effect": "sleep", "duration": "5 minutes" }, + { + "u_message": "Your exoskeleton grows steadily more rigid until you can no longer move. You strain against it for a few minutes, and it peels and cracks away in chunks like a plaster mold, revealing a soft and tender new layer beneath.", + "type": "bad" + }, + { "u_lose_trait": "CHITIN2" }, + { "u_lose_trait": "CHITIN" }, + { "u_lose_effect": "molting_imminent" }, + { "u_spawn_item": "chitin_piece", "count": 3 }, + { "u_add_trait": "CHITIN_MOLTED" }, + { "u_add_trait": "CHITIN2_MOLTED" } + ] + }, + { + "type": "effect_on_condition", + "id": "chitin2_molt_timer4", + "recurrence": [ "8 hours", "12 hours" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2_MOLTED" }, + { "not": { "u_has_effect": "molting" } }, + { "not": { "u_has_effect": "molting_imminent" } }, + { "not": { "u_has_trait": "CHITIN3_MOLTED" } }, + { "not": { "u_has_trait": "CRUSTACEAN_CARAPACE_MOLTED" } } + ] + }, + "effect": [ + { "u_message": "Your exoskeleton has finished hardening.", "type": "good" }, + { "u_lose_trait": "CHITIN_MOLTED" }, + { "u_lose_trait": "CHITIN2_MOLTED" }, + { "u_add_trait": "CHITIN" }, + { "u_add_trait": "CHITIN2" } + ] + }, + { + "type": "effect_on_condition", + "id": "chitin3_molt_timer1", + "recurrence": [ "24 days", "42 days" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2" }, + { "or": [ { "u_has_trait": "CHITIN3" }, { "u_has_trait": "CRUSTACEAN_CARAPACE" } ] }, + { "not": { "u_has_effect": "molting" } }, + { "not": { "u_has_effect": "molting_imminent" } } + ] + }, + "effect": [ { "u_add_effect": "molting", "intensity": 1, "duration": "PERMANENT" } ] + }, + { + "type": "effect_on_condition", + "id": "chitin3_molt_timer2", + "recurrence": [ "1 days", "2 days" ], + "condition": { + "and": [ + { "u_has_effect": "molting" }, + { "u_has_trait": "CHITIN2" }, + { "or": [ { "u_has_trait": "CHITIN3" }, { "u_has_trait": "CRUSTACEAN_CARAPACE" } ] }, + { "not": { "u_has_effect": "molting_imminent" } } + ] + }, + "effect": [ { "u_add_effect": "molting_imminent", "intensity": 1, "duration": "PERMANENT" }, { "u_lose_effect": "molting" } ] + }, + { + "type": "effect_on_condition", + "id": "chitin3_molt_timer3", + "recurrence": [ "1 hours", "3 hours" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2" }, + { "u_has_trait": "CHITIN3" }, + { "u_has_effect": "molting_imminent" }, + { "not": { "u_has_effect": "molting" } } + ] + }, + "effect": [ + { "u_add_effect": "narcosis", "duration": "15 minutes" }, + { "u_add_effect": "sleep", "duration": "15 minutes" }, + { + "u_message": "Your exoskeleton locks up around you like a straitjacket, completely immobilizing you. As you try to move, you begin to feel it painlessly rip, opening a hole through which you can slowly emerge, raw, soft, and vulnerable.", + "type": "bad" + }, + { "u_lose_trait": "CHITIN3" }, + { "u_lose_trait": "CHITIN2" }, + { "u_lose_trait": "CHITIN" }, + { "u_lose_effect": "molting_imminent" }, + { "u_spawn_item": "chitin_piece", "count": 4 }, + { "u_add_trait": "CHITIN_MOLTED" }, + { "u_add_trait": "CHITIN2_MOLTED" }, + { "u_add_trait": "CHITIN3_MOLTED" } + ] + }, + { + "type": "effect_on_condition", + "id": "chitin3_molt_timer4", + "recurrence": [ "8 hours", "12 hours" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2_MOLTED" }, + { "u_has_trait": "CHITIN3_MOLTED" }, + { "not": { "u_has_effect": "molting" } }, + { "not": { "u_has_effect": "molting_imminent" } } + ] + }, + "effect": [ + { "u_message": "Your exoskeleton has finished hardening.", "type": "good" }, + { "u_lose_trait": "CHITIN3_MOLTED" }, + { "u_lose_trait": "CHITIN2_MOLTED" }, + { "u_lose_trait": "CHITIN_MOLTED" }, + { "u_add_trait": "CHITIN" }, + { "u_add_trait": "CHITIN2" }, + { "u_add_trait": "CHITIN3" } + ] + }, + { + "type": "effect_on_condition", + "id": "chitin_carapace_molt_timer3", + "recurrence": [ "1 hours", "3 hours" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2" }, + { "u_has_trait": "CRUSTACEAN_CARAPACE" }, + { "u_has_effect": "molting_imminent" }, + { "not": { "u_has_effect": "molting" } } + ] + }, + "effect": [ + { "u_add_effect": "narcosis", "duration": "15 minutes" }, + { "u_add_effect": "sleep", "duration": "15 minutes" }, + { + "u_message": "Your exoskeleton locks up around you like a straitjacket, completely immobilizing you. As you try to move, you begin to feel it painlessly rip, opening a hole through which you can slowly emerge, raw, soft, and vulnerable.", + "type": "bad" + }, + { "u_lose_trait": "CRUSTACEAN_CARAPACE" }, + { "u_lose_trait": "CHITIN2" }, + { "u_lose_trait": "CHITIN" }, + { "u_lose_effect": "molting_imminent" }, + { "u_spawn_item": "chitin_piece", "count": 5 }, + { "u_add_trait": "CHITIN_MOLTED" }, + { "u_add_trait": "CHITIN2_MOLTED" }, + { "u_add_trait": "CRUSTACEAN_CARAPACE_MOLTED" } + ] + }, + { + "type": "effect_on_condition", + "id": "chitin_carapace_molt_timer4", + "recurrence": [ "8 hours", "12 hours" ], + "condition": { + "and": [ + { "u_has_trait": "CHITIN2_MOLTED" }, + { "u_has_trait": "CRUSTACEAN_CARAPACE_MOLTED" }, + { "not": { "u_has_effect": "molting" } }, + { "not": { "u_has_effect": "molting_imminent" } } + ] + }, + "effect": [ + { "u_message": "Your exoskeleton has finished hardening.", "type": "good" }, + { "u_lose_trait": "CRUSTACEAN_CARAPACE_MOLTED" }, + { "u_lose_trait": "CHITIN2_MOLTED" }, + { "u_lose_trait": "CHITIN_MOLTED" }, + { "u_add_trait": "CHITIN" }, + { "u_add_trait": "CHITIN2" }, + { "u_add_trait": "CRUSTACEAN_CARAPACE" } + ] + } +] diff --git a/data/json/nether_glass_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/nether_glass_effect_on_condition.json similarity index 100% rename from data/json/nether_glass_effect_on_condition.json rename to data/json/effects_on_condition/nether_eocs/nether_glass_effect_on_condition.json diff --git a/data/json/portal_dependent_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/portal_dependent_effect_on_condition.json similarity index 100% rename from data/json/portal_dependent_effect_on_condition.json rename to data/json/effects_on_condition/nether_eocs/portal_dependent_effect_on_condition.json diff --git a/data/json/portal_storm_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json similarity index 85% rename from data/json/portal_storm_effect_on_condition.json rename to data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json index e85c1e237dcbf..a2eb66b71c009 100644 --- a/data/json/portal_storm_effect_on_condition.json +++ b/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json @@ -1074,6 +1074,19 @@ ] } }, + { + "id": "EOC_DEATH_PORTAL_DUNGEON", + "type": "effect_on_condition", + "eoc_type": "AVATAR_DEATH", + "condition": { "compare_num": [ { "global_val": "var", "var_name": "portal_dungeon_level" }, "!=", { "const": 0 } ] }, + "effect": [ + { + "u_message": "Your ultimate fate is hard to sum up in words but suffice to say, the thing that used to be you wishes it had hidden from the storm.", + "popup": true + }, + { "run_eocs": "EOC_PORTAL_STORM_DUNGEON_EXIT" } + ] + }, { "type": "effect_on_condition", "id": "EOC_PORTAL_DUNGEON_REWARD_WEAKENED_INERTIA", @@ -1149,5 +1162,181 @@ "spawn_message_plural": "Several identical people walk nearby from nowhere." } ] + }, + { + "type": "effect_on_condition", + "id": "MAKAYLA_MUTATOR_portal_storm", + "recurrence": "15 minutes", + "//": "The assumption is that Makayla controls this normally, so the effects are only active when she's the avatar. Thus global:true.", + "global": true, + "condition": { + "and": [ + { "is_weather": "portal_storm" }, + { "u_has_trait": "MAKAYLA_MUTATOR" }, + { "not": { "u_has_worn_with_flag": "PORTAL_PROOF" } }, + "u_is_outside" + ] + }, + "deactivate_condition": { "not": { "is_weather": "portal_storm" } }, + "effect": [ + { "u_message": "Everything feels fuzzy.", "type": "info" }, + { "arithmetic": [ { "u_val": "vitamin", "name": "mutagen_feline" }, "=", { "const": 450 } ] }, + { "arithmetic": [ { "u_val": "vitamin", "name": "mutagen" }, "=", { "const": 750 } ] }, + { + "run_eocs": [ + { + "id": "cat_ears_portal_storm", + "condition": { "not": { "u_has_trait": "FELINE_EARS" } }, + "effect": [ + { "u_message": "It didn't take very long for the ears to be back.", "type": "info" }, + { "u_add_trait": "FELINE_EARS" } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "record_portal_storm_data", + "recurrence": "5 minutes", + "global": true, + "condition": { + "and": [ + { + "or": [ + { "is_weather": "portal_storm" }, + { "and": [ { "is_weather": "distant_portal_storm" }, { "one_in_chance": 12 } ] }, + { "is_weather": "close_portal_storm" } + ] + }, + { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, + "u_is_outside" + ] + }, + "deactivate_condition": { + "not": { + "or": [ { "is_weather": "portal_storm" }, { "is_weather": "distant_portal_storm" }, { "is_weather": "close_portal_storm" } ] + } + }, + "effect": [ + { "math": [ "u_portal_storm_record", "++" ] }, + { + "run_eocs": [ + { + "id": "large_printout_portal_storm_data_ping", + "condition": { "math": [ "u_portal_storm_record", ">=", "25" ] }, + "effect": [ { "u_message": "The NRE recorder emits a three beep sequence!", "type": "info" } ], + "false_effect": [ + { + "run_eocs": [ + { + "id": "medium_printout_portal_storm_data_ping", + "condition": { "math": [ "u_portal_storm_record", ">=", "3" ] }, + "effect": [ { "u_message": "The NRE recorder emits a two beep sequence!", "type": "info" } ], + "false_effect": [ + { + "run_eocs": [ + { + "id": "small_printout_portal_storm_data_ping", + "condition": { "math": [ "u_portal_storm_record", ">=", "1" ] }, + "effect": [ { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "capture_generic_nre_anomaly", + "global": true, + "condition": { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, + "effect": [ + { "math": [ "u_generic_nre_anomaly", "++" ] }, + { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_on_kill_capture_generic_nre_anomaly", + "eoc_type": "EVENT", + "required_event": "character_kills_monster", + "//": "Only add monsters with significant reality altering powers, not just anything in the nether species.", + "condition": { + "and": [ + { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, + { + "or": [ + { "compare_string": [ "mon_hound_tindalos", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_darkman", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_zombie_phase_shrike", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_swarm_structure", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_better_half", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_hallucinator", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_archunk_strong", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_void_spider", { "context_val": "victim_type" } ] }, + { "compare_string": [ "mon_XEDRA_officer", { "context_val": "victim_type" } ] } + ] + } + ] + }, + "effect": [ + { "math": [ "u_generic_nre_anomaly", "++" ] }, + { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } + ] + }, + { + "type": "effect_on_condition", + "id": "print_nre_data", + "condition": { "or": [ { "math": [ "u_portal_storm_record", ">", "0" ] }, { "math": [ "u_generic_nre_anomaly", ">", "0" ] } ] }, + "effect": { + "run_eocs": [ + { + "id": "large_printout_portal_storm_data", + "condition": { "math": [ "u_portal_storm_record", ">=", "25" ] }, + "effect": [ + { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, + { "u_spawn_item": "large_printout_portal_storm_data", "count": 1 }, + { "math": [ "u_portal_storm_record", "=", "0" ] } + ] + }, + { + "id": "medium_printout_portal_storm_data", + "condition": { "math": [ "u_portal_storm_record", ">=", "3" ] }, + "effect": [ + { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, + { "u_spawn_item": "medium_printout_portal_storm_data", "count": 1 }, + { "math": [ "u_portal_storm_record", "=", "0" ] } + ] + }, + { + "id": "small_printout_portal_storm_data", + "condition": { "math": [ "u_portal_storm_record", ">=", "1" ] }, + "effect": [ + { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, + { "u_spawn_item": "small_printout_portal_storm_data", "count": 1 }, + { "math": [ "u_portal_storm_record", "=", "0" ] } + ] + }, + { + "id": "printout_nre_anomaly_data", + "condition": { "math": [ "u_generic_nre_anomaly", ">=", "1" ] }, + "effect": [ + { "u_message": "The recorder whirs as it starts printing the recorded data.", "type": "info" }, + { "u_spawn_item": "nre_anomaly_printout_data", "count": { "u_val": "generic_nre_anomaly", "default": 1 } }, + { "math": [ "u_generic_nre_anomaly", "=", "0" ] } + ] + } + ] + }, + "false_effect": { "u_message": "The recorder prints: \"NO DATA\" in a short piece of paper", "type": "info" } } ] diff --git a/data/json/vitrification_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json similarity index 100% rename from data/json/vitrification_effect_on_condition.json rename to data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json diff --git a/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json b/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json new file mode 100644 index 0000000000000..cf3da00102484 --- /dev/null +++ b/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json @@ -0,0 +1,377 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_GIVE_RANDOM_MISSION", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": [ + { + "weighted_list_eocs": [ + [ + { + "id": "give_MISSION_GET_RELIC", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_GET_RELIC" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_RECORD_ACCOUNTING", + "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, + "effect": { "offer_mission": "MISSION_GET_RECORD_ACCOUNTING" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_INHALER", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_GET_INHALER" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_ANTIBIOTICS", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_GET_ANTIBIOTICS" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_FLAG", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_GET_FLAG" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_RECORD_WEATHER", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_GET_RECORD_WEATHER" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_SOFTWARE", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_GET_SOFTWARE" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_GET_RECORD_PATIENT", + "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, + "effect": { "offer_mission": "MISSION_GET_RECORD_PATIENT" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_KILL_JABBERWOCK", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_KILL_JABBERWOCK" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_KILL_ZOMBIE_MOM", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_KILL_ZOMBIE_MOM" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_RESCUE_DOG", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_RESCUE_DOG" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_PROVE_YOU_ARE_A_SURVIVOR", + "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, + "effect": { "offer_mission": "MISSION_PROVE_YOU_ARE_A_SURVIVOR" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_LEARN_ABOUT_CATTAIL_JELLY", + "condition": { "or": [ { "u_has_trait": "GETS_RANDOM_MISSION" }, { "u_has_trait": "GETS_RANDOM_MISSION_NOMOVE" } ] }, + "effect": { "offer_mission": "MISSION_LEARN_ABOUT_CATTAIL_JELLY" } + }, + { "const": 1 } + ], + [ + { + "id": "give_MISSION_PYROMANIAC", + "condition": { "u_has_trait": "GETS_RANDOM_MISSION" }, + "effect": { "offer_mission": "MISSION_PYROMANIAC" } + }, + { "const": 1 } + ] + ] + }, + { "u_lose_trait": "GETS_RANDOM_MISSION" }, + { "u_lose_trait": "GETS_RANDOM_MISSION_NOMOVE" } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MISSION_GET_DRIVEBELTS_done", + "global": true, + "condition": { "u_has_items": { "item": "drivebelt", "count": 3 } }, + "effect": [ { "u_sell_item": "drivebelt", "count": 3 } ], + "false_effect": [ { "u_sell_item": "drivebelt_makeshift", "count": 3 } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MISSION_LUMBERMILL_GET_6_BLANKETS_done", + "global": true, + "condition": { + "or": [ + { "u_has_items": { "item": "blanket", "count": 6 } }, + { "u_has_items": { "item": "fur_blanket", "count": 6 } }, + { "u_has_items": { "item": "electric_blanket", "count": 6 } }, + { "u_has_items": { "item": "quilt", "count": 6 } }, + { "u_has_items": { "item": "quilt_patchwork", "count": 6 } } + ] + }, + "effect": [ + { + "run_eocs": [ + { + "id": "sell_blanket", + "condition": { "u_has_items": { "item": "blanket", "count": 6 } }, + "effect": { "u_sell_item": "blanket", "count": 6 } + }, + { + "id": "sell_fur_blanket", + "condition": { "u_has_items": { "item": "fur_blanket", "count": 6 } }, + "effect": { "u_sell_item": "fur_blanket", "count": 6 } + }, + { + "id": "sell_electric_blanket", + "condition": { "u_has_items": { "item": "electric_blanket", "count": 6 } }, + "effect": { "u_sell_item": "electric_blanket", "count": 6 } + }, + { + "id": "sell_quilt", + "condition": { "u_has_items": { "item": "quilt", "count": 6 } }, + "effect": { "u_sell_item": "quilt", "count": 6 } + }, + { + "id": "sell_quilt_patchwork", + "condition": { "u_has_items": { "item": "quilt_patchwork", "count": 6 } }, + "effect": { "u_sell_item": "quilt_patchwork", "count": 6 } + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MISSION_GODCO_TROPHY2_done", + "global": true, + "condition": { + "or": [ + { "u_has_items": { "item": "egg_spider_cellar", "count": 1 } }, + { "u_has_items": { "item": "egg_spider_jumping", "count": 1 } }, + { "u_has_items": { "item": "egg_spider_trapdoor", "count": 1 } }, + { "u_has_items": { "item": "egg_spider_web", "count": 1 } }, + { "u_has_items": { "item": "egg_spider_widow", "count": 1 } }, + { "u_has_items": { "item": "egg_spider_wolf", "count": 1 } } + ] + }, + "effect": [ + { + "run_eocs": [ + { + "id": "sell_egg_spider_cellar", + "condition": { "u_has_items": { "item": "egg_spider_cellar", "count": 1 } }, + "effect": { "u_sell_item": "egg_spider_cellar", "count": 1 } + }, + { + "id": "sell_egg_spider_jumping", + "condition": { "u_has_items": { "item": "egg_spider_jumping", "count": 1 } }, + "effect": { "u_sell_item": "egg_spider_jumping", "count": 1 } + }, + { + "id": "sell_egg_spider_trapdoor", + "condition": { "u_has_items": { "item": "egg_spider_trapdoor", "count": 1 } }, + "effect": { "u_sell_item": "egg_spider_trapdoor", "count": 1 } + }, + { + "id": "sell_egg_spider_web", + "condition": { "u_has_items": { "item": "egg_spider_web", "count": 1 } }, + "effect": { "u_sell_item": "egg_spider_web", "count": 1 } + }, + { + "id": "sell_egg_spider_widow", + "condition": { "u_has_items": { "item": "egg_spider_widow", "count": 1 } }, + "effect": { "u_sell_item": "egg_spider_widow", "count": 1 } + }, + { + "id": "sell_egg_spider_wolf", + "condition": { "u_has_items": { "item": "egg_spider_wolf", "count": 1 } }, + "effect": { "u_sell_item": "egg_spider_wolf", "count": 1 } + } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_BANDIT_ASSASSIN", + "recurrence": [ "60 days", "100 days" ], + "condition": { + "and": [ + { "compare_int": [ { "faction_like": "hells_raiders" }, "<", { "const": -40 } ] }, + { "compare_int": [ { "faction_like": "hells_raiders" }, ">", { "const": -60 } ] }, + { "compare_num": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "<=", { "const": 10 } ] }, + { "days_since_cataclysm": 9 }, + { "not": { "is_weather": "portal_storm" } }, + { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, + { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, + { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, + { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, + { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } + ] + }, + "effect": [ + { "u_spawn_npc": "hells_raiders_assassin", "real_count": 1, "min_radius": 15, "max_radius": 25 }, + { "arithmetic": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "+=", { "const": 1 } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_BANDIT_ASSASSIN_2", + "recurrence": [ "60 days", "100 days" ], + "condition": { + "and": [ + { "compare_int": [ { "faction_like": "hells_raiders" }, "<", { "const": -60 } ] }, + { "compare_int": [ { "faction_like": "hells_raiders" }, ">", { "const": -90 } ] }, + { "compare_num": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "<=", { "const": 10 } ] }, + { "days_since_cataclysm": 15 }, + { "not": { "is_weather": "portal_storm" } }, + { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, + { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, + { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, + { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, + { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } + ] + }, + "effect": [ + { "u_spawn_npc": "hells_raiders_assassin", "real_count": 2, "min_radius": 15, "max_radius": 25 }, + { "arithmetic": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "+=", { "const": 2 } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_BANDIT_ASSASSIN_3", + "recurrence": [ "60 days", "100 days" ], + "condition": { + "and": [ + { "compare_int": [ { "faction_like": "hells_raiders" }, "<", { "const": -90 } ] }, + { "compare_num": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "<=", { "const": 10 } ] }, + { "days_since_cataclysm": 21 }, + { "not": { "is_weather": "portal_storm" } }, + { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, + { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, + { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, + { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, + { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } + ] + }, + "effect": [ + { "u_spawn_npc": "hells_raiders_assassin", "real_count": 3, "min_radius": 15, "max_radius": 25 }, + { "arithmetic": [ { "u_val": "var", "var_name": "bandit_assassins_sent" }, "+=", { "const": 3 } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_OLD_GUARD_ASSASSIN", + "recurrence": [ "60 days", "100 days" ], + "condition": { + "and": [ + { "compare_int": [ { "faction_like": "old_guard" }, "<", { "const": -45 } ] }, + { "compare_num": [ { "u_val": "var", "var_name": "government_assassins_sent" }, "<=", { "const": 6 } ] }, + { "days_since_cataclysm": 9 }, + { "not": { "is_weather": "portal_storm" } }, + { "not": { "u_near_om_location": "godco_enter", "range": 8 } }, + { "not": { "u_near_om_location": "evac_center_18", "range": 4 } }, + { "not": { "u_near_om_location": "pagan_cult_enter", "range": 4 } }, + { "not": { "u_near_om_location": "lumbermill_0_0_ocu", "range": 4 } }, + { "not": { "u_near_om_location": "smallscrapyard_ocu", "range": 4 } } + ] + }, + "effect": [ + { "u_spawn_npc": "old_guard_assassin", "real_count": 2, "min_radius": 15, "max_radius": 25 }, + { "arithmetic": [ { "u_val": "var", "var_name": "government_assassins_sent" }, "+=", { "const": 2 } ] } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_REFUGEE_CENTER_NPC_MOVEMENT", + "//": "Runs once an hour and moves refugee center npcs around based on what hour it is.", + "global": true, + "recurrence": "1 hours", + "effect": [ + { + "switch": "hour", + "cases": [ + { "case": 0, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, + { "case": 2, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, + { "case": 4, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, + { "case": 6, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, + { "case": 8, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, + { "case": 10, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, + { "case": 12, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, + { "case": 14, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, + { "case": 16, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, + { "case": 18, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } }, + { "case": 20, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION" } }, + { "case": 22, "effect": { "run_eocs": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION" } } + ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_REFUGEE_CENTER_GUARD_FIRST_POSITION", + "effect": [ + { + "u_run_npc_eocs": [ + { + "id": "EOC_REFUGEE_CENTER_GUARD_FIRST_SHIFT", + "effect": { "u_set_guard_pos": { "global_val": "_First" }, "unique_id": true } + } + ], + "unique_ids": [ "GUARD1", "GUARD2", "GUARD3", "GUARD4", "GUARD5", "GUARD6", "GUARD7" ] + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_REFUGEE_CENTER_GUARD_SECOND_POSITION", + "effect": [ + { + "u_run_npc_eocs": [ + { + "id": "EOC_REFUGEE_CENTER_GUARD_SECOND_SHIFT", + "effect": { "u_set_guard_pos": { "global_val": "_Second" }, "unique_id": true } + } + ], + "unique_ids": [ "GUARD1", "GUARD2", "GUARD3", "GUARD4", "GUARD5", "GUARD6", "GUARD7" ] + } + ] + } +] diff --git a/data/json/mapgen/godco/godco_eocs.json b/data/json/effects_on_condition/npc_eocs/godco_npc_eocs.json similarity index 51% rename from data/json/mapgen/godco/godco_eocs.json rename to data/json/effects_on_condition/npc_eocs/godco_npc_eocs.json index 4853df0505e58..36933b6a414d8 100644 --- a/data/json/mapgen/godco/godco_eocs.json +++ b/data/json/effects_on_condition/npc_eocs/godco_npc_eocs.json @@ -38,89 +38,6 @@ "deactivate_condition": { "u_has_var": "godco_notalk_to_u", "type": "dialogue", "context": "godco", "value": "yes" }, "effect": [ { "u_add_var": "godco_notalk_to_u", "type": "dialogue", "context": "godco", "value": "yes" } ] }, - { - "type": "effect_on_condition", - "id": "godco_place_coop", - "recurrence": 100, - "global": false, - "condition": { - "and": [ - { "compare_num": [ { "global_val": "var", "var_name": "darryl_building_coop" }, "==", { "const": 1 } ] }, - { - "npc_compare_time_since_var": "coop_in_progress", - "type": "timer", - "context": "trade", - "op": ">=", - "time": "7 d" - }, - { "npc_near_om_location": "godco_7", "range": 12 } - ] - }, - "deactivate_condition": { "compare_num": [ { "global_val": "var", "var_name": "darryl_building_coop" }, "==", { "const": 2 } ] }, - "effect": [ - { "mapgen_update": "darryl_place_coop", "om_terrain": "godco_7" }, - { "arithmetic": [ { "global_val": "var", "var_name": "darryl_building_coop" }, "=", { "const": 2 } ] }, - { "npc_lose_var": "coop_in_progress", "type": "timer", "context": "trade" } - ] - }, - { - "type": "effect_on_condition", - "id": "godco_place_herb_garden", - "recurrence": 100, - "global": false, - "condition": { - "and": [ - { "compare_num": [ { "global_val": "var", "var_name": "kostas_building_garden" }, "==", { "const": 1 } ] }, - { - "npc_compare_time_since_var": "herb_garden_in_progress", - "type": "timer", - "context": "trade", - "op": ">=", - "time": "3 d" - }, - { "npc_near_om_location": "godco_1_2", "range": 12 } - ] - }, - "deactivate_condition": { "compare_num": [ { "global_val": "var", "var_name": "kostas_building_garden" }, "==", { "const": 2 } ] }, - "effect": [ - { "mapgen_update": "place_herb_garden", "om_terrain": "godco_1_2" }, - { "arithmetic": [ { "global_val": "var", "var_name": "kostas_building_garden" }, "=", { "const": 2 } ] }, - { "npc_lose_var": "herb_garden_in_progress", "type": "timer", "context": "trade" } - ] - }, - { - "type": "effect_on_condition", - "id": "godco_place_wall", - "recurrence": 100, - "global": false, - "//": "4 hours 20 minutes per wall (from regular ground to full palisade) * 373 walls = ~1,567 hours. Divided into 8-hour work shifts, thats ~196 days, or six and a half months for one person. Presuming we have ~11 people working in a single shift, each building 1 wall, that should be ~18 days to build. Please correct me if I messed up the math.", - "condition": { - "and": [ - { "compare_num": [ { "global_val": "var", "var_name": "wall_in_progress" }, "==", { "const": 1 } ] }, - { - "npc_compare_time_since_var": "wall_started_building", - "type": "timer", - "context": "trade", - "op": ">=", - "time": "18 d" - }, - { "npc_near_om_location": "godco_5", "range": 12 } - ] - }, - "deactivate_condition": { "compare_num": [ { "global_val": "var", "var_name": "wall_in_progress" }, "==", { "const": 2 } ] }, - "effect": [ - { "mapgen_update": "place_right_corner_wall", "om_terrain": "godco_1" }, - { "mapgen_update": "place_gate_wall", "om_terrain": "godco_2" }, - { "mapgen_update": "place_left_corner_wall", "om_terrain": "godco_3" }, - { "mapgen_update": "place_straight_up_wall_right", "om_terrain": "godco_4" }, - { "mapgen_update": "place_straight_up_wall_left", "om_terrain": "godco_6" }, - { "mapgen_update": "place_right_corner_wall_bottom", "om_terrain": "godco_7" }, - { "mapgen_update": "place_straight_bottom_wall", "om_terrain": "godco_8" }, - { "mapgen_update": "place_left_corner_wall_bottom", "om_terrain": "godco_9" }, - { "arithmetic": [ { "global_val": "var", "var_name": "wall_in_progress" }, "=", { "const": 2 } ] }, - { "npc_lose_var": "wall_started_building", "type": "timer", "context": "trade" } - ] - }, { "type": "effect_on_condition", "id": "theresa_remove", diff --git a/data/json/effects_on_condition/scenario_specific_eocs.json b/data/json/effects_on_condition/scenario_specific_eocs.json new file mode 100644 index 0000000000000..24bd74af31d9a --- /dev/null +++ b/data/json/effects_on_condition/scenario_specific_eocs.json @@ -0,0 +1,210 @@ +[ + { + "type": "effect_on_condition", + "id": "scenario_bad_day", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { "u_add_effect": "flu", "intensity": 1, "duration": "1000 minutes" }, + { "u_add_effect": "drunk", "intensity": 1, "duration": "270 minutes" }, + { + "u_add_morale": "morale_feeling_bad", + "bonus": -100, + "max_bonus": -100, + "duration": "50 minutes", + "decay_start": "50 minutes" + } + ] + }, + { + "type": "effect_on_condition", + "id": "scenario_infected", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { "u_add_effect": "infected", "intensity": 1, "duration": "PERMANENT", "target_part": "RANDOM" }, + { "assign_mission": "MISSION_INFECTED_START_FIND_ANTIBIOTICS" } + ] + }, + { + "type": "effect_on_condition", + "id": "scenario_fungal_infection", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "u_add_effect": "fungus", "intensity": 1, "duration": "PERMANENT", "target_part": "RANDOM" } ] + }, + { + "type": "effect_on_condition", + "id": "scenario_paralyzepoison", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "u_add_effect": "paralyzepoison", "intensity": 3, "duration": "10 minutes" } ] + }, + { + "type": "effect_on_condition", + "id": "scenario_mansion_pursuit", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { + "u_spawn_monster": "GROUP_MANSION_ARMORED", + "group": true, + "real_count": 1, + "min_radius": 30, + "max_radius": 45, + "indoor_only": true + }, + { + "u_spawn_monster": "GROUP_MANSION_START", + "group": true, + "real_count": 2, + "min_radius": 20, + "max_radius": 35, + "indoor_only": true + }, + { + "u_spawn_monster": "GROUP_MANSION_START", + "group": true, + "real_count": 2, + "min_radius": 25, + "max_radius": 40, + "indoor_only": true + } + ] + }, + { + "type": "effect_on_condition", + "id": "scenario_assassin_convict", + "//": "Determines which prison the assassin is in currently to correctly place the target.", + "recurrence": 1, + "condition": { "u_has_trait": "PROF_ASSASSIN_CONVICT" }, + "deactivate_condition": { "not": { "u_has_trait": "PROF_ASSASSIN_CONVICT" } }, + "effect": [ + { + "run_eocs": { + "id": "EOC_ASSASSIN_CONVICT_PRISON", + "condition": { "u_near_om_location": "prison_1_5" }, + "effect": [ + { "assign_mission": "MISSION_ASSASSIN_CONVICT_PRISON" }, + { "u_message": "Now… Where is your mark?", "type": "warning", "popup": true } + ], + "false_effect": { + "run_eocs": { + "id": "EOC_ASSASSIN_CONVICT_PRISON_ISLAND", + "condition": { "u_near_om_location": "prison_alcatraz_3" }, + "effect": [ + { "assign_mission": "MISSION_ASSASSIN_CONVICT_PRISON_ISLAND1" }, + { "u_message": "Now… Where is your mark?", "type": "warning", "popup": true } + ], + "false_effect": [ + { "assign_mission": "MISSION_ASSASSIN_CONVICT_PRISON_ISLAND2" }, + { "u_message": "Now… Where is your mark?", "type": "warning", "popup": true } + ] + } + } + } + }, + { "u_lose_trait": "PROF_ASSASSIN_CONVICT" } + ] + }, + { + "type": "effect_on_condition", + "id": "faction_camp_start", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "mapgen_update": "faction_start_add" } ] + }, + { + "type": "effect_on_condition", + "id": "scenario_surrounded_zombie", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 12, "max_radius": 20 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 12, "max_radius": 20 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 15, "max_radius": 22 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 15, "max_radius": 22 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 30 } + ] + }, + { + "type": "effect_on_condition", + "id": "scenario_surrounded_zombie_heavy", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 14, "max_radius": 20 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 18, "max_radius": 25 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 20, "max_radius": 30 }, + { "u_spawn_monster": "GROUP_ZOMBIE", "group": true, "real_count": 1, "min_radius": 20, "max_radius": 30 } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_lone_survivor", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { + "u_message": "They are all dead. The group you were surviving with has been annihilated. Their bodies are still nearby. You are the last one left alive and their screams will haunt you.", + "type": "warning", + "popup": true + }, + { + "u_add_morale": "morale_feeling_bad", + "bonus": -100, + "max_bonus": -100, + "duration": "1440 minutes", + "decay_start": "180 minutes" + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_scenario_drunk", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ + { "u_add_effect": "drunk", "intensity": 1, "duration": "270 minutes" }, + { + "u_add_morale": "morale_feeling_bad", + "bonus": -50, + "max_bonus": -50, + "duration": "50 minutes", + "decay_start": "50 minutes" + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_scenario_blood", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "mapgen_update": "SCENARIO_BLOOD" } ] + }, + { + "type": "mapgen", + "update_mapgen_id": "SCENARIO_BLOOD", + "method": "json", + "object": { "place_fields": [ { "field": "fd_blood", "x": [ 5, 20 ], "y": [ 5, 20 ], "intensity": [ 1, 3 ], "repeat": 10 } ] } + }, + { + "type": "effect_on_condition", + "id": "EOC_scenario_fire", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "mapgen_update": "SCENARIO_FIRE" } ] + }, + { + "type": "mapgen", + "update_mapgen_id": "SCENARIO_FIRE", + "method": "json", + "object": { "place_fields": [ { "field": "fd_fire", "x": [ 3, 20 ], "y": [ 3, 20 ], "intensity": [ 1, 3 ], "repeat": 15 } ] } + }, + { + "type": "effect_on_condition", + "id": "EOC_scenario_smoke", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "mapgen_update": "SCENARIO_SMOKE" } ] + }, + { + "type": "mapgen", + "update_mapgen_id": "SCENARIO_SMOKE", + "method": "json", + "object": { "place_fields": [ { "field": "fd_smoke", "x": [ 3, 20 ], "y": [ 3, 20 ], "intensity": [ 1, 3 ], "repeat": 60 } ] } + } +] diff --git a/data/json/effects_on_condition/weather_eocs.json b/data/json/effects_on_condition/weather_eocs.json new file mode 100644 index 0000000000000..05c06ea1ab1f5 --- /dev/null +++ b/data/json/effects_on_condition/weather_eocs.json @@ -0,0 +1,60 @@ +[ + { + "type": "effect_on_condition", + "id": "thunder", + "recurrence": 1, + "global": true, + "condition": { + "and": [ + { "or": [ { "is_weather": "thunder" }, { "is_weather": "lightning" } ] }, + { "one_in_chance": 50 }, + { "compare_num": [ { "u_val": "pos_z" }, ">=", { "const": 0 } ] } + ] + }, + "deactivate_condition": { "not": { "or": [ { "is_weather": "thunder" }, { "is_weather": "lightning" } ] } }, + "effect": [ + { "u_message": "You hear a distant rumble of thunder.", "sound": true }, + { "sound_effect": "thunder_far", "outdoor_event": true, "id": "environment" } + ] + }, + { + "type": "effect_on_condition", + "id": "lightning", + "recurrence": 1, + "global": true, + "condition": { + "and": [ + { "is_weather": "lightning" }, + { "one_in_chance": 600 }, + { "compare_num": [ { "u_val": "pos_z" }, ">=", { "const": 0 } ] } + ] + }, + "deactivate_condition": { "not": { "is_weather": "lightning" } }, + "effect": [ + { "u_message": "A flash of lightning illuminates your surroundings!" }, + { "sound_effect": "thunder_near", "id": "environment" }, + "lightning", + { "custom_light_level": 100, "length": [ "1 seconds", "1 seconds" ] } + ] + }, + { + "type": "effect_on_condition", + "id": "snow", + "recurrence": 6, + "global": true, + "run_for_npcs": true, + "condition": { "and": [ { "is_weather": "snowing" }, "u_is_outside" ] }, + "deactivate_condition": { "not": { "is_weather": "snowing" } }, + "effect": [ { "u_add_wet": 10 } ] + }, + { + "type": "effect_on_condition", + "id": "snowstorm", + "recurrence": 6, + "global": true, + "run_for_npcs": true, + "condition": { "and": [ { "is_weather": "snowstorm" }, "u_is_outside" ] }, + "deactivate_condition": { "not": { "is_weather": "snowstorm" } }, + "effect": [ { "u_add_wet": 40 } ] + } +]