fix: Cleans up AI code (#1084)
This commit is contained in:
parent
da877f59a7
commit
38b45d5e0b
13 changed files with 4830 additions and 4632 deletions
|
|
@ -411,13 +411,13 @@ namespace Server.Factions
|
|||
{
|
||||
if (m_Mobile.Debug)
|
||||
{
|
||||
m_Mobile.DebugSay("My move is blocked, so I am going to attack {0}", m_Mobile.FocusMob.Name);
|
||||
m_Mobile.DebugSay($"My move is blocked, so I am going to attack {m_Mobile.FocusMob.Name}");
|
||||
}
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
else if (m_Mobile.Debug)
|
||||
{
|
||||
m_Mobile.DebugSay("I am stuck");
|
||||
}
|
||||
|
|
@ -815,17 +815,14 @@ namespace Server.Factions
|
|||
|
||||
if (type != null && m_Guard.Target == null && UseItemByType(type))
|
||||
{
|
||||
if (spell is GreaterHealSpell)
|
||||
{
|
||||
if (m_Guard.Hits + 30 > m_Guard.HitsMax && m_Guard.Hits + 10 < m_Guard.HitsMax)
|
||||
{
|
||||
spell = new HealSpell(m_Guard);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (spell is not GreaterHealSpell)
|
||||
{
|
||||
spell = null;
|
||||
}
|
||||
else if (m_Guard.Hits + 30 > m_Guard.HitsMax && m_Guard.Hits + 10 < m_Guard.HitsMax)
|
||||
{
|
||||
spell = new HealSpell(m_Guard);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (spell == null && m_Guard.Stam < m_Guard.StamMax / 3 && IsAllowed(GuardAI.Melee))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue