mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added the keywords "If a card would be put into an opponent's graveyard from anywhere, exile it instead." and "If a card would be put into your graveyard from anywhere, exile it instead.".
- Converted Leyline of the Void to script.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
Name:Leyline of the Void
|
||||
ManaCost:2 B B
|
||||
Types:Enchantment
|
||||
Text:If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield.\r\nIf a card would be put into an opponent's graveyard from anywhere, exile it instead.
|
||||
Text:If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield.
|
||||
K:If a card would be put into an opponent's graveyard from anywhere, exile it instead.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_the_void.jpg
|
||||
|
||||
@@ -296,18 +296,29 @@ public class GameAction {
|
||||
*/
|
||||
public final Card moveToGraveyard(Card c) {
|
||||
final PlayerZone origZone = AllZone.getZoneOf(c);
|
||||
final PlayerZone grave = c.getOwner().getZone(Constant.Zone.Graveyard);
|
||||
|
||||
if (AllZoneUtil.isCardInPlay("Leyline of the Void", c.getOwner().getOpponent())) {
|
||||
return moveTo(c.getOwner().getZone(Constant.Zone.Exile), c);
|
||||
}
|
||||
final Player owner = c.getOwner();
|
||||
final PlayerZone grave = owner.getZone(Constant.Zone.Graveyard);
|
||||
final PlayerZone exile = owner.getZone(Constant.Zone.Exile);
|
||||
final CardList ownerBoard = owner.getCardsIn(Constant.Zone.Battlefield);
|
||||
final CardList opponentsBoard = owner.getOpponent().getCardsIn(Constant.Zone.Battlefield);
|
||||
|
||||
|
||||
if (c.getName().equals("Nissa's Chosen") && origZone.is(Constant.Zone.Battlefield)) {
|
||||
return moveToLibrary(c, -1);
|
||||
}
|
||||
|
||||
for(Card card : opponentsBoard) {
|
||||
if(card.hasKeyword("If a card would be put into an opponent's graveyard from anywhere, exile it instead."))
|
||||
return moveTo(exile, c);
|
||||
}
|
||||
|
||||
for(Card card : ownerBoard) {
|
||||
if(card.hasKeyword("If a card would be put into your graveyard from anywhere, exile it instead."))
|
||||
return moveTo(exile, c);
|
||||
}
|
||||
|
||||
if (c.hasKeyword("If CARDNAME would be put into a graveyard this turn, exile it instead.")) {
|
||||
return moveTo(c.getOwner().getZone(Constant.Zone.Exile), c);
|
||||
return moveTo(exile, c);
|
||||
}
|
||||
|
||||
if (c.hasKeyword("If CARDNAME is put into a graveyard this turn, its controller gets a poison counter.")) {
|
||||
@@ -361,7 +372,7 @@ public class GameAction {
|
||||
boolean shouldRecoverForAI = false;
|
||||
boolean shouldRecoverForHuman = false;
|
||||
|
||||
if (c.getOwner().isHuman()) {
|
||||
if (owner.isHuman()) {
|
||||
shouldRecoverForHuman = GameActionUtil.showYesNoDialog(recoverable, question.toString());
|
||||
} else if (c.getOwner().isComputer()) {
|
||||
shouldRecoverForAI = ComputerUtil.canPayCost(abRecover);
|
||||
|
||||
Reference in New Issue
Block a user