Problem with IA, only pass turns

    Publicités

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

Status
Not open for further replies.

yenyax

Membre
Jul 12, 2019
16
0
202
28
So i create a IA with FlatyIA for a yop. When i enter to the battle, the yop puts nearby of the enemmies, but then he just pass turn until he is dead.


this is the script.


-- IA

DofusClass="8"


function Main()
MoveAggressive()
SpellPressionEnnemi12()
fighter:passTurn()
end

function MoveAggressive()
if (not(fighter:isHandToHand())) then
fight:moveToWardCell(fight:getNearestEnemy())
end
end

function SpellPressionEnnemi12()
if (fight:getCurrentTour() == 1 or fight:getCurrentTour() % 1 == 0) then
fight:launchSpellInCell(fight:getNearestEnemy(), "Pression")
fight:launchSpellInCell(fight:getNearestEnemy(), "Pression")
end
end



thanks
 
Last edited:
Status
Not open for further replies.