mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Made some changes to the Quest Deck Editor to make it more compatible with the new Look and Feel themes.
- Added Time Vault.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Time Vault
|
||||
2
|
||||
Artifact
|
||||
If you would begin your turn while Time Vault is tapped, you may skip that turn instead. If you do, untap Time Vault.
|
||||
This card doesn't untap during your untap step.
|
||||
Comes into play tapped.
|
||||
|
||||
Mana Tithe
|
||||
W
|
||||
Instant
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
program/mail=mtgerror@yahoo.com
|
||||
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26
|
||||
program/version=Forge -- official beta: 10/01/01, SVN revision: 266
|
||||
program/version=Forge -- official beta: 10/01/01, SVN revision: 267
|
||||
|
||||
tokens--file=AllTokens.txt
|
||||
|
||||
|
||||
@@ -16964,6 +16964,23 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Time Vault"))
|
||||
{
|
||||
final Ability_Tap ability = new Ability_Tap(card)
|
||||
{
|
||||
private static final long serialVersionUID = 5784473766585071504L;
|
||||
|
||||
public void resolve() {
|
||||
//System.out.println("Turn: " + AllZone.Phase.getTurn());
|
||||
AllZone.Phase.addExtraTurn(card.getController());
|
||||
}
|
||||
};
|
||||
card.addSpellAbility(ability);
|
||||
ability.setStackDescription(card +" - take an extra turn after this one.");
|
||||
ability.setDescription("Tap: Take an extra turn after this one.");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if (cardName.equals("Celestial Purge"))
|
||||
{
|
||||
final Spell spell = new Spell(card)
|
||||
|
||||
@@ -3025,6 +3025,13 @@ public class CardFactoryUtil
|
||||
return count;
|
||||
}
|
||||
|
||||
public static CardList getCards(String cardName, String player)
|
||||
{
|
||||
CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, player).getCards());
|
||||
list = list.getName(cardName);
|
||||
return list;
|
||||
}
|
||||
|
||||
public static CardList getFastbonds(String player)
|
||||
{
|
||||
CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, player).getCards());
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ImageIcon;
|
||||
//import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFileChooser;
|
||||
@@ -48,8 +48,8 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
|
||||
Gui_Quest_DeckEditor_Menu customMenu;
|
||||
|
||||
private ImageIcon upIcon = Constant.IO.upIcon;
|
||||
private ImageIcon downIcon = Constant.IO.downIcon;
|
||||
//private ImageIcon upIcon = Constant.IO.upIcon;
|
||||
//private ImageIcon downIcon = Constant.IO.downIcon;
|
||||
|
||||
public TableModel topModel;
|
||||
public TableModel bottomModel;
|
||||
@@ -468,8 +468,8 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
jScrollPane2.setBorder(titledBorder2);
|
||||
jScrollPane2.setBounds(new Rectangle(19, 458, 726, 218));
|
||||
removeButton.setBounds(new Rectangle(180, 403, 146, 49));
|
||||
removeButton.setIcon(upIcon);
|
||||
removeButton.setFont(new java.awt.Font("Dialog", 0, 13));
|
||||
//removeButton.setIcon(upIcon);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) removeButton.setFont(new java.awt.Font("Dialog", 0, 13));
|
||||
removeButton.setText("Remove Card");
|
||||
removeButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@@ -482,8 +482,8 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
addButton_actionPerformed(e);
|
||||
}
|
||||
});
|
||||
addButton.setIcon(downIcon);
|
||||
addButton.setFont(new java.awt.Font("Dialog", 0, 13));
|
||||
//addButton.setIcon(downIcon);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) addButton.setFont(new java.awt.Font("Dialog", 0, 13));
|
||||
addButton.setBounds(new Rectangle(23, 403, 146, 49));
|
||||
|
||||
analysisButton.setText("Deck Analysis");
|
||||
@@ -492,7 +492,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
analysisButton_actionPerformed(e);
|
||||
}
|
||||
});
|
||||
analysisButton.setFont(new java.awt.Font("Dialog", 0, 13));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) analysisButton.setFont(new java.awt.Font("Dialog", 0, 13));
|
||||
analysisButton.setBounds(new Rectangle(578, 426, 166, 25));
|
||||
|
||||
changePictureButton.setText("Change picture...");
|
||||
@@ -501,7 +501,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
changePictureButton_actionPerformed(e);
|
||||
}
|
||||
});
|
||||
changePictureButton.setFont(new java.awt.Font("Dialog", 0, 10));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) changePictureButton.setFont(new java.awt.Font("Dialog", 0, 10));
|
||||
changePictureButton.setBounds(new Rectangle(765, 349, 118, 20));
|
||||
|
||||
removePictureButton.setText("Remove picture...");
|
||||
@@ -510,7 +510,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
removePictureButton_actionPerformed(e);
|
||||
}
|
||||
});
|
||||
removePictureButton.setFont(new java.awt.Font("Dialog", 0, 10));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) removePictureButton.setFont(new java.awt.Font("Dialog", 0, 10));
|
||||
removePictureButton.setBounds(new Rectangle(885, 349, 118, 20));
|
||||
|
||||
/**
|
||||
@@ -518,7 +518,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
*/
|
||||
Font f = new Font("Tahoma", Font.PLAIN, 10);
|
||||
landCheckBox.setBounds(340, 400, 48, 20);
|
||||
landCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) landCheckBox.setFont(f);
|
||||
landCheckBox.setOpaque(false);
|
||||
landCheckBox.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
@@ -526,7 +526,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
}
|
||||
});
|
||||
creatureCheckBox.setBounds(385, 400, 65, 20);
|
||||
creatureCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) creatureCheckBox.setFont(f);
|
||||
creatureCheckBox.setOpaque(false);
|
||||
creatureCheckBox.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
@@ -534,7 +534,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
}
|
||||
});
|
||||
sorceryCheckBox.setBounds(447, 400, 62, 20);
|
||||
sorceryCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) sorceryCheckBox.setFont(f);
|
||||
sorceryCheckBox.setOpaque(false);
|
||||
sorceryCheckBox.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
@@ -542,7 +542,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
}
|
||||
});
|
||||
instantCheckBox.setBounds(505, 400, 60, 20);
|
||||
instantCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) instantCheckBox.setFont(f);
|
||||
instantCheckBox.setOpaque(false);
|
||||
instantCheckBox.addItemListener(new ItemListener() {
|
||||
|
||||
@@ -551,7 +551,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
}
|
||||
});
|
||||
planeswalkerCheckBox.setBounds(558, 400, 85, 20);
|
||||
planeswalkerCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) planeswalkerCheckBox.setFont(f);
|
||||
planeswalkerCheckBox.setOpaque(false);
|
||||
planeswalkerCheckBox.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
@@ -559,7 +559,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
}
|
||||
});
|
||||
artifactCheckBox.setBounds(638, 400, 58, 20);
|
||||
artifactCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) artifactCheckBox.setFont(f);
|
||||
artifactCheckBox.setOpaque(false);
|
||||
artifactCheckBox.addItemListener(new ItemListener() {
|
||||
|
||||
@@ -568,7 +568,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
}
|
||||
});
|
||||
enchantmentCheckBox.setBounds(692, 400, 80, 20);
|
||||
enchantmentCheckBox.setFont(f);
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) enchantmentCheckBox.setFont(f);
|
||||
enchantmentCheckBox.setOpaque(false);
|
||||
enchantmentCheckBox.addItemListener(new ItemListener() {
|
||||
|
||||
@@ -641,7 +641,7 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
picturePanel.setBounds(new Rectangle(765, 372, 239, 338));
|
||||
picturePanel.setLayout(borderLayout1);
|
||||
picturePanel.addMouseListener(new CustomListener());
|
||||
statsLabel.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) statsLabel.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
statsLabel.setText("Total - 0, Creatures - 0 Land - 0");
|
||||
statsLabel.setBounds(new Rectangle(19, 672, 720, 31));
|
||||
//Do not lower statsLabel any lower, we want this to be visible at 1024 x 768 screen size
|
||||
@@ -650,24 +650,24 @@ public class Gui_Quest_DeckEditor extends JFrame implements CardDetail, DeckDisp
|
||||
jScrollPane3.setBounds(new Rectangle(6, 168, 225, 143));
|
||||
jPanel3.setBounds(new Rectangle(7, 21, 224, 141));
|
||||
jPanel3.setLayout(gridLayout1);
|
||||
cdLabel4.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) cdLabel4.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
cdLabel4.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
cdLabel1.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) cdLabel1.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
cdLabel1.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cdLabel2.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) cdLabel2.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
cdLabel2.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
cdLabel3.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) cdLabel3.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
cdLabel3.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
gridLayout1.setColumns(1);
|
||||
gridLayout1.setRows(0);
|
||||
cdLabel5.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) cdLabel5.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
cdLabel5.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
cdTextArea.setFont(new java.awt.Font("Dialog", 0, 12));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) cdTextArea.setFont(new java.awt.Font("Dialog", 0, 12));
|
||||
cdTextArea.setLineWrap(true);
|
||||
cdTextArea.setWrapStyleWord(true);
|
||||
statsLabel2.setBounds(new Rectangle(19, 365, 720, 31));
|
||||
statsLabel2.setText("Total - 0, Creatures - 0 Land - 0");
|
||||
statsLabel2.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
if (!Gui_NewGame.useLAFFonts.isSelected()) statsLabel2.setFont(new java.awt.Font("Dialog", 0, 14));
|
||||
jLabel1.setText("Click on the column name (like name or color) to sort the cards");
|
||||
jLabel1.setBounds(new Rectangle(20, 1, 400, 19));
|
||||
this.getContentPane().add(cardDetailPanel, null);
|
||||
|
||||
@@ -100,6 +100,57 @@ public class Phase extends MyObservable
|
||||
|
||||
AllZone.ManaPool.clear();
|
||||
|
||||
//time vault:
|
||||
if ((is(Constant.Phase.Cleanup, Constant.Player.Human) && humanExtraTurns >= 0 ) ||
|
||||
(is(Constant.Phase.Cleanup, Constant.Player.Computer) && computerExtraTurns >= 0 ) )
|
||||
{
|
||||
String player = getActivePlayer();
|
||||
String opponent = AllZone.GameAction.getOpponent(player);
|
||||
CardList list = CardFactoryUtil.getCards("Time Vault", opponent);
|
||||
list = list.filter(new CardListFilter()
|
||||
{
|
||||
public boolean addCard(Card c)
|
||||
{
|
||||
return c.isTapped();
|
||||
}
|
||||
});
|
||||
|
||||
for (int i=0;i<list.size();i++)
|
||||
{
|
||||
final Card crd = list.get(i);
|
||||
|
||||
/*
|
||||
Ability ability = new Ability(list.get(i), "0")
|
||||
{
|
||||
public void resolve()
|
||||
{
|
||||
String controller = crd.getController();
|
||||
if (controller.equals(Constant.Player.Human))
|
||||
humanExtraTurns--;
|
||||
else
|
||||
computerExtraTurns--;
|
||||
|
||||
crd.untap();
|
||||
}
|
||||
};
|
||||
ability.setStackDescription(crd + " - skip this turn instead, untap Time Vault.");
|
||||
*/
|
||||
|
||||
if (player.equals(Constant.Player.Computer))
|
||||
{
|
||||
String[] choices = { "Yes", "No" };
|
||||
Object q = null;
|
||||
q = AllZone.Display.getChoiceOptional("Untap " + crd + "?", choices);
|
||||
if (q.equals("Yes")) {
|
||||
//AllZone.Stack.add(ability);
|
||||
humanExtraTurns--;
|
||||
crd.untap();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if (getPhase().equals(Constant.Phase.Cleanup) && extraTurns > 0)
|
||||
if ((is(Constant.Phase.Cleanup, Constant.Player.Human) && humanExtraTurns > 0 ) ||
|
||||
(is(Constant.Phase.Cleanup, Constant.Player.Computer) && computerExtraTurns > 0 ) )
|
||||
@@ -115,7 +166,6 @@ public class Phase extends MyObservable
|
||||
|
||||
AllZone.GameAction.setLastPlayerToDraw(opponent);
|
||||
setPhase(Constant.Phase.Untap, player);
|
||||
|
||||
}
|
||||
else if ((is(Constant.Phase.Cleanup, Constant.Player.Computer) && humanExtraTurns < 0 ) ||
|
||||
(is(Constant.Phase.Cleanup, Constant.Player.Human) && computerExtraTurns < 0 ) )
|
||||
|
||||
Reference in New Issue
Block a user