mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Little refactor, additional logs for CheckPlayableState error;
This commit is contained in:
parent
7b298f84a7
commit
2efdb464fc
5 changed files with 12 additions and 9 deletions
|
|
@ -241,7 +241,7 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost {
|
|||
assignPayment(game, ability, player.getManaPool(), costToPay != null ? costToPay : this);
|
||||
}
|
||||
game.getState().getSpecialActions().removeManaActions();
|
||||
while (!isPaid()) {
|
||||
while (player.canRespond() && !isPaid()) {
|
||||
ManaCost unpaid = this.getUnpaid();
|
||||
String promptText = ManaUtil.addSpecialManaPayAbilities(ability, game, unpaid);
|
||||
if (player.playMana(ability, unpaid, promptText, game)) {
|
||||
|
|
@ -251,7 +251,7 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost {
|
|||
}
|
||||
game.getState().getSpecialActions().removeManaActions();
|
||||
}
|
||||
return true;
|
||||
return isPaid();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
assignPayment(game, ability, player.getManaPool(), this);
|
||||
}
|
||||
game.getState().getSpecialActions().removeManaActions();
|
||||
while (!isPaid()) {
|
||||
while (player.canRespond() && !isPaid()) {
|
||||
ManaCost unpaid = this.getUnpaid();
|
||||
String promptText = ManaUtil.addSpecialManaPayAbilities(ability, game, unpaid);
|
||||
if (player.playMana(ability, unpaid, promptText, game)) {
|
||||
|
|
@ -138,7 +138,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
}
|
||||
game.getState().getSpecialActions().removeManaActions();
|
||||
}
|
||||
return true;
|
||||
return isPaid();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue