- Hopefully the AI will lose right away now after losing life into lethal levels from Phyr?\127exian Arena.

- Made a fix on Kiki-Jiki, Mirror Breaker: if it uses its ability on a stolen creature (Control Magic, Sower etc.), "leavesPlay triggers" should affect the correct player now (e.g. Meadowboon).
- Fixed Sower of Temptation: its ability will now trigger as it enters the battlefield. This allows for comboing with cards like Kiki-Jiki, Mirror Breaker.
- Added some new Worldwake cards: Avenger of Zendikar and Bestial Menace.
This commit is contained in:
jendave
2011-08-06 03:18:59 +00:00
parent 9ee2e83490
commit 35c06ce201
6 changed files with 372 additions and 99 deletions

View File

@@ -1,3 +1,15 @@
Avenger of Zendikar
5 G G
Creature Elemental
When Avenger of Zendikar enters the battlefield, put a 0/1 green Plant creature token onto the battlefield for each land you control. Landfall - Whenever a land enters the battlefield under your control, you may put a +1/+1 counter on each Plant creature you control.
5/5
Landfall
Bestial Menace
3 G G
Sorcery
Put a 1/1 green Snake creature token, a 2/2 green Wolf creature token, and a 3/3 green Elephant creature token onto the battlefield.
Doubling Season
4 G
Enchantment

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_17" class="java.beans.XMLDecoder">
<java version="1.6.0_18" class="java.beans.XMLDecoder">
<object id="MultiSplitLayout$Split0" class="org.jdesktop.swingx.MultiSplitLayout$Split">
<void property="bounds">
<object class="java.awt.Rectangle">
@@ -16,7 +16,7 @@
<object class="java.awt.Rectangle">
<int>0</int>
<int>0</int>
<int>245</int>
<int>249</int>
<int>827</int>
</object>
</void>
@@ -27,8 +27,8 @@
<object class="java.awt.Rectangle">
<int>0</int>
<int>0</int>
<int>245</int>
<int>128</int>
<int>249</int>
<int>125</int>
</object>
</void>
<void property="name">
@@ -47,8 +47,8 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>128</int>
<int>245</int>
<int>125</int>
<int>249</int>
<int>10</int>
</object>
</void>
@@ -62,9 +62,9 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>138</int>
<int>245</int>
<int>192</int>
<int>135</int>
<int>249</int>
<int>189</int>
</object>
</void>
<void property="name">
@@ -83,8 +83,8 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>330</int>
<int>245</int>
<int>324</int>
<int>249</int>
<int>10</int>
</object>
</void>
@@ -98,9 +98,9 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>340</int>
<int>245</int>
<int>109</int>
<int>334</int>
<int>249</int>
<int>106</int>
</object>
</void>
<void property="name">
@@ -119,8 +119,8 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>449</int>
<int>245</int>
<int>440</int>
<int>249</int>
<int>10</int>
</object>
</void>
@@ -134,9 +134,9 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>459</int>
<int>245</int>
<int>103</int>
<int>450</int>
<int>249</int>
<int>100</int>
</object>
</void>
<void property="name">
@@ -155,8 +155,8 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>562</int>
<int>245</int>
<int>550</int>
<int>249</int>
<int>10</int>
</object>
</void>
@@ -170,9 +170,9 @@
<void property="bounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>572</int>
<int>245</int>
<int>255</int>
<int>560</int>
<int>249</int>
<int>267</int>
</object>
</void>
<void property="name">
@@ -202,7 +202,7 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>245</int>
<int>249</int>
<int>0</int>
<int>10</int>
<int>827</int>
@@ -217,9 +217,9 @@
<object id="MultiSplitLayout$Split2" class="org.jdesktop.swingx.MultiSplitLayout$Split">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>259</int>
<int>0</int>
<int>899</int>
<int>863</int>
<int>827</int>
</object>
</void>
@@ -228,10 +228,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>259</int>
<int>0</int>
<int>899</int>
<int>149</int>
<int>863</int>
<int>146</int>
</object>
</void>
<void property="name">
@@ -249,9 +249,9 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>149</int>
<int>899</int>
<int>259</int>
<int>146</int>
<int>863</int>
<int>10</int>
</object>
</void>
@@ -264,10 +264,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>159</int>
<int>899</int>
<int>159</int>
<int>259</int>
<int>156</int>
<int>863</int>
<int>147</int>
</object>
</void>
<void property="name">
@@ -285,9 +285,9 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>318</int>
<int>899</int>
<int>259</int>
<int>303</int>
<int>863</int>
<int>10</int>
</object>
</void>
@@ -300,10 +300,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>328</int>
<int>899</int>
<int>135</int>
<int>259</int>
<int>313</int>
<int>863</int>
<int>162</int>
</object>
</void>
<void property="name">
@@ -321,9 +321,9 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>463</int>
<int>899</int>
<int>259</int>
<int>475</int>
<int>863</int>
<int>10</int>
</object>
</void>
@@ -336,10 +336,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>473</int>
<int>899</int>
<int>172</int>
<int>259</int>
<int>485</int>
<int>863</int>
<int>170</int>
</object>
</void>
<void property="name">
@@ -357,9 +357,9 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>645</int>
<int>899</int>
<int>259</int>
<int>655</int>
<int>863</int>
<int>10</int>
</object>
</void>
@@ -372,10 +372,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>255</int>
<int>655</int>
<int>899</int>
<int>172</int>
<int>259</int>
<int>665</int>
<int>863</int>
<int>162</int>
</object>
</void>
<void property="name">
@@ -408,7 +408,7 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>1154</int>
<int>1122</int>
<int>0</int>
<int>10</int>
<int>827</int>
@@ -423,9 +423,9 @@
<object id="MultiSplitLayout$Split3" class="org.jdesktop.swingx.MultiSplitLayout$Split">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>1164</int>
<int>1132</int>
<int>0</int>
<int>276</int>
<int>308</int>
<int>827</int>
</object>
</void>
@@ -434,10 +434,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>1164</int>
<int>1132</int>
<int>0</int>
<int>276</int>
<int>408</int>
<int>308</int>
<int>360</int>
</object>
</void>
<void property="name">
@@ -455,9 +455,9 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Divider">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>1164</int>
<int>408</int>
<int>276</int>
<int>1132</int>
<int>360</int>
<int>308</int>
<int>10</int>
</object>
</void>
@@ -470,10 +470,10 @@
<object class="org.jdesktop.swingx.MultiSplitLayout$Leaf">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>1164</int>
<int>418</int>
<int>276</int>
<int>409</int>
<int>1132</int>
<int>370</int>
<int>308</int>
<int>457</int>
</object>
</void>
<void property="name">

