mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
add new keyword: "If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else."
This commit is contained in:
@@ -32,6 +32,13 @@ public class GameAction {
|
||||
//Card lastKnownInfo = getLastKnownInformation(c);
|
||||
Card lastKnownInfo = c;
|
||||
|
||||
if(c.hasKeyword("If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else.") &&
|
||||
!zone.is(Constant.Zone.Exile)) {
|
||||
PlayerZone removed = AllZone.getZone(Constant.Zone.Exile, c.getOwner());
|
||||
c.removeExtrinsicKeyword("If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else.");
|
||||
return moveTo(removed, c);
|
||||
}
|
||||
|
||||
if(prev != null){
|
||||
if (prev.is(Constant.Zone.Battlefield) && c.isCreature())
|
||||
AllZone.Combat.removeFromCombat(c);
|
||||
@@ -263,6 +270,12 @@ public class GameAction {
|
||||
PlayerZone p = AllZone.getZone(c);
|
||||
PlayerZone library = AllZone.getZone(Constant.Zone.Library, c.getOwner());
|
||||
|
||||
if(c.hasKeyword("If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else.")) {
|
||||
PlayerZone removed = AllZone.getZone(Constant.Zone.Exile, c.getOwner());
|
||||
c.removeExtrinsicKeyword("If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else.");
|
||||
return moveTo(removed, c);
|
||||
}
|
||||
|
||||
if(p != null) p.remove(c);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user