mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Dev Mode: split the "Add Card to Play" functionality into two buttons: "Add Card to Battlefield", which acts like other Add Card to X buttons and adds the card directly to the battlefield, without using the stack and without firing ETB triggers; and "Cast Spell/Play Land", which acts like the old "Add Card to Play" button and uses the stack when necessary and fires all triggers.
This commit is contained in:
@@ -40,6 +40,7 @@ public final class CDev implements ICDoc {
|
||||
view.getLblCardToLibrary().addMouseListener(madCardToLibrary);
|
||||
view.getLblCardToGraveyard().addMouseListener(madCardToGraveyard);
|
||||
view.getLblCardToExile().addMouseListener(madCardToExile);
|
||||
view.getLblCastSpell().addMouseListener(madCastASpell);
|
||||
view.getLblRepeatAddCard().addMouseListener(madRepeatAddCard);
|
||||
view.getLblCounterPermanent().addMouseListener(madCounter);
|
||||
view.getLblTapPermanent().addMouseListener(madTap);
|
||||
@@ -167,6 +168,16 @@ public final class CDev implements ICDoc {
|
||||
getController().cheat().addCardToExile();
|
||||
}
|
||||
|
||||
private final MouseListener madCastASpell = new MouseAdapter() {
|
||||
@Override
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
castASpell();
|
||||
}
|
||||
};
|
||||
public void castASpell() {
|
||||
getController().cheat().castASpell();
|
||||
}
|
||||
|
||||
private final MouseListener madRepeatAddCard = new MouseAdapter() {
|
||||
@Override
|
||||
public void mousePressed(final MouseEvent e) {
|
||||
|
||||
@@ -65,13 +65,14 @@ public class VDev implements IVDoc<CDev>, IDevListener {
|
||||
private final DevLabel lblUntapPermanent = new DevLabel("Untap Permanents");
|
||||
private final DevLabel lblSetLife = new DevLabel("Set Player Life");
|
||||
private final DevLabel lblWinGame = new DevLabel("Win Game");
|
||||
private final DevLabel lblCardToBattlefield = new DevLabel("Add Card to Play");
|
||||
private final DevLabel lblCardToBattlefield = new DevLabel("Add Card to Battlefield");
|
||||
private final DevLabel lblExileFromPlay = new DevLabel("Exile Card from Play");
|
||||
private final DevLabel lblCardToHand = new DevLabel("Add Card to Hand");
|
||||
private final DevLabel lblExileFromHand = new DevLabel("Exile Card from Hand");
|
||||
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 lblCastSpell = new DevLabel("Cast Spell/Play Land");
|
||||
private final DevLabel lblRepeatAddCard = new DevLabel("Repeat Last Add Card");
|
||||
private final DevLabel lblRemoveFromGame = new DevLabel("Remove Card from Game");
|
||||
|
||||
@@ -98,13 +99,14 @@ 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.lblRepeatAddCard, halfConstraints);
|
||||
viewport.add(this.lblCastSpell, halfConstraints);
|
||||
viewport.add(this.lblRepeatAddCard, halfConstraintsLeft);
|
||||
viewport.add(this.lblRemoveFromGame, halfConstraints);
|
||||
viewport.add(this.lblExileFromHand, halfConstraintsLeft);
|
||||
viewport.add(this.lblExileFromPlay, halfConstraints);
|
||||
viewport.add(this.lblRemoveFromGame, halfConstraintsLeft);
|
||||
viewport.add(this.lblSetLife, halfConstraints);
|
||||
viewport.add(this.lblSetLife, halfConstraintsLeft);
|
||||
viewport.add(this.lblWinGame, halfConstraints);
|
||||
viewport.add(this.lblCounterPermanent, constraints);
|
||||
viewport.add(this.lblWinGame, constraints);
|
||||
viewport.add(this.lblSetupGame, halfConstraintsLeft);
|
||||
viewport.add(this.lblDumpGame, halfConstraints);
|
||||
viewport.add(this.lblTapPermanent, halfConstraintsLeft);
|
||||
@@ -227,11 +229,15 @@ public class VDev implements IVDoc<CDev>, IDevListener {
|
||||
return lblRepeatAddCard;
|
||||
}
|
||||
|
||||
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
|
||||
public DevLabel getLblCastSpell() {
|
||||
return this.lblCastSpell;
|
||||
}
|
||||
|
||||
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
|
||||
public DevLabel getLblExileFromPlay() {
|
||||
return this.lblExileFromPlay;
|
||||
}
|
||||
|
||||
/** @return {@link forge.screens.match.views.VDev.DevLabel} */
|
||||
public DevLabel getLblRemoveFromGame() {
|
||||
return this.lblRemoveFromGame;
|
||||
|
||||
Reference in New Issue
Block a user