Pull siege engine aggro on damage only
A siege engine switches to whoever damages it, player or pet, even when it already has a target. Pre-roll melee retaliation, harmful-power direct aggro (which also fires on misses) and Taunt no longer change a siege engine's target. The attack timer is untouched, so a switched engine still waits for its next cycle before firing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
531a2d028b
commit
c9208000bb
4 files changed
+17
-2
No files matched your search
@@ -257,7 +257,8 @@ public enum CombatManager {
|
||||
|
||||
|
||||
//handle retaliate
|
||||
if (AbstractCharacter.IsAbstractCharacter(target)) {
|
||||
//siege engines only retaliate on damage, see AbstractCharacter.modifyHealth
|
||||
if (AbstractCharacter.IsAbstractCharacter(target) && !(target.getObjectType().equals(mbEnums.GameObjectType.Mob) && ((Mob) target).isSiege())) {
|
||||
if (((AbstractCharacter) target).combatTarget == null || !((AbstractCharacter) target).combatTarget.isAlive()) {
|
||||
((AbstractCharacter) target).combatTarget = attacker;
|
||||
if (target.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter) && ((AbstractCharacter) target).isCombat())
|
||||
|
||||
@@ -1863,6 +1863,13 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
if (this.getObjectType().equals(GameObjectType.Mob)) {
|
||||
//handle hate value addition
|
||||
Mob target = (Mob) this;
|
||||
|
||||
// Siege engines switch to whoever damages them, players and pets alike.
|
||||
// Misses and non-damaging powers do not pull them.
|
||||
|
||||
if (target.isSiege() && value < 0f && attacker != null && !attacker.equals(target))
|
||||
target.setCombatTarget(attacker);
|
||||
|
||||
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter)) {
|
||||
|
||||
if (target.playerAgroMap.containsKey(attacker.getObjectUUID()))
|
||||
|
||||
@@ -1318,6 +1318,11 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
|
||||
if (!ac.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
return;
|
||||
|
||||
// siege engines only switch targets on damage, see AbstractCharacter.modifyHealth
|
||||
|
||||
if (this.isSiege())
|
||||
return;
|
||||
|
||||
if (this.getCombatTarget() == null)
|
||||
this.setCombatTarget(ac);
|
||||
|
||||
|
||||
@@ -246,7 +246,9 @@ public class ApplyEffectPowerAction extends AbstractPowerAction {
|
||||
|
||||
if (this.effectID.equals("TAUNT")) {
|
||||
|
||||
if (awo != null && awo.getObjectType() == GameObjectType.Mob) {
|
||||
// siege engines only switch targets on damage, see AbstractCharacter.modifyHealth
|
||||
|
||||
if (awo != null && awo.getObjectType() == GameObjectType.Mob && !((Mob) awo).isSiege()) {
|
||||
((Mob) awo).setCombatTarget(source);
|
||||
ChatSystemMsg msg = ChatManager.CombatInfo(source, awo);
|
||||
DispatchManager.sendToAllInRange(source, msg);
|
||||
|
||||
Reference in new issue
Block a user