Allowed choosing X=0 to act as an attack cost

This commit is contained in:
Zzooouhh 2017-11-03 19:15:35 +01:00 committed by GitHub
parent b352a31852
commit 4176b35f2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}