local combat = Combat() combat:setArea(createCombatArea(AREA_CIRCLE3X3)) function onTargetCreature(creature, target) if target:isMonster() then if target:getName() == "Mercenario" then creature:setTarget(target) end end return doChallengeCreature(creature, target) end combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") function onCastSpell(creature, variant) local checkTarget = creature:getTarget() if checkTarget then if checkTarget:isPlayer() or checkTarget:getName() == "Soldier" and checkTarget:getName() == "Towncryer" then creature:setTarget(nil) end end return combat:execute(creature, variant) end