* Bile Blight - Fixed a but that the discard cost was not properly reset.

This commit is contained in:
LevelX2 2014-08-19 15:06:22 +02:00
parent 746c86363f
commit 7c8d5ea1be
2 changed files with 8 additions and 2 deletions

View file

@ -94,6 +94,12 @@ public class DiscardTargetCost extends CostImpl {
return paid;
}
@Override
public void clearPaid() {
super.clearPaid();
cards.clear();
}
@Override
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
return targets.canChoose(sourceId, controllerId, game);

View file

@ -25,13 +25,13 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect {
public SacrificeSourceUnlessPaysEffect(final SacrificeSourceUnlessPaysEffect effect) {
super(effect);
this.cost = effect.cost;
this.cost = effect.cost.copy();
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId());
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (player != null && permanent != null) {
StringBuilder sb = new StringBuilder(cost.getText()).append("?");
if (!sb.toString().toLowerCase().startsWith("exile ") && !sb.toString().toLowerCase().startsWith("return ") ) {