Passer au contenu principal

Documentation Index

Fetch the complete documentation index at: https://docs.dotouch-emu.com/llms.txt

Use this file to discover all available pages before exploring further.

Vérifier si une invocation peut lancer un sort sur une cellule cible.

🎮 Méthode

fightSlave:canCastSpellOnCell(launchedCellId, spellId, targetCellId)

📝 Arguments

NomTypeDescription
launchedCellIdintCellule source de l’invocation.
spellIdintIdentifiant du sort.
targetCellIdintIdentifiant de la cellule cible.

💎 Valeur de retour

TypeDescription
intCode d’erreur (0 = succès, 116 = diverses restrictions).

💡 Exemple

local slaveCell = fightSlave:cellId()
local enemyCell = fightSlave:getNearestEnemy()
if fightSlave:canCastSpellOnCell(slaveCell, 183, enemyCell) == 0 then
    fightSlave:castSpellOnCell(183, enemyCell)
end