mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +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;
|
return paid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearPaid() {
|
||||||
|
super.clearPaid();
|
||||||
|
cards.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||||
return targets.canChoose(sourceId, controllerId, game);
|
return targets.canChoose(sourceId, controllerId, game);
|
||||||
|
|
|
@ -25,13 +25,13 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect {
|
||||||
|
|
||||||
public SacrificeSourceUnlessPaysEffect(final SacrificeSourceUnlessPaysEffect effect) {
|
public SacrificeSourceUnlessPaysEffect(final SacrificeSourceUnlessPaysEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.cost = effect.cost;
|
this.cost = effect.cost.copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (player != null && permanent != null) {
|
if (player != null && permanent != null) {
|
||||||
StringBuilder sb = new StringBuilder(cost.getText()).append("?");
|
StringBuilder sb = new StringBuilder(cost.getText()).append("?");
|
||||||
if (!sb.toString().toLowerCase().startsWith("exile ") && !sb.toString().toLowerCase().startsWith("return ") ) {
|
if (!sb.toString().toLowerCase().startsWith("exile ") && !sb.toString().toLowerCase().startsWith("return ") ) {
|
||||||
|
|
Loading…
Reference in a new issue