mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Cleanup (mostly in CardFactory_Creatures).
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Name=Darth Vader 3
|
||||
Title=Darth Vader
|
||||
Difficulty=hard
|
||||
Description=WU Battle of Wits style alternate win type deck with WoG
|
||||
Description=WU Battle of Wits deck
|
||||
Icon=Darth Vader.jpg
|
||||
Deck Type=constructed
|
||||
[main]
|
||||
|
||||
@@ -357,10 +357,6 @@ public class CombatUtil {
|
||||
if (!attacker.hasKeyword("Shadow")
|
||||
&& blocker.hasKeyword("Shadow")) return false;
|
||||
|
||||
if (blocker.hasKeyword("CARDNAME can't block black creatures.")) {
|
||||
if (attacker.isBlack()) return false;
|
||||
}
|
||||
|
||||
if (attacker.hasKeyword("Creatures with power less than CARDNAME's power can't block it.")
|
||||
&& attacker.getNetAttack() > blocker.getNetAttack())
|
||||
return false;
|
||||
|
||||
@@ -598,60 +598,6 @@ public class CardFactory_Creatures {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Hermit Druid")) {
|
||||
Cost abCost = new Cost("G T", cardName, true);
|
||||
final Ability_Activated ability = new Ability_Activated(card, abCost, null) {
|
||||
private static final long serialVersionUID = 5884624727757154056L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
//Use the ability if there is still a forest in the library
|
||||
CardList library = card.getController().getCardsIn(Zone.Library);
|
||||
return !library.getName("Forest").isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
CardList library = card.getController().getCardsIn(Zone.Library);
|
||||
if (library.size() == 0) return; // maybe provide some notification that library is empty?
|
||||
|
||||
CardList revealed = new CardList();
|
||||
|
||||
Card basicGrab = null;
|
||||
|
||||
int count = 0;
|
||||
// reveal top card until library runs out or hit a basic land
|
||||
while (basicGrab == null) {
|
||||
Card top = library.get(count);
|
||||
count++;
|
||||
revealed.add(top);
|
||||
|
||||
if (top.isBasicLand())
|
||||
basicGrab = top;
|
||||
|
||||
if (count == library.size())
|
||||
break;
|
||||
}//while
|
||||
GuiUtils.getChoiceOptional("Revealed cards:", revealed.toArray());
|
||||
|
||||
if (basicGrab != null) {
|
||||
// put basic in hand
|
||||
AllZone.getGameAction().moveToHand(basicGrab);
|
||||
revealed.remove(basicGrab);
|
||||
}
|
||||
// place revealed cards in graveyard (TODO: player should choose order)
|
||||
for (Card c : revealed) {
|
||||
AllZone.getGameAction().moveToGraveyard(c);
|
||||
}
|
||||
}
|
||||
};
|
||||
ability.setStackDescription(abCost + "Reveal cards from the top of your library until you reveal a basic land card." +
|
||||
" Put that card into your hand and all other cards revealed this way into your graveyard.");
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Vedalken Plotter")) {
|
||||
@@ -1315,217 +1261,6 @@ public class CardFactory_Creatures {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Figure of Destiny")) {
|
||||
Ability ability1 = new Ability(card, "RW") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
boolean artifact = false;
|
||||
card.setBaseAttack(2);
|
||||
card.setBaseDefense(2);
|
||||
|
||||
card.removeIntrinsicKeyword("Flying");
|
||||
card.removeIntrinsicKeyword("First Strike");
|
||||
|
||||
if (card.isArtifact()) artifact = true;
|
||||
|
||||
card.setType(new ArrayList<String>());
|
||||
if (artifact) card.addType("Artifact");
|
||||
card.addType("Creature");
|
||||
card.addType("Kithkin");
|
||||
card.addType("Spirit");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return !card.isType("Spirit")
|
||||
&& super.canPlayAI();
|
||||
}
|
||||
|
||||
};// ability1
|
||||
|
||||
ability1.setDescription("RW: Figure of Destiny becomes a 2/2 Kithkin Spirit.");
|
||||
ability1.setStackDescription("Figure of Destiny becomes a 2/2 Kithkin Spirit.");
|
||||
card.addSpellAbility(ability1);
|
||||
|
||||
|
||||
Ability ability2 = new Ability(card, "RW RW RW") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if (card.isType("Spirit")) {
|
||||
boolean artifact = false;
|
||||
card.setBaseAttack(4);
|
||||
card.setBaseDefense(4);
|
||||
|
||||
card.removeIntrinsicKeyword("Flying");
|
||||
card.removeIntrinsicKeyword("First Strike");
|
||||
|
||||
if (card.isArtifact()) artifact = true;
|
||||
|
||||
card.setType(new ArrayList<String>());
|
||||
if (artifact) card.addType("Artifact");
|
||||
card.addType("Creature");
|
||||
card.addType("Kithkin");
|
||||
card.addType("Spirit");
|
||||
card.addType("Warrior");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return card.isType("Spirit")
|
||||
&& super.canPlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return !card.isType("Warrior")
|
||||
&& super.canPlayAI();
|
||||
}
|
||||
|
||||
};// ability2
|
||||
|
||||
ability2.setDescription("RW RW RW: If Figure of Destiny is a Spirit, it becomes a 4/4 Kithkin Spirit Warrior.");
|
||||
ability2.setStackDescription("Figure of Destiny becomes a 4/4 Kithkin Spirit Warrior.");
|
||||
card.addSpellAbility(ability2);
|
||||
|
||||
|
||||
Ability ability3 = new Ability(card, "RW RW RW RW RW RW") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if (card.isType("Warrior")) {
|
||||
boolean artifact = false;
|
||||
card.setBaseAttack(8);
|
||||
card.setBaseDefense(8);
|
||||
|
||||
card.addIntrinsicKeyword("Flying");
|
||||
card.addIntrinsicKeyword("First Strike");
|
||||
|
||||
if (card.isArtifact()) artifact = true;
|
||||
|
||||
card.setType(new ArrayList<String>());
|
||||
if (artifact) card.addType("Artifact");
|
||||
card.addType("Creature");
|
||||
card.addType("Kithkin");
|
||||
card.addType("Spirit");
|
||||
card.addType("Warrior");
|
||||
card.addType("Avatar");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return card.isType("Warrior")
|
||||
&& super.canPlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return !card.isType("Avatar")
|
||||
&& super.canPlayAI();
|
||||
}
|
||||
};// ability3
|
||||
|
||||
StringBuilder sbDesc = new StringBuilder();
|
||||
sbDesc.append("RW RW RW RW RW RW: If Figure of Destiny is a Warrior, it becomes ");
|
||||
sbDesc.append("an 8/8 Kithkin Spirit Warrior Avatar with flying and first strike.");
|
||||
ability3.setDescription(sbDesc.toString());
|
||||
|
||||
ability3.setStackDescription("Figure of Destiny becomes an 8/8 Kithkin Spirit Warrior Avatar with flying and first strike.");
|
||||
card.addSpellAbility(ability3);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
*/
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Cantivore")) {
|
||||
SpellAbility spell = new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = 7254358703158629514L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getCardsIn(Zone.Graveyard);
|
||||
list = list.getType("Enchantment");
|
||||
return super.canPlayAI() && list.size() > 0;
|
||||
}
|
||||
};
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpell();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Terravore")) {
|
||||
SpellAbility spell = new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = 7316190829288665283L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getCardsIn(Zone.Graveyard);
|
||||
list = list.getType("Land");
|
||||
return super.canPlayAI() && list.size() > 0;
|
||||
}
|
||||
};
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpell();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Mortivore")) {
|
||||
SpellAbility spell = new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = -7118801410173525870L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getCardsIn(Zone.Graveyard);
|
||||
list = list.getType("Creature");
|
||||
return super.canPlayAI() && list.size() > 0;
|
||||
}
|
||||
};
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpell();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Cognivore")) {
|
||||
SpellAbility spell = new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = -2216181341715046786L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getCardsIn(Zone.Graveyard);
|
||||
list = list.getType("Instant");
|
||||
return super.canPlayAI() && list.size() > 0;
|
||||
}
|
||||
};
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpell();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Magnivore")) {
|
||||
SpellAbility spell = new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = -2252263708643462897L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = AllZoneUtil.getCardsIn(Zone.Graveyard);
|
||||
list = list.getType("Sorcery");
|
||||
return super.canPlayAI() && list.size() > 0;
|
||||
}
|
||||
};
|
||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
||||
card.clearFirstSpell();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Shifting Wall") || cardName.equals("Maga, Traitor to Mortals") || cardName.equals("Feral Hydra")
|
||||
@@ -3017,6 +2752,7 @@ public class CardFactory_Creatures {
|
||||
ability.setStackDescription(sb.toString());
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Awakener Druid")) {
|
||||
final long[] timeStamp = {0};
|
||||
@@ -3076,8 +2812,6 @@ public class CardFactory_Creatures {
|
||||
SpellAbility myAb = createAb.getAbility(abilityBuilder.toString(), card);
|
||||
|
||||
card.addSpellAbility(myAb);
|
||||
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user