mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix Shifting Shadow trigger
This commit is contained in:
@@ -243,7 +243,7 @@ public class Cost implements Serializable {
|
|||||||
} else {
|
} else {
|
||||||
CostPart cp = parseCostPart(part, tapCost, untapCost);
|
CostPart cp = parseCostPart(part, tapCost, untapCost);
|
||||||
if (null != cp )
|
if (null != cp )
|
||||||
if (cp instanceof CostPartMana ) {
|
if (cp instanceof CostPartMana) {
|
||||||
parsedMana = (CostPartMana) cp;
|
parsedMana = (CostPartMana) cp;
|
||||||
} else {
|
} else {
|
||||||
this.costParts.add(cp);
|
this.costParts.add(cp);
|
||||||
|
|||||||
@@ -47,19 +47,22 @@ public class CostAdjustment {
|
|||||||
Cost result = cost.copy();
|
Cost result = cost.copy();
|
||||||
|
|
||||||
boolean isStateChangeToFaceDown = false;
|
boolean isStateChangeToFaceDown = false;
|
||||||
if (sa.isSpell() && sa.isCastFaceDown()) {
|
|
||||||
// Turn face down to apply cost modifiers correctly
|
|
||||||
host.turnFaceDownNoUpdate();
|
|
||||||
isStateChangeToFaceDown = true;
|
|
||||||
} // isSpell
|
|
||||||
|
|
||||||
// Commander Tax there
|
if (sa.isSpell()) {
|
||||||
if (sa.isSpell() && host.isCommander() && ZoneType.Command.equals(host.getCastFrom())) {
|
if (sa.isCastFaceDown()) {
|
||||||
int n = player.getCommanderCast(host) * 2;
|
// Turn face down to apply cost modifiers correctly
|
||||||
if (n > 0) {
|
host.turnFaceDownNoUpdate();
|
||||||
result.add(new Cost(ManaCost.get(n), false));
|
isStateChangeToFaceDown = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Commander Tax there
|
||||||
|
if (host.isCommander() && ZoneType.Command.equals(host.getCastFrom())) {
|
||||||
|
int n = player.getCommanderCast(host) * 2;
|
||||||
|
if (n > 0) {
|
||||||
|
result.add(new Cost(ManaCost.get(n), false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // isSpell
|
||||||
|
|
||||||
CardCollection cardsOnBattlefield = new CardCollection(game.getCardsIn(ZoneType.Battlefield));
|
CardCollection cardsOnBattlefield = new CardCollection(game.getCardsIn(ZoneType.Battlefield));
|
||||||
cardsOnBattlefield.addAll(game.getCardsIn(ZoneType.Stack));
|
cardsOnBattlefield.addAll(game.getCardsIn(ZoneType.Stack));
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ K:Enchant creature
|
|||||||
A:SP$ Attach | Cost$ 2 R | ValidTgts$ Creature | AILogic$ Pump | SubAbility$ RememberSelf | SpellDescription$ Enchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order."
|
A:SP$ Attach | Cost$ 2 R | ValidTgts$ Creature | AILogic$ Pump | SubAbility$ RememberSelf | SpellDescription$ Enchanted creature has haste and "At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order."
|
||||||
SVar:RememberSelf:DB$ Pump | Defined$ Creature.EnchantedBy | ImprintCards$ Self
|
SVar:RememberSelf:DB$ Pump | Defined$ Creature.EnchantedBy | ImprintCards$ Self
|
||||||
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | AddSVar$ ShadowRememberSelf,ShadowDestroyEnchanted,ShadowRevealCards,ShadowReattach,DBCleanup
|
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Haste | AddTrigger$ ShadowUpkeepTrig | AddSVar$ ShadowRememberSelf,ShadowDestroyEnchanted,ShadowRevealCards,ShadowReattach,DBCleanup
|
||||||
T:Mode$ ChangesZone | Affected$ Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True
|
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Any | Execute$ DBCleanup | Static$ True
|
||||||
SVar:ShadowUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ShadowRememberSelf | TriggerDescription$ At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order.
|
SVar:ShadowUpkeepTrig:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ ShadowRememberSelf | TriggerDescription$ At the beginning of your upkeep, destroy this creature. Reveal cards from the top of your library until you reveal a creature card. Put that card onto the battlefield and attach CARDNAME to it, then put all other cards revealed this way on the bottom of your library in a random order.
|
||||||
SVar:ShadowRememberSelf:DB$ Pump | ImprintCards$ OriginalHost | SubAbility$ ShadowDestroyEnchanted
|
SVar:ShadowRememberSelf:DB$ Pump | ImprintCards$ OriginalHost | SubAbility$ ShadowDestroyEnchanted
|
||||||
SVar:ShadowDestroyEnchanted:DB$ Destroy | Defined$ Self | SubAbility$ ShadowRevealCards
|
SVar:ShadowDestroyEnchanted:DB$ Destroy | Defined$ Self | SubAbility$ ShadowRevealCards
|
||||||
|
|||||||
Reference in New Issue
Block a user