Author: soliton
Date: Tue Oct 21 14:27:07 2008
New Revision: 30299
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30299&view=rev
Log:
* make the AI less cautious again
Modified:
trunk/src/ai.cpp
trunk/src/ai_move.cpp
Modified: trunk/src/ai.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai.cpp?rev=30299&r1=30298&r2=30299&view=diff
==============================================================================
--- trunk/src/ai.cpp (original)
+++ trunk/src/ai.cpp Tue Oct 21 14:27:07 2008
@@ -1176,7 +1176,7 @@
time_taken = SDL_GetTicks() - ticks;
LOG_AI << "analysis took " << time_taken << " ticks\n";
- if(choice_rating > current_team().caution()) {
+ if(choice_rating > 0.0 /*current_team().caution()*/) {
location from = choice_it->movements[0].first;
location to = choice_it->movements[0].second;
location target_loc = choice_it->target;
Modified: trunk/src/ai_move.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai_move.cpp?rev=30299&r1=30298&r2=30299&view=diff
==============================================================================
--- trunk/src/ai_move.cpp (original)
+++ trunk/src/ai_move.cpp Tue Oct 21 14:27:07 2008
@@ -157,7 +157,7 @@
if (u->second.can_recruit() &&
current_team().is_enemy(u->second.side())
&& !u->second.invisible(u->first, units_, teams_)) {
assert(map_.on_board(u->first));
- LOG_AI << "found enemy leader target... " << u->first
<< " with value: " << current_team().leader_value() << "\n";
+ LOG_AI << "found enemy leader (side: " <<
u->second.side() << ") target... " << u->first << " with value: " <<
current_team().leader_value() << "\n";
targets.push_back(target(u->first,current_team().leader_value(),target::LEADER));
}
@@ -439,7 +439,7 @@
assert(map_.on_board(tg->loc));
- const double locStopValue = 500.0;
+ const double locStopValue = std::min(tg->value / best_rating,
500.0);
paths::route cur_route = a_star_search(u->first, tg->loc,
locStopValue, &cost_calc, map_.w(), map_.h());
if (cur_route.move_left == cost_calc.getNoPathValue())
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits