From 45d494f971a207fa20fb552b068034766ca703d3 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Sat, 16 Nov 2024 13:19:40 +0100 Subject: [PATCH 1/4] init --- .../scenario_specific_eocs.json | 6 ++++++ data/json/scenarios.json | 15 +++++++++++++++ data/json/start_locations.json | 11 +++++++++++ 3 files changed, 32 insertions(+) diff --git a/data/json/effects_on_condition/scenario_specific_eocs.json b/data/json/effects_on_condition/scenario_specific_eocs.json index 5826106304f7a..a07dfafe47979 100644 --- a/data/json/effects_on_condition/scenario_specific_eocs.json +++ b/data/json/effects_on_condition/scenario_specific_eocs.json @@ -308,5 +308,11 @@ "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_scenario_clear_weather", + "eoc_type": "SCENARIO_SPECIFIC", + "effect": [ { "math": [ "weather('humidity')", "=", "0" ] }, { "math": [ "weather('pressure')", "=", "1050" ] }, "next_weather" ] } ] diff --git a/data/json/scenarios.json b/data/json/scenarios.json index b80c541295522..e08cb5b47a504 100644 --- a/data/json/scenarios.json +++ b/data/json/scenarios.json @@ -1353,5 +1353,20 @@ "requirement": "achievement_kill_10_monsters", "map_extra": "mx_laststand", "flags": [ "CITY_START", "LONE_START" ] + }, + { + "type": "scenario", + "id": "a_moonlit_night_start", + "name": "A Moonlight Night", + "points": 0, + "description": "You've been holed up in your basement ever since the Cataclysm happened a little over a week ago, but now you've run out of food and have been forced to go on a supply run on this fateful moonlit night. You see zombies all around you, but thankfully, most of them can't seem to see as well in moonlight as you do.", + "start_name": "In the Middle of Town", + "start_of_cataclysm": { "hour": 0, "day": 61, "season": "spring", "year": 1 }, + "start_of_game": { "hour": 23, "day": 72, "season": "spring", "year": 1 }, + "allowed_locs": [ "sloc_town_in_the_open" ], + "eoc": [ "EOC_scenario_clear_weather" ], + "requirement": "achievement_survive_one_day", + "flags": [ "CITY_START", "LONE_START", "SUR_START" ], + "surround_groups": [ [ "GROUP_BLACK_ROAD", 70.0 ] ] } ] diff --git a/data/json/start_locations.json b/data/json/start_locations.json index 9560639c95301..93ba38265d702 100644 --- a/data/json/start_locations.json +++ b/data/json/start_locations.json @@ -825,5 +825,16 @@ "name": "Intersection", "terrain": [ { "om_terrain": "road_nesw_manhole", "om_terrain_match_type": "PREFIX" } ], "flags": [ "ALLOW_OUTSIDE" ] + }, + { + "type": "start_location", + "id": "sloc_town_in_the_open", + "name": "Town, in the open", + "terrain": [ + { "om_terrain": "road", "om_terrain_match_type": "TYPE" }, + { "om_terrain": "playground", "om_terrain_match_type": "TYPE" }, + { "om_terrain": "park", "om_terrain_match_type": "TYPE" } + ], + "flags": [ "ALLOW_OUTSIDE" ] } ] From e69b1115138feb5b00c8e53a47306d9b1d9e092b Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Sat, 16 Nov 2024 13:54:40 +0100 Subject: [PATCH 2/4] change road start to manhole --- data/json/start_locations.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/start_locations.json b/data/json/start_locations.json index 93ba38265d702..9aacf3ad8cdb2 100644 --- a/data/json/start_locations.json +++ b/data/json/start_locations.json @@ -831,7 +831,7 @@ "id": "sloc_town_in_the_open", "name": "Town, in the open", "terrain": [ - { "om_terrain": "road", "om_terrain_match_type": "TYPE" }, + { "om_terrain": "road_nesw_manhole", "om_terrain_match_type": "PREFIX" }, { "om_terrain": "playground", "om_terrain_match_type": "TYPE" }, { "om_terrain": "park", "om_terrain_match_type": "TYPE" } ], From f7a00b1f9ea2b284b9de89e55c0caf4b06a29dbe Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Sun, 17 Nov 2024 09:05:57 +0100 Subject: [PATCH 3/4] ensure no fog with special weather --- .../scenario_specific_eocs.json | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/data/json/effects_on_condition/scenario_specific_eocs.json b/data/json/effects_on_condition/scenario_specific_eocs.json index a07dfafe47979..33c4b97df2143 100644 --- a/data/json/effects_on_condition/scenario_specific_eocs.json +++ b/data/json/effects_on_condition/scenario_specific_eocs.json @@ -309,10 +309,32 @@ "method": "json", "object": { "place_fields": [ { "field": "fd_smoke", "x": [ 3, 20 ], "y": [ 3, 20 ], "intensity": [ 1, 3 ], "repeat": 60 } ] } }, + { + "id": "moonlit_scenario_weather", + "copy-from": "sunny", + "type": "weather_type", + "name": "Moonlit", + "priority": 999, + "condition": { "math": [ "is_moonlit_scenario", "==", "1" ] } + }, + { + "type": "effect_on_condition", + "eoc_type": "ACTIVATION", + "id": "EOC_deactivate_moonlit", + "effect": [ + { "math": [ "is_moonlit_scenario", "=", "0" ] }, + "next_weather" + ] + }, { "type": "effect_on_condition", "id": "EOC_scenario_clear_weather", "eoc_type": "SCENARIO_SPECIFIC", - "effect": [ { "math": [ "weather('humidity')", "=", "0" ] }, { "math": [ "weather('pressure')", "=", "1050" ] }, "next_weather" ] + "effect": [ + { "u_message": "The moon shines brightly." }, + { "math": [ "is_moonlit_scenario", "=", "1" ] }, + "next_weather", + { "run_eocs": "EOC_deactivate_moonlit", "time_in_future": "4 hours" } + ] } ] From f5367501cb9c32609634f3240fe2030c6f737755 Mon Sep 17 00:00:00 2001 From: ampersand55 Date: Sun, 17 Nov 2024 09:18:10 +0100 Subject: [PATCH 4/4] lint --- data/json/effects_on_condition/scenario_specific_eocs.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/data/json/effects_on_condition/scenario_specific_eocs.json b/data/json/effects_on_condition/scenario_specific_eocs.json index 33c4b97df2143..ef689dbe8ff8a 100644 --- a/data/json/effects_on_condition/scenario_specific_eocs.json +++ b/data/json/effects_on_condition/scenario_specific_eocs.json @@ -321,17 +321,14 @@ "type": "effect_on_condition", "eoc_type": "ACTIVATION", "id": "EOC_deactivate_moonlit", - "effect": [ - { "math": [ "is_moonlit_scenario", "=", "0" ] }, - "next_weather" - ] + "effect": [ { "math": [ "is_moonlit_scenario", "=", "0" ] }, "next_weather" ] }, { "type": "effect_on_condition", "id": "EOC_scenario_clear_weather", "eoc_type": "SCENARIO_SPECIFIC", "effect": [ - { "u_message": "The moon shines brightly." }, + { "u_message": "The moon shines brightly." }, { "math": [ "is_moonlit_scenario", "=", "1" ] }, "next_weather", { "run_eocs": "EOC_deactivate_moonlit", "time_in_future": "4 hours" }