mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Allowed choosing X=0 to act as an attack cost
This commit is contained in:
parent
b352a31852
commit
4176b35f2a
1 changed files with 7 additions and 9 deletions
|
@ -86,17 +86,15 @@ class WarTaxReplacementEffect extends ReplacementEffectImpl {
|
|||
Player player = game.getPlayer(event.getPlayerId());
|
||||
if (player != null) {
|
||||
int amount = xCosts.calculate(game, source, this);
|
||||
if (amount > 0) {
|
||||
String mana = "{" + amount + '}';
|
||||
ManaCostsImpl cost = new ManaCostsImpl(mana);
|
||||
if (cost.canPay(source, source.getSourceId(), event.getPlayerId(), game)
|
||||
&& player.chooseUse(Outcome.Benefit, "Pay " + mana + " to declare attacker?", source, game)) {
|
||||
if (cost.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
String mana = "{" + amount + '}';
|
||||
ManaCostsImpl cost = new ManaCostsImpl(mana);
|
||||
if (cost.canPay(source, source.getSourceId(), event.getPlayerId(), game)
|
||||
&& player.chooseUse(Outcome.Benefit, "Pay " + mana + " to declare attacker?", source, game)) {
|
||||
if (cost.payOrRollback(source, game, source.getSourceId(), event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue