Added Affa Guard Hound

This commit is contained in:
jendave
2011-08-06 04:39:24 +00:00
parent 69c7b27a0a
commit ca2d3a46b7
4 changed files with 91 additions and 0 deletions

View File

@@ -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
affa_guard_hound.jpg http://www.wizards.com/global/images/magic/general/affa_guard_hound.jpg
totem_guide_hartebeest.jpg http://www.wizards.com/global/images/magic/general/totem_guide_hartebeest.jpg
novablast_wurm.jpg http://www.wizards.com/global/images/magic/general/novablast_wurm.jpg
hammerhead_shark.jpg http://www.wizards.com/global/images/magic/general/hammerhead_shark.jpg

View File

@@ -1,3 +1,10 @@
Affa Guard Hound
2 W
Creature Hound
When Affa Guard Hound comes into play, target creature gets +0/+3 until end of turn.
2/2
Flash
Totem-Guide Hartebeest
4 W
Creature Antelope

View File

@@ -10606,6 +10606,88 @@ public class CardFactory_Creatures {
ability.setBeforePayMana(new Input_NoCost_TapAbility(ability));
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Affa Guard Hound")) {
final CommandReturn getCreature = new CommandReturn() {
//get target card, may be null
public Object execute() {
Combat combat = ComputerUtil.getAttackers();
Card[] c = combat.getAttackers();
CardList list = new CardList();
if(c.length == 0) {
list.addAll(AllZone.Computer_Play.getCards());
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isCreature();
}
});
if(list.size() == 0) return card;
else {
CardListUtil.sortAttack(list);
CardListUtil.sortFlying(list);
for(int i = 0; i < list.size(); i++)
if(list.get(i).isUntapped()) return list.get(i);
return list.get(0);
}
}
return c[0];
}//execute()
};//CommandReturn
final SpellAbility ability = new Ability(card, "0") {
@Override
public void resolve() {
final Card c = getTargetCard();
if(AllZone.GameAction.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
c.addTempDefenseBoost(3);
AllZone.EndOfTurn.addUntil(new Command() {
private static final long serialVersionUID = -6478141025919509688L;
public void execute() {
c.addTempDefenseBoost(-3);
}
});
}//if
}//resolve()
};//SpellAbility
Command intoPlay = new Command() {
private static final long serialVersionUID = -4514602963470596654L;
public void execute() {
if(card.getController().equals(Constant.Player.Human)) {
AllZone.InputControl.setInput(CardFactoryUtil.input_targetCreature(ability));
} else//computer
{
Object o = getCreature.execute();
if(o != null)//should never happen, but just in case
{
ability.setTargetCard((Card) o);
AllZone.Stack.add(ability);
}
}//else
}//execute()
};
card.addComesIntoPlayCommand(intoPlay);
card.clearSpellAbility();
card.addSpellAbility(new Spell_Permanent(card) {
private static final long serialVersionUID = 7153795935713327863L;
@Override
public boolean canPlayAI() {
Object o = getCreature.execute();
return (o != null) && AllZone.getZone(getSourceCard()).is(Constant.Zone.Hand);
}
});
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Elvish Farmer") || cardName.equals("Mycologist")) {

View File

@@ -77,6 +77,7 @@ public class ComputerAI_General implements Computer {
play.add("Flametongue Kavu");
play.add("Briarhorn");
play.add("Inner-Flame Acolyte");
play.add("Affa Guard Hound");
play.add("Keening Banshee");
play.add("Aggressive Urge");
play.add("Amnesia");