- Milling is a loss condition now (optionally).

- Fixed Emeria Angel (white birds instead of green ones).
- Added Triadasoul's Lobotomy.
This commit is contained in:
jendave
2011-08-06 02:53:43 +00:00
parent 5ec063f052
commit 932f4a2b48
9 changed files with 143 additions and 18 deletions

View File

@@ -18,6 +18,7 @@ forest.jpg http://resources.wizards.com/magic/cards/unh/en-us/card73946.jpg
forest1.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=2748
forest2.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=587
forest3.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=586
lobotomy.jpg http://www.wizards.com/global/images/magic/general/lobotomy.jpg
haunting_echoes.jpg http://www.wizards.com/global/images/magic/general/haunting_echoes.jpg
hedron_crab.jpg http://www.wizards.com/global/images/magic/general/hedron_crab.jpg
daru_encampment.jpg http://www.wizards.com/global/images/magic/general/Daru_Encampment.jpg

View File

@@ -1,3 +1,8 @@
Lobotomy
2 U B
Sorcery
Target player reveals his or her hand, then you choose a card other than a basic land card from it. Search that player's graveyard, hand, and library for all cards with the same name as the chosen card and remove them from the game. Then that player shuffles his or her library.
Haunting Echoes
3 B B
Sorcery

View File

@@ -1,6 +1,6 @@
program/mail=mtgerror@yahoo.com
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26
program/version=MTG Forge -- official beta: 09/11/25, SVN revision: 122
program/version=MTG Forge -- official beta: 09/11/25, SVN revision: 123
tokens--file=AllTokens.txt

View File

@@ -17489,6 +17489,97 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Lobotomy"))
{
final SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = 5338238621454661783L;
public void resolve()
{
Card choice = null;
//check for no cards in hand on resolve
String player = getTargetPlayer();
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
PlayerZone exiled = AllZone.getZone(Constant.Zone.Removed_From_Play, player);
CardList libList = new CardList(lib.getCards());
CardList grvList = new CardList(grave.getCards());
CardList fullHand = new CardList(hand.getCards());
Card[] handChoices = removeLand(hand.getCards());
if(card.getController().equals(Constant.Player.Human))
{
choice = (Card) AllZone.Display.getChoice("Choose", handChoices);
}
else//computer chooses
{
choice = CardUtil.getRandom(handChoices);
}
String chosen = choice.getName();
int max = libList.size();
for (int i=0;i<max;i++)
{
Card c = libList.get(i);
if ( c.getName().equals(chosen))
{ lib.remove(c);
exiled.add(c);
}
}
int grv = grvList.size();
for (int i=0;i<grv;i++)
{
Card c = grvList.get(i);
if ( c.getName().equals(chosen))
{ grave.remove(c);
exiled.add(c);
}
}
int hnd = fullHand.size();
for (int i=0;i<hnd;i++)
{
Card c = fullHand.get(i);
if ( c.getName().equals(chosen))
{ hand.remove(c);
exiled.add(c);
}
}
}//resolve()
public boolean canPlayAI()
{
Card[] c = removeLand(AllZone.Human_Hand.getCards());
return 0 < c.length;
}
Card[] removeLand(Card[] in)
{
CardList c = new CardList(in);
c = c.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
return !c.getType().contains("Basic");
}
});
return c.toArray();
}//removeLand()
};//SpellAbility spell
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
card.clearSpellAbility();
card.addSpellAbility(spell);
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found
if (hasKeyword(card, "Cycling") != -1)

View File

