Merge remote-tracking branch 'remotes/core/master'

This commit is contained in:
Anthony Calosa
2021-08-19 11:46:12 +08:00
5 changed files with 19 additions and 18 deletions

View File

@@ -1473,8 +1473,7 @@ public class AbilityUtils {
if (sa.metConditions()) { if (sa.metConditions()) {
if (sa.isWrapper() || StringUtils.isBlank(sa.getParam("UnlessCost"))) { if (sa.isWrapper() || StringUtils.isBlank(sa.getParam("UnlessCost"))) {
sa.resolve(); sa.resolve();
} } else {
else {
handleUnlessCost(sa, game); handleUnlessCost(sa, game);
return; return;
} }

View File

@@ -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()) {
if (sa.isSpell()) {
if (sa.isCastFaceDown()) {
// Turn face down to apply cost modifiers correctly // Turn face down to apply cost modifiers correctly
host.turnFaceDownNoUpdate(); host.turnFaceDownNoUpdate();
isStateChangeToFaceDown = true; isStateChangeToFaceDown = true;
} // isSpell }
// Commander Tax there // Commander Tax there
if (sa.isSpell() && host.isCommander() && ZoneType.Command.equals(host.getCastFrom())) { if (host.isCommander() && ZoneType.Command.equals(host.getCastFrom())) {
int n = player.getCommanderCast(host) * 2; int n = player.getCommanderCast(host) * 2;
if (n > 0) { if (n > 0) {
result.add(new Cost(ManaCost.get(n), false)); 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));

View File

@@ -1118,8 +1118,7 @@ public class PhaseHandler implements java.io.Serializable {
else if (!game.getStack().hasSimultaneousStackEntries()) { else if (!game.getStack().hasSimultaneousStackEntries()) {
game.getStack().resolveStack(); game.getStack().resolveStack();
} }
} } else {
else {
// pass the priority to other player // pass the priority to other player
pPlayerPriority = nextPlayer; pPlayerPriority = nextPlayer;
} }

View File

@@ -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