Fix ante cards (#2089)

This commit is contained in:
tool4ever
2022-12-12 22:23:32 +01:00
committed by GitHub
parent 9d761ca7cf
commit c303222f6f
6 changed files with 8 additions and 12 deletions

View File

@@ -39,8 +39,6 @@ public class MillAi extends SpellAbilityAi {
} else if (aiLogic.equals("LilianaMill")) { } else if (aiLogic.equals("LilianaMill")) {
// Only mill if a "Raise Dead" target is available, in case of control decks with few creatures // Only mill if a "Raise Dead" target is available, in case of control decks with few creatures
return CardLists.filter(ai.getCardsIn(ZoneType.Graveyard), CardPredicates.Presets.CREATURES).size() >= 1; return CardLists.filter(ai.getCardsIn(ZoneType.Graveyard), CardPredicates.Presets.CREATURES).size() >= 1;
} else if (aiLogic.equals("Rebirth")) {
return ai.getLife() <= 8;
} }
return true; return true;
} }

View File

@@ -549,7 +549,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
final Zone originZone = game.getZoneOf(gameCard); final Zone originZone = game.getZoneOf(gameCard);
// if Target isn't in the expected Zone, continue // if Target isn't in the expected Zone, continue
if (originZone == null || (!origin.isEmpty() && !origin.contains(originZone.getZoneType()))) { if (originZone == null || (!origin.isEmpty() && !origin.contains(originZone.getZoneType()))) {
continue; continue;
} }
@@ -559,10 +558,10 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
if (destination.equals(ZoneType.Library)) { if (destination.equals(ZoneType.Library)) {
// library position is zero indexed // library position is zero indexed
int libraryPosition = 0; int libraryPosition = 0;
if (!altDest) { if (altDest) {
libraryPosition = sa.hasParam("LibraryPosition") ? AbilityUtils.calculateAmount(hostCard, sa.getParam("LibraryPosition"), sa) : 0;
} else {
libraryPosition = sa.hasParam("LibraryPositionAlternative") ? Integer.parseInt(sa.getParam("LibraryPositionAlternative")) : 0; libraryPosition = sa.hasParam("LibraryPositionAlternative") ? Integer.parseInt(sa.getParam("LibraryPositionAlternative")) : 0;
} else {
libraryPosition = sa.hasParam("LibraryPosition") ? AbilityUtils.calculateAmount(hostCard, sa.getParam("LibraryPosition"), sa) : 0;
} }
// If a card is moved to library from the stack, remove its spells from the stack // If a card is moved to library from the stack, remove its spells from the stack

View File

@@ -2,7 +2,7 @@ Name:Amulet of Quoz
ManaCost:6 ManaCost:6
Types:Artifact Types:Artifact
K:Remove CARDNAME from your deck before playing if you're not playing for ante. K:Remove CARDNAME from your deck before playing if you're not playing for ante.
A:AB$ Dig | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Opponent | DestinationZone$ Ante | DigNum$ 1 | ChangeNum$ All | RememberChanged$ True | Optional$ True | SubAbility$ DBFlip | PlayerTurn$ True | ActivationPhases$ Upkeep | SpellDescription$ Target opponent may ante the top card of their library. If they don't, you flip a coin. If you win the flip, that player loses the game. If you lose the flip, you lose the game. Activate only during your upkeep. A:AB$ Dig | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Opponent | DestinationZone$ Ante | DigNum$ 1 | ChangeNum$ All | RememberChanged$ True | Optional$ True | PromptToSkipOptionalAbility$ True | SubAbility$ DBFlip | PlayerTurn$ True | ActivationPhases$ Upkeep | SpellDescription$ Target opponent may ante the top card of their library. If they don't, you flip a coin. If you win the flip, that player loses the game. If you lose the flip, you lose the game. Activate only during your upkeep.
SVar:DBFlip:DB$ FlipACoin | Caller$ You | WinSubAbility$ OppLoseGame | LoseSubAbility$ YouLoseGame | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | SubAbility$ DBCleanup SVar:DBFlip:DB$ FlipACoin | Caller$ You | WinSubAbility$ OppLoseGame | LoseSubAbility$ YouLoseGame | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | SubAbility$ DBCleanup
SVar:OppLoseGame:DB$ LosesGame | Defined$ Targeted SVar:OppLoseGame:DB$ LosesGame | Defined$ Targeted
SVar:YouLoseGame:DB$ LosesGame | Defined$ You SVar:YouLoseGame:DB$ LosesGame | Defined$ You

View File

@@ -2,7 +2,7 @@ Name:Demonic Attorney
ManaCost:1 B B ManaCost:1 B B
Types:Sorcery Types:Sorcery
K:Remove CARDNAME from your deck before playing if you're not playing for ante. K:Remove CARDNAME from your deck before playing if you're not playing for ante.
A:SP$ Dig | Cost$ 1 B B | Defined$ Player | DigNum$ 1 | DestinationZone$ Ante | SpellDescription$ Each player antes the top card of their library. A:SP$ Dig | Cost$ 1 B B | Defined$ Player | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Ante | SpellDescription$ Each player antes the top card of their library.
AI:RemoveDeck:All AI:RemoveDeck:All
AI:RemoveDeck:Random AI:RemoveDeck:Random
Oracle:Remove Demonic Attorney from your deck before playing if you're not playing for ante.\nEach player antes the top card of their library. Oracle:Remove Demonic Attorney from your deck before playing if you're not playing for ante.\nEach player antes the top card of their library.

View File

@@ -2,8 +2,7 @@ Name:Rebirth
ManaCost:3 G G G ManaCost:3 G G G
Types:Sorcery Types:Sorcery
K:Remove CARDNAME from your deck before playing if you're not playing for ante. K:Remove CARDNAME from your deck before playing if you're not playing for ante.
A:SP$ RepeatEach | Cost$ 3 G G G | RepeatPlayers$ Player | RepeatSubAbility$ Ante | SpellDescription$ Each player may ante the top card of their library. If a player does, that player's life total becomes 20. A:SP$ Dig | Defined$ Player | DestinationZone$ Ante | DigNum$ 1 | ChangeNum$ All | RememberChanged$ True | Optional$ True | PromptToSkipOptionalAbility$ True | SubAbility$ 20Life | SpellDescription$ Each player may ante the top card of their library. If a player does, that player's life total becomes 20.
SVar:Ante:DB$ Dig | Defined$ Player.IsRemembered | Destination$ Ante | DigNum$ 1 | ChangeNum$ All | RememberChanged$ True | Optional$ True | SubAbility$ 20Life | AILogic$ Rebirth SVar:20Life:DB$ SetLife | Defined$ RememberedOwner | LifeAmount$ 20 | SubAbility$ DBCleanup
SVar:20Life:DB$ SetLife | Defined$ Player.IsRemembered | LifeAmount$ 20 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Remove Rebirth from your deck before playing if you're not playing for ante.\nEach player may ante the top card of their library. If a player does, that player's life total becomes 20. Oracle:Remove Rebirth from your deck before playing if you're not playing for ante.\nEach player may ante the top card of their library. If a player does, that player's life total becomes 20.

View File

@@ -4,7 +4,7 @@ Types:Creature Horror
PT:1/1 PT:1/1
K:Remove CARDNAME from your deck before playing if you're not playing for ante. K:Remove CARDNAME from your deck before playing if you're not playing for ante.
A:AB$ Pump | Cost$ B B B Sac<1/CARDNAME> | ValidTgts$ Artifact | SubAbility$ DBAnte | ImprintCards$ Targeted | RememberObjects$ TargetedController | StackDescription$ SpellDescription | SpellDescription$ The owner of target artifact may ante the top card of their library. If that player doesn't, exchange ownership of that artifact and CARDNAME. Put the artifact card into your graveyard and CARDNAME from anywhere into that player's graveyard. This change in ownership is permanent. A:AB$ Pump | Cost$ B B B Sac<1/CARDNAME> | ValidTgts$ Artifact | SubAbility$ DBAnte | ImprintCards$ Targeted | RememberObjects$ TargetedController | StackDescription$ SpellDescription | SpellDescription$ The owner of target artifact may ante the top card of their library. If that player doesn't, exchange ownership of that artifact and CARDNAME. Put the artifact card into your graveyard and CARDNAME from anywhere into that player's graveyard. This change in ownership is permanent.
SVar:DBAnte:DB$ Dig | Defined$ Player.IsRemembered | DestinationZone$ Ante | DigNum$ 1 | ChangeNum$ All | RememberChanged$ True | Optional$ True | SubAbility$ ExchangeOwn1 | AILogic$ TimmerianFiends | StackDescription$ None SVar:DBAnte:DB$ Dig | Defined$ Player.IsRemembered | DestinationZone$ Ante | DigNum$ 1 | ChangeNum$ All | RememberChanged$ True | Optional$ True | PromptToSkipOptionalAbility$ True | SubAbility$ ExchangeOwn1 | AILogic$ TimmerianFiends | StackDescription$ None
SVar:ExchangeOwn1:DB$ GainOwnership | Defined$ Imprinted | DefinedPlayer$ You | SubAbility$ ToGrave1 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 SVar:ExchangeOwn1:DB$ GainOwnership | Defined$ Imprinted | DefinedPlayer$ You | SubAbility$ ToGrave1 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0
SVar:ToGrave1:DB$ ChangeZone | Defined$ Imprinted | Origin$ Battlefield | Destination$ Graveyard | SubAbility$ ExchangeOwn2 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | StackDescription$ None SVar:ToGrave1:DB$ ChangeZone | Defined$ Imprinted | Origin$ Battlefield | Destination$ Graveyard | SubAbility$ ExchangeOwn2 | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | StackDescription$ None
SVar:ExchangeOwn2:DB$ GainOwnership | Defined$ Self | DefinedPlayer$ Remembered | SubAbility$ ToGrave | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 SVar:ExchangeOwn2:DB$ GainOwnership | Defined$ Self | DefinedPlayer$ Remembered | SubAbility$ ToGrave | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0