|
|
@ -1314,23 +1314,21 @@ public enum CombatManager { |
|
|
|
|
|
|
|
|
|
|
|
if (target.getObjectType() == GameObjectType.Mob) { |
|
|
|
if (target.getObjectType() == GameObjectType.Mob) { |
|
|
|
|
|
|
|
|
|
|
|
Mob retaliater = (Mob) target; |
|
|
|
Mob attackedMobile = (Mob) target; |
|
|
|
|
|
|
|
|
|
|
|
if (retaliater.getCombatTarget() != null && !retaliater.isSiege()) |
|
|
|
if (attackedMobile.getCombatTarget() != null && !attackedMobile.isSiege()) |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (attacker.getObjectType() == GameObjectType.Mob && retaliater.isSiege()) |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
//handle minion informing his captain of the attack
|
|
|
|
//handle minion informing his captain of the attack
|
|
|
|
if(attacker.getObjectType().equals(GameObjectType.Mob)){ |
|
|
|
if (attacker.getObjectType().equals(GameObjectType.Mob)) { |
|
|
|
Mob mob = (Mob)attacker; |
|
|
|
Mob mob = (Mob) attacker; |
|
|
|
if(mob.agentType.equals(AIAgentType.GUARDMINION) && mob.guardCaptain != null && mob.guardCaptain.isAlive()) |
|
|
|
if (mob.agentType.equals(AIAgentType.GUARDMINION) && mob.guardCaptain != null && mob.guardCaptain.isAlive()) |
|
|
|
if(mob.guardCaptain.combatTarget == null) |
|
|
|
if (mob.guardCaptain.combatTarget == null) |
|
|
|
mob.guardCaptain.combatTarget = attacker; |
|
|
|
mob.guardCaptain.setCombatTarget(attacker); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
retaliater.setCombatTarget(attacker); |
|
|
|
attackedMobile.setCombatTarget(attacker); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|