mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
add the missing "return card" ability of The Unspeakable.
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
Name:The Unspeakable
|
Name:The Unspeakable
|
||||||
ManaCost:6 U U U
|
ManaCost:6 U U U
|
||||||
Types:Legendary Creature Spirit
|
Types:Legendary Creature Spirit
|
||||||
Text:(NOTE: "Whenever The Unspeakable deals combat damage to a player, you may return target Arcane card from your graveyard to your hand." not implemented.)
|
Text:no text
|
||||||
PT:6/7
|
PT:6/7
|
||||||
K:Flying
|
K:Flying
|
||||||
K:Trample
|
K:Trample
|
||||||
SVar:RemAIDeck:True
|
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card78693.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card78693.jpg
|
||||||
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/98.jpg
|
SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/98.jpg
|
||||||
|
|||||||
@@ -6065,11 +6065,59 @@ public class GameActionUtil {
|
|||||||
else if(c.getName().equals("Rith, the Awakener")) playerCombatDamage_Rith(c);
|
else if(c.getName().equals("Rith, the Awakener")) playerCombatDamage_Rith(c);
|
||||||
else if(c.getName().equals("Vorosh, the Hunter")) playerCombatDamage_Vorosh(c);
|
else if(c.getName().equals("Vorosh, the Hunter")) playerCombatDamage_Vorosh(c);
|
||||||
else if(c.getName().equals("Doomsday Specter")) opponent_Discard_Card_You_Choose(c);
|
else if(c.getName().equals("Doomsday Specter")) opponent_Discard_Card_You_Choose(c);
|
||||||
|
else if(c.getName().equals("The Unspeakable")) may_Return_Graveyard_to_Hand(c, "Arcane".split(","));
|
||||||
|
|
||||||
//Unused variable
|
//Unused variable
|
||||||
//c.setDealtCombatDmgToOppThisTurn(true);
|
//c.setDealtCombatDmgToOppThisTurn(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void may_Return_Graveyard_to_Hand(final Card source, final String[] valid) {
|
||||||
|
final Player player = source.getController();
|
||||||
|
final PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||||
|
final boolean mayReturn = true;
|
||||||
|
|
||||||
|
final SpellAbility returnTgt = new Ability(source, "0") {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
Card target = getTargetCard();
|
||||||
|
if (AllZone.GameAction.isCardInZone(target, grave)) {
|
||||||
|
AllZone.GameAction.moveToHand(target);
|
||||||
|
}
|
||||||
|
}//resolve()
|
||||||
|
};// returnTgt
|
||||||
|
|
||||||
|
|
||||||
|
CardList choices = new CardList(grave.getCards());
|
||||||
|
choices = choices.getValidCards(valid, player, source);
|
||||||
|
|
||||||
|
if( choices.isEmpty() ) return;
|
||||||
|
|
||||||
|
if( player.isHuman() ) {
|
||||||
|
if (grave.size() > 0) {
|
||||||
|
Object o;
|
||||||
|
if (mayReturn) {
|
||||||
|
o = AllZone.Display.getChoiceOptional("Select a card", choices.toArray());
|
||||||
|
} else {
|
||||||
|
o = AllZone.Display.getChoice("Select a card", choices.toArray());
|
||||||
|
}
|
||||||
|
if (o != null) {
|
||||||
|
Card c_1 = (Card) o;
|
||||||
|
returnTgt.setTargetCard(c_1);
|
||||||
|
AllZone.Stack.add(returnTgt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}// if HumanPlayer
|
||||||
|
|
||||||
|
else { // ComputerPlayer
|
||||||
|
|
||||||
|
if (choices.size() > 0) {
|
||||||
|
returnTgt.setTargetCard(choices.get(0));
|
||||||
|
AllZone.Stack.add(returnTgt);
|
||||||
|
}
|
||||||
|
}// ComputerPlayer
|
||||||
|
}
|
||||||
|
|
||||||
private static void playerCombatDamage_PoisonCounter(Card c, int n) {
|
private static void playerCombatDamage_PoisonCounter(Card c, int n) {
|
||||||
final Player opponent = c.getController().getOpponent();
|
final Player opponent = c.getController().getOpponent();
|
||||||
|
|||||||
Reference in New Issue
Block a user