- If a Sower of Temptation leaves play, and the creature it stole was attacking, that creature will be removed from combat now.

- Added a makeToken method in CardFactoryUtil, and changed most token creation code in  to use this.
- Bunch of  cleanups.
This commit is contained in:
jendave
2011-08-06 03:16:51 +00:00
parent a522c0d7bf
commit 6057c3b8ff
3 changed files with 97 additions and 966 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3150,6 +3150,32 @@ public class CardFactoryUtil
list.add(creatureLands[i]);
return list;
}
public static void makeToken(String name, String imageName, Card source, String manaCost, String[] types, int baseAttack, int baseDefense,
String[] intrinsicKeywords)
{
Card c = new Card();
c.setName(name);
c.setImageName(imageName);
c.setOwner(source.getController());
c.setController(source.getController());
c.setManaCost(manaCost);
c.setToken(true);
for (String t : types)
c.addType(t);
c.setBaseAttack(baseAttack);
c.setBaseDefense(baseDefense);
for (String kw : intrinsicKeywords)
c.addIntrinsicKeyword(kw);
PlayerZone play = AllZone.getZone(Constant.Zone.Play, source.getController());
play.add(c);
}
//may return null
static public Card getRandomCard(CardList list)

View File

@@ -9092,7 +9092,7 @@ public class CardFactory_Creatures {
{
private static final long serialVersionUID = -8961588142846220965L;
public void execute()
public void execute()
{
Card c = moveCreature[0];
@@ -9107,6 +9107,15 @@ public class CardFactory_Creatures {
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);