- Dev Mode: added a new function "Remove Card from Game", which allows to completely remove a card from the game in case it was added previously by mistake.

This commit is contained in:
Agetian
2017-08-21 16:09:20 +00:00
parent 96f97e41e1
commit 46ecbc9c42
6 changed files with 73 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ public enum CSubmenuPuzzleCreate implements ICDoc, IMenuProvider {
private void startPuzzleCreate() {
String firstPlayer = SGuiChoose.one("Who should be the first to take a turn?",
Arrays.asList(new String[] {"Human", "AI"}));
Arrays.asList("Human", "AI"));
final Puzzle emptyPuzzle = new Puzzle(generateEmptyPuzzle(firstPlayer));

View File

@@ -46,6 +46,7 @@ public final class CDev implements ICDoc {
view.getLblWinGame().addMouseListener(madWinGame);
view.getLblCardToBattlefield().addMouseListener(madCardToBattlefield);
view.getLblExileFromPlay().addMouseListener(madExileFromPlay);
view.getLblRemoveFromGame().addMouseListener(madRemoveFromGame);
view.getLblRiggedRoll().addMouseListener(madRiggedRoll);
view.getLblWalkTo().addMouseListener(madWalkToPlane);
}
@@ -246,6 +247,16 @@ public final class CDev implements ICDoc {
getController().cheat().exileCardsFromBattlefield();
}
private final MouseListener madRemoveFromGame = new MouseAdapter() {
@Override
public void mousePressed(final MouseEvent e) {
removeCardsFromGame();
}
};
public void removeCardsFromGame() {
getController().cheat().removeCardsFromGame();
}
private final MouseListener madRiggedRoll = new MouseAdapter() {
@Override
public void mousePressed(final MouseEvent e) {

View File

@@ -72,6 +72,7 @@ public class VDev implements IVDoc<CDev>, IDevListener {
private final DevLabel lblCardToLibrary = new DevLabel("Add Card to Library");
private final DevLabel lblCardToGraveyard = new DevLabel("Add Card to Graveyard");
private final DevLabel lblCardToExile = new DevLabel("Add Card to Exile");
private final DevLabel lblRemoveFromGame = new DevLabel("Remove Card from Game");
private final DevLabel lblRiggedRoll = new DevLabel("Rigged Planar Roll");
private final DevLabel lblWalkTo = new DevLabel("Planeswalk to");
@@ -97,8 +98,9 @@ public class VDev implements IVDoc<CDev>, IDevListener {
viewport.add(this.lblCardToLibrary, halfConstraintsLeft);
viewport.add(this.lblCardToGraveyard, halfConstraints);
viewport.add(this.lblCardToExile, halfConstraintsLeft);
viewport.add(this.lblSetLife, halfConstraints);
viewport.add(this.lblWinGame, constraints);
viewport.add(this.lblRemoveFromGame, halfConstraints);
viewport.add(this.lblSetLife, halfConstraintsLeft);
viewport.add(this.lblWinGame, halfConstraints);
viewport.add(this.lblSetupGame, halfConstraintsLeft);
viewport.add(this.lblDumpGame, halfConstraints);
viewport.add(this.lblUnlimitedLands, constraints);
@@ -223,6 +225,11 @@ public class VDev implements IVDoc<CDev>, IDevListener {
return this.lblExileFromPlay;
}
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
public DevLabel getLblRemoveFromGame() {
return this.lblRemoveFromGame;
}
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
public DevLabel getLblCounterPermanent() {
return this.lblCounterPermanent;