fix: fixes mobiles pathing home after combat (#2246)
This commit is contained in:
parent
fa0b67ec29
commit
f59605190c
1 changed files with 6 additions and 3 deletions
|
|
@ -439,11 +439,14 @@ public abstract partial class BaseAI
|
||||||
|
|
||||||
public virtual bool DoActionGuard()
|
public virtual bool DoActionGuard()
|
||||||
{
|
{
|
||||||
DebugSay("I am still on guard.");
|
if (Mobile.Combatant == null)
|
||||||
if (Utility.Random(10) == 0)
|
|
||||||
{
|
{
|
||||||
Mobile.Turn(Utility.Random(0, 2) - 1);
|
DebugSay("No threats found. Going home...");
|
||||||
|
Action = ActionType.Wander;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DebugSay("I stopped being on guard.");
|
||||||
|
Action = ActionType.Wander;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue