mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
play lands from devmode
This commit is contained in:
@@ -406,33 +406,33 @@ public final class GuiDisplayUtil {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Card forgeCard = c.toForgeCard(p);
|
|
||||||
|
|
||||||
final Game game = getGame();
|
final Game game = getGame();
|
||||||
if (forgeCard.getType().contains("Land")) {
|
game.getAction().invoke(new Runnable() {
|
||||||
forgeCard.setOwner(p);
|
@Override public void run() {
|
||||||
game.getAction().moveToPlay(forgeCard);
|
final Card forgeCard = c.toForgeCard(p);
|
||||||
} else {
|
|
||||||
final List<SpellAbility> choices = forgeCard.getBasicSpells();
|
|
||||||
if (choices.isEmpty()) {
|
|
||||||
return; // when would it happen?
|
|
||||||
}
|
|
||||||
|
|
||||||
final SpellAbility sa = choices.size() == 1 ? choices.get(0) : GuiChoose.oneOrNone("Choose", choices);
|
if (c.getRules().getType().isLand()) {
|
||||||
if (sa == null) {
|
forgeCard.setOwner(p);
|
||||||
return; // happens if cancelled
|
game.getAction().moveToPlay(forgeCard);
|
||||||
}
|
|
||||||
|
} else {
|
||||||
game.getAction().invoke(new Runnable() {
|
final List<SpellAbility> choices = forgeCard.getBasicSpells();
|
||||||
@Override
|
if (choices.isEmpty()) {
|
||||||
public void run() {
|
return; // when would it happen?
|
||||||
|
}
|
||||||
|
|
||||||
|
final SpellAbility sa = choices.size() == 1 ? choices.get(0) : GuiChoose.oneOrNone("Choose", choices);
|
||||||
|
if (sa == null) {
|
||||||
|
return; // happens if cancelled
|
||||||
|
}
|
||||||
|
|
||||||
game.getAction().moveToHand(forgeCard); // this is really needed (for rollbacks at least)
|
game.getAction().moveToHand(forgeCard); // this is really needed (for rollbacks at least)
|
||||||
// Human player is choosing targets for an ability controlled by chosen player.
|
// Human player is choosing targets for an ability controlled by chosen player.
|
||||||
sa.setActivatingPlayer(p);
|
sa.setActivatingPlayer(p);
|
||||||
HumanPlay.playSaWithoutPayingManaCost(game, sa);
|
HumanPlay.playSaWithoutPayingManaCost(game, sa);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user