mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
add The Abyss (from Legends)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -4134,6 +4134,7 @@ res/cardsfolder/thallid_germinator.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/thallid_shell_dweller.txt -text svneol=native#text/plain
|
res/cardsfolder/thallid_shell_dweller.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/that_which_was_taken.txt -text svneol=native#text/plain
|
res/cardsfolder/that_which_was_taken.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/thaumatog.txt -text svneol=native#text/plain
|
res/cardsfolder/thaumatog.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/the_abyss.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/the_hive.txt -text svneol=native#text/plain
|
res/cardsfolder/the_hive.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/the_lady_of_the_mountain.txt -text svneol=native#text/plain
|
res/cardsfolder/the_lady_of_the_mountain.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/the_rack.txt -text svneol=native#text/plain
|
res/cardsfolder/the_rack.txt -text svneol=native#text/plain
|
||||||
|
|||||||
7
res/cardsfolder/the_abyss.txt
Normal file
7
res/cardsfolder/the_abyss.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Name:The Abyss
|
||||||
|
ManaCost:3 B
|
||||||
|
Types:World Enchantment
|
||||||
|
Text:At the beginning of each player's upkeep, destroy target nonartifact creature that player controls of his or her choice. It can't be regenerated.
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/the_abyss.jpg
|
||||||
|
End
|
||||||
@@ -469,6 +469,12 @@ public class AllZoneUtil {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static CardListFilter nonartifacts = new CardListFilter() {
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return !c.isArtifact();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public static CardListFilter lands = new CardListFilter() {
|
public static CardListFilter lands = new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
return c.isLand();
|
return c.isLand();
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public class GameActionUtil {
|
|||||||
|
|
||||||
AllZone.GameAction.CheckWheneverKeyword(AllZone.CardFactory.HumanNullCard, "BeginningOfUpkeep", null);
|
AllZone.GameAction.CheckWheneverKeyword(AllZone.CardFactory.HumanNullCard, "BeginningOfUpkeep", null);
|
||||||
|
|
||||||
|
upkeep_The_Abyss();
|
||||||
upkeep_Yawgmoth_Demon();
|
upkeep_Yawgmoth_Demon();
|
||||||
upkeep_Lord_of_the_Pit();
|
upkeep_Lord_of_the_Pit();
|
||||||
upkeep_Drop_of_Honey();
|
upkeep_Drop_of_Honey();
|
||||||
@@ -3385,6 +3386,66 @@ public class GameActionUtil {
|
|||||||
}
|
}
|
||||||
}//damageUpkeepCost
|
}//damageUpkeepCost
|
||||||
|
|
||||||
|
private static void upkeep_The_Abyss() {
|
||||||
|
/*
|
||||||
|
* At the beginning of each player's upkeep, destroy target
|
||||||
|
* nonartifact creature that player controls of his or her
|
||||||
|
* choice. It can't be regenerated.
|
||||||
|
*/
|
||||||
|
final String player = AllZone.Phase.getActivePlayer();
|
||||||
|
final CardList cards = AllZoneUtil.getCardsInPlay("The Abyss");
|
||||||
|
|
||||||
|
for(Card c:cards) {
|
||||||
|
final Card abyss = c;
|
||||||
|
|
||||||
|
final Ability sacrificeCreature = new Ability(abyss, "") {
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
if(player.equals(Constant.Player.Human)) {
|
||||||
|
AllZone.InputControl.setInput( new Input() {
|
||||||
|
private static final long serialVersionUID = 4820011040853968644L;
|
||||||
|
public void showMessage() {
|
||||||
|
AllZone.Display.showMessage(abyss.getName()+" - Select one nonartifact creature to destroy");
|
||||||
|
ButtonUtil.disableAll();
|
||||||
|
}
|
||||||
|
public void selectCard(Card selected, PlayerZone zone) {
|
||||||
|
//probably need to restrict by controller also
|
||||||
|
if(selected.isCreature() && !selected.isArtifact() && zone.is(Constant.Zone.Play)
|
||||||
|
&& zone.getPlayer().equals(Constant.Player.Human)) {
|
||||||
|
AllZone.GameAction.destroyNoRegeneration(selected);
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
}//selectCard()
|
||||||
|
});//Input
|
||||||
|
}
|
||||||
|
else { //computer
|
||||||
|
CardList targets = abyss_getTargets(player);
|
||||||
|
CardList indestruct = targets.getKeyword("Indestructible");
|
||||||
|
if(indestruct.size() > 0) {
|
||||||
|
AllZone.GameAction.destroyNoRegeneration(indestruct.get(0));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Card target = CardFactoryUtil.AI_getWorstCreature(targets);
|
||||||
|
if(null == target) {
|
||||||
|
//must be nothing valid to destroy
|
||||||
|
}
|
||||||
|
else AllZone.GameAction.destroyNoRegeneration(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}//resolve
|
||||||
|
};//sacrificeCreature
|
||||||
|
sacrificeCreature.setStackDescription(abyss.getName()+" - destroy a nonartifact creatur of your choice.");
|
||||||
|
if(abyss_getTargets(player).size() > 0)
|
||||||
|
AllZone.Stack.add(sacrificeCreature);
|
||||||
|
}//end for
|
||||||
|
}//The Abyss
|
||||||
|
|
||||||
|
private static CardList abyss_getTargets(final String player) {
|
||||||
|
CardList creats = AllZoneUtil.getCreaturesInPlay(player);
|
||||||
|
creats = creats.filter(AllZoneUtil.nonartifacts);
|
||||||
|
return creats;
|
||||||
|
}
|
||||||
|
|
||||||
private static void upkeep_Yawgmoth_Demon() {
|
private static void upkeep_Yawgmoth_Demon() {
|
||||||
/*
|
/*
|
||||||
* At the beginning of your upkeep, you may sacrifice an artifact. If
|
* At the beginning of your upkeep, you may sacrifice an artifact. If
|
||||||
|
|||||||
Reference in New Issue
Block a user