- 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 Accelerated Mutation
3 G G 3 G G
Instant Instant

View File

@@ -1,6 +1,6 @@
program/mail=mtgerror@yahoo.com program/mail=mtgerror@yahoo.com
program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26 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 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 watcher_sliver.jpg http://[server]/TSP/Watcher%20Sliver.full.jpg
watchwing_scarecrow.jpg http://[server]/SHM/Watchwing%20Scarecrow.full.jpg watchwing_scarecrow.jpg http://[server]/SHM/Watchwing%20Scarecrow.full.jpg
watchwolf.jpg http://[server]/RAV/Watchwolf.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_gun_balloon_game.jpg http://[server]/UNH/Water%20Gun%20Balloon%20Game.full.jpg
water_wurm.jpg http://[server]/DK/Water%20Wurm.full.jpg water_wurm.jpg http://[server]/DK/Water%20Wurm.full.jpg
waterfront_bouncer.jpg http://[server]/MM/Waterfront%20Bouncer.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"; player = "Human";
System.out.println("Evil hack"); System.out.println("Evil hack");
} }
Object o = map.get(zone + player); Object o = map.get(zone + player);
if(o == null) if(o == null)
throw new RuntimeException("AllZone : getZone() invalid parameters " +zone +" " +player); throw new RuntimeException("AllZone : getZone() invalid parameters " +zone +" " +player);

View File

@@ -12,9 +12,9 @@ public interface BoosterDraft
class BoosterDraft_1 implements BoosterDraft class BoosterDraft_1 implements BoosterDraft
{ {
private final BoosterDraftAI draftAI = new BoosterDraftAI(); private final BoosterDraftAI draftAI = new BoosterDraftAI();
private final int nPlayers = 8; private static final int nPlayers = 8;
private static final int boosterPackSize = 15; 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 int currentCount = 0;
private CardList[] pack;//size 8 private CardList[] pack;//size 8

View File

@@ -189,14 +189,19 @@ public class Card extends MyObservable
public void addCounter(Counters counterName, int n) 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)) if(counters.containsKey(counterName))
{ {
Integer aux = counters.get(counterName) + n; Integer aux = counters.get(counterName) + (multiplier * n);
counters.put(counterName,aux); counters.put(counterName,aux);
} }
else else
{ {
counters.put(counterName, Integer.valueOf(n)); counters.put(counterName, Integer.valueOf(multiplier * n));
} }
this.updateObservers(); this.updateObservers();
} }

View File

