temporis 7

    Publicités

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

nicolas014

Membre
Jan 26, 2014
8
0
911
-- 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

Post automatically merged:

-- 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
 

Attachments

  • x.lua
    1.6 KB · Views: 31

zurken14

Membre
Nov 13, 2019
13
1
124
34
Re, l'ia fonctionne pour temporis 8 ? car a chauqye entree en combat ma console perd la connexion avec flatyvore