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(); }
public void SetWhenEitherHighOrLowIsNotZero(int low, int high) { var range = new Range(low, high); Assert.False(range.NotSet()); }
public void NotSetWhenBothHighAndLowAreZero() { var range = new Range(0, 0); Assert.True(range.NotSet()); }
public void NotInRangeWhenValueNotBetweenLowAndHigh(int value) { var range = new Range(0, 2); Assert.False(range.InRange(value)); }
public void InRangeWhenValueBetweenLowAndHigh(int value) { var range = new Range(0, 2); Assert.True(range.InRange(value)); }