-
- /* we have at least one col on each arm, build now */
- if (need_more_elements() == 0) {
-
- /* try to build on opponent, will return
- * END_TRAJ without doing anything if
- * disabled */
- err = strat_build_on_opponent_temple();
- if (!TRAJ_SUCCESS(err))
- continue;
- if (need_more_elements())
- continue;
-
- /* try to scan and build on our temple, will
- * return END_TRAJ without doing anything if
- * disabled */
- err = strat_check_temple_and_build();
- if (!TRAJ_SUCCESS(err))
- continue;
- if (need_more_elements())
- continue;
-
- /* Else, do a simple build, as before */
-
- temple = strat_get_best_temple();
-
- /* one valid temple found */
- if (temple) {
- DUMP_RATE_LIMIT(strat_dump_all_temples, last_print_temple);
-
- err = strat_goto_temple(temple);
- if (!TRAJ_SUCCESS(err))
- continue;
-
- /* can return END_ERROR or END_TIMER,
- * should not happen here */
- err = strat_grow_temple(temple);
- if (!TRAJ_SUCCESS(err))
- continue;
-
- err = strat_escape(temple->zone, TRAJ_FLAGS_STD);
- if (!TRAJ_SUCCESS(err))
- continue;
-
- continue;
- }
-
- zone = strat_get_best_zone();
- if (zone) {
- DUMP_RATE_LIMIT(strat_dump_all_zones, last_print_zone);
-
- DEBUG(E_USER_STRAT, "goto zone %s", zone->name);
- err = strat_goto_build_zone(zone, zone->level);
- if (!TRAJ_SUCCESS(err))
- continue;
- DEBUG(E_USER_STRAT, "zone reached");
-
- /* no error code except END_ERROR, should not happen */
- err = strat_build_new_temple(zone);
-
- err = strat_escape(zone, TRAJ_FLAGS_STD);
- if (!TRAJ_SUCCESS(err))
- continue;
-
- continue;
- }
-
- /* XXX hey what can we do here... :'( */
- DEBUG(E_USER_STRAT, "panic :)");
- time_wait_ms(1000);