⚔️ fight_GetFightStatus()
Vérifie si le personnage est actuellement en combat.
fight_GetFightStatus()
FightVérifie si le personnage est actuellement en combat.
Paramètres
Aucun paramètre.
Valeur de retour
bool - true si le personnage est en combat, false sinon
Exemple
function example_fightgetfightstatus()
-- Vérifier si on est toujours en combat
if not fight_GetFightStatus() then
fight_SendLogs("Le combat est terminé", "Green")
return
end
-- Boucle principale de combat
while fight_GetFightStatus() do
if fight_IsMyTurn() then
-- Logique de combat
local enemyCell = fight_GetClosestEnemyCell()
fight_CastSpell("Attaque", enemyCell)
end
fight_Delay(100)
end
end
-- Appeler la fonction
example_fightgetfightstatus()