- Adding Generate Mana Option to DevMode to generate 10 of each color (non-snow)

This commit is contained in:
jendave
2011-08-06 15:54:29 +00:00
parent 57a622c453
commit f3a96d1c57
5 changed files with 38 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
program/name=Forge - http://mtgrares.blogspot.com
program/name=Forge - http://cardforge.org
@@ -50,6 +50,9 @@ Display/computer/graveyard/title=Computer's Graveyard
Display/concede/menu=Concede Game
Display/concede/button=Concede Game
Display/managen/menu=Generate Mana
Display/managen/button=Generate Mana
DownloadPictures/title=Downloading

View File

@@ -204,8 +204,15 @@ public class GuiDisplay3 extends JFrame implements CardContainer, Display, NewCo
Action viewAIHand = new ZoneAction(AllZone.Computer_Hand, COMPUTER_HAND.BASE);
Action viewAILibrary = new ZoneAction(AllZone.Computer_Library, COMPUTER_LIBRARY.BASE);
Action viewHumanLibrary = new ZoneAction(AllZone.Human_Library, HUMAN_LIBRARY.BASE);
ForgeAction generateMana = new ForgeAction(MANAGEN) {
private static final long serialVersionUID = 7171104690016706405L;
Object[] objDev = { GuiDisplay4.canLoseByDecking, viewAIHand, viewAILibrary, viewHumanLibrary };
public void actionPerformed(ActionEvent arg0) {
GuiDisplayUtil.devModeGenerateMana();
}
};
Object[] objDev = { GuiDisplay4.canLoseByDecking, viewAIHand, viewAILibrary, viewHumanLibrary, generateMana };
for(Object o:objDev) {
if(o instanceof ForgeAction)
devMenu.add(((ForgeAction) o).setupButton(new JMenuItem()));

View File

@@ -200,8 +200,15 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
Action viewAIHand = new ZoneAction(AllZone.Computer_Hand, COMPUTER_HAND.BASE);
Action viewAILibrary = new ZoneAction(AllZone.Computer_Library, COMPUTER_LIBRARY.BASE);
Action viewHumanLibrary = new ZoneAction(AllZone.Human_Library, HUMAN_LIBRARY.BASE);
ForgeAction generateMana = new ForgeAction(MANAGEN) {
private static final long serialVersionUID = 7171104690016706405L;
Object[] objDev = { canLoseByDecking, viewAIHand, viewAILibrary, viewHumanLibrary };
public void actionPerformed(ActionEvent arg0) {
GuiDisplayUtil.devModeGenerateMana();
}
};
Object[] objDev = { GuiDisplay4.canLoseByDecking, viewAIHand, viewAILibrary, viewHumanLibrary, generateMana };
for(Object o:objDev) {
if(o instanceof ForgeAction)
devMenu.add(((ForgeAction) o).setupButton(new JMenuItem()));

View File

@@ -123,6 +123,17 @@ public class GuiDisplayUtil implements NewConstants {
} else return BorderFactory.createLineBorder(Color.gray, 2);
}
public static void devModeGenerateMana(){
Card dummy = new Card();
dummy.setOwner(AllZone.HumanPlayer);
dummy.setController(AllZone.HumanPlayer);
Ability_Mana abMana = new Ability_Mana(dummy, "0", "W U B G R", 10) {
private static final long serialVersionUID = -2164401486331182356L;
};
abMana.produceMana();
}
public static String formatCardType(Card card) {
ArrayList<String> list = card.getType();
StringBuilder sb = new StringBuilder();

View File

@@ -253,6 +253,13 @@ public interface NewConstants {
public static final String BUTTON = "%s/Display/concede/button";
public static final String MENU = "%s/Display/concede/menu";
}
public static final String MANAGEN = "%s/Display/managen";
public static interface MANAGEN {
public static final String BUTTON = "%s/Display/managen/button";
public static final String MENU = "%s/Display/managen/menu";
}
}
public static interface Gui_DownloadPictures {