mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
CardState: Fix Card copies itself though ReplacementEffect (#8356)
Co-authored-by: tool4EvEr <tool4EvEr@>
This commit is contained in:
@@ -750,11 +750,21 @@ public class CardState extends GameObject implements IHasSVars, ITranslatable {
|
|||||||
triggers.add(tr.copy(card, lki));
|
triggers.add(tr.copy(card, lki));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ReplacementEffect runRE = null;
|
||||||
|
if (ctb instanceof SpellAbility sp && sp.isReplacementAbility()
|
||||||
|
&& source.getCard().equals(ctb.getHostCard())) {
|
||||||
|
runRE = sp.getReplacementEffect();
|
||||||
|
}
|
||||||
|
|
||||||
replacementEffects.clear();
|
replacementEffects.clear();
|
||||||
for (ReplacementEffect re : source.replacementEffects) {
|
for (ReplacementEffect re : source.replacementEffects) {
|
||||||
if (re.isIntrinsic()) {
|
if (re.isIntrinsic()) {
|
||||||
replacementEffects.add(re.copy(card, lki));
|
ReplacementEffect reCopy = re.copy(card, lki);
|
||||||
|
if (re.equals(runRE) && runRE.hasRun()) {
|
||||||
|
// CR 208.2b prevent loop from card copying itself
|
||||||
|
reCopy.setHasRun(true);
|
||||||
|
}
|
||||||
|
replacementEffects.add(reCopy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ ManaCost:2 U U
|
|||||||
Types:Creature Shapeshifter
|
Types:Creature Shapeshifter
|
||||||
PT:*/*
|
PT:*/*
|
||||||
K:Morph:2 U
|
K:Morph:2 U
|
||||||
R:Event$ TurnFaceUp | ValidCard$ Card.Self | ReplaceWith$ MorphChoice | ActiveZones$ Battlefield
|
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Layer$ Copy | ReplacementResult$ Updated | ReplaceWith$ MorphChoice | Description$ As CARDNAME enters or is turned face up, it becomes your choice of 5/1 or 1/5.
|
||||||
K:ETBReplacement:Other:MorphChoice
|
R:Event$ TurnFaceUp | ValidCard$ Card.Self | ActiveZones$ Battlefield | Layer$ Copy | Secondary$ True | ReplaceWith$ MorphChoice | Description$ As CARDNAME enters or is turned face up, it becomes your choice of 5/1 or 1/5.
|
||||||
SVar:MorphChoice:DB$ GenericChoice | Defined$ You | Choices$ BigTough,BigPower | SpellDescription$ As CARDNAME enters or is turned face up, it becomes your choice of 5/1 or 1/5.
|
SVar:MorphChoice:DB$ GenericChoice | Defined$ You | Choices$ BigTough,BigPower
|
||||||
SVar:BigPower:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 5 | Toughness$ 1 | SpellDescription$ CARDNAME is 5/1
|
SVar:BigPower:DB$ Clone | Defined$ Self | SetPower$ 5 | SetToughness$ 1 | SpellDescription$ CARDNAME is 5/1
|
||||||
SVar:BigTough:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 1 | Toughness$ 5 | SpellDescription$ CARDNAME is 1/5
|
SVar:BigTough:DB$ Clone | Defined$ Self | SetPower$ 1 | SetToughness$ 5 | SpellDescription$ CARDNAME is 1/5
|
||||||
Oracle:As Aquamorph Entity enters or is turned face up, it becomes your choice of 5/1 or 1/5.\nMorph {2}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)
|
Oracle:As Aquamorph Entity enters or is turned face up, it becomes your choice of 5/1 or 1/5.\nMorph {2}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ ManaCost:3 U
|
|||||||
Types:Creature Eldrazi Shapeshifter
|
Types:Creature Eldrazi Shapeshifter
|
||||||
PT:*/*
|
PT:*/*
|
||||||
K:Devoid
|
K:Devoid
|
||||||
K:ETBReplacement:Other:MorphChoice
|
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Layer$ Copy | ReplacementResult$ Updated | ReplaceWith$ MoldChoice | Description$ As CARDNAME enters, it becomes your choice of a 3/3 creature with flying, a 2/5 creature with vigilance, or a 0/12 creature with defender.
|
||||||
SVar:MorphChoice:DB$ GenericChoice | Defined$ You | Choices$ Flyer,VigilancePump,Wall | SpellDescription$ As CARDNAME enters, it becomes your choice of a 3/3 creature with flying, a 2/5 creature with vigilance, or a 0/12 creature with defender.
|
SVar:MorphChoice:DB$ GenericChoice | Defined$ You | Choices$ Flyer,VigilancePump,Wall
|
||||||
SVar:Flyer:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 3 | Toughness$ 3 | Keywords$ Flying | SpellDescription$ CARDNAME is a 3/3 creature with flying.
|
SVar:Flyer:DB$ Clone | Defined$ Self | SetPower$ 3 | SetToughness$ 3 | AddKeywords$ Flying | SpellDescription$ CARDNAME is a 3/3 creature with flying.
|
||||||
SVar:VigilancePump:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 2 | Toughness$ 5 | Keywords$ Vigilance | SpellDescription$ CARDNAME is a 2/5 creature with vigilance.
|
SVar:VigilancePump:DB$ Clone | Defined$ Self | SetPower$ 2 | SetToughness$ 5 | AddKeywords$ Vigilance | SpellDescription$ CARDNAME is a 2/5 creature with vigilance.
|
||||||
SVar:Wall:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 0 | Toughness$ 12 | Keywords$ Defender | SpellDescription$ CARDNAME is a 0/12 creature with defender.
|
SVar:Wall:DB$ Clone | Defined$ Self | SetPower$ 0 | SetToughness$ 12 | AddKeywords$ Defender | SpellDescription$ CARDNAME is a 0/12 creature with defender.
|
||||||
Oracle:Devoid (This card has no color.)\nAs Corrupted Shapeshifter enters, it becomes your choice of a 3/3 creature with flying, a 2/5 creature with vigilance, or a 0/12 creature with defender.
|
Oracle:Devoid (This card has no color.)\nAs Corrupted Shapeshifter enters, it becomes your choice of a 3/3 creature with flying, a 2/5 creature with vigilance, or a 0/12 creature with defender.
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ Name:Primal Clay
|
|||||||
ManaCost:4
|
ManaCost:4
|
||||||
Types:Artifact Creature Shapeshifter
|
Types:Artifact Creature Shapeshifter
|
||||||
PT:*/*
|
PT:*/*
|
||||||
K:ETBReplacement:Other:MoldChoice
|
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Layer$ Copy | ReplacementResult$ Updated | ReplaceWith$ MoldChoice | Description$ As CARDNAME enters, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types.
|
||||||
SVar:MoldChoice:DB$ GenericChoice | Defined$ You | Choices$ GroundMold,AirMold,WallMold | SpellDescription$ As CARDNAME enters, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types.
|
SVar:MoldChoice:DB$ GenericChoice | Defined$ You | Choices$ GroundMold,AirMold,WallMold
|
||||||
SVar:GroundMold:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 3 | Toughness$ 3 | SpellDescription$ CARDNAME is 3/3.
|
SVar:GroundMold:DB$ Clone | Defined$ Self | SetPower$ 3 | SetToughness$ 3 | SpellDescription$ CARDNAME is 3/3.
|
||||||
SVar:AirMold:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 2 | Toughness$ 2 | Keywords$ Flying | SpellDescription$ CARDNAME is 2/2 with flying.
|
SVar:AirMold:DB$ Clone | Defined$ Self | SetPower$ 2 | SetToughness$ 2 | AddKeywords$ Flying | SpellDescription$ CARDNAME is 2/2 with flying.
|
||||||
SVar:WallMold:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 1 | Toughness$ 6 | Types$ Wall | Keywords$ Defender | SpellDescription$ CARDNAME is 1/6 with defender and is a Wall in addition to its other types.
|
SVar:WallMold:DB$ Clone | Defined$ Self | SetPower$ 1 | SetToughness$ 6 | AddTypes$ Wall | AddKeywords$ Defender | SpellDescription$ CARDNAME is 1/6 with defender and is a Wall in addition to its other types.
|
||||||
AI:RemoveDeck:Random
|
AI:RemoveDeck:Random
|
||||||
DeckHas:Keyword$Defender|Flying & Type$Wall
|
DeckHas:Keyword$Defender|Flying & Type$Wall
|
||||||
Oracle:As Primal Clay enters, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types. (A creature with defender can't attack.)
|
Oracle:As Primal Clay enters, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature with flying, or a 1/6 Wall artifact creature with defender in addition to its other types. (A creature with defender can't attack.)
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ Name:Primal Plasma
|
|||||||
ManaCost:3 U
|
ManaCost:3 U
|
||||||
Types:Creature Elemental Shapeshifter
|
Types:Creature Elemental Shapeshifter
|
||||||
PT:*/*
|
PT:*/*
|
||||||
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$ PlasmaChoice | ReplacementResult$ Updated | Description$ As CARDNAME enters, it becomes your choice of a 3/3 creature, a 2/2 creature with flying, or a 1/6 creature with defender.
|
R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Layer$ Copy | ReplacementResult$ Updated | ReplaceWith$ PlasmaChoice | Description$ As CARDNAME enters, it becomes your choice of a 3/3 creature, a 2/2 creature with flying, or a 1/6 creature with defender.
|
||||||
SVar:PlasmaChoice:DB$ GenericChoice | Defined$ You | Choices$ GroundPlasma,AirPlasma,WallPlasma
|
SVar:PlasmaChoice:DB$ GenericChoice | Defined$ You | Choices$ GroundPlasma,AirPlasma,WallPlasma
|
||||||
SVar:GroundPlasma:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 3 | Toughness$ 3 | SpellDescription$ CARDNAME is 3/3.
|
SVar:GroundPlasma:DB$ Clone | Defined$ Self | SetPower$ 3 | SetToughness$ 3 | SpellDescription$ CARDNAME is 3/3.
|
||||||
SVar:AirPlasma:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 2 | Toughness$ 2 | Keywords$ Flying | SpellDescription$ CARDNAME is 2/2 with flying.
|
SVar:AirPlasma:DB$ Clone | Defined$ Self | SetPower$ 2 | SetToughness$ 2 | AddKeywords$ Flying | SpellDescription$ CARDNAME is 2/2 with flying.
|
||||||
SVar:WallPlasma:DB$ Animate | Defined$ Self | Duration$ Permanent | Power$ 1 | Toughness$ 6 | Keywords$ Defender | SpellDescription$ CARDNAME is 1/6 with defender.
|
SVar:WallPlasma:DB$ Clone | Defined$ Self | SetPower$ 1 | SetToughness$ 6 | AddKeywords$ Defender | SpellDescription$ CARDNAME is 1/6 with defender.
|
||||||
AI:RemoveDeck:All
|
AI:RemoveDeck:All
|
||||||
Oracle:As Primal Plasma enters, it becomes your choice of a 3/3 creature, a 2/2 creature with flying, or a 1/6 creature with defender.
|
Oracle:As Primal Plasma enters, it becomes your choice of a 3/3 creature, a 2/2 creature with flying, or a 1/6 creature with defender.
|
||||||
|
|||||||
Reference in New Issue
Block a user