-- Vérifier le défi et adapter la stratégie
local challengeId = fightChallenge:getChallengeId()
if challengeId > 0 then
local bonus = fightChallenge:getXpBonus()
fightDebug:print("Défi " .. challengeId .. " XP+" .. bonus .. "%")
local targets = fightChallenge:getTargetCells()
if #targets > 0 then
-- Prioriser les cibles du défi
for _, targetCell in ipairs(targets) do
local myCell = fightCharacter:getCellId()
if fightAction:canCastSpellOnCell(myCell, 8139, targetCell) == 0 then
fightAction:castSpellOnCell(8139, targetCell)
break
end
end
end
end