From 7ecf6dabce2a07c06c30de3f6ce68548bc503c43 Mon Sep 17 00:00:00 2001 From: Simon Holmberg Date: Wed, 31 Oct 2012 18:21:54 +0100 Subject: [PATCH] AP fixed --- DepthsBelow/DepthsBelow/Interface.cs | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/DepthsBelow/DepthsBelow/Interface.cs b/DepthsBelow/DepthsBelow/Interface.cs index f1324e8..db5f064 100755 --- a/DepthsBelow/DepthsBelow/Interface.cs +++ b/DepthsBelow/DepthsBelow/Interface.cs @@ -232,16 +232,26 @@ namespace DepthsBelow } else { - if (soldier.AP >= soldier.GetComponent().Length) - { - soldier.GetComponent().Goal = point; - soldier.AP -= soldier.GetComponent().Length; + Console.WriteLine("before " + soldier.AP); - Console.WriteLine(x + " " + y); - Console.WriteLine(soldier.GetComponent().Goal.X + " " + - soldier.GetComponent().Goal.Y); + soldier.GetComponent().Goal = point; + var length = soldier.GetComponent().Length - 1; - } + if (soldier.GetComponent().IsMoving == true) + { + if (soldier.AP >= length) + { + + soldier.AP -= length; + + Console.WriteLine("then " + soldier.AP); + + } + else + { + soldier.GetComponent().Stop(); + } + } } }