@@ -823,7 +823,7 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(a1); card.addSpellAbility(a1);
String Desc = new String(); String Desc = "";
Desc = "Regenerate " + cardName; Desc = "Regenerate " + cardName;
a1.setDescription(manacost + ": " + Desc); a1.setDescription(manacost + ": " + Desc);
@@ -14013,10 +14013,14 @@ public class CardFactory implements NewConstants {
return AllZone.Phase.getPhase().equals(Constant.Phase.Main1); return AllZone.Phase.getPhase().equals(Constant.Phase.Main1);
} }
public void resolve() 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() final Command atEOT = new Command()
{ {
private static final long serialVersionUID = -1928884889370422828L; private static final long serialVersionUID = -1928884889370422828L;
@@ -14062,69 +14066,6 @@ 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("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 ************************** //*************** START *********** START **************************
else if(cardName.equals("Animate Land")) else if(cardName.equals("Animate Land"))
@@ -17187,7 +17128,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
}//getCard2 }//getCard2
// copies stats like attack, defense, etc.. // copies stats like attack, defense, etc..
private Card copyStats(Object o) { public static Card copyStats(Object o) {
Card sim = (Card) o; Card sim = (Card) o;
Card c = new Card(); Card c = new Card();

View File

@@ -3151,9 +3151,10 @@ public class CardFactoryUtil
return list; 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) String[] intrinsicKeywords)
{ {
CardList list = new CardList();
Card c = new Card(); Card c = new Card();
c.setName(name); c.setName(name);
c.setImageName(imageName); c.setImageName(imageName);
@@ -3174,7 +3175,20 @@ public class CardFactoryUtil
c.addIntrinsicKeyword(kw); c.addIntrinsicKeyword(kw);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, source.getController()); 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 //may return null

File diff suppressed because it is too large Load Diff

View File

@@ -1030,31 +1030,8 @@ class CardFactory_Lands {
card.subtractCounter(Counters.ICE, 1); card.subtractCounter(Counters.ICE, 1);
if (card.getCounters(Counters.ICE) == 0) if (card.getCounters(Counters.ICE) == 0)
{ CardFactoryUtil.makeToken("Marit Lage", "B 20 20 Marit Lage", card, "B", new String[] {"Legendary", "Creature", "Avatar"}, 20, 20, new String[] {"Flying", "Indestructible"} );
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
//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."); 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() public void resolve()
{ {
String player = card.getController();
AllZone.GameAction.sacrifice(card); AllZone.GameAction.sacrifice(card);
CardFactoryUtil.makeToken("Gargoyle", "C 3 4 Gargoyle", card, "", new String[] {"Artifact", "Creature", "Gargoyle"}, 3, 4, new String[] {"Flying"} );
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);
} }
}; };
@@ -1726,12 +1681,6 @@ class CardFactory_Lands {
card.addSpellAbility(ability); 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 ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
@@ -1751,27 +1700,7 @@ class CardFactory_Lands {
public void resolve() public void resolve()
{ {
String player = card.getController(); CardFactoryUtil.makeToken("Kobolds of Kher Keep", "R 0 1 Kobolds of Kher Keep", card, "R", new String[] {"Creature", "Kobold"}, 0, 1, new String[] {""} );
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);
} }
}; };
@@ -1805,27 +1734,7 @@ class CardFactory_Lands {
public void resolve() public void resolve()
{ {
String player = card.getController(); CardFactoryUtil.makeToken("Saproling", "G 1 1 Saproling", card, "G", new String[] {"Creature", "Saproling"}, 1, 1, new String[] {""} );
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);
} }
}; };
@@ -1850,26 +1759,7 @@ class CardFactory_Lands {
{ {
public void resolve() public void resolve()
{ {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); CardFactoryUtil.makeToken("Spirit", "C 1 1 Spirit", card, "", new String[] {"Creature", "Spirit"}, 1, 1, new String[] {""} );
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);
}//resolve() }//resolve()
};//Ability };//Ability
@@ -2254,28 +2144,7 @@ class CardFactory_Lands {
public void resolve() public void resolve()
{ {
String player = card.getController(); CardFactoryUtil.makeToken("Assembly-Worker", "C 2 2 Assembly-Worker", card, "C", new String[] {"Artiface", "Creature", "Assembly-Worker"}, 2, 2, new String[] {""} );
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);
} }
}; };

View File

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

View File

@@ -12,16 +12,18 @@ public void showMessage()
CardList creats = new CardList(play.getCards()); CardList creats = new CardList(play.getCards());
creats = creats.getType("Creature"); creats = creats.getType("Creature");
for (int i = 0;i<creats.size(); i++) if (getPlaneswalker() == null) {
{ 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.")) Card c = creats.get(i);
{ if (CombatUtil.canAttack(c) && c.getKeyword().contains("This card attacks each turn if able."))
{
AllZone.Combat.addAttacker(c);
if (!c.getKeyword().contains("Vigilance")) AllZone.Combat.addAttacker(c);
c.tap(); if (!c.getKeyword().contains("Vigilance"))
} c.tap();
}
}
} }
} }
public void selectButtonOK() public void selectButtonOK()

View File

@@ -7,6 +7,23 @@ public class Input_Attack_Planeswalker extends Input
{ {
ButtonUtil.enableOnlyOK(); ButtonUtil.enableOnlyOK();
AllZone.Display.showMessage("Planeswalker Declare Attackers:\r\nSelect creatures that you want to attack " +AllZone.pwCombat.getPlaneswalker()); 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() 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 RiffChunkHeader header;
public WaveFormat_ChunkData data; public WaveFormat_ChunkData data;