* Buyback abilities - fixed that AI can't cast cards with buyback for normal cost (AI don't use buyback now);

This commit is contained in:
Oleg Agafonov 2020-01-04 20:26:59 +04:00
parent 1ae9fc883e
commit bcb37992cc
2 changed files with 30 additions and 5 deletions

View file

@ -131,7 +131,9 @@ public class BuybackAbility extends StaticAbility implements OptionalAdditionalS
Player player = game.getPlayer(ability.getControllerId());
if (player != null) {
this.resetBuyback(game);
if (player.chooseUse(Outcome.Benefit, "Pay " + buybackCost.getText(false) + " ?", ability, game)) {
// TODO: add AI support to find mana available to pay buyback
// canPay checks only single mana available, not total mana usage
if (player.chooseUse(/*Outcome.Benefit*/ Outcome.AIDontUseIt, "Pay " + buybackCost.getText(false) + " ?", ability, game)) {
activateBuyback(game, true);
for (Iterator it = ((Costs) buybackCost).iterator(); it.hasNext(); ) {
Cost cost = (Cost) it.next();