Added Spreading Seas (A bit dodgy), Chalice of the Void, Teferi's Puzzle Box and Cruel Ultimatum.

This commit is contained in:
jendave
2011-08-06 04:47:10 +00:00
parent 6d4aaf8a05
commit 54253eaba3
7 changed files with 393 additions and 5 deletions

View File

@@ -38,6 +38,10 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
spreading_seas.jpg http://www.wizards.com/global/images/magic/general/spreading_seas.jpg
chalice_of_the_void.jpg http://www.wizards.com/global/images/magic/general/chalice_of_the_void.jpg
teferis_puzzle_box.jpg http://www.wizards.com/global/images/magic/general/teferis_puzzle_box.jpg
cruel_ultimatum.jpg http://www.wizards.com/global/images/magic/general/cruel_ultimatum.jpg
steppe_lynx.jpg http://www.wizards.com/global/images/magic/general/steppe_lynx.jpg steppe_lynx.jpg http://www.wizards.com/global/images/magic/general/steppe_lynx.jpg
omnath_locus_of_mana.jpg http://www.wizards.com/global/images/magic/general/omnath_locus_of_mana.jpg omnath_locus_of_mana.jpg http://www.wizards.com/global/images/magic/general/omnath_locus_of_mana.jpg
implements_of_sacrifice.jpg http://www.wizards.com/global/images/magic/general/implements_of_sacrifice.jpg implements_of_sacrifice.jpg http://www.wizards.com/global/images/magic/general/implements_of_sacrifice.jpg

View File

@@ -1,3 +1,25 @@
Spreading Seas
1 U
Enchantment Aura
Enchanted land is an Island.
Enchant land
When CARDNAME enters the battlefield, draw a card.
Chalice of the Void
X X 0
Artifact
Chalice of the Void enters the battlefield with X charge counters on it. Whenever a player casts a spell with converted mana cost equal to the number of charge counters on Chalice of the Void, counter that spell.
Teferi's Puzzle Box
4
Artifact
At the beginning of each player's draw step, that player puts the cards in his or her hand on the bottom of his or her library in any order, then draws that many cards.
Cruel Ultimatum
U U B B B R R
Sorcery
Target opponent sacrifices a creature, discards three cards, then loses 5 life. You return a creature card from your graveyard to your hand, draw three cards, then gain 5 life.
Omnath, Locus of Mana Omnath, Locus of Mana
2 G 2 G
Legendary Creature Elemental Legendary Creature Elemental

View File

@@ -17,8 +17,8 @@ abstract public class Ability extends SpellAbility {
@Override @Override
public boolean canPlay() { public boolean canPlay() {
// if(getSourceCard().isCreature() && (!getSourceCard().hasSickness())) // if(getSourceCard().isCreature() && (!getSourceCard().hasSickness()))
return AllZone.GameAction.isCardInPlay(getSourceCard()) && !getSourceCard().isFaceDown(); return AllZone.GameAction.isCardInPlay(getSourceCard()) && !getSourceCard().isFaceDown() && getSourceCard().getName().equals("Spreading Seas") == false; // For Spreading Seas
// return false; // return false;
} }
} }

View File