@@ -18,7 +18,8 @@ public interface Constant {
public static final Deck[] ComputerDeck = new Deck[1];
public static final String[] GameType = new String[1];
public static final WinLose WinLose = new WinLose();
public static final boolean[] smooth = new boolean[1];
public static final boolean[] Smooth = new boolean[1];
public static final boolean[] Mill = new boolean[1];
public static final int[] width = new int[1];
public static final int[] height = new int[1];

View File

@@ -684,7 +684,6 @@ private Card getCurrentCard(int ID)
public void drawCard(String player)
{
//TODO: show that milled player looses
boolean isDrawPhase = AllZone.Phase.getPhase().equals(Constant.Phase.Draw);
if(isDrawPhase){
@@ -712,6 +711,21 @@ private Card getCurrentCard(int ID)
GameActionUtil.executeDrawCardTriggeredEffects(player);
}
if(library.size() != 0)
{
Card c = library.get(0);
library.remove(0);
hand.add(c);
GameActionUtil.executeDrawCardTriggeredEffects(player);
}
//lose:
else if (Constant.Runtime.Mill[0])
{
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.setLife(0);
}
}
//is this card a permanent that is in play?
@@ -881,7 +895,7 @@ private Card getCurrentCard(int ID)
this.shuffle(Constant.Player.Human);
//do this instead of shuffling Computer's deck
boolean smoothLand = Constant.Runtime.smooth[0];
boolean smoothLand = Constant.Runtime.Smooth[0];
if(smoothLand)
{

View File

@@ -1546,14 +1546,13 @@ public class GameActionUtil
{
Card card = new Card();
card.setName("Bird");
card.setImageName("W 1 1 Bird");
card.setOwner(crd.getController());
card.setController(crd.getController());
card.setManaCost("G");
card.setManaCost("W");
card.setToken(true);
card.addType("Creature");

View File

@@ -78,6 +78,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
private TitledBorder titledBorder2;
private static JCheckBox newGuiCheckBox = new JCheckBox("", true);
private static JCheckBox smoothLandCheckBox = new JCheckBox("", true);
private static JCheckBox millLoseCheckBox = new JCheckBox("", true);
// GenerateConstructedDeck.get2Colors() and GenerateSealedDeck.get2Colors()
// use these two variables
@@ -168,7 +169,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
Dimension screen = getToolkit().getScreenSize();
Rectangle bounds = getBounds();
bounds.width = 460;
bounds.height = 560;
bounds.height = 610;
bounds.x = (screen.width - bounds.width) / 2;
bounds.y = (screen.height - bounds.height) / 2;
setBounds(bounds);
@@ -276,7 +277,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
deckEditorButton_actionPerformed(e);
}
});
startButton.setBounds(new Rectangle(159, 375, 139, 54));
startButton.setBounds(new Rectangle(159, 410, 139, 54));
startButton.setFont(new java.awt.Font("Dialog", 0, 18));
startButton.setHorizontalTextPosition(SwingConstants.LEADING);
startButton.setText("Start Game");
@@ -312,16 +313,18 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
}
});
jPanel1.setBorder(BorderFactory.createEtchedBorder());
jPanel1.setBounds(new Rectangle(10, 209, 425, 150));
jPanel1.setBounds(new Rectangle(10, 209, 425, 190));
jPanel1.setLayout(null);
newGuiCheckBox.setText("Resizable Game Area");
newGuiCheckBox.setBounds(new Rectangle(159, 305, 164, 25));
newGuiCheckBox.setBounds(new Rectangle(140, 305, 164, 25));
//newGuiCheckBox.setSelected(true);
smoothLandCheckBox.setText("Stack AI land");
smoothLandCheckBox.setBounds(new Rectangle(159, 330, 165, 25));
smoothLandCheckBox.setBounds(new Rectangle(140, 330, 165, 25));
//smoothLandCheckBox.setSelected(true);
millLoseCheckBox.setText("Milling = Loss Condition");
millLoseCheckBox.setBounds(new Rectangle(140, 355, 165, 25));
questButton.setBounds(new Rectangle(137, 435, 187, 53));
questButton.setBounds(new Rectangle(137, 470, 187, 53));
questButton.setFont(new java.awt.Font("Dialog", 0, 18));
questButton.setText("Quest Mode");
@@ -334,6 +337,7 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
this.getContentPane().add(startButton, null);
this.getContentPane().add(newGuiCheckBox, null);
this.getContentPane().add(smoothLandCheckBox, null);
this.getContentPane().add(millLoseCheckBox, null);
this.getContentPane().add(questButton, null);
this.getContentPane().add(jPanel2, null);
jPanel2.add(singleRadioButton, null);
@@ -450,11 +454,21 @@ public class Gui_NewGame extends JFrame implements NewConstants, NewConstants.LA
//DO NOT CHANGE THIS ORDER, GuiDisplay needs to be created before cards are added
if(newGuiCheckBox.isSelected()) AllZone.Display = new GuiDisplay3();
else AllZone.Display = new GuiDisplay2();
if(newGuiCheckBox.isSelected())
AllZone.Display = new GuiDisplay3();
else
AllZone.Display = new GuiDisplay2();
if(smoothLandCheckBox.isSelected())
Constant.Runtime.Smooth[0] = true;
else
Constant.Runtime.Smooth[0] = false;
if(millLoseCheckBox.isSelected())
Constant.Runtime.Mill[0] = true;
else
Constant.Runtime.Mill[0] = false;
if(smoothLandCheckBox.isSelected()) Constant.Runtime.smooth[0] = true;
else Constant.Runtime.smooth[0] = false;
AllZone.GameAction.newGame(Constant.Runtime.HumanDeck[0], Constant.Runtime.ComputerDeck[0]);
AllZone.Display.setVisible(true);

View File

@@ -219,8 +219,8 @@ public class Gui_Quest extends JFrame {
if(resizeCheckbox.isSelected()) AllZone.Display = new GuiDisplay3();
else AllZone.Display = new GuiDisplay2();
if(smoothLandCheckBox.isSelected()) Constant.Runtime.smooth[0] = true;
else Constant.Runtime.smooth[0] = false;
if(smoothLandCheckBox.isSelected()) Constant.Runtime.Smooth[0] = true;
else Constant.Runtime.Smooth[0] = false;
AllZone.GameAction.newGame(human, computer);
AllZone.Display.setVisible(true);