Merge pull request #409 from tool4ever/card_fixes

Card fixes
This commit is contained in:
Agetian
2022-05-21 07:17:22 +03:00
committed by GitHub
15 changed files with 22 additions and 41 deletions

View File

@@ -727,7 +727,6 @@ public class PlayerControllerAi extends PlayerController {
@Override
public List<SpellAbility> chooseSaToActivateFromOpeningHand(List<SpellAbility> usableFromOpeningHand) {
// AI would play everything. But limits to one copy of (Leyline of Singularity) and (Gemstone Caverns)
return brains.chooseSaToActivateFromOpeningHand(usableFromOpeningHand);
}

View File

@@ -36,9 +36,7 @@ public class DrainManaEffect extends SpellAbilityEffect {
}
if (sa.hasParam("DrainMana")) {
for (Mana mana : drained) {
sa.getActivatingPlayer().getManaPool().addMana(mana);
}
sa.getActivatingPlayer().getManaPool().add(drained);
}
if (sa.hasParam("RememberDrainedMana")) {
sa.getHostCard().addRemembered(Integer.valueOf(drained.size()));

View File

@@ -171,8 +171,6 @@ public class FlipCoinEffect extends SpellAbilityEffect {
}
}
}
// AllZone.getTriggerHandler().runTrigger("FlipsACoin",runParams);
}
/**

View File

@@ -431,6 +431,7 @@ public class PhaseHandler implements java.io.Serializable {
}
nUpkeepsThisTurn = 0;
nCombatsThisTurn = 0;
nMain2sThisTurn = 0;
game.getStack().resetMaxDistinctSources();
@@ -479,10 +480,6 @@ public class PhaseHandler implements java.io.Serializable {
}
switch (phase) {
case UNTAP:
nCombatsThisTurn = 0;
break;
case UPKEEP:
for (Card c : game.getCardsIncludePhasingIn(ZoneType.Battlefield)) {
c.getDamageHistory().setNotAttackedSinceLastUpkeepOf(playerTurn);

View File

@@ -330,7 +330,7 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
}
if (this.getFirstCombatOnly()) {
if (game.getPhaseHandler().getNumCombat() > 1) {
if (game.getPhaseHandler().getNumCombat() > (game.getPhaseHandler().inCombat() ? 1 : 0)) {
return false;
}
}

View File

@@ -5,11 +5,11 @@ PT:6/6
K:Flying
K:ETBReplacement:Other:ChooseEach
SVar:ChooseEach:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBChoice | SubAbility$ DBRemember | ClearRememberedBeforeLoop$ True | SpellDescription$ As CARDNAME enters the battlefield, each player chooses war or peace. Creatures controlled by players who chose war get +3/+0. Creatures controlled by players who chose peace get +0/+3.
SVar:DBChoice:DB$ GenericChoice | Defined$ Player.IsRemembered | Choices$ WarChoice,PeaceChoice
SVar:DBChoice:DB$ GenericChoice | Defined$ Player.IsRemembered | Choices$ WarChoice,PeaceChoice | ShowChoice$ ExceptSelf
SVar:WarChoice:DB$ Pump | Defined$ Player.IsRemembered | NoteCards$ Self | NoteCardsFor$ Strife | SpellDescription$ War
SVar:PeaceChoice:DB$ Pump | Defined$ Player.IsRemembered | ClearNotedCardsFor$ Strife | SpellDescription$ Peace
SVar:DBRemember:DB$ Pump | RememberObjects$ Player.NotedForStrife
SVar:DBRemember:DB$ Pump | RememberObjects$ Player.NotedForStrife | ImprintCards$ Self
S:Mode$ Continuous | AffectedZone$ Battlefield | Affected$ Creature.ControlledBy Remembered | AddPower$ 3 | Description$ Creatures controlled by players who chose war get +3/+0.
S:Mode$ Continuous | AffectedZone$ Battlefield | Affected$ Creature.!ControlledBy Remembered | AddToughness$ 3 | Description$ Creatures controlled by players who chose peace get +0/+3.
S:Mode$ Continuous | AffectedZone$ Battlefield | Affected$ Creature.!ControlledBy Remembered | AddToughness$ 3 | IsPresent$ Card.IsImprinted | Description$ Creatures controlled by players who chose peace get +0/+3.
AI:RemoveDeck:Random
Oracle:Flying\nAs Archangel of Strife enters the battlefield, each player chooses war or peace.\nCreatures controlled by players who chose war get +3/+0.\nCreatures controlled by players who chose peace get +0/+3.

View File

@@ -1,10 +1,10 @@
Name:Hoarder's Greed
ManaCost:3 B
Types:Sorcery
A:SP$ Repeat | Cost$ 3 B | RepeatCheckSVar$ CheckRepeat | RepeatSVarCompare$ GT0 | RepeatSubAbility$ DBLoseLife | SubAbility$ DBReset | StackDescription$ SpellDescription | SpellDescription$ You lose 2 life and draw two cards, then clash with an opponent. If you win, repeat this process.
A:SP$ Repeat | Cost$ 3 B | RepeatCheckSVar$ CheckRepeat | RepeatSVarCompare$ GT0 | RepeatSubAbility$ DBLoseLife | StackDescription$ SpellDescription | SpellDescription$ You lose 2 life and draw two cards, then clash with an opponent. If you win, repeat this process.
SVar:DBLoseLife:DB$ LoseLife | Defined$ You | LifeAmount$ 2 | SubAbility$ DBDraw | SpellDescription$ You lose 2 life and draw two cards, then clash with an opponent. If you win, repeat this process.
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 2 | SubAbility$ DBClash
SVar:DBClash:DB$ Clash | LoseSubAbility$ DBStoreSVar
SVar:DBClash:DB$ Clash | WinSubAbility$ DBStoreSVar | OtherwiseSubAbility$ DBReset
SVar:DBStoreSVar:DB$ StoreSVar | SVar$ CheckRepeat | Type$ Number | Expression$ 1
SVar:DBReset:DB$ StoreSVar | SVar$ CheckRepeat | Type$ Number | Expression$ 0
SVar:CheckRepeat:Number$0

View File

@@ -2,12 +2,5 @@ Name:Sea Troll
ManaCost:2 U
Types:Creature Troll
PT:2/1
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | ValidBlocker$ Creature.Blue | Execute$ TrigRemember | Static$ True
T:Mode$ AttackerBlocked | ValidCard$ Creature.Blue | ValidBlocker$ Card.Self | Execute$ TrigRemember | Static$ True
SVar:TrigRemember:DB$ StoreSVar | SVar$ CheckActivation | Type$ Number | Expression$ 1
A:AB$ Regenerate | Cost$ U | CheckSVar$ CheckActivation | SpellDescription$ Regenerate CARDNAME. Activate only if CARDNAME blocked or was blocked by a blue creature this turn.
SVar:CheckSVar:Number$0
T:Mode$ Phase | Phase$ Cleanup | TriggerZones$ Battlefield | Execute$ DBCleanup | Static$ True
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ DBCleanup | Static$ True
SVar:DBCleanup:DB$ StoreSVar | SVar$ CheckActivation | Type$ Number | Expression$ 0
A:AB$ Regenerate | Cost$ U | IsPresent$ Card.Self+blockedValidThisTurn Creature.Blue,Card.Self+blockedByValidThisTurn Creature.Blue | SpellDescription$ Regenerate CARDNAME. Activate only if CARDNAME blocked or was blocked by a blue creature this turn.
Oracle:{U}: Regenerate Sea Troll. Activate only if Sea Troll blocked or was blocked by a blue creature this turn.

View File

@@ -4,7 +4,7 @@ Types:Instant
A:SP$ Pump | Cost$ 1 U | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | RememberObjects$ Targeted | SubAbility$ DBRememberPirate | SpellDescription$ Exile target creature you control, then return that card to the battlefield under its owner's control. If a Pirate was exiled this way, draw a card. | StackDescription$ SpellDescription
SVar:DBRememberPirate:DB$ StoreSVar | SVar$ WasPirate | Type$ Number | Expression$ 1 | ConditionDefined$ Remembered | ConditionPresent$ Card.Pirate | ConditionCompare$ EQ1 | SubAbility$ DBChangeZone
SVar:DBChangeZone:DB$ ChangeZone | Defined$ ParentTarget | Origin$ Battlefield | Destination$ Exile | ForgetOtherRemembered$ True | RememberChanged$ True | SubAbility$ DBReturn
SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ All | Destination$ Battlefield | GainControl$ True | SubAbility$ DBPirateDraw
SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ All | Destination$ Battlefield | SubAbility$ DBPirateDraw
SVar:DBPirateDraw:DB$ Draw | NumCards$ 1 | ConditionCheckSVar$ WasPirate | ConditionSVarCompare$ EQ1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBReinitialize
SVar:DBReinitialize:DB$ StoreSVar | SVar$ WasPirate | Type$ Number | Expression$ 0

View File

@@ -2,11 +2,11 @@ Name:Tezzeret, Betrayer of Flesh
ManaCost:2 U U
Types:Legendary Planeswalker Tezzeret
Loyalty:4
T:Mode$ AbilityCast | ValidActivatingPlayer$ You | ValidCard$ Artifact | Static$ True | CheckSVar$ ArtAct | SVarCompare$ NE1 | Execute$ TrigStore
SVar:TrigStore:DB$ Pump | NoteNumber$ 1
T:Mode$ AbilityCast | ValidCard$ Artifact | Static$ True | CheckSVar$ ArtAct | SVarCompare$ NE1 | Execute$ TrigStore
SVar:TrigStore:DB$ Pump | Defined$ TriggeredActivator | NoteNumber$ 1
SVar:ArtAct:Count$NotedNumber
T:Mode$ TurnBegin | Execute$ TrigReset | Static$ True
SVar:TrigReset:DB$ Pump | NoteNumber$ 0
SVar:TrigReset:DB$ Pump | Defined$ Player | NoteNumber$ 0
S:Mode$ ReduceCost | ValidCard$ Artifact.YouCtrl | Type$ Ability | Amount$ 2 | CheckSVar$ ArtAct | SVarCompare$ NE1 | OnlyFirstActivation$ True | AffectedZone$ Battlefield | Description$ The first activated ability of an artifact you activate each turn costs {2} less to activate.
A:AB$ Draw | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | NumCards$ 2 | SpellDescription$ Draw two cards. Then discard two cards unless you discard an artifact card. | SubAbility$ DBDiscard
SVar:DBDiscard:DB$ Discard | Defined$ You | NumCards$ 2 | Mode$ TgtChoose | UnlessType$ Artifact

View File

@@ -2,12 +2,10 @@ Name:Spiteful Repossession
ManaCost:4 R
Types:Sorcery
A:SP$ RepeatEach | RepeatPlayers$ Opponent | RepeatSubAbility$ DBDamage | DamageMap$ True | SubAbility$ DBTreasure | SpellDescription$ CARDNAME deals damage to each opponent who controls more lands than you equal to the difference.
SVar:DBDamage:DB$ DealDamage | Defined$ Remembered | NumDmg$ Y | ConditionCheckSVar$ Y | SubAbility$ DBTally
SVar:DBTally:DB$ StoreSVar | SVar$ Z | Type$ CountSVar | Expression$ Z/Plus.Y
SVar:DBTreasure:DB$ Token | TokenAmount$ Z | TokenScript$ c_a_treasure_sac | SubAbility$ DBReset | SpellDescription$ Then create a number of Treasure tokens equal to the damage dealt this way.
SVar:DBReset:DB$ StoreSVar | SVar$ Z | Type$ Number | Expression$ 0
SVar:DBDamage:DB$ DealDamage | Defined$ Remembered | NumDmg$ Y | ConditionCheckSVar$ Y
SVar:DBTreasure:DB$ Token | TokenAmount$ Z | TokenScript$ c_a_treasure_sac | SpellDescription$ Then create a number of Treasure tokens equal to the damage dealt this way.
SVar:X:Count$Valid Land.YouCtrl
SVar:Y:Count$Valid Land.RememberedPlayerCtrl/Minus.X
SVar:Z:Number$0
SVar:Z:Count$TotalDamageDoneByThisTurn
DeckHas:Ability$Token|Sacrifice & Type$Treasure|Artifact
Oracle:Spiteful Repossession deals damage to each opponent who controls more lands than you equal to the difference. Then create a number of Treasure tokens equal to the damage dealt this way.

View File

@@ -3,12 +3,10 @@ ManaCost:3 W B
Types:Creature Human Cleric
PT:1/3
K:Extort
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ PayLife | TriggerDescription$ When CARDNAME enters the battlefield, pay any amount of life. Target opponent reveals that many cards from their hand. You choose one of them and exile it.
SVar:PayLife:AB$ StoreSVar | Cost$ PayLife<X> | SVar$ LifePaidOnETB | Type$ Calculate | Expression$ X | SubAbility$ OppRevealX
SVar:OppRevealX:DB$ Reveal | ValidTgts$ Opponent | NumCards$ LifePaidOnETB | RememberRevealed$ True | SubAbility$ PickOne
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ OppRevealX | TriggerDescription$ When CARDNAME enters the battlefield, pay any amount of life. Target opponent reveals that many cards from their hand. You choose one of them and exile it.
SVar:OppRevealX:AB$ Reveal | Cost$ PayLife<X> | ValidTgts$ Opponent | NumCards$ X | RememberRevealed$ True | SubAbility$ PickOne
SVar:PickOne:DB$ ChooseCard | Defined$ You | Amount$ 1 | Mandatory$ True | ChoiceTitle$ Choose card to exile | Choices$ Card.IsRemembered | ChoiceZone$ Hand | SubAbility$ MoveChosen
SVar:MoveChosen:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | Defined$ ChosenCard | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:LifePaidOnETB:Number$0
SVar:X:Count$xPaid
Oracle:Extort (Whenever you cast a spell, you may pay {W/B}. If you do, each opponent loses 1 life and you gain that much life.)\nWhen Vizkopa Confessor enters the battlefield, pay any amount of life. Target opponent reveals that many cards from their hand. You choose one of them and exile it.

View File

@@ -2,7 +2,7 @@ Name:World at War
ManaCost:3 R R
Types:Sorcery
A:SP$ AddPhase | Cost$ 3 R R | ExtraPhase$ Combat | AfterPhase$ Main2 | FollowedBy$ Main2 | BeforeFirstPostCombatMainEnd$ True | ExtraPhaseDelayedTrigger$ DelTrigUntap | ExtraPhaseDelayedTriggerExcute$ TrigUntapAll | SpellDescription$ After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn.
SVar:DelTrigUntap:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerDescription$ At the beginning of that combat, untap all creatures that attacked this turn.
SVar:DelTrigUntap:Mode$ Phase | Phase$ BeginCombat | TriggerDescription$ At the beginning of that combat, untap all creatures that attacked this turn.
SVar:TrigUntapAll:DB$ UntapAll | ValidCards$ Creature.attackedThisTurn
K:Rebound
Oracle:After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn.\nRebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.)