@@ -7507,6 +7507,141 @@ public class CardFactory implements NewConstants {
card.clearSpellAbility(); card.clearSpellAbility();
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Cruel Ultimatum")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -6598023699468746L;
@Override
public void resolve() {
// Opponent Sacrifices Creature
String player = card.getController();
AllZone.Display.showMessage("Sacrifice a Creature: ");
ButtonUtil.enableOnlyCancel();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, AllZone.GameAction.getOpponent(card.getController()));
CardList creature2 = new CardList();
creature2.addAll(play.getCards());
creature2 = creature2.getType("Creature");
if(player != "Human"){
if(creature2.size() > 0) {
Card[] Target = new Card[creature2.size()];
for(int i = 0; i < creature2.size(); i++) {
Card crd = creature2.get(i);
Target[i] = crd;
}
Object check = AllZone.Display.getChoice("Select creature", Target);
if(check != null) {
setTargetCard((Card) check);
}
}
} else {
if(creature2.size() > 0) {
Card smallest = creature2.get(0);
for(int i = 0; i < creature2.size(); i++)
if(smallest.getNetAttack() < creature2.get(i).getNetAttack()) smallest = creature2.get(i);
setTargetCard(smallest);
}
}
Card c = getTargetCard();
AllZone.GameAction.sacrifice(c);
// Opponent Discards 3 Cards
PlayerZone Ohand = AllZone.getZone(Constant.Zone.Hand, AllZone.GameAction.getOpponent(card.getController()));
Card h[] = Ohand.getCards();
Card[] handChoices = Ohand.getCards();
int Handsize = 3;
if(h.length <= 3) Handsize = h.length;
String opponent = AllZone.GameAction.getOpponent(card.getController());
Card choice = null;
for(int i = 0; i < Handsize; i++) {
AllZone.Display.showMessage("Select a card to discard " + (3 - i) + " more to discard");
ButtonUtil.enableOnlyCancel();
handChoices = Ohand.getCards();
//human chooses
if(opponent.equals(Constant.Player.Human)) {
choice = AllZone.Display.getChoice("Choose", handChoices);
} else//computer chooses
{
choice = CardUtil.getRandom(handChoices);
}
AllZone.GameAction.discard(choice);
}
// Opponent Loses 5 Life
PlayerLife target = AllZone.GameAction.getPlayerLife(opponent);
target.subtractLife(5);
// Player Returns Creature Card from Graveyard to Hand
if(player == "Human") {
AllZone.Display.showMessage("Return a creature from your graveyard to your hand: ");
ButtonUtil.enableOnlyCancel();
}
CardList creature = new CardList();
PlayerZone zone = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
if(zone != null) {
creature.addAll(zone.getCards());
creature = creature.getType("Creature");
if(player == "Human"){
Card[] Target = new Card[creature.size()];
for(int i = 0; i < creature.size(); i++) {
Card crd = creature.get(i);
Target[i] = crd;
}
Object check = AllZone.Display.getChoiceOptional("Select creature", Target);
if(check != null) {
setTargetCard((Card) check);
}
} else {
Card biggest = creature.get(0);
for(int i = 0; i < creature.size(); i++)
if(biggest.getNetAttack() < creature.get(i).getNetAttack()) biggest = creature.get(i);
setTargetCard(biggest);
}
Card c2 = getTargetCard();
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
if(AllZone.GameAction.isCardInZone(c2, grave)) {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
AllZone.GameAction.moveTo(hand, c2);
}
}
// Player Draws 3 Cards
for(int i = 0; i < 3; i++) {
AllZone.GameAction.drawCard(card.getController());
}
// Player Gains 5 Life
PlayerLife playerlife = AllZone.GameAction.getPlayerLife(card.getController());
playerlife.addLife(5);
} // Resolve
public boolean canPlayAI() {
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerLife target = AllZone.GameAction.getPlayerLife(opponent);
PlayerZone Lib = AllZone.getZone(Constant.Zone.Library, card.getController());
CardList Deck = new CardList();
Deck.addAll(Lib.getCards());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, AllZone.GameAction.getOpponent(card.getController()));
CardList creature = new CardList();
creature.addAll(play.getCards());
creature = creature.getType("Creature");
PlayerZone zone = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
CardList creature2 = new CardList();
creature2.addAll(zone.getCards());
creature2 = creature2.getType("Creature");
return (Deck.size() > 2 && (target.getLife() <= 5 || (creature.size() > 0 && creature2.size() > 0)));
}
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Tendrils of Agony")) { else if(cardName.equals("Tendrils of Agony")) {
SpellAbility spell = new Spell(card) { SpellAbility spell = new Spell(card) {
@@ -13933,6 +14068,19 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Chalice of the Void")) {
Command intoPlay = new Command() {
private static final long serialVersionUID = -7679939432259603542L;
public void execute() {
int XCounters = card.getXManaCostPaid();
card.addCounter(Counters.CHARGE, XCounters);
}
};
card.addComesIntoPlayCommand(intoPlay);
}
//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Counterbalance")) { else if(cardName.equals("Counterbalance")) {

View File

@@ -5,6 +5,8 @@ package forge;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import javax.swing.JOptionPane;
class CardFactory_Auras { class CardFactory_Auras {
@@ -605,6 +607,144 @@ class CardFactory_Auras {
}; };
spell.setBeforePayMana(runtime); spell.setBeforePayMana(runtime);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Spreading Seas")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 53941812202244498L;
@Override
public boolean canPlayAI() {
CardList list = new CardList(AllZone.Human_Play.getCards());
list = list.getType("Land");
if(list.isEmpty()) return false;
setTargetCard(list.get(0));
return true;
}//canPlayAI()
@Override
public void resolve() {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(card);
Card c = getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) card.enchantCard(c);
}//resolve()
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
Command onEnchant = new Command() {
private static final long serialVersionUID = 3528675502863241126L;
public void execute() {
if(card.isEnchanting()) {
Card crd = card.getEnchanting().get(0);
crd.removeType("Swamp");
crd.removeType("Forest");
crd.removeType("Island");
crd.removeType("Plains");
crd.removeType("Mountain");
crd.addType("Island");
SpellAbility[] Abilities = crd.getSpellAbility();
for(int i = 0; i < Abilities.length; i++) {
card.addSpellAbility(Abilities[i]);
}
crd.clearSpellAbility();
crd.addSpellAbility(new Ability_Mana(card, "tap: add U") {
private static final long serialVersionUID = 787103012484588884L;
});
}
}//execute()
};//Command
Command onUnEnchant = new Command() {
private static final long serialVersionUID = -2021446345291180334L;
public void execute() {
if(card.isEnchanting()) {
Card crd = card.getEnchanting().get(0);
ArrayList<Card> Seas = crd.getEnchantedBy();
int Count = 0;
for(int i = 0; i < Seas.size(); i++) {
if(Seas.get(i).getName().equals("Spreading Seas")) Count = Count + 1;
}
if(Count == 1) {
crd.removeType("Island");
crd.removeType("Land");
crd.removeType("Basic");
crd.removeType("Snow");
crd.removeType("Legendary");
crd.clearSpellAbility();
Card c = AllZone.CardFactory.copyCard(crd);
ArrayList<String> Types = c.getType();
SpellAbility[] Abilities = card.getSpellAbility();
for(int i = 0; i < Types.size(); i++) {
crd.addType(Types.get(i));
}
for(int i = 0; i < Abilities.length; i++) {
crd.addSpellAbility(Abilities[i]);
}
JOptionPane.showMessageDialog(null, Abilities, "", JOptionPane.INFORMATION_MESSAGE);
// Restoring the card gives it the abilities from the copied card. This card is not in play and has no counters and thus the Dark Depths Error
}
}
}//execute()
};//Command
Command onLeavesPlay = new Command() {
private static final long serialVersionUID = -4543302260602460839L;
public void execute() {
if(card.isEnchanting()) {
Card crd = card.getEnchanting().get(0);
card.unEnchantCard(crd);
}
}
};
card.addEnchantCommand(onEnchant);
card.addUnEnchantCommand(onUnEnchant);
card.addLeavesPlayCommand(onLeavesPlay);
Input runtime = new Input() {
private static final long serialVersionUID = -6237279587146079880L;
@Override
public void showMessage() {
PlayerZone comp = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
PlayerZone hum = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
CardList land = new CardList();
land.addAll(comp.getCards());
land.addAll(hum.getCards());
land = land.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isLand();
}
});
stopSetNext(CardFactoryUtil.input_targetSpecific(spell, land, "Select target land", true,
false));
}
};
spell.setBeforePayMana(runtime);
}//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Cursed Land")) { else if(cardName.equals("Cursed Land")) {

