-- Auteur : Tiflo
local myTeam = { "Safarieur", "Lycradi", "Valdingume", "Nenufarouche", "Magmacaque", "Hyporg", "Mélomask" }
local currentInvo = 0
local currentTeam = {}
function Main()
MoveFuyard()
if (fight:getCurrentTour() == 1) then
fight:launchSpellInCell(fight:getPlayerCell(), "Liberte des Alteres")
end
if (CanInvoc() == true)then
Invoc()
else
fighter:passTurn()
end
end
function Invoc()
for i = 0, #myTeam do
fight:launchSpellInCell(fight:getEmptyCell(myTeam), myTeam)
end
fighter:passTurn()
end
function CanInvoc()
currentInvo = 0
local entities = fight:getAllEntities()
for i = 1, #entities do
-- On vérifie si l'entité est un pokemon et si elle est invoquée par le joueur
if (entities.Team == 0 and entities.summoner == fighter:getId()) then
for j = 1, #myTeam do
if (entities.GetName() == myTeam[j]) then
currentTeam[currentInvo] = entities.GetName()
currentInvo = currentInvo + 1
if (currentInvo == 2) then
return false
end
end
end
end
end
return true
end
function DisplayTeam()
for i = 0, #currentTeam do
util:debug(currentTeam)
end
end
function MoveFuyard()
fight:moveFarthestCell(fight:getNearestEnemy())
end
local entities = fight:getAllEntities()
for i = 1, #entities do
if (entities.name == "Fuyard") then
fight:moveFarthestCell(entities)
end
end
il a etait partage sur le discord flaty ^^ il faut change les nom des altere ligne 2