Dmitry Kovalenko
51fd066a51
LuaAI: exposed the attacks() vector values
2012-04-09 15:34:03 +00:00
Dmitry Kovalenko
2adbf5ae5f
Refactored the move map structuring when exposed to LuaAI
2012-04-08 23:54:34 +00:00
Dmitry Kovalenko
9ddd3d4408
[[lua AI fixes]]
...
(1) First draft of the caching system for LuaAI. (2) Added validation
variables and setters/getters in the ai contexts, to allow LuaAI cache
check the movemaps for validity
2012-04-08 00:00:14 +00:00
Dmitry Kovalenko
bdc8138c3b
[[lua AI fixes]]
...
(1) LuaAI ai.get_avoid() now provides the correct coordinates (not
offset by -1), this reduced some code duplication and code
inconsistency (2) Tweaked ai.attack() of LuaAI to consider weapons are
numbered from 1 and so forth, so that this function is more consistent
to the Lua indexing style
2012-04-03 02:13:15 +00:00
Dmitry Kovalenko
ecf23e8055
Fixed an infinite loop bug
...
Fixed methods, that provided wrong objects to Lua
2012-04-02 20:51:38 +00:00
Steven Panek
29c4d4269b
Fixed some spelling and spacing errors;...
...
...made the messages in question somewhat more authentic.
2012-02-07 19:29:04 +00:00
Anonymissimus
91ae18b6d3
required compatibility changes for Lua 5.2 in extension Lua code
...
Searched all *.lua and *.cfg (embedded lua) files in data/ for occurences
of the deprecated stuff mentioned in
http://www.lua.org/manual/5.2/manual.html#8.2
The currently compiled-in define LUA_COMPAT_ALL appears to work
like so that both the old and the new syntax work at the same time
(without errors or warnings), while the old one will be an error after
removing it.
2012-02-07 18:05:22 +00:00
Ignacio R. Morelle
fbd8f6ae59
Ran wmlindent
2012-01-11 21:49:32 +00:00
Steven Panek
a3168f89f9
Converted the remaining uses of Ggf.
2011-11-28 20:00:43 +00:00
Dmitry Kovalenko
2a9a663980
Lua backed goals now available(docs to be updated tomorrow)
...
//some minor fixes
2011-08-06 16:06:24 +00:00
Dmitry Kovalenko
8dc1551d30
Exposed the target list to Lua // minor fixes
2011-08-05 13:25:35 +00:00
Ignacio R. Morelle
53e260ca6b
Ran wmlindent in mainline except for data/gui
2011-08-02 00:01:08 +00:00
Dmitry Kovalenko
de07362204
Persistant data storage now is local to the lua_ai_context
2011-07-31 00:45:49 +00:00
Dmitry Kovalenko
a3acad0d70
It is possible now to store data in the Lua AI engine...
...
...and the data persists between save/load routines // Needs slight
refactoring, use at your own risk
2011-07-21 10:31:01 +00:00
Dmitry Kovalenko
3e5bdcf448
Fixed a bug that leads to a crash(Lua aspects weren't saved between games)
2011-07-20 10:13:05 +00:00
Dmitry Kovalenko
de73faad91
Tweaked the patrol_gen function to return a pair of function: execution and evaluation
2011-07-12 08:39:18 +00:00
Dmitry Kovalenko
a293e91db3
Completed cleanup functionality(kind of hacky, might need refactoring). Also done some minor fixes
2011-07-08 09:40:08 +00:00
Dmitry Kovalenko
cd0450f950
Removed debug outputs
2011-06-30 14:54:08 +00:00
Dmitry Kovalenko
8d65c3b7f7
Added functionality to the [add_ai_behavior] tag.
...
Not fully working at the moment, but is usable. The usage syntax will
most probably remain, but the internals will be modified.
2011-06-30 14:14:46 +00:00
Dmitry Kovalenko
74cf9b5ae3
Added a counter for sticky candidate actions and a comment for Crab
2011-06-26 18:51:43 +00:00
Dmitry Kovalenko
ba69be6682
Minor cosmetic fixes
2011-06-21 14:10:12 +00:00
Dmitry Kovalenko
437b619397
added a wesnoth.modify_ai Lua function,
...
...continued work on the patrolling system, made more mess in lua_ai
arena
2011-06-20 17:05:59 +00:00
Dmitry Kovalenko
184105148a
The patrol unit now cycles through the multiple waypoints given to him
2011-06-17 11:20:29 +00:00
Dmitry Kovalenko
93cfadb5bc
Fast & easy fix of the move problem.
...
Now the unit rests on the waypoint until the next turn
2011-06-17 10:19:03 +00:00
Dmitry Kovalenko
bf8300c064
This is a first draft of the patrolling system.
...
At the moment everything manually, the system lacks normal evaluation
of the move and the patrolling unit will not stop until its moves run
out. Also, at the moment, it is possible to patrol between two
waypoints only.
Further work will be carried out to transform the creation of
patrolling units to one line syntax.
2011-06-17 10:07:41 +00:00
Dmitry Kovalenko
1670520d79
The rest of the move maps exposed // Might need refactoring
2011-06-16 14:06:41 +00:00
Dmitry Kovalenko
f87b14b9dc
First draft on movement map exposure to Lua
2011-06-14 19:35:28 +00:00
Dmitry Kovalenko
c1a2084259
More aspect exposure.
...
@Crab_, please, leave feedback on this, I am unsure about several
parts of this patch
2011-06-10 15:17:17 +00:00
Dmitry Kovalenko
c1ea8ac520
Exposed recruitment pattern aspect to Lua
2011-06-08 10:09:29 +00:00
Anonymissimus
87d505241e
transformed wesnoth.get_time_of_day into a more useful implementation
...
(will extend with more parameters and return values)
2011-06-07 15:26:57 +00:00
Dmitry Kovalenko
a1600a1a63
Added wesnoth.get_time_of_day() Lua function
2011-06-07 12:02:03 +00:00
Dmitry Kovalenko
5c7d4d64e5
More(village related) aspects exposed to lua( http://wiki.wesnoth.org/LuaAI )
2011-06-07 10:38:44 +00:00
Dmitry Kovalenko
65db78e77d
More aspects exposed to Lua( http://wiki.wesnoth.org/LuaAI )
2011-06-07 09:29:03 +00:00
Dmitry Kovalenko
330b3886d8
Added Lua support for multiple aspects.
...
More info on: http://wiki.wesnoth.org/LuaAI
2011-06-02 12:24:27 +00:00
Steven Panek
80d08acec3
Converted some instances of 'colour='.
2011-05-30 20:32:35 +00:00
Jody Northup
9e720501c6
exposed suitable_keep(unit) to Lua AI library.
...
Added test of AI.suitable_keep to lua ai test scenario.
2011-04-16 00:05:20 +00:00
Iurii Chernyi
94029166a7
patch #2599 by nephro: lua_ai routine: ai.get_aggression()
2011-03-24 19:59:50 +00:00
Eric S. Raymond
e7d337a676
Reindent mainline.
2010-09-23 13:04:56 +00:00
Mark de Wever
a717cd92e6
Strip trailing spaces.
2010-07-31 08:15:15 +00:00
Iurii Chernyi
5a4e32bb55
add a workaround to convert old usages of 'fallback to default ai'...
...
...to 'fallback to rca ai'
2010-04-29 21:24:50 +00:00
Iurii Chernyi
f2b8b94d0b
Add support for AI candidate actions written in lua.
...
patch LuaW_pcall to support LUA_MULTRET. Patch #1558 by Darkas.
2010-03-23 21:04:50 +00:00
Guillaume Melquiond
0684992511
Removed never used argument.
2010-02-27 09:18:12 +00:00
Iurii Chernyi
3cbbeeb6e1
continue work related to patch #1432 .
...
Fix issues identified on irc by silene. Fixed 1,2,4,5,6 (not entirely
sure about 1)
2010-02-21 23:11:56 +00:00
Iurii Chernyi
f9b0fdb1f5
Lua AI: redesign, simplified usage, added lua_ai test scenario
2010-02-21 12:24:31 +00:00
Eric S. Raymond
0aa99781cf
Reindent mainline.
2009-11-23 14:39:03 +00:00
Iurii Chernyi
9408c3a9ea
remove unnecessary translation markers from AI test scenarios
2009-10-07 13:23:20 +00:00
Iurii Chernyi
85459732d1
remove accidentially added translation marker
2009-10-07 13:22:08 +00:00
Iurii Chernyi
df4a5a3f25
AI Arena test case...
...
...for filtering of allowed attackers/defenders via [filter_own] and
[filter_enemy]
2009-09-30 01:03:24 +00:00
Nils Kneuper
64abf3e200
add a default textdomain declaration...
...
...(using "./utils/change-textdomain -t data/")
2009-09-20 13:53:46 +00:00
Iurii Chernyi
468d796701
fix obsolete AI macro
2009-09-08 18:20:17 +00:00