Guillaume Melquiond
eeb047de55
Fixed file headers so that they match the content of the COPYING file.
2010-09-01 21:12:38 +00:00
Mark de Wever
a99c78e0d8
Update doxygen comment.
...
The filename after the @file comment is optional (spotted by alink).
2010-07-26 21:32:18 +00:00
Ali El Gariani
c7c222380d
Clean the use of @todo for Doxygen
...
Use ///@todo bla or /** @todo bla */
with lowercase and no colon after todo
2010-07-26 00:31:55 +00:00
Ali El Gariani
2b89fee136
Remove gamestate from ai::game_info, and uses resources::gamestate instead
2010-06-16 14:19:28 +00:00
Ali El Gariani
1faf7dc372
Remove map from ai::game_info, and uses resources::game_map instead
2010-06-15 21:22:40 +00:00
Ali El Gariani
494f09bdc5
Remove teams from ai::game_info, and uses resources::teams instead
2010-06-15 21:22:35 +00:00
Ali El Gariani
0b8f260d07
Remove unit_map from ai::game_info, and uses resources::units instead
2010-06-15 21:22:20 +00:00
Iurii Chernyi
f6953c07ac
reduce AI header dependencies
2010-04-29 23:25:32 +00:00
Iurii Chernyi
ebbe53ae9d
remove default_ai, to avoid code duplication...
...
...(as default_ai is ported to rca ai candidate actions. remove ai2 stub.
2010-04-29 21:25:03 +00:00
Iurii Chernyi
1460db5c8b
reduce ai header dependencies
2010-04-28 23:43:43 +00:00
Iurii Chernyi
2157dd0326
fix a bug in scoring of AI recall list. Patch by billynux
2010-04-15 23:57:07 +00:00
Fabian Müller
4a7e27d070
Reverted back to 42095.
2010-04-10 17:30:45 +00:00
Alexander van Gessel
183c40ba5b
Merge fendrin_editor branch
2010-04-10 16:00:09 +01:00
Alexander van Gessel
64db5cd41d
Side-specific recall cost
2010-04-09 00:53:41 +01:00
Iurii Chernyi
dd54c4ead3
simplified code
2010-04-08 22:20:08 +00:00
Guillaume Melquiond
ad3ebbba05
Removed locations from unit maps so that they are not duplicated.
...
As a side effect, iterators became much nicer, e.g. usable in foreach.
2010-03-28 10:42:41 +00:00
Jérémy Rosen
53105be56f
remove EXPERIMENTAL blocks in source
2010-02-22 20:08:38 +00:00
Eric S. Raymond
75925deb82
Merge of fendrin's new teleport and tunnel code.
...
The changes are guarded by the C++ and WML conditional symbol
"EXPERIMENTAL".
The experimental flag is temporarily defaulted off, so those patches
should have no effect on people doing ordinary builds. This may change
once fendrin has the tunnel code fixed and polished.
2010-01-26 06:34:20 +00:00
Eric S. Raymond
b907f48b97
Yest more pathfind namespace fixups. No code changes.
2010-01-25 18:00:22 +00:00
Eric S. Raymond
e5d39639e2
Move pathfinding code into a pathfind namespace. No logic changes.
...
This is a step towards merging fendrin's [tunnel] code.
2010-01-25 15:37:35 +00:00
Mark de Wever
e1b52f6046
Pre instead of post increment a variable.
...
Issue found by cppcheck.
2010-01-01 17:11:48 +00:00
Mark de Wever
92f5f92ce5
New year copyright update.
2010-01-01 13:16:49 +00:00
Guillaume Melquiond
590bb42f1c
Fixed AI warning about successes instead of failures.
2009-12-30 13:42:45 +00:00
Iurii Chernyi
82752447f9
AI: replace TODO with @todo
2009-12-25 13:45:25 +00:00
Guillaume Melquiond
0f42610295
Simplified handling of unit types.
...
As a side effect, unit animations no longer appear as leaked for Valgrind.
2009-12-23 13:09:53 +00:00
Guillaume Melquiond
61f5727523
Partly fixed compilation issues with ICC,
...
...including some real bugs in the code.
2009-12-18 08:08:48 +00:00
Ali El Gariani
5cd75ad594
Stop using unit::type() as a simple getter, because it's rather slow.
2009-12-03 02:25:41 +00:00
Iurii Chernyi
08ac3d103d
various tweaks of ai handling of map changes
...
solve some problems which might arise if map changes in the middle of
the turn thanks to WML events
2009-12-02 23:53:49 +00:00
Ali El Gariani
2fd0a37e2e
Optimize by skipping dummy units creation during the AI recruit
...
thinking phase.
(using new pathfinding calcultor from 2009-11-28T01:24:50Z!alinkmaze@gmail.com)
2009-11-28 01:27:24 +00:00
Iurii Chernyi
f916c2bf55
fix bug #14768 : made AI observe changes in allowed recruits,
...
...thus, fixing the issue with AI not recruiting when some of its
recruits are removed by outside sources (such as by WML
[disallow_recruit]) and fixing some related issues.
2009-11-15 20:56:58 +00:00
Iurii Chernyi
a70b56aa7d
initialize newly-added field
2009-11-12 11:00:55 +00:00
Iurii Chernyi
6e8cb1f9af
new 'limit' subtag of [value] of recruitment aspect...
...
...allow easy limiting of number of recruits of specific type in the field
2009-11-12 00:00:40 +00:00
Iurii Chernyi
b765c7308e
fixed a bug with ai_default leader...
...
...sometimes not attacking even if it is advantageous to do so
2009-11-11 12:12:03 +00:00
Mark de Wever
ef02c3e269
Pass parameter by const ref instead of const value.
...
Issue found by cppcheck.
2009-10-16 17:55:49 +00:00
Iurii Chernyi
a264913088
fix a serious enough bug in default ai targeting,
...
...uncovered with the help of Aethaeryn, who provided a test case. The
bug caused the AI, in certain situations, to make weird
shuffle-doing-nothing moves and not seek enemies or their villages
2009-10-10 21:35:16 +00:00
Ali El Gariani
da6dfa3b2b
Continue to clean unit constructor:
...
Better control when we do random generation of traits, name and gender
(to avoid OoS)
Activate them for debug-created units.
2009-10-09 01:46:27 +00:00
Mark de Wever
e7ed48bff1
Strip trailing whitespace.
2009-09-20 15:36:32 +00:00
Iurii Chernyi
c8da727c37
refactored previous commit
2009-09-19 19:45:38 +00:00
Iurii Chernyi
2ffa516eba
fix a bug with weight being set to 0 incorrectly...
...
...in case of considering wounded units during recruitment and
recall. thanks to silene for spotting this.
2009-09-19 19:38:29 +00:00
Iurii Chernyi
4848a57604
improved default ai recruitment and recall...
...
...make it consider enemy potential recruits as potential opponents, as
well. this fixes some 1st turn recall/recruit issues
2009-09-19 18:54:03 +00:00
Iurii Chernyi
8a9263e80e
make AI consider 'unit cost vs recall cost' when recalling
2009-09-19 18:53:54 +00:00
Iurii Chernyi
236e627462
make AI consider units's XP and potential advancements when recalling
2009-09-19 12:21:13 +00:00
Iurii Chernyi
0e8e19c293
teach default ai recruitment to recall good units
2009-09-19 09:23:44 +00:00
Guillaume Melquiond
99a3190fca
Removed AI that has been obsolete and broken for several years.
2009-09-12 08:35:31 +00:00
Iurii Chernyi
afcb29c338
reworked AI macros, added support for moving leader to goal...
...
...as a candidate action, fixed some bugs, changed modify_ai syntax to
make it more resilient to bugs and to allow reuse of subtags
2009-09-03 23:23:37 +00:00
Mark de Wever
0a7e680eaa
Initialize all members.
2009-08-30 13:42:27 +00:00
Mark de Wever
671b0b256c
Strip trailing whitespace.
2009-08-29 18:46:38 +00:00
Iurii Chernyi
4651281232
fixed saves of games with idle_ai's
2009-08-28 22:34:45 +00:00
Iurii Chernyi
8cc47b6cbc
changes to targeting phase to discard avoided locations earlier
2009-08-25 23:14:55 +00:00
Iurii Chernyi
6bc2aaf3b3
optimization of retreat phase
2009-08-25 01:15:19 +00:00