- Fixed Water Elemental HQ pic link.

- Converted all token creation code in CardFactory_Lands.java and CardFactory_Planeswalker.java, and half of CardFactory_Creatures.java.
- Creatures that have "This creature attacks each turn if able" won't be forced to attack until the planeswalker attack phase (if one is in play on the AI's side). 
- Added Doubling Season (won't work yet for all cases, still have to convert all token creation code).
This commit is contained in:
jendave
2011-08-06 03:18:27 +00:00
parent 8ba0150404
commit c051e92c27
14 changed files with 149 additions and 986 deletions

View File

@@ -1,3 +1,8 @@
Doubling Season
4 G
Enchantment
If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead. If an effect would place one or more counters on a permanent you control, it places twice that many of those counters on that permanent instead.
Accelerated Mutation
3 G G
Instant

View File

@@ -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/17, SVN revision: 315
program/version=Forge -- official beta: 10/01/17, SVN revision: 320
tokens--file=AllTokens.txt

View File

@@ -126,7 +126,7 @@ watchdog.jpg http://[server]/TE/Watchdog.full.jpg
watcher_sliver.jpg http://[server]/TSP/Watcher%20Sliver.full.jpg
watchwing_scarecrow.jpg http://[server]/SHM/Watchwing%20Scarecrow.full.jpg
watchwolf.jpg http://[server]/RAV/Watchwolf.full.jpg
water_elemental.jpg http://[server]/4E/Water%20Elemental.full.jpg
water_elemental.jpg http://[server]/B/Water%20Elemental.full.jpg
water_gun_balloon_game.jpg http://[server]/UNH/Water%20Gun%20Balloon%20Game.full.jpg
water_wurm.jpg http://[server]/DK/Water%20Wurm.full.jpg
waterfront_bouncer.jpg http://[server]/MM/Waterfront%20Bouncer.full.jpg

View File

@@ -96,6 +96,7 @@ public class AllZone implements NewConstants {
player = "Human";
System.out.println("Evil hack");
}
Object o = map.get(zone + player);
if(o == null)
throw new RuntimeException("AllZone : getZone() invalid parameters " +zone +" " +player);

View File

@@ -12,9 +12,9 @@ public interface BoosterDraft
class BoosterDraft_1 implements BoosterDraft
{
private final BoosterDraftAI draftAI = new BoosterDraftAI();
private final int nPlayers = 8;
private static final int nPlayers = 8;
private static final int boosterPackSize = 15;
private final int stopCount = boosterPackSize * 3;//should total of 45
private static final int stopCount = boosterPackSize * 3;//should total of 45
private int currentCount = 0;
private CardList[] pack;//size 8

View File

@@ -189,14 +189,19 @@ public class Card extends MyObservable
public void addCounter(Counters counterName, int n)
{
int multiplier = 1;
int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", this.getController()).size();
if (doublingSeasons > 0)
multiplier = (int) Math.pow(2, doublingSeasons);
if(counters.containsKey(counterName))
{
Integer aux = counters.get(counterName) + n;
Integer aux = counters.get(counterName) + (multiplier * n);
counters.put(counterName,aux);
}
else
{
counters.put(counterName, Integer.valueOf(n));
counters.put(counterName, Integer.valueOf(multiplier * n));
}
this.updateObservers();
}

View File

@@ -823,7 +823,7 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(a1);
String Desc = new String();
String Desc = "";
Desc = "Regenerate " + cardName;
a1.setDescription(manacost + ": " + Desc);
@@ -14013,10 +14013,14 @@ public class CardFactory implements NewConstants {
return AllZone.Phase.getPhase().equals(Constant.Phase.Main1);
}
public void resolve()
{
final Card[] token = new Card[3];
int multiplier = 1;
int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", card.getController()).size();
if (doublingSeasons > 0)
multiplier = (int) Math.pow(2, doublingSeasons);
final Card[] token = new Card[3*multiplier];
final Command atEOT = new Command()
{
private static final long serialVersionUID = -1928884889370422828L;
@@ -14063,69 +14067,6 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spell);
}//*************** END ************ END **************************
/*
//*************** START *********** START **************************
else if(cardName.equals("Inspirit"))
{
SpellAbility spell = new Spell(card)
{
private static final long serialVersionUID = -601100008975177639L;
public boolean canPlayAI()
{
return getAttacker() != null;
}
public void chooseTargetAI()
{
setTargetCard(getAttacker());
}
public Card getAttacker()
{
//target creature that is going to attack
Combat c = ComputerUtil.getAttackers();
Card[] att = c.getAttackers();
if(att.length != 0)
return att[0];
else
return null;
}//getAttacker()
public void resolve()
{
final Card[] target = new Card[1];
final Command untilEOT = new Command()
{
private static final long serialVersionUID = -3197321199337917886L;
public void execute()
{
if(AllZone.GameAction.isCardInPlay(target[0]))
{
target[0].addTempAttackBoost(-2);
target[0].addTempDefenseBoost(-4);
}
}
};
target[0] = getTargetCard();
if(AllZone.GameAction.isCardInPlay(target[0]) && CardFactoryUtil.canTarget(card, target[0]))
{
target[0].addTempAttackBoost(2);
target[0].addTempDefenseBoost(4);
target[0].untap();
AllZone.EndOfTurn.addUntil(untilEOT);
}
}//resolve()
};
spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell));
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
*/
//*************** START *********** START **************************
else if(cardName.equals("Animate Land"))
{
@@ -17187,7 +17128,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
}//getCard2
// copies stats like attack, defense, etc..
private Card copyStats(Object o) {
public static Card copyStats(Object o) {
Card sim = (Card) o;
Card c = new Card();

View File

@@ -3151,9 +3151,10 @@ public class CardFactoryUtil
return list;
}
public static void makeToken(String name, String imageName, Card source, String manaCost, String[] types, int baseAttack, int baseDefense,
public static CardList makeToken(String name, String imageName, Card source, String manaCost, String[] types, int baseAttack, int baseDefense,
String[] intrinsicKeywords)
{
CardList list = new CardList();
Card c = new Card();
c.setName(name);
c.setImageName(imageName);
@@ -3174,7 +3175,20 @@ public class CardFactoryUtil
c.addIntrinsicKeyword(kw);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, source.getController());
play.add(c);
int multiplier = 1;
int doublingSeasons = CardFactoryUtil.getCards("Doubling Season", source.getController()).size();
if (doublingSeasons > 0)
multiplier = (int) Math.pow(2, doublingSeasons);
for (int i=0;i<multiplier;i++) {
Card temp = CardFactory.copyStats(c);
temp.setToken(true);
play.add(temp);
list.add(temp);
}
return list;
}
//may return null

View File

@@ -197,7 +197,6 @@ public class CardFactory_Creatures {
//*************** START *********** START **************************
else if(cardName.equals("Captain of the Watch"))
{
final SpellAbility comesIntoPlayAbility = new Ability(card, "0")
{
public void resolve()
@@ -209,24 +208,7 @@ public class CardFactory_Creatures {
public void makeToken()
{
Card c = new Card();
c.setName("Soldier");
c.setImageName("W 1 1 Soldier");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Soldier");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Soldier", "W 1 1 Soldier", card, "W", new String[]{"Creature", "Soldier"}, 1, 1, new String[] {""});
}
}; //comesIntoPlayAbility
@@ -666,23 +648,7 @@ public class CardFactory_Creatures {
}//countGraveyard()
void makeToken()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setImageName("G 2 2 Bear");
c.setName("Bear");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Bear");
c.setBaseAttack(2);
c.setBaseDefense(2);
play.add(c);
CardFactoryUtil.makeToken("Bear", "G 2 2 Bear", card, "W", new String[]{"Creature", "Bear"}, 2, 2, new String[] {""});
}//makeToken()
};//SpellAbility
@@ -796,7 +762,6 @@ public class CardFactory_Creatures {
play.add(copy);
//have to do this since getTargetCard() might change
//if Kiki-Jiki somehow gets untapped again
final Card[] target = new Card[1];
@@ -1135,31 +1100,8 @@ public class CardFactory_Creatures {
}
public void resolve()
{
makeToken();
CardFactoryUtil.makeToken("Sliver", "C 1 1 Sliver", card, "", new String[]{"Creature", "Sliver"}, 1, 1, new String[] {""});
}
void makeToken()
{
Card c = new Card();
c.setImageName("C 1 1 Sliver");
c.setName("Sliver");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("");
c.setToken(true);
c.addType("Creature");
c.addType("Sliver");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}//makeToken()
public boolean canPlayAI()
{
@@ -1354,28 +1296,8 @@ public class CardFactory_Creatures {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
CardList list = new CardList(play.getCards());
list = list.getType("Land");
makeToken(list.size());
CardFactoryUtil.makeToken("Wurm", "G X X Wurm", card, "G", new String[]{"Creature", "Wurm"}, list.size(), list.size(), new String[] {""});
}
void makeToken(int stats)
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setImageName("G X X Wurm");
c.setName("Wurm");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Wurm");
c.setBaseAttack(stats);
c.setBaseDefense(stats);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
play.add(c);
}//makeToken()
};
Input removeCard = new Input()
{
@@ -1415,31 +1337,8 @@ public class CardFactory_Creatures {
public void resolve()
{
for(int i = 0; i < 5; i++)
makeToken();
CardFactoryUtil.makeToken("Goblin", "R 1 1 Goblin", card, "R", new String[]{"Creature", "Goblin"}, 1, 1, new String[] {""});
}
void makeToken()
{
//warning, different owner and controller
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, opponent);
Card c = new Card();
c.setOwner(card.getController());
c.setController(opponent);
c.setName("Goblin");
c.setImageName("R 1 1 Goblin");
c.setManaCost("R");
c.setToken(true);
c.addType("Creature");
c.addType("Goblin");
c.setBaseAttack(1);
c.setBaseDefense(1);
play.add(c);
}//makeToken()
};//SpellAbility
Command intoPlay = new Command()
@@ -1464,31 +1363,9 @@ public class CardFactory_Creatures {
public void resolve()
{
for(int i = 0; i < 2; i++)
makeToken();
CardFactoryUtil.makeToken("Centaur", "G 3 3 Centaur", card, "G", new String[]{"Creature", "Centaur"}, 3, 3,
new String[] {"Protection from black"});
}
void makeToken()
{
//warning, different owner and controller
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, opponent);
Card c = new Card();
c.setOwner(card.getController());
c.setController(opponent);
c.setName("Centaur");
c.setImageName("G 3 3 Centaur Pro Black");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Centaur");
c.setBaseAttack(3);
c.setBaseDefense(3);
c.addIntrinsicKeyword("Protection from black");
play.add(c);
}//makeToken()
};//SpellAbility
Command intoPlay = new Command()
@@ -1511,30 +1388,8 @@ public class CardFactory_Creatures {
{
public void resolve()
{
makeToken();
CardFactoryUtil.makeToken("Horror", "B 4 4 Horror", card, "B", new String[]{"Creature", "Horror"}, 4, 4, new String[] {""});
}
void makeToken()
{
//warning, different owner and controller
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, opponent);
Card c = new Card();
c.setOwner(card.getController());
c.setController(opponent);
c.setName("Horror");
c.setImageName("B 4 4 Horror");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Horror");
c.setBaseAttack(4);
c.setBaseDefense(4);
play.add(c);
}//makeToken()
};//SpellAbility
Command intoPlay = new Command()
@@ -1559,31 +1414,8 @@ public class CardFactory_Creatures {
public void resolve()
{
for(int i = 0; i < 3; i++)
makeToken();
CardFactoryUtil.makeToken("Knight", "W 2 2 Knight", card, "W", new String[]{"Creature", "Knight"}, 2, 2, new String[] {"First Strike"});
}
void makeToken()
{
//warning, different owner and controller
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, opponent);
Card c = new Card();
c.setOwner(card.getController());
c.setController(opponent);
c.setName("Knight");
c.setImageName("W 2 2 Knight");
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Knight");
c.setBaseAttack(2);
c.setBaseDefense(2);
c.addIntrinsicKeyword("First Strike");
play.add(c);
}//makeToken()
};//SpellAbility
Command intoPlay = new Command()
@@ -1607,33 +1439,9 @@ public class CardFactory_Creatures {
{
public void resolve()
{
for(int i = 0; i < 4; i++)
makeToken();
CardFactoryUtil.makeToken("Faerie", "U 1 1 Faerie", card, "U", new String[]{"Creature", "Faerie"}, 1, 1, new String[] {"Flying"});
}
void makeToken()
{
//warning, different owner and controller
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, opponent);
Card c = new Card();
c.setOwner(card.getController());
c.setController(opponent);
c.setName("Faerie");
c.setImageName("U 1 1 Faerie");
c.setManaCost("U");
c.setToken(true);
c.addType("Creature");
c.addType("Faerie ");
c.setBaseAttack(1);
c.setBaseDefense(1);
c.addIntrinsicKeyword("Flying");
play.add(c);
}//makeToken()
};//SpellAbility
Command intoPlay = new Command()
@@ -1677,8 +1485,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Filigree Angel"))
{
@@ -1844,32 +1650,9 @@ public class CardFactory_Creatures {
{
int number = CardFactoryUtil.getNumberOfManaSymbolsControlledByColor("W", card.getController());
for (int i=0;i<number;i++)
{
makeToken();
}
CardFactoryUtil.makeToken("Goat", "W 0 1 Goat", card, "W", new String[]{"Creature", "Goat"}, 0, 1, new String[] {""});
}//resolve()
public void makeToken()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setImageName("W 0 1 Goat");
c.setName("Goat");
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Goat");
c.setBaseAttack(0);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}
};
Command intoPlay = new Command()
{
@@ -2044,31 +1827,8 @@ public class CardFactory_Creatures {
{
public void resolve()
{
card.untap();
makeToken();
CardFactoryUtil.makeToken("Kithkin Soldier", "W 1 1 Kithkin Soldier", card, "W", new String[]{"Creature", "Kithkin", "Soldier"}, 1, 1, new String[] {""});
}
void makeToken()
{
Card c = new Card();
c.setName("Kithkin Soldier");
c.setImageName("W 1 1 Kithkin Soldier");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Kithkin");
c.addType("Soldier");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}//makeToken()
public boolean canPlay()
{
SpellAbility sa;
@@ -2112,25 +1872,7 @@ public class CardFactory_Creatures {
public void makeToken()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Kithkin Soldier");
c.setImageName("W 1 1 Kithkin Soldier");
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Kithkin");
c.addType("Soldier");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Kithkin Soldier", "W 1 1 Kithkin Soldier", card, "W", new String[]{"Creature", "Kithkin", "Soldier"}, 1, 1, new String[] {""});
}
}; //ability
@@ -2218,26 +1960,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Elf Warrior");
c.setImageName("G 1 1 Elf Warrior");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Elf");
c.addType("Warrior");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Elf Warrior", "G 1 1 Elf Warrior", card, "G", new String[]{"Creature", "Elf", "Warrior"}, 1, 1, new String[] {""});
}//resolve()
};
Command intoPlay = new Command()
@@ -2253,9 +1976,6 @@ public class CardFactory_Creatures {
card.addComesIntoPlayCommand(intoPlay);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Mudbutton Torchrunner"))
{
@@ -2388,28 +2108,8 @@ public class CardFactory_Creatures {
public void resolve()
{
for(int i = 0; i < 3; i++)
makeToken();
CardFactoryUtil.makeToken("Serf", "B 0 1 Serf", card, "B", new String[]{"Creature", "Serf"}, 0, 1, new String[] {""});
}
void makeToken()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Serf");
c.setImageName("B 0 1 Serf");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Serf");
c.setBaseAttack(0);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}//makeToken()
};//SpellAbility
Command intoPlay = new Command()
{
@@ -2441,8 +2141,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Haunted Angel"))
{
@@ -2450,7 +2148,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
makeToken();
CardFactoryUtil.makeToken("Angel", "B 3 3 Angel", card, "B", new String[]{"Creature", "Angel"}, 3, 3, new String[] {"Flying"});
//remove this card from the graveyard and from the game
@@ -2462,28 +2160,6 @@ public class CardFactory_Creatures {
AllZone.GameAction.removeFromGame(card);
}
void makeToken()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Angel");
c.setImageName("B 3 3 Angel");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Angel");
c.setBaseAttack(3);
c.setBaseDefense(3);
c.addIntrinsicKeyword("Flying");
String opponent = AllZone.GameAction.getOpponent(card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, opponent);
play.add(c);
}//makeToken()
};//SpellAbility
Command destroy = new Command()
{
@@ -2500,8 +2176,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Angel of Mercy") || cardName.equals("Rhox Bodyguard"))
{
@@ -2577,28 +2251,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
makeToken();
}
public void makeToken()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Bird");
c.setImageName("R 4 4 Bird");
c.setManaCost("R");
c.setToken(true);
c.addType("Creature");
c.addType("Bird");
c.setBaseAttack(4);
c.setBaseDefense(4);
c.addIntrinsicKeyword("Flying");
play.add(c);
CardFactoryUtil.makeToken("Bird", "R 4 4 Bird", card, "R", new String[]{"Creature", "Bird"}, 4, 4, new String[] {"Flying"});
}
}; //ability
ability.setStackDescription(cardName + " - Put a 4/4 red Bird creature token with flying onto the battlefield.");
@@ -2877,23 +2530,7 @@ public class CardFactory_Creatures {
}
void makeToken()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Insect");
c.setImageName("G 1 1 Insect");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Insect");
c.setBaseAttack(1);
c.setBaseDefense(1);
play.add(c);
CardFactoryUtil.makeToken("Insect", "G 1 1 Insect", card, "G", new String[]{"Creature", "Insect"}, 1, 1, new String[] {""});
}//makeToken()
};//SpellAbility
@@ -4227,24 +3864,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setName("Insect");
c.setImageName("G 1 1 Insect");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Insect");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Insect", "G 1 1 Insect", card, "G", new String[]{"Creature", "Insect"}, 1, 1, new String[] {""});
}//resolve()
};
ability.setDescription("1 G: Put a 1/1 green Insect creature token onto the battlefield.");
@@ -4591,23 +4211,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Kavu");
c.setImageName("B 3 3 Kavu");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Kavu");
c.setBaseAttack(3);
c.setBaseDefense(3);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Kavu", "B 3 3 Kavu", card, "B", new String[]{"Creature", "Kavu"}, 3, 3, new String[] {""});
}//resolve()
};//Ability
@@ -4626,7 +4230,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Penumbra Bobcat"))
{
@@ -4634,23 +4237,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Cat");
c.setImageName("B 2 1 Cat");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Cat");
c.setBaseAttack(2);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Cat", "B 2 1 Cat", card, "B", new String[]{"Creature", "Cat"}, 2, 1, new String[] {""});
}//resolve()
};//Ability
@@ -4674,24 +4261,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Spider");
c.setImageName("B 2 4 Spider");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Spider");
c.setBaseAttack(2);
c.setBaseDefense(4);
c.addIntrinsicKeyword("Reach");
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Spider", "B 2 4 Spider", card, "B", new String[]{"Creature", "Spider"}, 2, 4, new String[] {"Reach"});
}//resolve()
};//Ability
@@ -4715,24 +4285,7 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Wurm");
c.setImageName("B 6 6 Wurm");
c.setManaCost("B");
c.setToken(true);
c.addType("Creature");
c.addType("Wurm");
c.setBaseAttack(6);
c.setBaseDefense(6);
c.addIntrinsicKeyword("Trample");
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Wurm", "B 6 6 Wurm", card, "B", new String[]{"Creature", "Wurm"}, 6, 6, new String[] {"Trample"});
}//resolve()
};//Ability
@@ -4750,8 +4303,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Aven Fisher") || cardName.equals("Riptide Crab"))
{
@@ -5319,29 +4870,8 @@ public class CardFactory_Creatures {
}
public void resolve()
{
makeToken();
CardFactoryUtil.makeToken("Wolf", "G 2 2 Wolf", card, "G", new String[]{"Creature", "Wolf"}, 2, 2, new String[] {""});
}
void makeToken()
{
Card c = new Card();
c.setName("Wolf");
c.setImageName("G 2 2 Wolf");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Wolf");
c.setBaseAttack(2);
c.setBaseDefense(2);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}//makeToken()
};//SpellAbility
a1.setDescription("2 G: Put a 2/2 green Wolf creature token into play.");
@@ -5352,8 +4882,6 @@ public class CardFactory_Creatures {
card.addComesIntoPlayCommand(commandComes);
card.addLeavesPlayCommand(commandLeavesPlay);
card.addSpellAbility(new Spell_Permanent(card)
{
private static final long serialVersionUID = 2583297503017070549L;
@@ -6095,29 +5623,8 @@ public class CardFactory_Creatures {
{
int count = ((Integer)countZubera.execute()).intValue();
for(int i = 0; i < count; i++)
makeToken();
CardFactoryUtil.makeToken("Spirit", "C 1 1 Spirit", card, "", new String[]{"Creature", "Spirit"}, 1, 1, new String[] {""});
}//resolve()
void makeToken()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Spirit");
c.setImageName("C 1 1 Spirit");
c.setManaCost("");
c.setToken(true);
c.addType("Creature");
c.addType("Spirit");
c.setBaseAttack(1);
c.setBaseDefense(1);
play.add(c);
}//makeToken()
};//SpellAbility
Command destroy = new Command()
@@ -7922,25 +7429,7 @@ public class CardFactory_Creatures {
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Elf Warrior");
c.setImageName("G 1 1 Elf Warrior");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Elf");
c.addType("Warrior");
c.setBaseAttack(1);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Elf Warrior", "G 1 1 Elf Warrior", card, "G", new String[]{"Creature", "Elf", "Warrior"}, 1, 1, new String[] {""});
}//resolve()
};//SpellAbility
@@ -7969,26 +7458,7 @@ public class CardFactory_Creatures {
public void resolve()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Kelp");
c.setImageName("U 0 1 Kelp");
c.setManaCost("U");
c.setToken(true);
c.addType("Creature");
c.addType("Plant");
c.addType("Wall");
c.addIntrinsicKeyword("Defender");
c.setBaseAttack(0);
c.setBaseDefense(1);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
CardFactoryUtil.makeToken("Kelp", "U 0 1 Kelp", card, "U", new String[]{"Creature", "Plant", "Wall"}, 0, 1, new String[] {"Defender"});
}//resolve()
};//SpellAbility
@@ -8000,8 +7470,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Vedalken Mastermind"))
{
@@ -9488,24 +8956,7 @@ public class CardFactory_Creatures {
public void execute()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Spirit");
c.setImageName("W 1 1 Spirit");
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Spirit");
c.setBaseAttack(1);
c.setBaseDefense(1);
c.addIntrinsicKeyword("Flying");
PlayerZone play = AllZone.getZone(Constant.Zone.Play , card.getController());
play.add(c);
CardFactoryUtil.makeToken("Spirit", "W 1 1 Spirit", card, "W", new String[]{"Creature", "Spirit"}, 1, 1, new String[] {"Flying"});
}//execute()
};//Command
@@ -9744,22 +9195,8 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
c.setToken(true);
c.setImageName("U 1 1 Illusion");
c.setName("Illusion");
c.setManaCost("U");
c.setBaseAttack(1);
c.setBaseDefense(1);
c.addIntrinsicKeyword("Flying");
c.addType("Creature");
c.addType("Illusion");
c.setOwner(card.getController());
c.setController(card.getController());
CardFactoryUtil.makeToken("Illusion", "U 1 1 Illusion", card, "U", new String[]{"Creature", "Illusion"}, 1, 1, new String[] {"Flying"});
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
//TODO: the "bounced" land should be chosen by the user
//instead of "automatically" done for him
@@ -9785,7 +9222,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Squall Drifter"))
{
@@ -9806,7 +9242,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Bonded Fetch") || cardName.equals("Merfolk Looter"))
{
@@ -9929,25 +9364,10 @@ public class CardFactory_Creatures {
{
public void resolve()
{
Card c = new Card();
CardList cl = CardFactoryUtil.makeToken("Stangg Twin", "RG 3 4 Stangg Twin", card, "R G", new String[]{"Legendary", "Creature", "Human", "Warrior"},
3, 4, new String[] {""});
c.setName("Stangg Twin");
c.setImageName("RG 3 4 Stangg Twin");
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("R G");
c.setToken(true);
c.addType("Legendary");
c.addType("Creature");
c.addType("Human");
c.addType("Warrior");
c.setBaseAttack(3);
c.setBaseDefense(4);
c.addLeavesPlayCommand(new Command()
cl.get(0).addLeavesPlayCommand(new Command()
{
private static final long serialVersionUID = 3367390368512271319L;
@@ -9955,12 +9375,7 @@ public class CardFactory_Creatures {
if (AllZone.GameAction.isCardInPlay(card))
AllZone.GameAction.sacrifice(card);
}
});
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
play.add(c);
}
};
ability.setStackDescription("When Stangg enters the battlefield, if Stangg is on the battlefield, put a legendary 3/4 red and green Human Warrior creature token named Stangg Twin onto the battlefield.");
@@ -10000,42 +9415,20 @@ public class CardFactory_Creatures {
public void resolve()
{
makeToken();
CardList cl = CardFactoryUtil.makeToken("Llanowar Elves", "G 1 1 Llanowar Elves", card, "G", new String[]{"Creature", "Elf", "Druid"},
1, 1, new String[] {""});
for (Card c : cl) {
c.addSpellAbility(new Ability_Mana(card, "tap: add G")
{
private static final long serialVersionUID = 7871036527184588884L;
});
}
//computer discards here, todo: should discard when ability put on stack
if(card.getController().equals(Constant.Player.Computer))
AllZone.GameAction.discardRandom(Constant.Player.Computer);
}
void makeToken()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Elf");
c.addType("Druid");
c.setBaseAttack(1);
c.setBaseDefense(1);
//custom settings
c.setName("Llanowar Elves");
c.setImageName("G 1 1 Llanowar Elves");
//c.addIntrinsicKeyword("tap: add G");
c.addSpellAbility(new Ability_Mana(card, "tap: add G")
{
private static final long serialVersionUID = 7871036527184588884L;
});
play.add(c);
}//makeToken()
public boolean canPlay()
{

View File

@@ -1030,31 +1030,8 @@ class CardFactory_Lands {
card.subtractCounter(Counters.ICE, 1);
if (card.getCounters(Counters.ICE) == 0)
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
CardFactoryUtil.makeToken("Marit Lage", "B 20 20 Marit Lage", card, "B", new String[] {"Legendary", "Creature", "Avatar"}, 20, 20, new String[] {"Flying", "Indestructible"} );
//make token
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Marit Lage");
c.setName("B 20 20 Marit Lage");
c.setManaCost("B");
c.setToken(true);
c.addType("Legendary");
c.addType("Creature");
c.addType("Avatar");
c.addIntrinsicKeyword("Flying");
c.addExtrinsicKeyword("Indestructible");
c.setBaseAttack(20);
c.setBaseDefense(20);
play.add(c);
AllZone.GameAction.sacrifice(card);
}// if counters == 0
}
};
ability.setDescription("Dark Depths enters the battlefield with ten ice counters on it.\r\n\r\n3: Remove an ice counter from Dark Depths.\r\n\r\nWhen Dark Depths has no ice counters on it, sacrifice it. If you do, put an indestructible legendary 20/20 black Avatar creature token with flying named Marit Lage onto the battlefield.");
@@ -1694,30 +1671,8 @@ class CardFactory_Lands {
public void resolve()
{
String player = card.getController();
AllZone.GameAction.sacrifice(card);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
//make token
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Gargoyle");
c.setImageName("C 3 4 Gargoyle");
c.setManaCost("1");
c.setToken(true);
c.addType("Artifact");
c.addType("Creature");
c.addType("Gargoyle");
c.setBaseAttack(3);
c.setBaseDefense(4);
c.addIntrinsicKeyword("Flying");
play.add(c);
CardFactoryUtil.makeToken("Gargoyle", "C 3 4 Gargoyle", card, "", new String[] {"Artifact", "Creature", "Gargoyle"}, 3, 4, new String[] {"Flying"} );
}
};
@@ -1726,12 +1681,6 @@ class CardFactory_Lands {
card.addSpellAbility(ability);
//not sure what's going on here, maybe because it's a land it doesn't add the ability to the text?
//anyway, this does the trick:
//card.removeIntrinsicKeyword("tap: add 1");
//card.setText(card.getSpellText() + "\r\n5, tap, sacrifice Gargoyle Castle: Put a 3/4 colorless Gargoyle artifact creature token with flying onto the battlefield.");
//card.addIntrinsicKeyword("tap: add 1");
}//*************** END ************ END **************************
//*************** START *********** START **************************
@@ -1751,27 +1700,7 @@ class CardFactory_Lands {
public void resolve()
{
String player = card.getController();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
//make token
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Kobolds of Kher Keep");
c.setImageName("R 0 1 Kobolds of Kher Keep");
c.setManaCost("R");
c.setToken(true);
c.addType("Creature");
c.addType("Kobold");
c.setBaseAttack(0);
c.setBaseDefense(1);
play.add(c);
CardFactoryUtil.makeToken("Kobolds of Kher Keep", "R 0 1 Kobolds of Kher Keep", card, "R", new String[] {"Creature", "Kobold"}, 0, 1, new String[] {""} );
}
};
@@ -1805,27 +1734,7 @@ class CardFactory_Lands {
public void resolve()
{
String player = card.getController();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
//make token
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Saproling");
c.setImageName("G 1 1 Saproling");
c.setManaCost("G");
c.setToken(true);
c.addType("Creature");
c.addType("Saproling");
c.setBaseAttack(1);
c.setBaseDefense(1);
play.add(c);
CardFactoryUtil.makeToken("Saproling", "G 1 1 Saproling", card, "G", new String[] {"Creature", "Saproling"}, 1, 1, new String[] {""} );
}
};
@@ -1850,26 +1759,7 @@ class CardFactory_Lands {
{
public void resolve()
{
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setManaCost("1");
c.setToken(true);
c.setName("Spirit");
c.setImageName("C 1 1 Spirit");
c.addType("Creature");
c.addType("Spirit");
c.setBaseAttack(1);
c.setBaseDefense(1);
play.add(c);
CardFactoryUtil.makeToken("Spirit", "C 1 1 Spirit", card, "", new String[] {"Creature", "Spirit"}, 1, 1, new String[] {""} );
}//resolve()
};//Ability
@@ -2254,28 +2144,7 @@ class CardFactory_Lands {
public void resolve()
{
String player = card.getController();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
//make token
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setName("Assembly-Worker");
c.setImageName("c 2 2 Assembly-Worker");
c.setManaCost("");
c.setToken(true);
c.addType("Artifact");
c.addType("Creature");
c.addType("Assembly-Worker");
c.setBaseAttack(2);
c.setBaseDefense(2);
play.add(c);
CardFactoryUtil.makeToken("Assembly-Worker", "C 2 2 Assembly-Worker", card, "C", new String[] {"Artiface", "Creature", "Assembly-Worker"}, 2, 2, new String[] {""} );
}
};

View File

@@ -20,7 +20,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 4);
card2.setCounter(Counters.LOYALTY, 4);
card2.setOwner(owner);
card2.setController(owner);
@@ -182,24 +182,7 @@ class CardFactory_Planeswalkers {
card2.addCounter(Counters.LOYALTY, 1);
turn[0] = AllZone.Phase.getTurn();
Card c = new Card();
c.setOwner(card2.getController());
c.setController(card2.getController());
c.setManaCost("W");
c.setToken(true);
c.setImageName("W 1 1 Soldier");
c.setName("Soldier");
c.addType("Creature");
c.addType("Soldier");
c.setBaseAttack(1);
c.setBaseDefense(1);
//AllZone.GameAction.getPlayerLife(card.getController()).addLife(2);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card2.getController());
play.add(c);
CardFactoryUtil.makeToken("Soldier", "W 1 1 Soldier", card2, "W", new String[]{"Creature", "Soldier"}, 1, 1, new String[] {""});
}
public boolean canPlayAI()
{
@@ -271,7 +254,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 2);
card2.setCounter(Counters.LOYALTY, 2);
card2.setOwner(owner);
card2.setController(owner);
@@ -521,7 +504,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 5);
card2.setCounter(Counters.LOYALTY, 5);
card2.setOwner(owner);
card2.setController(owner);
@@ -869,7 +852,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 4);
card2.setCounter(Counters.LOYALTY, 4);
card2.setOwner(owner);
card2.setController(owner);
@@ -974,27 +957,10 @@ class CardFactory_Planeswalkers {
card2.subtractCounter(Counters.LOYALTY, 6);
turn[0] = AllZone.Phase.getTurn();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card2.getController());
//Create token
Card c = new Card();
c.setOwner(card2.getController());
c.setController(card2.getController());
c.setImageName("W N N Avatar");
c.setName("Avatar");
c.setManaCost("W");
c.setToken(true);
c.addType("Creature");
c.addType("Avatar");
c.setBaseAttack(AllZone.GameAction.getPlayerLife(card.getController()).getLife());
c.setBaseDefense(AllZone.GameAction.getPlayerLife(card.getController()).getLife());
c.addIntrinsicKeyword("This creature's power and toughness are each equal to your life total.");
play.add(c);
int n = AllZone.GameAction.getPlayerLife(card.getController()).getLife();
CardFactoryUtil.makeToken("Avatar", "W N N Avatar", card2, "W", new String[]{"Creature", "Avatar"}, n, n,
new String[] {"This creature's power and toughness are each equal to your life total"});
}
public boolean canPlay()
{
@@ -1108,7 +1074,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 5);
card2.setCounter(Counters.LOYALTY, 5);
card2.setOwner(owner);
card2.setController(owner);
@@ -1355,7 +1321,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 6);
card2.setCounter(Counters.LOYALTY, 6);
card2.setOwner(owner);
card2.setController(owner);
@@ -1623,7 +1589,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY,3);
card2.setCounter(Counters.LOYALTY,3);
card2.setOwner(owner);
card2.setController(owner);
@@ -1723,30 +1689,8 @@ class CardFactory_Planeswalkers {
card2.subtractCounter(Counters.LOYALTY,1);
turn[0] = AllZone.Phase.getTurn();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card2.getController());
play.add(getToken());
CardFactoryUtil.makeToken("Beast", "G 3 3 Beast", card2, "G", new String[]{"Creature", "Beast"}, 3, 3, new String[] {""});
}
Card getToken()
{
Card c = new Card();
c.setOwner(card.getController());
c.setController(card.getController());
c.setImageName("G 3 3 Beast");
c.setName("Beast");
c.setManaCost("G");
c.setToken(true);
//c.addKeyword("Token");
c.addType("Creature");
c.addType("Beast");
c.setBaseAttack(3);
c.setBaseDefense(3);
return c;
}//makeToken()
public boolean canPlay()
{
return AllZone.getZone(card2).is(Constant.Zone.Play) &&
@@ -1894,7 +1838,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY,3);
card2.setCounter(Counters.LOYALTY,3);
card2.setOwner(owner);
card2.setController(owner);
@@ -2034,7 +1978,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY, 3);
card2.setCounter(Counters.LOYALTY, 3);
card2.setOwner(owner);
card2.setController(owner);
@@ -2269,7 +2213,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY,4);
card2.setCounter(Counters.LOYALTY,4);
card2.setOwner(owner);
card2.setController(owner);
@@ -2581,7 +2525,7 @@ class CardFactory_Planeswalkers {
AllZone.GameAction.checkStateEffects();
}
};
card2.addCounter(Counters.LOYALTY,4);
card2.setCounter(Counters.LOYALTY,4);
card2.setOwner(owner);
card2.setController(owner);
@@ -2767,34 +2711,9 @@ class CardFactory_Planeswalkers {
card2.subtractCounter(Counters.LOYALTY, 6);
turn[0] = AllZone.Phase.getTurn();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card2.getController());
for (int i=0;i<5;i++)
{
play.add(getToken());
CardFactoryUtil.makeToken("Dragon", "R 4 4 Dragon", card2, "W", new String[]{"Creature", "Dragon"}, 4, 4, new String[] {"Flying"});
}
}
Card getToken()
{
Card c = new Card();
c.setOwner(card2.getController());
c.setController(card2.getController());
c.setImageName("R 4 4 Dragon");
c.setName("Dragon");
c.setManaCost("R");
c.setToken(true);
c.addType("Creature");
c.addType("Dragon");
c.setBaseAttack(4);
c.setBaseDefense(4);
c.addIntrinsicKeyword("Flying");
return c;
}//makeToken()
public boolean canPlay()
{
return AllZone.getZone(card2).is(Constant.Zone.Play) &&
@@ -2818,9 +2737,6 @@ class CardFactory_Planeswalkers {
return card2;
}//*************** END ************ END **************************
return card;
}

