From 90b0bdd44e82008f3ad236c211b3aa0cb17ef7eb Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 25 Nov 2015 14:53:29 +0100 Subject: [PATCH 1/2] re-enable all monster tests except piracy for seaserpents, which is red. --- src/monsters.test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/monsters.test.c b/src/monsters.test.c index 66e96153c..2ba2e2ae0 100644 --- a/src/monsters.test.c +++ b/src/monsters.test.c @@ -264,10 +264,10 @@ CuSuite *get_monsters_suite(void) SUITE_ADD_TEST(suite, test_monsters_attack); SUITE_ADD_TEST(suite, test_monsters_attack_ocean); DISABLE_TEST(suite, test_seaserpent_piracy); - DISABLE_TEST(suite, test_monsters_waiting); + SUITE_ADD_TEST(suite, test_monsters_waiting); SUITE_ADD_TEST(suite, test_monsters_attack_not); SUITE_ADD_TEST(suite, test_dragon_attacks_the_rich); - DISABLE_TEST(suite, test_dragon_moves); - DISABLE_TEST(suite, test_monsters_learn_exp); + SUITE_ADD_TEST(suite, test_dragon_moves); + SUITE_ADD_TEST(suite, test_monsters_learn_exp); return suite; } From 6c2f4be4afe8862bd49974a3ce5ee638883b0c46 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 25 Nov 2015 15:29:26 +0100 Subject: [PATCH 2/2] fix sea serpents using piracy (by re-ordering the decision making process) --- src/monsters.c | 24 ++++++++++++------------ src/monsters.test.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/monsters.c b/src/monsters.c index 988045a9d..ab63cbb31 100644 --- a/src/monsters.c +++ b/src/monsters.c @@ -827,18 +827,6 @@ void plan_monsters(faction * f) } } - if (long_order == NULL && unit_can_study(u)) { - /* Einheiten, die Waffenlosen Kampf lernen könnten, lernen es um - * zu bewachen: */ - if (u_race(u)->bonus[SK_WEAPONLESS] != -99) { - if (effskill(u, SK_WEAPONLESS, 0) < 1) { - long_order = - create_order(K_STUDY, f->locale, "'%s'", - skillname(SK_WEAPONLESS, f->locale)); - } - } - } - if (long_order == NULL) { /* Ab hier noch nicht generalisierte Spezialbehandlungen. */ @@ -867,6 +855,18 @@ void plan_monsters(faction * f) break; } } + if (long_order == NULL && unit_can_study(u)) { + /* Einheiten, die Waffenlosen Kampf lernen könnten, lernen es um + * zu bewachen: */ + if (u_race(u)->bonus[SK_WEAPONLESS] != -99) { + if (effskill(u, SK_WEAPONLESS, 0) < 1) { + long_order = + create_order(K_STUDY, f->locale, "'%s'", + skillname(SK_WEAPONLESS, f->locale)); + } + } + } + if (long_order) { addlist(&u->orders, long_order); } diff --git a/src/monsters.test.c b/src/monsters.test.c index 2ba2e2ae0..9fce059f2 100644 --- a/src/monsters.test.c +++ b/src/monsters.test.c @@ -263,7 +263,7 @@ CuSuite *get_monsters_suite(void) CuSuite *suite = CuSuiteNew(); SUITE_ADD_TEST(suite, test_monsters_attack); SUITE_ADD_TEST(suite, test_monsters_attack_ocean); - DISABLE_TEST(suite, test_seaserpent_piracy); + SUITE_ADD_TEST(suite, test_seaserpent_piracy); SUITE_ADD_TEST(suite, test_monsters_waiting); SUITE_ADD_TEST(suite, test_monsters_attack_not); SUITE_ADD_TEST(suite, test_dragon_attacks_the_rich);