mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
fix #12449 (Flash)
This commit is contained in:
parent
9f917472fc
commit
78edb6a65c
1 changed files with 3 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ class FlashEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final String choiceText = "Put a creature card from your hand onto the battlefield?";
|
private static final String choiceText = "Put a creature card from your hand onto the battlefield?";
|
||||||
|
|
||||||
public FlashEffect() {
|
FlashEffect() {
|
||||||
super(Outcome.PutCreatureInPlay);
|
super(Outcome.PutCreatureInPlay);
|
||||||
this.staticText = "You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.";
|
this.staticText = "You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.";
|
||||||
}
|
}
|
||||||
|
|
@ -72,13 +72,14 @@ class FlashEffect extends OneShotEffect {
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
ManaCosts<ManaCost> reducedCost = ManaCosts.removeVariableManaCost(CardUtil.reduceCost(card.getManaCost(), 2));
|
ManaCosts<ManaCost> reducedCost = ManaCosts.removeVariableManaCost(CardUtil.reduceCost(card.getManaCost(), 2));
|
||||||
if (controller.chooseUse(Outcome.Benefit, String.valueOf("Pay " + reducedCost.getText()) + Character.toString('?'), source, game)) {
|
if (controller.chooseUse(Outcome.Benefit, "Pay " + reducedCost.getText() + '?', source, game)) {
|
||||||
reducedCost.clearPaid();
|
reducedCost.clearPaid();
|
||||||
if (reducedCost.pay(source, game, source, source.getControllerId(), false, null)) {
|
if (reducedCost.pay(source, game, source, source.getControllerId(), false, null)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
game.processAction();
|
||||||
Permanent permanent = game.getPermanent(card.getId());
|
Permanent permanent = game.getPermanent(card.getId());
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
permanent.sacrifice(source, game);
|
permanent.sacrifice(source, game);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue