diff --git a/Projects/UOContent/Misc/Notoriety.cs b/Projects/UOContent/Misc/Notoriety.cs index 3d8a5b6c6..ff7924bb5 100644 --- a/Projects/UOContent/Misc/Notoriety.cs +++ b/Projects/UOContent/Misc/Notoriety.cs @@ -387,6 +387,12 @@ namespace Server.Misc return Notoriety.Invulnerable; } + // Moved above AccessLevel check so staff summons are red + if (bcTarg?.AlwaysMurderer == true) + { + return Notoriety.Murderer; + } + var pmFrom = source as PlayerMobile; var pmTarg = target as PlayerMobile; @@ -434,7 +440,7 @@ namespace Server.Misc if (target.Kills >= 5 || target.Body.IsMonster && IsSummoned(bcTarg) && target is not BaseFamiliar && target is not ArcaneFey && - target is not Golem || bcTarg?.AlwaysMurderer == true || bcTarg?.IsAnimatedDead == true) + target is not Golem || bcTarg?.IsAnimatedDead == true) { return Notoriety.Murderer; } diff --git a/Projects/UOContent/Mobiles/AI/BaseAI.cs b/Projects/UOContent/Mobiles/AI/BaseAI.cs index 5ce7ba5a7..555c65a46 100644 --- a/Projects/UOContent/Mobiles/AI/BaseAI.cs +++ b/Projects/UOContent/Mobiles/AI/BaseAI.cs @@ -2672,39 +2672,27 @@ public abstract class BaseAI var pm = m as PlayerMobile; // Monster don't attack it's own summon or the summon of another monster - if (Core.AOS && bc != null && bc.Summoned && (bc.SummonMaster == m_Mobile || (!bc.SummonMaster.Player && IsHostile(bc.SummonMaster)))) + if (Core.AOS && bc != null && bc.Summoned && (bc.SummonMaster == m_Mobile || !bc.SummonMaster.Player && IsHostile(bc.SummonMaster))) { continue; } if (m_Mobile.Summoned && m_Mobile.SummonMaster != null) { - // If this is a summon, it can't target its controller. - if (m == m_Mobile.SummonMaster) - { - continue; - } - - // It also must abide by harmful spell rules. - if (!SpellHelper.ValidIndirectTarget(m_Mobile.SummonMaster, m)) - { - continue; - } - // Animated creatures cannot attack players directly. if (pm != null && m_Mobile.IsAnimatedDead) { continue; } - // Animated creatures cannot attack other animated creatures - if (m_Mobile.IsAnimatedDead && bc?.IsAnimatedDead == true) + // Animated creatures cannot attack other animated creatures or pets of other players + if (m_Mobile.IsAnimatedDead && bc != null && (bc.IsAnimatedDead || bc.Controlled)) { continue; } - // Animated creatures cannot attack pets of other players - if (m_Mobile.IsAnimatedDead && bc?.Controlled == true) + // If this is a summon, it can't target its controller or invalid targets. + if (m_Mobile.FollowsAcquireRules && (m == m_Mobile.SummonMaster || !SpellHelper.ValidIndirectTarget(m_Mobile, m))) { continue; } @@ -2771,7 +2759,9 @@ public abstract class BaseAI } var theirVal = m_Mobile.GetFightModeRanking(m, acqType, bPlayerOnly); - if (theirVal > val && m_Mobile.InLOS(m)) + + // Always prefer someone else over the summon master (EV/BS) + if ((theirVal > val || newFocusMob == m_Mobile.SummonMaster) && m_Mobile.InLOS(m)) { newFocusMob = m; val = theirVal; diff --git a/Projects/UOContent/Mobiles/BaseCreature.cs b/Projects/UOContent/Mobiles/BaseCreature.cs index dc7e91ceb..6dde04f62 100644 --- a/Projects/UOContent/Mobiles/BaseCreature.cs +++ b/Projects/UOContent/Mobiles/BaseCreature.cs @@ -448,6 +448,8 @@ namespace Server.Mobiles [CommandProperty(AccessLevel.GameMaster)] public bool IsPrisoner { get; set; } + public virtual bool FollowsAcquireRules => true; + protected DateTime SummonEnd { get; set; } public virtual Faction FactionAllegiance => null; diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs index 85b5d0671..100e115d7 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs @@ -45,7 +45,7 @@ namespace Server.Mobiles public override string CorpseName => "a blade spirit corpse"; public override string DefaultName => "a blade spirit"; - + public override bool DeleteCorpseOnDeath => Core.AOS; public override bool IsHouseSummonable => true; @@ -55,6 +55,8 @@ namespace Server.Mobiles public override bool BleedImmune => true; public override Poison PoisonImmune => Poison.Lethal; + public override bool FollowsAcquireRules => Core.AOS || !Summoned || SummonMaster?.Player != true || Map != Map.Felucca; + public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly) => (m.Str + m.Skills.Tactics.Value) / Math.Max(GetDistanceToSqrt(m), 1.0); diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs index a6ab88261..b94d2650c 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs @@ -63,6 +63,8 @@ namespace Server.Mobiles public override bool BleedImmune => true; public override Poison PoisonImmune => Poison.Lethal; + public override bool FollowsAcquireRules => Core.AOS || !Summoned || SummonMaster?.Player != true || Map != Map.Felucca; + public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly) => (m.Int + m.Skills.Magery.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);