- More cleanup.

- Added Whimwader.
This commit is contained in:
jendave
2011-08-06 12:52:45 +00:00
parent 801e42fdf3
commit 13a2f48c09
6 changed files with 26 additions and 95 deletions

1
.gitattributes vendored
View File

@@ -5312,6 +5312,7 @@ res/cardsfolder/western_paladin.txt -text svneol=native#text/plain
res/cardsfolder/wheel_and_deal.txt -text svneol=native#text/plain res/cardsfolder/wheel_and_deal.txt -text svneol=native#text/plain
res/cardsfolder/wheel_of_fortune.txt -text svneol=native#text/plain res/cardsfolder/wheel_of_fortune.txt -text svneol=native#text/plain
res/cardsfolder/wheel_of_torture.txt -text svneol=native#text/plain res/cardsfolder/wheel_of_torture.txt -text svneol=native#text/plain
res/cardsfolder/whimwader.txt -text svneol=native#text/plain
res/cardsfolder/whip_sergeant.txt -text svneol=native#text/plain res/cardsfolder/whip_sergeant.txt -text svneol=native#text/plain
res/cardsfolder/whip_spine_drake.txt -text svneol=native#text/plain res/cardsfolder/whip_spine_drake.txt -text svneol=native#text/plain
res/cardsfolder/whipcorder.txt -text svneol=native#text/plain res/cardsfolder/whipcorder.txt -text svneol=native#text/plain

View File

@@ -2,7 +2,7 @@ Name:Imperial Edict
ManaCost:1 B ManaCost:1 B
Types:Sorcery Types:Sorcery
Text:no text Text:no text
A:SP$Sacrifice | Cost$ 1 B | ValidTgts$ Opponent | SacValid$ Creature | SacMessage$ Creature | SpellDescription$ Target player sacrifices a creature. A:SP$Sacrifice | Cost$ 1 B | ValidTgts$ Opponent | SacValid$ Creature | SacMessage$ Creature | SpellDescription$ Target opponent sacrifices a creature.
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/imperial_edict.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/imperial_edict.jpg
SetInfo:POR|Common|http://magiccards.info/scans/en/p3k/77.jpg SetInfo:POR|Common|http://magiccards.info/scans/en/p3k/77.jpg

View File

@@ -2,7 +2,7 @@ Name:Slave of Bolas
ManaCost:3 UR B ManaCost:3 UR B
Types:Sorcery Types:Sorcery
Text:no text Text:no text
A:SP$GainControl|Cost$3 UR B|Tgt$TgtC|Untap$True|AddKWs$Haste & At the beginning of the end step, sacrifice CARDNAME. |SpellDescription$Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. A:SP$GainControl | Cost$ 3 UR B | Tgt$ TgtC | Untap$ True | AddKWs$ Haste & HIDDEN At the beginning of the end step, sacrifice CARDNAME. |SpellDescription$ Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/slave_of_bolas.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/slave_of_bolas.jpg

View File

@@ -0,0 +1,9 @@
Name:Whimwader
ManaCost:4 U
Types:Creature Elemental
Text:no text
PT:6/4
K:CARDNAME can't attack unless defending player controls a blue permanent.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/whimwader.jpg
End

View File

