Bruno Wolff III
711ef80806
2006-08-30T13:31:01Z!bruno@wolff.to (missing include) applied to trunk.
2006-08-30 13:46:08 +00:00
Benoît Timbert
a8412af84a
merge 2006-08-29T11:03:56Z!benoit.timbert@free.fr : Now all AIs fire a "ai turn" event.
2006-08-29 11:10:05 +00:00
Elias Pschernig
adf2455cca
Fixed a bug in the Python AI...
...
...where it would crash when not finding a script when run from a campaign.
2006-08-24 08:12:56 +00:00
Dominic Bolin
c989fe09b0
Fix ai usage of unit::type()
2006-07-29 19:34:46 +00:00
Elias Pschernig
72c2e2e1d2
Removed debug statement which crept in with my previous patch.
2006-07-25 19:08:21 +00:00
Elias Pschernig
3dc5097c22
Fixed two bugs in Python AI:
...
User input was ignored during the AI's turn, and after the Python AI
won a game, no more python games could be played.
2006-07-25 17:45:32 +00:00
Elias Pschernig
e95c0a7de2
fixed storage of a reference to a temporary object
2006-07-22 23:41:53 +00:00
Elias Pschernig
fc25219f09
python_ai: Clarified meaning of 'max_cost' parameter in find_path,
...
fixed off-by-one mistake and changed default value.
2006-07-22 20:08:12 +00:00
Elias Pschernig
f66ed76abd
fixed error message printed when python AI wins
2006-06-15 22:26:47 +00:00
Elias Pschernig
fd02b6d727
Fixed several things in python AI:
...
- finally resolved the long-standing crash-on-win of the Python AI
- fixed bug where unit.is_valid always would trigger an exception
- fixed bug where AI could cheat by giving unfair parameters to
wesnoth.attack_unit
- fixed bug where wesnoth.get_adjacent_tiles would return invalid positions
- fixed type punning warnings
2006-06-15 21:54:12 +00:00
Elias Pschernig
e8330980cd
made last parameter to unit.attack_statistics optional, and fixed two typos
2006-06-10 15:39:13 +00:00
Gunter Labes
bdb316a916
more propsets and a codeclean run
2006-06-09 11:44:46 +00:00
Elias Pschernig
d59ae150f5
Updated attack_unit to work with changed AI interface
...
(and also made the weapon parameter optional), fixed a warning, and
added support for querying a few more weapon specials
2006-06-08 11:26:12 +00:00
Elias Pschernig
895fb161e3
fixed unittype.regenerate and unittype.teleport...
...
...which used the wrong id, and added unittype.curing
2006-06-07 12:57:06 +00:00
Elias Pschernig
60c3ab6136
Updated docs and added unittype.hitpoints property to python AI
2006-06-05 21:15:09 +00:00
Gunter Labes
23ca57f01e
ran codeclean over all files and set them all to svn:eol-style 'native'
2006-06-05 20:02:25 +00:00
Elias Pschernig
aff98d4736
As request by Elvish_Pillager, added berserk and stones properties to attacktype
2006-06-04 13:20:06 +00:00
Elias Pschernig
64ee1027e6
fixed typo
2006-06-04 13:13:14 +00:00
Elias Pschernig
90b2549e1e
added unit.attack_statistics and team.is_enemy methods to Python AI
2006-06-04 13:11:05 +00:00
Elias Pschernig
3a9154b468
renamed resistance_from -> damage_from to be more consistent
2006-05-24 23:54:48 +00:00
Elias Pschernig
c2ead6caf1
Replaced script_data with set/get_variable,
...
providing variables which are persistent even over saving/reloading of
the game.
2006-05-24 21:16:59 +00:00
Elias Pschernig
c6ccf4d853
slight update of Python AI API:
...
added unittype.usage field, and removed redundant gamemap parameters
of some methods
2006-05-24 13:14:58 +00:00
Elias Pschernig
d8efe69dd8
Added docstrings to the python API.
2006-05-22 11:26:51 +00:00
Elias Pschernig
cfd453e7f3
Added a combo box to the multiplayer dialog...
...
...which allows to select an AI algorithm or python script, as well as
helper functions to return the algorithms and scripts.
2006-05-21 17:44:42 +00:00
Elias Pschernig
a534176eeb
Made the python AI look in <binary_pathes>/data/ais for python AIs,
...
instead of the current directory.
2006-05-21 14:56:54 +00:00
Gunter Labes
eca5519ec0
[[Unit display fixes]]
...
fix bug with tile hash
fix bug with enemy movement
expose experience of unit
expose possible attacks of unit type
expose defenses/resistances of unit type
patch provided by allefant (who should apply as a developer ;-))
2006-05-11 13:48:35 +00:00
Dominic Bolin
a18a383c77
fix mistaken use of empty()
2006-05-08 21:27:38 +00:00
Gunter Labes
23e1523f59
fix --enable-python compiling provided by allefant
...
make a forgotten string translatable as pointed out by grzywacz
2006-05-07 22:52:26 +00:00
Dominic Bolin
af1d7ba478
use any of 'yes','on','true' for boolean strings
2006-04-27 20:25:04 +00:00
Dominic Bolin
d992fdcc74
Fix python compilation
2006-04-17 15:23:59 +00:00
Benoît Timbert
cb2653b91e
Remove max_unit_healing from ai_python since it no longer exists.
...
And then Wesnoth shall compile with Python
2006-03-27 15:40:17 +00:00
Nicolas Weeger
7bd608d9f5
missed a part, how did the linker not complain???
2006-03-08 22:51:51 +00:00
Nicolas Weeger
c63a65e811
Apply patches #512 and #513 courtesy anonymous
...
- add team.side and unit.can_attack wrapper
2006-03-08 22:45:46 +00:00
Nicolas Weeger
36326a97fe
Added hitpoints, max_hitpoints and poisoned to unit.
2006-03-02 21:24:37 +00:00
Nicolas Weeger
e5d244c030
Add enemy-related moves
2006-02-19 15:24:40 +00:00
Nicolas Weeger
2b55a11760
Apply patch #504 courtesy Allefant to expose a unit's side and movement left
2006-02-19 08:49:25 +00:00
Nicolas Weeger
3d5b2edcbc
Tentative fix for bug #5125
...
(ai moving a unit to an occupied tile crashes) and #5126 (ai can cheat).
2006-01-22 22:24:54 +00:00
Nicolas Weeger
8fe088bf97
Fix bug 5124 : dst/src arrays are not correctly reset after moves.
2006-01-22 22:04:54 +00:00
Jon Daniel
04ac0202a4
fix more warnings
2006-01-15 11:17:02 +00:00
Nicolas Weeger
89eafaeb87
Fix team.recruits() mistake (was always returning AI's current team's).
...
Change the way Python script is called, variables shouldn't persist anymore.
Add 'wesnoth.script_data_()' in which scripts can put persistent data.
2006-01-15 11:03:15 +00:00
Jon Daniel
f639c7fc0f
fix more warnings
2006-01-15 10:19:02 +00:00
Jon Daniel
a5d4636d7b
fix even more warnings
2006-01-15 10:08:45 +00:00
Jon Daniel
af5cecca92
fix some warnings
2006-01-15 10:02:31 +00:00
András Salamon
99bbbd6a51
whitespace cleanup
2006-01-12 11:04:50 +00:00
Dominic Bolin
c2876f9610
Fixed attacktype_get_range
2006-01-11 16:17:08 +00:00
Isaac Clerencia Perez
0928d6ce26
Fix 4992 correctly
2006-01-07 12:23:14 +00:00
Nicolas Weeger
cab900c5f5
Range is now a string.
2006-01-05 21:19:55 +00:00
Isaac Clerencia Perez
85dfc46d30
Fix several problems that caused amd64 to fail to build wesnoth
2006-01-05 08:11:09 +00:00
Nicolas Weeger
e12c5528e2
Readd HAVE_PYTHON per isaac's request. Python is now optional again.
2005-12-29 17:22:28 +00:00
Nicolas Weeger
50b7836a87
Use 0 instead of NULL for integers.
2005-12-29 15:44:59 +00:00