forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request CleverRaven#68242 from MNG-cataclysm/eoc_file_orga…
…nization Organize the EOC files for better accessibility
- Loading branch information
Showing
18 changed files
with
1,449 additions
and
1,433 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } ] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } | ||
} | ||
] | ||
} | ||
} | ||
] |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } | ||
} | ||
] |
85 changes: 85 additions & 0 deletions
85
data/json/effects_on_condition/mapgen_eocs/godco_mapgen_eocs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" } | ||
] | ||
} | ||
] |
117 changes: 117 additions & 0 deletions
117
data/json/effects_on_condition/misc_effect_on_condition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "<AMBIENT_SUBWAY>", "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" } | ||
] | ||
} | ||
] |
Oops, something went wrong.