mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Bile Blight - Fixed a but that the discard cost was not properly reset.
This commit is contained in:
parent
746c86363f
commit
7c8d5ea1be
2 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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 ") ) {
|
||||
|
|
Loading…
Reference in a new issue