mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
1) update Target_Selection.input_targetValid() to call getValidCards(Tgts, controller)
2) add Witch Hunter (from The Dark)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/wistful_selkie.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/withstand_death.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/wits_end.txt -text svneol=native#text/plain
|
||||
|
||||
9
res/cardsfolder/witch_hunter.txt
Normal file
9
res/cardsfolder/witch_hunter.txt
Normal 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
|
||||
@@ -2436,7 +2436,7 @@ public class Card extends MyObservable {
|
||||
if (r == true) return true;
|
||||
}
|
||||
return false;
|
||||
}//getValidCards
|
||||
}//isValidCard
|
||||
|
||||
public void setImmutable(boolean isImmutable) {
|
||||
this.isImmutable = isImmutable;
|
||||
|
||||
@@ -20271,6 +20271,42 @@ public class CardFactory_Creatures {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** 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
|
||||
// -1 means keyword "Cycling" not found
|
||||
|
||||
@@ -209,7 +209,7 @@ public class Target_Selection {
|
||||
CardList allCards = new CardList();
|
||||
allCards.addAll(AllZone.Human_Play.getCards());
|
||||
allCards.addAll(AllZone.Computer_Play.getCards());
|
||||
CardList choices = allCards.getValidCards(Tgts);
|
||||
CardList choices = allCards.getValidCards(Tgts, sa.getSourceCard().getController());
|
||||
|
||||
boolean canTargetPlayer = false;
|
||||
for(String s : Tgts)
|
||||
|
||||
Reference in New Issue
Block a user