1) update Target_Selection.input_targetValid() to call getValidCards(Tgts, controller)

2) add Witch Hunter (from The Dark)
This commit is contained in:
jendave
2011-08-06 09:05:11 +00:00
parent 69f8980c1b
commit 5036c3360e
5 changed files with 48 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -4649,6 +4649,7 @@ res/cardsfolder/wirewood_savage.txt -text svneol=native#text/plain
res/cardsfolder/wispmare.txt -text svneol=native#text/plain res/cardsfolder/wispmare.txt -text svneol=native#text/plain
res/cardsfolder/wistful_selkie.txt -text svneol=native#text/plain res/cardsfolder/wistful_selkie.txt -text svneol=native#text/plain
res/cardsfolder/wistful_thinking.txt -text svneol=native#text/plain res/cardsfolder/wistful_thinking.txt -text svneol=native#text/plain
res/cardsfolder/witch_hunter.txt -text svneol=native#text/plain
res/cardsfolder/witch_maw_nephilim.txt -text svneol=native#text/plain res/cardsfolder/witch_maw_nephilim.txt -text svneol=native#text/plain
res/cardsfolder/withstand_death.txt -text svneol=native#text/plain res/cardsfolder/withstand_death.txt -text svneol=native#text/plain
res/cardsfolder/wits_end.txt -text svneol=native#text/plain res/cardsfolder/wits_end.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Witch Hunter
ManaCost:2 W W
Types:Creature Human Cleric
Text:no text
PT:1/1
K:abDamageTgtP T:1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/witch_hunter.jpg
End

View File

@@ -2436,7 +2436,7 @@ public class Card extends MyObservable {
if (r == true) return true; if (r == true) return true;
} }
return false; return false;
}//getValidCards }//isValidCard
public void setImmutable(boolean isImmutable) { public void setImmutable(boolean isImmutable) {
this.isImmutable = isImmutable; this.isImmutable = isImmutable;

View File

@@ -20271,6 +20271,42 @@ public class CardFactory_Creatures {
card.addSpellAbility(ability); card.addSpellAbility(ability);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Witch Hunter")) {
final String Tgts[] = {"Creature+YouDontCtrl"};
Target target = new Target("TgtV", "Select target creature you don't control.", Tgts);
final Ability_Cost abCost = new Ability_Cost("1 W W T", card.getName(), true);
final SpellAbility ability = new Ability_Activated(card, abCost, target) {
private static final long serialVersionUID = -7134239527522243583L;
@Override
public void resolve() {
Card target = getTargetCard();
if( AllZone.GameAction.isCardInPlay(target) && CardFactoryUtil.canTarget(card, target)) {
AllZone.GameAction.moveToHand(target);
}
}
@Override
public boolean canPlay() {
String opp = AllZone.GameAction.getOpponent(card.getController());
CardList targets = AllZoneUtil.getCreaturesInPlay(opp);
return AllZoneUtil.isCardInPlay(card) && targets.size() > 0 && super.canPlay();
}
@Override
public boolean canPlayAI() {
return false;
}
};//SpellAbility
card.addSpellAbility(ability);
ability.setDescription(abCost+"Return target creature an opponent controls to its owner's hand.");
ability.setStackDescription(card.getName() + " - return target creature to owner's hand.");
//ability.setBeforePayMana(runtime);
}//*************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities
// -1 means keyword "Cycling" not found // -1 means keyword "Cycling" not found

View File

@@ -209,7 +209,7 @@ public class Target_Selection {
CardList allCards = new CardList(); CardList allCards = new CardList();
allCards.addAll(AllZone.Human_Play.getCards()); allCards.addAll(AllZone.Human_Play.getCards());
allCards.addAll(AllZone.Computer_Play.getCards()); allCards.addAll(AllZone.Computer_Play.getCards());
CardList choices = allCards.getValidCards(Tgts); CardList choices = allCards.getValidCards(Tgts, sa.getSourceCard().getController());
boolean canTargetPlayer = false; boolean canTargetPlayer = false;
for(String s : Tgts) for(String s : Tgts)