← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/relax-ai-asserts into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/relax-ai-asserts into lp:widelands.

Commit message:
Relax AI requirement for hunters.

Requested reviews:
  TiborB (tiborb95)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/relax-ai-asserts/+merge/372400
-- 
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/relax-ai-asserts.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2019-09-05 19:57:55 +0000
+++ src/ai/defaultai.cc	2019-09-06 08:29:52 +0000
@@ -898,7 +898,8 @@
 	assert(count_buildings_with_attribute(BuildingAttribute::kRanger) == 1);
 	assert(count_buildings_with_attribute(BuildingAttribute::kWell) == 1);
 	assert(count_buildings_with_attribute(BuildingAttribute::kLumberjack) == 1);
-	assert(count_buildings_with_attribute(BuildingAttribute::kHunter) == 1);
+	assert((count_buildings_with_attribute(BuildingAttribute::kHunter) == 1) ||
+		   (count_buildings_with_attribute(BuildingAttribute::kHunter) == 0));
 	assert(count_buildings_with_attribute(BuildingAttribute::kIronMine) >= 1);
 	assert(count_buildings_with_attribute(BuildingAttribute::kFisher) == 1);
 	// If there will be a tribe with more than 3 mines of the same type, just increase the number


Follow ups