View File

@@ -12,6 +12,7 @@ public void showMessage()
CardList creats = new CardList(play.getCards());
creats = creats.getType("Creature");
if (getPlaneswalker() == null) {
for (int i = 0;i<creats.size(); i++)
{
Card c = creats.get(i);
@@ -24,6 +25,7 @@ public void showMessage()
}
}
}
}
public void selectButtonOK()
{
Card check = getPlaneswalker();

View File

@@ -7,6 +7,23 @@ public class Input_Attack_Planeswalker extends Input
{
ButtonUtil.enableOnlyOK();
AllZone.Display.showMessage("Planeswalker Declare Attackers:\r\nSelect creatures that you want to attack " +AllZone.pwCombat.getPlaneswalker());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
CardList creats = new CardList(play.getCards());
creats = creats.getType("Creature");
CardList attackers = new CardList(AllZone.Combat.getAttackers());
for (int i = 0;i<creats.size(); i++)
{
Card c = creats.get(i);
if (CombatUtil.canAttack(c) && c.getKeyword().contains("This card attacks each turn if able.")
&& !attackers.contains(c))
{
AllZone.pwCombat.addAttacker(c);
if (!c.getKeyword().contains("Vigilance"))
c.tap();
}
}
}
public void selectButtonOK()
{

View File

@@ -58,7 +58,7 @@ public class WaveFile extends RiffFile
}
class WaveFormat_Chunk
static class WaveFormat_Chunk
{
public RiffChunkHeader header;
public WaveFormat_ChunkData data;