mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
add Doomsday Specter (from Planeshift)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1337,6 +1337,7 @@ res/cardsfolder/donate.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doom_blade.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doomed_necromancer.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doomsday.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doomsday_specter.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/door_to_nothingness.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/doran_the_siege_tower.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/dosans_oldest_chant.txt -text svneol=native#text/plain
|
||||
|
||||
11
res/cardsfolder/doomsday_specter.txt
Normal file
11
res/cardsfolder/doomsday_specter.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Doomsday Specter
|
||||
ManaCost:2 U B
|
||||
Types:Creature Specter
|
||||
Text:When CARDNAME enters the battlefield, return a blue or black creature you control to its owner's hand.\r\n\r\nWhenever CARDNAME deals combat damage to a player, look at that player's hand and choose a card from it. The player discards that card.
|
||||
PT:2/3
|
||||
K:Flying
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/doomsday_specter.jpg
|
||||
SetInfo:PLS|Rare|http://magiccards.info/scans/en/ps/103.jpg
|
||||
End
|
||||
@@ -7738,7 +7738,6 @@ public class CardFactory_Creatures {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Cavern Harpy")) {
|
||||
final SpellAbility a1 = new Ability(card, "0") {
|
||||
@@ -7827,6 +7826,48 @@ public class CardFactory_Creatures {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Doomsday Specter")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
Card c = getTargetCard();
|
||||
if(AllZone.GameAction.isCardInPlay(c)) {
|
||||
AllZone.GameAction.moveToHand(c);
|
||||
}
|
||||
}
|
||||
};
|
||||
Command intoPlay = new Command() {
|
||||
private static final long serialVersionUID = -1944407110865125254L;
|
||||
|
||||
public void execute() {
|
||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(card.getController());
|
||||
creatures = creatures.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isBlue() || c.isBlack();
|
||||
}
|
||||
});
|
||||
|
||||
AllZone.InputControl.setInput(CardFactoryUtil.input_targetSpecific(ability, creatures,
|
||||
"Select blue or black creature you control.", false, false));
|
||||
ButtonUtil.disableAll();
|
||||
|
||||
}//execute()
|
||||
};//Command
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(new Spell_Permanent(card) {
|
||||
private static final long serialVersionUID = -1885027663323697759L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Nemata, Grove Guardian")) {
|
||||
|
||||
|
||||
@@ -6064,6 +6064,7 @@ public class GameActionUtil {
|
||||
else if(c.getName().equals("Treva, the Renewer")) playerCombatDamage_Treva(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("Doomsday Specter")) opponent_Discard_Card_You_Choose(c);
|
||||
|
||||
//Unused variable
|
||||
//c.setDealtCombatDmgToOppThisTurn(true);
|
||||
@@ -6772,6 +6773,52 @@ public class GameActionUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static void opponent_Discard_Card_You_Choose(final Card source) {
|
||||
final Player player = source.getController().getOpponent();
|
||||
|
||||
if(source.getNetAttack() > 0) {
|
||||
SpellAbility ability = new Ability(source, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone pzH = AllZone.getZone(Constant.Zone.Hand, player);
|
||||
if(pzH.size() != 0) {
|
||||
CardList dPHand = new CardList(pzH.getCards());
|
||||
CardList dPChHand = new CardList(dPHand.toArray());
|
||||
|
||||
if(source.getController().isComputer()){
|
||||
//hardcoded to 1, but if it needs to be changed...
|
||||
for(int i = 0; i < 1; i++) {
|
||||
if (dPChHand.size() > 0){
|
||||
Card c = CardFactoryUtil.AI_getMostExpensivePermanent(dPChHand, source, false);
|
||||
AllZone.Display.getChoiceOptional("Computer has chosen", new Card[] {c});
|
||||
AllZone.HumanPlayer.discard(c, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
//human
|
||||
AllZone.Display.getChoiceOptional("Revealed computer hand", dPHand.toArray());
|
||||
|
||||
//hardcode for 1, but if it needs to be expanded, it's here
|
||||
for(int i = 0; i < 1; i++) {
|
||||
if (dPChHand.size() > 0) {
|
||||
Card dC = AllZone.Display.getChoice("Choose a card to be discarded", dPChHand.toArray());
|
||||
AllZone.ComputerPlayer.discard(dC, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};// ability
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(source.getName()).append(" - ").append(player).append(" discards a card of opponent's choice.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
// upkeep_CheckEmptyDeck_Lose
|
||||
private static void upkeep_CheckEmptyDeck_Lose() {
|
||||
|
||||
Reference in New Issue
Block a user