View File

@@ -1250,7 +1250,7 @@ class CardFactory_Lands {
if(sa.getSourceCard().equals(card)) return false; if(sa.getSourceCard().equals(card)) return false;
} }
if(card.getCounters(Counters.ICE) > 0 && AllZone.GameAction.isCardInPlay(card)) return true; if(card.getCounters(Counters.ICE) > 0 && AllZone.GameAction.isCardInPlay(card) && card.isEnchantedBy("Spreading Seas") == false) return true; // Dodgy Fix to Spreading Seas
else return false; else return false;
} }
@@ -1278,7 +1278,7 @@ class CardFactory_Lands {
//TODO - this should probably be a state effect //TODO - this should probably be a state effect
@Override @Override
public boolean canPlay() { public boolean canPlay() {
return card.getCounters(Counters.ICE) == 0 && AllZone.GameAction.isCardInPlay(card); return card.getCounters(Counters.ICE) == 0 && AllZone.GameAction.isCardInPlay(card)&& card.isEnchantedBy("Spreading Seas") == false; // Dodgy Fix to Spreading Seas
} }
@Override @Override

View File

@@ -109,6 +109,7 @@ public class GameActionUtil {
// cause black vise to do an extra point of // cause black vise to do an extra point of
// damage if black vise was in play // damage if black vise was in play
upkeep_Font_of_Mythos(); upkeep_Font_of_Mythos();
upkeep_Teferi_Puzzle_Box();
upkeep_Overbeing_of_Myth(); upkeep_Overbeing_of_Myth();
upkeep_AI_Aluren(); // experimental, just have the AI dump his small upkeep_AI_Aluren(); // experimental, just have the AI dump his small
@@ -263,6 +264,7 @@ public class GameActionUtil {
playCard_Storm(c); playCard_Storm(c);
playCard_Dovescape(c); //keep this one top playCard_Dovescape(c); //keep this one top
playCard_Chalice_of_the_Void(c);
playCard_Vengevine(c); playCard_Vengevine(c);
playCard_Demigod_of_Revenge(c); playCard_Demigod_of_Revenge(c);
playCard_Halcyon_Glaze(c); playCard_Halcyon_Glaze(c);
@@ -270,7 +272,7 @@ public class GameActionUtil {
playCard_Infernal_Kirin(c); playCard_Infernal_Kirin(c);
playCard_Cloudhoof_Kirin(c); playCard_Cloudhoof_Kirin(c);
playCard_Bounteous_Kirin(c); playCard_Bounteous_Kirin(c);
playCard_Emberstrike_Duo(c); playCard_Emberstrike_Duo(c);
playCard_Gravelgill_Duo(c); playCard_Gravelgill_Duo(c);
playCard_Safehold_Duo(c); playCard_Safehold_Duo(c);
playCard_Tattermunge_Duo(c); playCard_Tattermunge_Duo(c);
@@ -1095,7 +1097,33 @@ public class GameActionUtil {
}//Gravelgill Duo }//Gravelgill Duo
public static void playCard_Chalice_of_the_Void(Card c) {
CardList list = AllZoneUtil.getCardsInPlay();
list = list.getName("Chalice of the Void");
if(list.size() > 0) {
for(int i = 0; i < list.size(); i++) {
final Card card = list.get(i);
final SpellAbility sa = AllZone.Stack.peek();
Ability ability2 = new Ability(card, "0") {
@Override
public void resolve() {
AllZone.Stack.pop();
AllZone.GameAction.moveToGraveyard(sa.getSourceCard());
}
}; // ability2
ability2.setStackDescription(card.getName() + " - " + c.getController()
+ " played a spell with same amount of charge counters on Chalice of the Void. The spell is countered");
int convertedManaSpell = CardUtil.getConvertedManaCost(sa.getSourceCard().getManaCost());
if(sa.isSpell() == true && card.getCounters(Counters.CHARGE) == convertedManaSpell) AllZone.Stack.add(ability2);
}
}//if
} // Chalice_of_the_Void
public static void playCard_Safehold_Duo(Card c) { public static void playCard_Safehold_Duo(Card c) {
final String controller = c.getController(); final String controller = c.getController();
@@ -8390,6 +8418,52 @@ public class GameActionUtil {
AllZone.GameAction.drawCard(player); AllZone.GameAction.drawCard(player);
} }
}// upkeep_Font_of_Mythos() }// upkeep_Font_of_Mythos()
private static void upkeep_Teferi_Puzzle_Box() {
final String player = AllZone.Phase.getActivePlayer();
CardList list = new CardList();
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.getName("Teferi's Puzzle Box");
PlayerZone Playerhand = AllZone.getZone(Constant.Zone.Hand, player);
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
CardList hand = new CardList();
Card[] handlist = null;
if(list.size() > 0) {
AllZone.Display.showMessage("Shuffle cards back into your library: ");
ButtonUtil.enableOnlyCancel();
AllZone.GameAction.drawCard(player); // Player draws a card in the draw phase before this card activates
hand.addAll(Playerhand.getCards());
int Count = hand.size();
for(int i = 0; i < list.size(); i++) {
if(player == "Human") {
for(int e = 0; e < Count; e++) {
if(hand.size() == 0) hand.addAll(Playerhand.getCards());
handlist = hand.toArray();
Object check = AllZone.Display.getChoice("Select card to put on bottom of library", handlist);
if(check != null) {
Card target = ((Card) check);
hand.remove(target);
AllZone.GameAction.moveTo(lib, target);
}
}
}else {
for(int x = 0; x < hand.size(); x++) hand.remove(hand.get(x));
hand.addAll(Playerhand.getCards());
for(int e = 0; e < hand.size(); e++) {
AllZone.GameAction.moveTo(lib, hand.get(e));
}
}
if(i == list.size() - 1) Count = Count - 1; // To remove the effect of the initial hack draw
for(int d = 0; d < Count; d++) {
AllZone.GameAction.drawCard(player);
}
}
}
}// Teferi_Puzzle_Box
private static void upkeep_Overbeing_of_Myth() { private static void upkeep_Overbeing_of_Myth() {
final String player = AllZone.Phase.getActivePlayer(); final String player = AllZone.Phase.getActivePlayer();