Compare commits

...

6 Commits

Author SHA1 Message Date
Zhilkin Serg b1b7a0fa94 Update overmap_test.cpp 2023-08-13 13:38:33 +03:00
Zhilkin Serg 64aed6813f Update overmap_test.cpp 2023-08-10 23:14:49 +03:00
Zhilkin Serg bde438d13b Merge branch 'master' into globally-unique-npcs 2023-07-29 09:36:24 +03:00
Maleclypse 7f9b06131d Merge branch 'master' into globally-unique-npcs 2023-07-15 18:46:38 -05:00
Kevin Granade 11b7fc811e Apply suggestions from code review
Co-authored-by: Procyonae <45432782+Procyonae@users.noreply.github.com>
2023-07-11 14:28:57 -07:00
Kevin Granade deebd71e57 Flip many specials to globally unique to prevent duplicate NPCs.
Core-game version of https://github.com/CleverRaven/Cataclysm-DDA/pull/63627
2023-06-17 15:28:08 -07:00
9 changed files with 78 additions and 24 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
"difficulty": 2,
"value": 0,
"start": {
"assign_mission_target": { "om_terrain": "exodii_base_x0y3z0", "om_special": "exodii_base", "reveal_radius": 5, "search_range": 400 }
"assign_mission_target": { "om_terrain": "exodii_base_x0y3z0", "om_special": "exodii_base", "reveal_radius": 5, "search_range": 540 }
},
"origins": [ "ORIGIN_SECONDARY" ],
"dialogue": {
+1 -1
View File
@@ -239,7 +239,7 @@
"goal": "MGOAL_CONDITION",
"difficulty": 3,
"start": {
"assign_mission_target": { "om_terrain": "farm_isherwood_2", "om_special": "Isherwood Farms", "reveal_radius": 3, "search_range": 360 }
"assign_mission_target": { "om_terrain": "farm_isherwood_2", "om_special": "Isherwood Farms", "reveal_radius": 3, "search_range": 540 }
},
"goal_condition": { "u_has_var": "u_met_carlos_isherwood", "type": "general", "context": "meeting", "value": "yes" },
"value": 5000,
@@ -77,7 +77,7 @@
"destination": "dairy_farm_isherwood_W",
"start": {
"effect": [ { "u_add_var": "u_have_barry_escape", "type": "general", "context": "meeting", "value": "yes" } ],
"assign_mission_target": { "om_terrain": "dairy_farm_isherwood_W", "om_special": "Isherwood Farms", "reveal_radius": 3, "search_range": 240 }
"assign_mission_target": { "om_terrain": "dairy_farm_isherwood_W", "om_special": "Isherwood Farms", "reveal_radius": 3, "search_range": 540 }
},
"end": {
"opinion": { "trust": 5, "value": 5 },
@@ -271,7 +271,7 @@
"difficulty": 2,
"value": 0,
"start": {
"assign_mission_target": { "om_special": "Isherwood Farms", "om_terrain": "farm_isherwood_1", "reveal_radius": 5, "search_range": 400 },
"assign_mission_target": { "om_special": "Isherwood Farms", "om_terrain": "farm_isherwood_1", "reveal_radius": 5, "search_range": 540 },
"effect": { "u_add_var": "directions", "type": "teamster", "context": "mission", "value": "isherwood" }
},
"origins": [ "ORIGIN_SECONDARY" ],
@@ -296,7 +296,7 @@
"difficulty": 2,
"value": 0,
"start": {
"assign_mission_target": { "om_special": "hub_01", "om_terrain": "robofachq_surface_entrance", "reveal_radius": 5, "search_range": 400 },
"assign_mission_target": { "om_special": "hub_01", "om_terrain": "robofachq_surface_entrance", "reveal_radius": 5, "search_range": 540 },
"effect": { "u_add_var": "directions", "type": "teamster", "context": "mission", "value": "hub01" }
},
"origins": [ "ORIGIN_SECONDARY" ],
@@ -321,7 +321,7 @@
"difficulty": 2,
"value": 0,
"start": {
"assign_mission_target": { "om_terrain": "exodii_base_x0y3z0", "om_special": "exodii_base", "reveal_radius": 5, "search_range": 400 },
"assign_mission_target": { "om_terrain": "exodii_base_x0y3z0", "om_special": "exodii_base", "reveal_radius": 5, "search_range": 540 },
"effect": { "u_add_var": "directions", "type": "teamster", "context": "mission", "value": "exodii" }
},
"origins": [ "ORIGIN_SECONDARY" ],
@@ -346,7 +346,7 @@
"difficulty": 2,
"value": 0,
"start": {
"assign_mission_target": { "om_special": "isolated_road", "om_terrain": "isolated_house_farm_gunsmith", "reveal_radius": 2, "search_range": 400 },
"assign_mission_target": { "om_special": "isolated_road", "om_terrain": "isolated_house_farm_gunsmith", "reveal_radius": 2, "search_range": 540 },
"effect": { "u_add_var": "directions", "type": "teamster", "context": "mission", "value": "artisans" }
},
"origins": [ "ORIGIN_SECONDARY" ],
@@ -14,7 +14,7 @@
"om_special": "hub_01",
"reveal_radius": 1,
"random": true,
"search_range": 500
"search_range": 540
}
},
"end": {
@@ -184,7 +184,7 @@
"value": 50000,
"item": "commune_prospectus",
"start": {
"assign_mission_target": { "om_terrain": "ranch_camp_67", "om_special": "ranch_camp", "reveal_radius": 1, "search_range": 200 },
"assign_mission_target": { "om_terrain": "ranch_camp_67", "om_special": "ranch_camp", "reveal_radius": 1, "search_range": 540 },
"update_mapgen": {
"place_npcs": [
{ "class": "ranch_foreman", "x": 16, "y": 15, "target": true, "add_trait": "NPC_MISSION_LEV_1" },
@@ -247,7 +247,7 @@
"difficulty": 2,
"value": 10000,
"start": {
"assign_mission_target": { "om_terrain": "exodii_base_x0y3z0", "om_special": "exodii_base", "reveal_radius": 5, "search_range": 400 }
"assign_mission_target": { "om_terrain": "exodii_base_x0y3z0", "om_special": "exodii_base", "reveal_radius": 5, "search_range": 540 }
},
"origins": [ "ORIGIN_SECONDARY" ],
"followup": "MISSION_OLD_GUARD_REP_4",
+1 -1
View File
@@ -104,6 +104,6 @@
"city_sizes": [ 1, 12 ],
"//": "Occurrences should drop a lot once we have some breadcrumbs leading to the base, but until then this is going to be the only way to get CBMs.",
"occurrences": [ 1, 12 ],
"flags": [ "UNIQUE", "EXODII" ]
"flags": [ "GLOBALLY_UNIQUE", "EXODII" ]
}
]
+13 -13
View File
@@ -632,7 +632,7 @@
"city_distance": [ 25, -1 ],
"occurrences": [ 50, 100 ],
"//": "Inflated chance, effective rate ~40%",
"flags": [ "WILDERNESS", "UNIQUE", "MAN_MADE" ]
"flags": [ "WILDERNESS", "GLOBALLY_UNIQUE", "MAN_MADE" ]
},
{
"type": "overmap_special",
@@ -3634,7 +3634,7 @@
"locations": [ "wilderness" ],
"city_distance": [ 3, -1 ],
"occurrences": [ 30, 100 ],
"flags": [ "UNIQUE", "SAFE_AT_WORLDGEN", "MAN_MADE", "FARM" ]
"flags": [ "GLOABALLY_UNIQUE", "SAFE_AT_WORLDGEN", "MAN_MADE", "FARM" ]
},
{
"type": "overmap_special",
@@ -4611,7 +4611,7 @@
"city_sizes": [ 1, 16 ],
"occurrences": [ 33, 100 ],
"rotate": false,
"flags": [ "UNIQUE", "SAFE_AT_WORLDGEN", "MAN_MADE" ]
"flags": [ "GLOBALLY_UNIQUE", "SAFE_AT_WORLDGEN", "MAN_MADE" ]
},
{
"type": "overmap_special",
@@ -5069,7 +5069,7 @@
"city_sizes": [ 6, -1 ],
"occurrences": [ 40, 100 ],
"//": "Inflated chance, in effect 15%",
"flags": [ "CLASSIC", "UNIQUE", "MAN_MADE" ]
"flags": [ "CLASSIC", "GLOBALLY_UNIQUE", "MAN_MADE" ]
},
{
"type": "overmap_special",
@@ -7164,7 +7164,7 @@
"occurrences": [ 35, 100 ],
"//": "Inflated chance, effective rate ~19% (n=726)",
"connections": [ { "point": [ -1, 15, 0 ], "terrain": "road" } ],
"flags": [ "FARM", "UNIQUE", "SAFE_AT_WORLDGEN", "MAN_MADE" ]
"flags": [ "FARM", "GLOABALLY_UNIQUE", "SAFE_AT_WORLDGEN", "MAN_MADE" ]
},
{
"id": "airliner_crashed",
@@ -7815,8 +7815,8 @@
"locations": [ "forest" ],
"city_distance": [ 5, 10 ],
"city_sizes": [ 4, -1 ],
"occurrences": [ 0, 1 ],
"flags": [ "CLASSIC", "MAN_MADE" ]
"occurrences": [ 30, 100 ],
"flags": [ "CLASSIC", "MAN_MADE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
@@ -7826,8 +7826,8 @@
"locations": [ "field" ],
"city_distance": [ 5, 40 ],
"city_sizes": [ 1, -1 ],
"occurrences": [ 0, 1 ],
"flags": [ "CLASSIC", "MAN_MADE" ]
"occurrences": [ 30, 100 ],
"flags": [ "CLASSIC", "MAN_MADE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
@@ -7857,8 +7857,8 @@
"locations": [ "land" ],
"city_distance": [ 5, 60 ],
"city_sizes": [ 4, -1 ],
"occurrences": [ 0, 2 ],
"flags": [ "CLASSIC", "MAN_MADE" ]
"occurrences": [ 60, 100 ],
"flags": [ "CLASSIC", "MAN_MADE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
@@ -7867,8 +7867,8 @@
"locations": [ "field" ],
"city_distance": [ 3, 10 ],
"city_sizes": [ 8, -1 ],
"occurrences": [ 0, 1 ],
"flags": [ "CLASSIC", "URBAN", "MAN_MADE" ]
"occurrences": [ 30, 100 ],
"flags": [ "CLASSIC", "URBAN", "MAN_MADE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
+54
View File
@@ -27,6 +27,9 @@ static const oter_str_id oter_cabin_west( "cabin_west" );
static const oter_type_str_id oter_type_ants_lab( "ants_lab" );
static const oter_type_str_id oter_type_ants_lab_stairs( "ants_lab_stairs" );
static const oter_type_str_id oter_type_bunker( "bunker" );
static const oter_type_str_id oter_type_bunker_basement_1( "bunker_basement_1" );
static const oter_type_str_id oter_type_bunker_roof( "bunker_roof" );
static const oter_type_str_id oter_type_bunker_shop_b( "bunker_shop_b" );
static const oter_type_str_id oter_type_bunker_shop_g( "bunker_shop_g" );
static const oter_type_str_id oter_type_deserter_city_gate( "deserter_city_gate" );
@@ -39,6 +42,30 @@ static const oter_type_str_id oter_type_deserter_city_office_3fb( "deserter_city
static const oter_type_str_id oter_type_deserter_city_office_roof( "deserter_city_office_roof" );
static const oter_type_str_id oter_type_deserter_city_office_roofb( "deserter_city_office_roofb" );
static const oter_type_str_id oter_type_deserter_city_park( "deserter_city_park" );
static const oter_type_str_id oter_type_fort_1a( "fort_1a" );
static const oter_type_str_id oter_type_fort_1a_1( "fort_1a_1" );
static const oter_type_str_id oter_type_fort_1b( "fort_1b" );
static const oter_type_str_id oter_type_fort_1b_1( "fort_1b_1" );
static const oter_type_str_id oter_type_fort_1c( "fort_1c" );
static const oter_type_str_id oter_type_fort_1c_1( "fort_1c_1" );
static const oter_type_str_id oter_type_fort_2a( "fort_2a" );
static const oter_type_str_id oter_type_fort_2a_1( "fort_2a_1" );
static const oter_type_str_id oter_type_fort_2b( "fort_2b" );
static const oter_type_str_id oter_type_fort_2b_1( "fort_2b_1" );
static const oter_type_str_id oter_type_fort_2c( "fort_2c" );
static const oter_type_str_id oter_type_fort_2c_1( "fort_2c_1" );
static const oter_type_str_id oter_type_fort_3a( "fort_3a" );
static const oter_type_str_id oter_type_fort_3a_1( "fort_3a_1" );
static const oter_type_str_id oter_type_fort_3b( "fort_3b" );
static const oter_type_str_id oter_type_fort_3b_1( "fort_3b_1" );
static const oter_type_str_id oter_type_fort_3c( "fort_3c" );
static const oter_type_str_id oter_type_fort_3c_1( "fort_3c_1" );
static const oter_type_str_id oter_type_fort_4a( "fort_4a" );
static const oter_type_str_id oter_type_fort_4a_1( "fort_4a_1" );
static const oter_type_str_id oter_type_fort_4b( "fort_4b" );
static const oter_type_str_id oter_type_fort_4b_1( "fort_4b_1" );
static const oter_type_str_id oter_type_fort_4c( "fort_4c" );
static const oter_type_str_id oter_type_fort_4c_1( "fort_4c_1" );
static const oter_type_str_id oter_type_ravine( "ravine" );
static const oter_type_str_id oter_type_ravine_edge( "ravine_edge" );
static const oter_type_str_id oter_type_ravine_floor( "ravine_floor" );
@@ -312,6 +339,9 @@ TEST_CASE( "overmap_terrain_coverage", "[overmap][slow]" )
std::unordered_set<oter_type_id> whitelist = {
oter_type_ants_lab.id(), // ant lab is a very improbable spawn
oter_type_ants_lab_stairs.id(),
oter_type_bunker.id(),
oter_type_bunker_basement_1.id(),
oter_type_bunker_roof.id(),
oter_type_bunker_shop_b.id(),
oter_type_bunker_shop_g.id(),
oter_type_deserter_city_gate.id(),
@@ -342,6 +372,30 @@ TEST_CASE( "overmap_terrain_coverage", "[overmap][slow]" )
oter_type_unvitrified_farm_1.id(),
oter_type_unvitrified_farm_2.id(),
oter_type_unvitrified_farm_neg_1.id(),
oter_type_fort_1a.id(),
oter_type_fort_2a.id(),
oter_type_fort_3a.id(),
oter_type_fort_4a.id(),
oter_type_fort_1b.id(),
oter_type_fort_2b.id(),
oter_type_fort_3b.id(),
oter_type_fort_4b.id(),
oter_type_fort_1c.id(),
oter_type_fort_2c.id(),
oter_type_fort_3c.id(),
oter_type_fort_4c.id(),
oter_type_fort_1a_1.id(),
oter_type_fort_2a_1.id(),
oter_type_fort_3a_1.id(),
oter_type_fort_4a_1.id(),
oter_type_fort_1b_1.id(),
oter_type_fort_2b_1.id(),
oter_type_fort_3b_1.id(),
oter_type_fort_4b_1.id(),
oter_type_fort_1c_1.id(),
oter_type_fort_2c_1.id(),
oter_type_fort_3c_1.id(),
oter_type_fort_4c_1.id(),
};
std::unordered_set<oter_type_id> done;