mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
* 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:
parent
1ae9fc883e
commit
bcb37992cc
2 changed files with 30 additions and 5 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue