Passer au contenu principal
Lancer un sort sur une cellule spécifique sans vérifications.

🎮 Méthode

fightAction:castSpellOnCell(spellId, cellId)

📝 Arguments

NomTypeDescription
spellIdintIdentifiant du sort.
cellIdintIdentifiant de la cellule cible.

💎 Valeur de retour

TypeDescription
booleantrue si le sort est lancé avec succès, false sinon.

💡 Exemple

local cellId = fightAction:getNearestEnemy()
local spellId = ATTACK_SPELLS[tostring(character:breed())]
if fightAction:canCastSpellOnCell(fightCharacter:getCellId(), spellId, cellId) == 0 then
    fightAction:castSpellOnCell(spellId, cellId)
end