remove lua AI example from the list of MP AIs,
...as now it can be tested from within test scenario
This commit is contained in:
parent
f9b0fdb1f5
commit
a260c13fb6
1 changed files with 0 additions and 48 deletions
|
@ -1,48 +0,0 @@
|
|||
#textdomain wesnoth
|
||||
[ai]
|
||||
id=ai_lua_simple
|
||||
description=Lua Simple AI
|
||||
version=10710
|
||||
[engine]
|
||||
name="lua"
|
||||
code= <<
|
||||
local data = ...
|
||||
local ai = { side = data._side() }
|
||||
|
||||
--! do a full move from FROM to TO. Unit's movement points are set to 0 after a move
|
||||
|
||||
--! recruit a UNIT_NAME on LOC
|
||||
function ai:recruit(UNIT_NAME,LOC)
|
||||
ai:_recruit(UNIT_NAME,LOC.x,LOC.y)
|
||||
end
|
||||
|
||||
--! recall a UNIT_ID at LOC
|
||||
function ai:recall(UNIT_ID,LOC)
|
||||
ai:_recall(UNIT_ID,LOC.x,LOC.y)
|
||||
end
|
||||
|
||||
--! stop a unit at LOC - remove MOVES and/or remove ATTACK
|
||||
function ai:stop(LOC,MOVES,ATTACKS)
|
||||
ai:_stop(LOC.x,LOC.y,MOVES,ATTACKS)
|
||||
end
|
||||
|
||||
--! implementation
|
||||
function ai:execute()
|
||||
print(self.side)
|
||||
my_leader = wesnoth.get_units( {canrecruit="yes", side=self.side})[1]
|
||||
self:recruit("Spearman",{x=15, y=3})
|
||||
self:_move_full(my_leader,{x=11, y=4})
|
||||
self:_attack({x=11,y=4},{x=11, y=5},1)
|
||||
end
|
||||
|
||||
|
||||
|
||||
return ai;
|
||||
>>
|
||||
[/engine]
|
||||
[stage]
|
||||
engine="lua"
|
||||
code= "(...):execute()"
|
||||
[/stage]
|
||||
[/ai]
|
||||
|
Loading…
Add table
Reference in a new issue