protected override void CanPay(CanPayResult result) { // mana checking is an expensive operation // so it should only be done when nessesary // the following lazy evaluation allows ai // to only check mana costs when all the cheaper // timing tests are successful var evaluator = new PayManaEvaluator(this); result.CanPay(evaluator.CanPay); result.MaxX(evaluator.MaxX); result.MaxRepetitions(evaluator.MaxRepetitions); }