(d732f31b3) Enable initiative and courage. Implement initiative.
This commit is contained in:
@@ -40,6 +40,18 @@ namespace Barotrauma
|
||||
|
||||
public override bool IsLoop { get => true; set => throw new System.Exception("Trying to set the value for IsLoop from: " + System.Environment.StackTrace); }
|
||||
|
||||
public override float GetPriority()
|
||||
{
|
||||
float max = Math.Min(AIObjectiveManager.OrderPriority - 1, 100);
|
||||
Priority = MathHelper.Lerp(1, max, MathUtils.InverseLerp(100, 0, character.GetSkillLevel("initiative")));
|
||||
return Priority;
|
||||
}
|
||||
|
||||
public override bool IsCompleted() => false;
|
||||
public override bool CanBeCompleted => true;
|
||||
|
||||
public override bool IsLoop { get => true; set => throw new System.Exception("Trying to set the value for IsLoop from: " + System.Environment.StackTrace); }
|
||||
|
||||
// TODO: take the initiative into account
|
||||
public override float GetPriority() => 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user