View File

@@ -5494,7 +5494,8 @@ public class CardFactory implements NewConstants {
{
CardList play = new CardList(AllZone.Human_Play.getCards());
Card target = CardFactoryUtil.AI_getBestCreature(play, card);
setTargetCard(target);
if (target!=null)
setTargetCard(target);
}
};
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
@@ -9924,7 +9925,7 @@ public class CardFactory implements NewConstants {
public void resolve()
{
CardFactoryUtil.makeToken("Beast", "G 3 3 Beast", card, "G", new String[]{"Creature", "Beast"}, 1, 1, new String[] {""});
CardFactoryUtil.makeToken("Beast", "G 3 3 Beast", card, "G", new String[]{"Creature", "Beast"}, 3, 3, new String[] {""});
//return card to hand if necessary
String opponent = AllZone.GameAction.getOpponent(card.getController());
@@ -16949,6 +16950,23 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Bestial Menace"))
{
SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = 523613120207836692L;
public void resolve()
{
CardFactoryUtil.makeToken("Snake", "G 1 1 Snake", card, "G", new String[]{"Creature", "Snake"}, 1, 1, new String[] {""});
CardFactoryUtil.makeToken("Wolf", "G 2 2 Wolf", card, "G", new String[]{"Creature", "Wolf"}, 2, 2, new String[] {""});
CardFactoryUtil.makeToken("Elephant", "G 3 3 Elephant", card, "G", new String[]{"Creature", "Elephant"}, 3, 3, new String[] {""});
}//resolve()
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found

View File

@@ -715,6 +715,7 @@ public class CardFactory_Creatures {
if(AllZone.GameAction.isCardInPlay(getTargetCard()) && getTargetCard().getController().equals(card.getController())
&& CardFactoryUtil.canTarget(card,getTargetCard()) )
{
Card copy;
if (!getTargetCard().isToken())
{
@@ -724,7 +725,11 @@ public class CardFactory_Creatures {
//copy creature and put it into play
//copy = getCard(getTargetCard(), getTargetCard().getName(), card.getController());
copy = cfact.getCard(getTargetCard().getName(), getTargetCard().getOwner());
copy.setToken(true);
//when copying something stolen:
copy.setController(getTargetCard().getController());
copy.setToken(true);
if (getTargetCard().isFaceDown()) {
copy.setIsFaceDown(true);
@@ -741,6 +746,8 @@ public class CardFactory_Creatures {
else //isToken()
{
Card c = getTargetCard();
copy = new Card();
copy.setName(c.getName());
@@ -8476,13 +8483,202 @@ public class CardFactory_Creatures {
AllZone.Stack.push(ability);
}
}//execute()
};//Command
card.addDestroyCommand(leavesPlay);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Sower of Temptation"))
{
final Card movedCreature[] = new Card[1];
final CommandReturn getCreature = new CommandReturn()
{
public Object execute()
{
//get all creatures
CardList list = new CardList();
list.addAll(AllZone.Human_Play.getCards());
list.addAll(AllZone.Computer_Play.getCards());
list = list.filter(new CardListFilter(){
public boolean addCard(Card c) {
return c.isCreature() && CardFactoryUtil.canTarget(card,c);
}
});
//remove "this card"
list.remove(card);
return list;
}
};//CommandReturn
final SpellAbility comesAbility = new Ability(card,"0")
{
public void resolve()
{
//super.resolve();
Card c = getTargetCard();
movedCreature[0] = c;
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c) )
{
//set summoning sickness
if(c.getKeyword().contains("Haste")){
c.setSickness(false);
}
else{
c.setSickness(true);
}
((PlayerZone_ComesIntoPlay)AllZone.Human_Play).setTriggers(false);
((PlayerZone_ComesIntoPlay)AllZone.Computer_Play).setTriggers(false);
c.setSickness(true);
c.setController(card.getController());
PlayerZone from = AllZone.getZone(c);
from.remove(c);
PlayerZone to = AllZone.getZone(Constant.Zone.Play, card.getController());
to.add(c);
((PlayerZone_ComesIntoPlay)AllZone.Human_Play).setTriggers(true);
((PlayerZone_ComesIntoPlay)AllZone.Computer_Play).setTriggers(true);
}
}//resolve()
};//SpellAbility
final Input inputComes = new Input()
{
private static final long serialVersionUID = -8449238833091942579L;
public void showMessage()
{
CardList choice = (CardList)getCreature.execute();
stopSetNext(CardFactoryUtil.input_targetSpecific(comesAbility, choice, "Select target creature to gain control of: ", true, false));
ButtonUtil.disableAll();//to disable the Cancel button
}
};
final Command commandCIP = new Command()
{
private static final long serialVersionUID = -5675532512302863456L;
public void execute()
{
CardList creature = (CardList)getCreature.execute();
String s = card.getController();
if(creature.size() == 0)
return;
else if(s.equals(Constant.Player.Human))
AllZone.InputControl.setInput(inputComes);
else //computer
{
Card target;
//try to target human creature
CardList human = CardFactoryUtil.AI_getHumanCreature(card, true);
target = CardFactoryUtil.AI_getBestCreature(human);//returns null if list is empty
if(target == null)
{
//must target computer creature
CardList computer = new CardList(AllZone.Computer_Play.getCards());
computer = computer.getType("Creature");
computer.remove(card);
computer.shuffle();
if (computer.size()!= 0)
target = computer.get(0);
}
comesAbility.setTargetCard(target);
AllZone.Stack.add(comesAbility);
}//else
}//execute()
};//CommandComes
card.addComesIntoPlayCommand(commandCIP);
card.addLeavesPlayCommand(new Command()
{
private static final long serialVersionUID = 6737424952039552060L;
public void execute()
{
Card c = movedCreature[0];
if(AllZone.GameAction.isCardInPlay(c))
{
((PlayerZone_ComesIntoPlay)AllZone.Human_Play).setTriggers(false);
((PlayerZone_ComesIntoPlay)AllZone.Computer_Play).setTriggers(false);
c.setSickness(true);
c.setController(AllZone.GameAction.getOpponent(c.getController()));
PlayerZone from = AllZone.getZone(c);
from.remove(c);
//make sure the creature is removed from combat:
CardList list = new CardList(AllZone.Combat.getAttackers());
if (list.contains(c))
AllZone.Combat.removeFromCombat(c);
CardList pwlist = new CardList(AllZone.pwCombat.getAttackers());
if (pwlist.contains(c))
AllZone.pwCombat.removeFromCombat(c);
PlayerZone to = AllZone.getZone(Constant.Zone.Play, c.getOwner());
to.add(c);
((PlayerZone_ComesIntoPlay)AllZone.Human_Play).setTriggers(true);
((PlayerZone_ComesIntoPlay)AllZone.Computer_Play).setTriggers(true);
}//if
}//execute()
});//Command
card.clearSpellAbility();
card.addSpellAbility(new Spell_Permanent(card)
{
private static final long serialVersionUID = -6810781646652311270L;
public boolean canPlay()
{
CardList choice = (CardList)getCreature.execute();
return choice.size() > 0;
}
public boolean canPlayAI()
{
CardList c = CardFactoryUtil.AI_getHumanCreature(card, true);
CardListUtil.sortAttack(c);
CardListUtil.sortFlying(c);
if(c.isEmpty())
return false;
if(2 <= c.get(0).getNetAttack() && c.get(0).getKeyword().contains("Flying"))
{
setTargetCard(c.get(0));
return true;
}
CardListUtil.sortAttack(c);
if(4 <= c.get(0).getNetAttack())
{
setTargetCard(c.get(0));
return true;
}
return false;
}
});
}//*************** END ************ END **************************
/*
//*************** START *********** START **************************
//destroy doesn't work
else if(cardName.equals("Sower of Temptation"))
@@ -8593,7 +8789,7 @@ public class CardFactory_Creatures {
}//execute()
});//Command
}//*************** END ************ END **************************
*/
//*************** START *********** START **************************
else if(cardName.equals("Frostling"))
@@ -18420,6 +18616,36 @@ public class CardFactory_Creatures {
card.addComesIntoPlayCommand(commandComes);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Avenger of Zendikar"))
{
final Ability ability = new Ability(card, "0")
{
public void resolve()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
CardList land = new CardList(play.getCards());
land = land.getType("Land");
for (int i=0;i<land.size();i++)
CardFactoryUtil.makeToken("Plant", "G 0 1 Plant", card, "G", new String[] {"Creature", "Plant"}, 0, 1, new String[] {""} );
}
};
ability.setStackDescription("When Avenger of Zendikar enters the battlefield, put a 0/1 green Plant creature token onto the battlefield for each land you control.");
final Command comesIntoPlay = new Command()
{
private static final long serialVersionUID = 4245563898487609274L;
public void execute()
{
AllZone.Stack.add(ability);
}
};
card.clearSpellKeepManaAbility();
card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found
if (shouldCycle(card) != -1)

View File

@@ -1501,28 +1501,10 @@ public class CombatUtil
{
public void resolve()
{
Card card = new Card();
card.setOwner(jedit.getController());
card.setController(jedit.getController());
card.setName("Cat Warrior");
card.setImageName("G 2 2 Cat Warrior");
card.setManaCost("G");
card.setToken(true);
card.addIntrinsicKeyword("Forestwalk");
card.addType("Creature");
card.addType("Cat");
card.addType("Warrior");
card.setBaseAttack(2);
card.setBaseDefense(2);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, jedit.getController());
play.add(card);
CardFactoryUtil.makeToken("Cat Warrior", "G 2 2 Cat Warrior", jedit, "G", new String[]{"Creature", "Cat", "Warrior"},
2, 2, new String[] {"Forestwalk"});
//(anger) :
GameActionUtil.executeCardStateEffects();
//GameActionUtil.executeCardStateEffects();
}
}; //Ability

View File

@@ -3697,6 +3697,8 @@ public class GameActionUtil
landfall_Hedron_Crab(c);
else if (c.getName().equals("Bloodghast"))
landfall_Bloodghast(c);
else if (c.getName().equals("Avenger of Zendikar"))
landfall_Avenger_of_Zendikar(c);
}
private static boolean showLandfallDialog(Card c)
@@ -3917,6 +3919,38 @@ public class GameActionUtil
}//landfall_Bloodghast
private static void landfall_Avenger_of_Zendikar(Card c)
{
final Card crd = c;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, crd.getController());
CardList plants = new CardList(play.getCards());
plants = plants.filter(new CardListFilter(){
public boolean addCard(Card card)
{
return card.isCreature() && card.getType().contains("Plant");
}
});
for (Card plant : plants)
plant.addCounter(Counters.P1P1, 1);
}
};
ability.setStackDescription(c + " - put a +1/+1 counter on each Plant creature you control.");
if (c.getController().equals(Constant.Player.Human)) {
if (showLandfallDialog(c))
AllZone.Stack.add(ability);
}
else if (c.getController().equals(Constant.Player.Computer)) {
AllZone.Stack.add(ability);
}
}//landfall_Avenger
public static void executeLifeLinkEffects(Card c)
{
final String player = c.getController();
@@ -7452,6 +7486,7 @@ public class GameActionUtil
AllZone.GameAction.drawCard(player);
AllZone.GameAction.getPlayerLife(player).subtractLife(1);
}
AllZone.GameAction.checkStateEffects();
}// upkeep_Phyrexian_Arena
private static void upkeep_Honden_of_Seeing_Winds()