mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
add Beached As's code for Filigree Sages from Shards of Alara. I simplified it and let targeting happen by clicking an artifact.
This commit is contained in:
@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
|
||||
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
|
||||
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
|
||||
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
|
||||
filigree_sages.jpg http://www.wizards.com/global/images/magic/general/filigree_sages.jpg
|
||||
spire_owl.jpg http://www.wizards.com/global/images/magic/general/spire_owl.jpg
|
||||
sage_aven.jpg http://www.wizards.com/global/images/magic/general/sage_aven.jpg
|
||||
sage_of_epityr.jpg http://www.wizards.com/global/images/magic/general/sage_of_epityr.jpg
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Filigree Sages
|
||||
3 U
|
||||
Artifact Creature Vedalken Wizard
|
||||
2U: Untap target artifact
|
||||
2/3
|
||||
|
||||
Spire Owl
|
||||
1 U
|
||||
Creature Bird
|
||||
|
||||
@@ -17695,6 +17695,49 @@ public class CardFactory_Creatures {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Filigree Sages")) {
|
||||
/*
|
||||
* 2U: Untap target artifact.
|
||||
*/
|
||||
final SpellAbility ability = new Ability(card, "2 U") {
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList list = getArtifactList(Constant.Player.Computer);
|
||||
return list.size() >= 1;
|
||||
}
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
CardList list = getArtifactList(Constant.Player.Computer);
|
||||
if(list.size() > 0) {
|
||||
setTargetCard(CardFactoryUtil.AI_getBestArtifact(list));
|
||||
}
|
||||
}
|
||||
|
||||
private CardList getArtifactList(final String player) {
|
||||
CardList list = new CardList();
|
||||
list.addAll(AllZone.Computer_Play.getCards());
|
||||
list = list.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isArtifact() && c.isTapped() && CardFactoryUtil.canTarget(card, c) && CardUtil.getConvertedManaCost(c.getManaCost()) > 5;
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
@Override
|
||||
public void resolve() {
|
||||
Card c = getTargetCard();
|
||||
if( c.isTapped()) {
|
||||
c.untap();
|
||||
}
|
||||
}
|
||||
};
|
||||
card.addSpellAbility(ability);
|
||||
ability.setStackDescription(cardName + " - Untap Target Artifact");
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetType(ability, "Artifact"));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(shouldCycle(card) != -1) {
|
||||
|
||||
Reference in New Issue
Block a user