A lot of fixes in cards.txt and the CardFactories, removed all warnings.

This commit is contained in:
jendave
2011-08-06 02:45:22 +00:00
parent e74ef54912
commit a48a6f43bb
12 changed files with 125 additions and 116 deletions

View File

@@ -3326,85 +3326,6 @@ public class CardFactory implements NewConstants {
//*************** START *********** START **************************
else if(cardName.equals("Magus of the Disk"))
{
SpellAbility summoningSpell = new Spell_Permanent(card)
{
private static final long serialVersionUID = 2510163318362956239L;
public boolean canPlayAI()
{
boolean nevinyrralInPlay = false;
CardList inPlay = new CardList();
inPlay.addAll(AllZone.Computer_Play.getCards());
for(int i=0; i<inPlay.size(); ++i)
{
if( inPlay.getCard(i).getName().equals("Nevinyrral's Disk"))
{
nevinyrralInPlay = true;
}
}
return ! nevinyrralInPlay && (0 < CardFactoryUtil.AI_getHumanCreature(card, false).size());
}
};
card.clearSpellAbility();
card.addSpellAbility(summoningSpell);
card.addComesIntoPlayCommand(new Command()
{
private static final long serialVersionUID = 1227443034730254929L;
public void execute()
{
card.tap();
}
});
final SpellAbility ability = new Ability_Tap(card, "1")
{
private static final long serialVersionUID = -4871606824998622131L;
public void resolve()
{
CardList all = new CardList();
all.addAll(AllZone.Human_Play.getCards());
all.addAll(AllZone.Computer_Play.getCards());
all = filter(all);
for(int i = 0; i < all.size(); i++)
AllZone.GameAction.destroy(all.get(i));
}
private CardList filter(CardList list)
{
return list.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
return c.isArtifact() || c.isCreature() || c.isEnchantment();
}
});
}//filter()
public boolean canPlayAI()
{
CardList human = new CardList(AllZone.Human_Play.getCards());
CardList computer = new CardList(AllZone.Computer_Play.getCards());
human = human.getType("Creature");
computer = computer.getType("Creature");
//the computer will at least destroy 2 more human creatures
return computer.size() < human.size()-1 || AllZone.Computer_Life.getLife() < 7;
}
};//SpellAbility
card.addSpellAbility(ability);
ability.setDescription("1, tap: Destroy all artifacts, creatures, and enchantments.");
ability.setStackDescription("Destroy all artifacts, creatures, and enchantments.");
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Tanglebloom"))
{
@@ -15996,6 +15917,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
}
}
};//Input
ability.setDescription("W U B R G: Exile target permanent.");
ability.setBeforePayMana(target);
card.addSpellAbility(ability);
@@ -16038,7 +15960,8 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
}
}
};//Input
ability.setDescription("1, tap: Untap target artifact.");
ability.setBeforePayMana(target);
card.addSpellAbility(ability);