@@ -6525,7 +6525,6 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Stitch Together")) { else if(cardName.equals("Stitch Together")) {
@@ -6623,95 +6622,6 @@ public class CardFactory_Sorceries {
spell.setBeforePayMana(target); spell.setBeforePayMana(target);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
/*
//*************** START *********** START **************************
else if (cardName.equals("Natural Order")){
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -6598323179507468746L;
@Override
public void resolve() {
Player controller = card.getController();
PlayerZone battlezone = AllZone.getZone(Constant.Zone.Play, controller);
PlayerZone library = AllZone.getZone(Constant.Zone.Library, controller);
CardList list = new CardList(library.getCards());
list = list.getType("Creature").getColor("G");
if(list.size() == 0) return;
if(controller.equals(AllZone.HumanPlayer)) {
Card c = AllZone.Display.getChoiceOptional("Choose a green creature", list.toArray());
if(c != null) {
list.remove(c);
library.remove(c);
battlezone.add(c);
}//if
} else {
CardList greenlist = new CardList(library.getCards());
greenlist = greenlist.getType("Creature").getColor("G");
Card c = CardFactoryUtil.AI_getBestCreature(greenlist);
if(c != null) {
list.remove(c);
library.remove(c);
battlezone.add(c);
}//if
}
} // resolve
public void chooseTargetAI() {
Card target = null;
target = CardFactoryUtil.AI_getWorstCreature(new CardList(AllZone.getZone(Constant.Zone.Play, AllZone.ComputerPlayer).getCards()));
setTargetCard(target);
AllZone.GameAction.sacrifice(getTargetCard());
}//chooseTargetAI()
public boolean canPlayAI()
{
PlayerZone library = AllZone.getZone(Constant.Zone.Library, AllZone.ComputerPlayer);
CardList list = new CardList(library.getCards());
list = list.getType("Creature").getColor("G");
PlayerZone inPlay = AllZone.getZone(Constant.Zone.Play, AllZone.ComputerPlayer);
CardList listInPlay = new CardList(inPlay.getCards());
listInPlay = listInPlay.getType("Creature").getColor("G");
Card inPlayCreature = CardFactoryUtil.AI_getWorstCreature(new CardList(AllZone.getZone(Constant.Zone.Play, AllZone.ComputerPlayer).getCards()));
Card inLibraryCreature = CardFactoryUtil.AI_getBestCreature(new CardList(AllZone.getZone(Constant.Zone.Library, AllZone.ComputerPlayer).getCards()));
return (list.size() > 0) && (listInPlay.size() > 0) && (inPlayCreature.getNetAttack() < inLibraryCreature.getNetAttack());
}
};//SpellAbility
Input runtime = new Input() {
private static final long serialVersionUID = -7551607354431165941L;
@Override
public void showMessage() {
Player player = card.getController();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
CardList choice = new CardList(play.getCards());
choice = choice.getType("Creature").getColor("G");
boolean free = false;
if (this.isFree())
free = true;
if (player.equals(AllZone.HumanPlayer)) {
stopSetNext(CardFactoryUtil.input_sacrifice(spell, choice, "Select a green creature to sacrifice.", free));
}
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
spell.setBeforePayMana(runtime);
} //*************** END ************ END **************************
*/
//*************** START ********** START ************************* //*************** START ********** START *************************
else if (cardName.equals("Destructive Force") || cardName.equals("Wildfire")) else if (cardName.equals("Destructive Force") || cardName.equals("Wildfire"))
@@ -6923,6 +6833,7 @@ public class CardFactory_Sorceries {
spell.setStackDescription(sb.toString()); spell.setStackDescription(sb.toString());
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Ashes to Ashes")) { else if(cardName.equals("Ashes to Ashes")) {
final Card[] target = new Card[2]; final Card[] target = new Card[2];
@@ -7020,7 +6931,6 @@ public class CardFactory_Sorceries {
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Take Possession")) { else if(cardName.equals("Take Possession")) {
final SpellAbility spell = new Spell(card) { final SpellAbility spell = new Spell(card) {
@@ -7209,6 +7119,7 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}// *************** END ************ END ************************** }// *************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Last Stand")) { else if(cardName.equals("Last Stand")) {
/* /*
@@ -7270,6 +7181,7 @@ public class CardFactory_Sorceries {
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell)); spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Overwhelming Stampede")) { else if(cardName.equals("Overwhelming Stampede")) {
/* /*
@@ -7332,6 +7244,7 @@ public class CardFactory_Sorceries {
card.setSVar("PlayMain1", "TRUE"); card.setSVar("PlayMain1", "TRUE");
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Winds of Change")) { else if(cardName.equals("Winds of Change")) {
/* /*
@@ -7378,6 +7291,7 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Nature's Resurgence")) { else if(cardName.equals("Nature's Resurgence")) {
/* /*
@@ -7405,6 +7319,7 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("All Hallow's Eve")) { else if(cardName.equals("All Hallow's Eve")) {
/* /*
@@ -7505,6 +7420,7 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Death Cloud")) { else if(cardName.equals("Death Cloud")) {
/* /*
@@ -7551,6 +7467,7 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Channel")) { else if(cardName.equals("Channel")) {
/* /*

View File

@@ -298,11 +298,10 @@ public class CombatUtil {
if(AllZoneUtil.isCardInPlay("Peacekeeper")) return false; if(AllZoneUtil.isCardInPlay("Peacekeeper")) return false;
if(AllZoneUtil.isCardInPlay("Moat") || AllZoneUtil.isCardInPlay("Magus of the Moat") if((AllZoneUtil.isCardInPlay("Moat") || AllZoneUtil.isCardInPlay("Magus of the Moat"))
&& !c.getKeyword().contains("Flying")) return false; && !c.getKeyword().contains("Flying")) return false;
// CARDNAME can't attack if defending player controls an untapped creature with power ... // CARDNAME can't attack if defending player controls an untapped creature with power ...
final int powerLimit[] = {0}; final int powerLimit[] = {0};
int keywordPosition = 0; int keywordPosition = 0;
boolean hasKeyword = false; boolean hasKeyword = false;
@@ -355,6 +354,11 @@ public class CombatUtil {
temp = list.getType("Forest"); temp = list.getType("Forest");
if(temp.isEmpty()) return false; if(temp.isEmpty()) return false;
} }
if(c.getKeyword().contains("CARDNAME can't attack unless defending player controls a blue permanent.")) {
temp = list.getColor("Blue");
if(temp.isEmpty()) return false;
}
if(c.getName().equals("Harbor Serpent")) { if(c.getName().equals("Harbor Serpent")) {
CardList allislands = AllZoneUtil.getTypeInPlay("Island"); CardList allislands = AllZoneUtil.getTypeInPlay("Island");