예제 #1
0
 public bool IsValid(ActionContext context)
 {
     var action = context.BattleAbility;
     var memory = context.MemoryAPI;
     var mpReserve = new Range(action.MPReserveLow, action.MPReserveHigh);
     return mpReserve.InRange(memory.Player.MPPCurrent) || mpReserve.NotSet();
 }
예제 #2
0
 public void SetWhenEitherHighOrLowIsNotZero(int low, int high)
 {
     var range = new Range(low, high);
     Assert.False(range.NotSet());
 }
예제 #3
0
 public void NotSetWhenBothHighAndLowAreZero()
 {
     var range = new Range(0, 0);
     Assert.True(range.NotSet());
 }
예제 #4
0
 public void NotInRangeWhenValueNotBetweenLowAndHigh(int value)
 {
     var range = new Range(0, 2);
     Assert.False(range.InRange(value));
 }
예제 #5
0
 public void InRangeWhenValueBetweenLowAndHigh(int value)
 {
     var range = new Range(0, 2);
     Assert.True(range.InRange(value));
 }