- Fixed "precombat main phase" triggers

This commit is contained in:
swordshine
2018-04-05 22:07:15 +08:00
parent d61aeb09c0
commit 45b6f1a6ef
14 changed files with 19 additions and 13 deletions

View File

@@ -235,6 +235,12 @@ public abstract class Trigger extends TriggerReplacementBase {
} }
} }
if (this.mapParams.containsKey("PreCombatMain")) {
if (!phaseHandler.isPreCombatMain()) {
return false;
}
}
if (this.mapParams.containsKey("PlayerTurn")) { if (this.mapParams.containsKey("PlayerTurn")) {
if (!phaseHandler.isPlayerTurn(this.getHostCard().getController())) { if (!phaseHandler.isPlayerTurn(this.getHostCard().getController())) {
return false; return false;

View File

@@ -1,7 +1,7 @@
Name:Altar of Shadows Name:Altar of Shadows
ManaCost:7 ManaCost:7
Types:Artifact Types:Artifact
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGetMana | TriggerDescription$ At the beginning of your precombat main phase, add {B} to your mana pool for each charge counter on CARDNAME. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGetMana | TriggerDescription$ At the beginning of your precombat main phase, add {B} to your mana pool for each charge counter on CARDNAME.
SVar:TrigGetMana:DB$ Mana | Produced$ B | Amount$ X | References$ X | SpellDescription$ Add {X}{B} to your mana pool SVar:TrigGetMana:DB$ Mana | Produced$ B | Amount$ X | References$ X | SpellDescription$ Add {X}{B} to your mana pool
A:AB$ Destroy | Cost$ 7 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBPutCounter | SpellDescription$ Destroy target creature. Then put a charge counter on CARDNAME. A:AB$ Destroy | Cost$ 7 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBPutCounter | SpellDescription$ Destroy target creature. Then put a charge counter on CARDNAME.
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ CHARGE | CounterNum$ 1 SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ CHARGE | CounterNum$ 1

View File

@@ -3,7 +3,7 @@ ManaCost:3 B B
Types:Enchantment Types:Enchantment
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever a creature dies, put a charge counter on CARDNAME. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever a creature dies, put a charge counter on CARDNAME.
SVar:TrigPutCounter:DB$PutCounter | Defined$ Self | CounterType$ CHARGE | CounterNum$ 1 SVar:TrigPutCounter:DB$PutCounter | Defined$ Self | CounterType$ CHARGE | CounterNum$ 1
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGetMana | TriggerDescription$ At the beginning of your precombat main phase, add {B} to your mana pool for each charge counter on CARDNAME. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGetMana | TriggerDescription$ At the beginning of your precombat main phase, add {B} to your mana pool for each charge counter on CARDNAME.
SVar:TrigGetMana:DB$ Mana | Produced$ B | Amount$ X | References$ X | SpellDescription$ Add {X}{B} to your mana pool SVar:TrigGetMana:DB$ Mana | Produced$ B | Amount$ X | References$ X | SpellDescription$ Add {X}{B} to your mana pool
SVar:X:Count$CardCounters.CHARGE SVar:X:Count$CardCounters.CHARGE
SVar:Picture:http://www.wizards.com/global/images/magic/general/black_market.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/black_market.jpg

View File

@@ -1,7 +1,7 @@
Name:Blinkmoth Urn Name:Blinkmoth Urn
ManaCost:5 ManaCost:5
Types:Artifact Types:Artifact
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ Player | TriggerZones$ Battlefield | IsPresent$ Card.Self+untapped | Execute$ TrigGetMana | TriggerDescription$ At the beginning of each player's precombat main phase, if CARDNAME is untapped, that player adds {C} to his or her mana pool for each artifact he or she controls. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ Player | TriggerZones$ Battlefield | IsPresent$ Card.Self+untapped | Execute$ TrigGetMana | TriggerDescription$ At the beginning of each player's precombat main phase, if CARDNAME is untapped, that player adds {C} to his or her mana pool for each artifact he or she controls.
SVar:TrigGetMana:DB$ Mana | Produced$ C | Amount$ X | References$ X | Defined$ TriggeredPlayer SVar:TrigGetMana:DB$ Mana | Produced$ C | Amount$ X | References$ X | Defined$ TriggeredPlayer
SVar:X:Count$Valid Artifact.ActivePlayerCtrl SVar:X:Count$Valid Artifact.ActivePlayerCtrl
SVar:RemRandomDeck:True SVar:RemRandomDeck:True

View File

@@ -1,7 +1,7 @@
Name:Bounty of the Luxa Name:Bounty of the Luxa
ManaCost:2 G U ManaCost:2 G U
Types:Enchantment Types:Enchantment
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRemove | TriggerDescription$ At the beginning of your precombat main phase, remove all flood counters from CARDNAME. If no counters were removed this way, put a flood counter on CARDNAME and draw a card. Otherwise, add {C}{G}{U} to your mana pool. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRemove | TriggerDescription$ At the beginning of your precombat main phase, remove all flood counters from CARDNAME. If no counters were removed this way, put a flood counter on CARDNAME and draw a card. Otherwise, add {C}{G}{U} to your mana pool.
SVar:TrigRemove:DB$ RemoveCounter | CounterType$ FLOOD | CounterNum$ All | RememberRemoved$ True | SubAbility$ DBPutCounter SVar:TrigRemove:DB$ RemoveCounter | CounterType$ FLOOD | CounterNum$ All | RememberRemoved$ True | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | ConditionCheckSVar$ X | References$ X | ConditionSVarCompare$ EQ0 | CounterType$ FLOOD | CounterNum$ 1 | SubAbility$ DBDraw SVar:DBPutCounter:DB$PutCounter | Defined$ Self | ConditionCheckSVar$ X | References$ X | ConditionSVarCompare$ EQ0 | CounterType$ FLOOD | CounterNum$ 1 | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | NumCards$ 1 | ConditionCheckSVar$ X | References$ X | ConditionSVarCompare$ EQ0 | SubAbility$ DBGetMana SVar:DBDraw:DB$ Draw | NumCards$ 1 | ConditionCheckSVar$ X | References$ X | ConditionSVarCompare$ EQ0 | SubAbility$ DBGetMana

View File

@@ -3,7 +3,7 @@ ManaCost:3
Types:Artifact Types:Artifact
A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | SpellDescription$ Add one mana of any color to your mana pool. A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 1 | SpellDescription$ Add one mana of any color to your mana pool.
A:AB$ PutCounter | Cost$ T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME. A:AB$ PutCounter | Cost$ T | CounterType$ CHARGE | CounterNum$ 1 | SpellDescription$ Put a charge counter on CARDNAME.
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRemove | TriggerDescription$ At the beginning of your precombat main phase, remove all charge counters from CARDNAME. Add one mana of any color to your mana pool for each charge counter removed this way. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigRemove | TriggerDescription$ At the beginning of your precombat main phase, remove all charge counters from CARDNAME. Add one mana of any color to your mana pool for each charge counter removed this way.
SVar:TrigRemove:DB$ RemoveCounter | CounterType$ CHARGE | CounterNum$ All | RememberRemoved$ True | SubAbility$ TrigGetMana SVar:TrigRemove:DB$ RemoveCounter | CounterType$ CHARGE | CounterNum$ All | RememberRemoved$ True | SubAbility$ TrigGetMana
SVar:TrigGetMana:DB$ Mana | Produced$ Combo Any | Amount$ NumRemoved | References$ NumRemoved | AILogic$ MostProminentInComputerHand | SubAbility$ DBCleanup SVar:TrigGetMana:DB$ Mana | Produced$ Combo Any | Amount$ NumRemoved | References$ NumRemoved | AILogic$ MostProminentInComputerHand | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -2,7 +2,7 @@ Name:Eladamri, Lord of Leaves Avatar
ManaCost:no cost ManaCost:no cost
Types:Vanguard Types:Vanguard
HandLifeModifier:-1/+2 HandLifeModifier:-1/+2
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ Player | TriggerZones$ Command | Execute$ TrigAddMana | TriggerDescription$ At the beginning of each player's precombat main phase, that player adds {G}{G} to his or her mana pool. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ Player | TriggerZones$ Command | Execute$ TrigAddMana | TriggerDescription$ At the beginning of each player's precombat main phase, that player adds {G}{G} to his or her mana pool.
SVar:TrigAddMana:DB$ Mana | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer SVar:TrigAddMana:DB$ Mana | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Picture:https://downloads.cardforge.org/images/cards/VAN/Eladamri, Lord of Leaves Avatar.full.jpg SVar:Picture:https://downloads.cardforge.org/images/cards/VAN/Eladamri, Lord of Leaves Avatar.full.jpg

View File

@@ -1,7 +1,7 @@
Name:Eladamri's Vineyard Name:Eladamri's Vineyard
ManaCost:G ManaCost:G
Types:Enchantment Types:Enchantment
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigMana | TriggerDescription$ At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigMana | TriggerDescription$ At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool.
SVar:TrigMana:DB$Mana | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer SVar:TrigMana:DB$Mana | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer
SVar:Picture:http://www.wizards.com/global/images/magic/general/eladamris_vineyard.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/eladamris_vineyard.jpg
Oracle:At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool. Oracle:At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool.

View File

@@ -3,7 +3,7 @@ ManaCost:2 G G
Types:Enchantment Aura Types:Enchantment Aura
K:Enchant permanent K:Enchant permanent
A:SP$ Attach | Cost$ 2 G G | ValidTgts$ Permanent | AILogic$ Pump A:SP$ Attach | Cost$ 2 G G | ValidTgts$ Permanent | AILogic$ Pump
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigMana | TriggerDescription$ At the beginning of your precombat main phase, add mana equal to enchanted permanent's mana cost to your mana pool. (Mana cost includes color. If a mana symbol has multiple colors, choose one.) T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigMana | TriggerDescription$ At the beginning of your precombat main phase, add mana equal to enchanted permanent's mana cost to your mana pool. (Mana cost includes color. If a mana symbol has multiple colors, choose one.)
SVar:TrigMana:DB$ Mana | Produced$ Special EnchantedManaCost SVar:TrigMana:DB$ Mana | Produced$ Special EnchantedManaCost
SVar:Picture:http://www.wizards.com/global/images/magic/general/elemental_resonance.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/elemental_resonance.jpg
Oracle:Enchant permanent\nAt the beginning of your precombat main phase, add mana equal to enchanted permanent's mana cost to your mana pool. (Mana cost includes color. If a mana symbol has multiple colors, choose one.) Oracle:Enchant permanent\nAt the beginning of your precombat main phase, add mana equal to enchanted permanent's mana cost to your mana pool. (Mana cost includes color. If a mana symbol has multiple colors, choose one.)

View File

@@ -2,7 +2,7 @@ Name:Kilnspire District
ManaCost:no cost ManaCost:no cost
Types:Plane Ravnica Types:Plane Ravnica
T:Mode$ PlaneswalkedTo | ValidCard$ Card.Self | TriggerZones$ Command | Execute$ PutCounter | TriggerDescription$ When you planeswalk to CARDNAME or at the beginning of your precombat main phase, put a charge counter on CARDNAME, then add {R} to your mana pool for each charge counter on it. T:Mode$ PlaneswalkedTo | ValidCard$ Card.Self | TriggerZones$ Command | Execute$ PutCounter | TriggerDescription$ When you planeswalk to CARDNAME or at the beginning of your precombat main phase, put a charge counter on CARDNAME, then add {R} to your mana pool for each charge counter on it.
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Command | Execute$ PutCounter | Secondary$ True | TriggerDescription$ When you planeswalk to CARDNAME or at the beginning of your precombat main phase, put a charge counter on CARDNAME, then add {R} to your mana pool for each charge counter on it. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Command | Execute$ PutCounter | Secondary$ True | TriggerDescription$ When you planeswalk to CARDNAME or at the beginning of your precombat main phase, put a charge counter on CARDNAME, then add {R} to your mana pool for each charge counter on it.
SVar:PutCounter:DB$PutCounter | Defined$ Self | CounterType$ CHARGE | CounterNum$ 1 | SubAbility$ DBMana SVar:PutCounter:DB$PutCounter | Defined$ Self | CounterType$ CHARGE | CounterNum$ 1 | SubAbility$ DBMana
SVar:DBMana:DB$ Mana | Produced$ R | Amount$ Y | References$ Y SVar:DBMana:DB$ Mana | Produced$ R | Amount$ Y | References$ Y
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ DBPay | TriggerDescription$ Whenever you roll {CHAOS}, you may pay {X}. If you do, CARDNAME deals X damage to target creature or player. T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ DBPay | TriggerDescription$ Whenever you roll {CHAOS}, you may pay {X}. If you do, CARDNAME deals X damage to target creature or player.

View File

@@ -2,7 +2,7 @@ Name:Magus of the Vineyard
ManaCost:G ManaCost:G
Types:Creature Human Wizard Types:Creature Human Wizard
PT:1/1 PT:1/1
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ Player | Execute$ TrigMana | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ Player | Execute$ TrigMana | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool.
SVar:TrigMana:DB$Mana | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer SVar:TrigMana:DB$Mana | Produced$ G | Amount$ 2 | Defined$ TriggeredPlayer
SVar:Picture:http://www.wizards.com/global/images/magic/general/magus_of_the_vineyard.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/magus_of_the_vineyard.jpg
Oracle:At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool. Oracle:At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool.

View File

@@ -2,7 +2,7 @@ Name:Orcish Squatters Avatar
ManaCost:no cost ManaCost:no cost
Types:Vanguard Types:Vanguard
HandLifeModifier:-1/-1 HandLifeModifier:-1/-1
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Command | Execute$ TrigGetMana | TriggerDescription$ At the beginning of your precombat main phase, add an amount of {C} to your mana pool equal to the number of lands target opponent controls. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Command | Execute$ TrigGetMana | TriggerDescription$ At the beginning of your precombat main phase, add an amount of {C} to your mana pool equal to the number of lands target opponent controls.
SVar:TrigGetMana:DB$ Pump | ValidTgts$ Player | RememberObjects$ Targeted | SubAbility$ DBMana SVar:TrigGetMana:DB$ Pump | ValidTgts$ Player | RememberObjects$ Targeted | SubAbility$ DBMana
SVar:DBMana:DB$ Mana | Produced$ C | Amount$ X | References$ X | SubAbility$ DBCleanup SVar:DBMana:DB$ Mana | Produced$ C | Amount$ X | References$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -2,7 +2,7 @@ Name:Plasm Capture
ManaCost:G G U U ManaCost:G G U U
Types:Instant Types:Instant
A:SP$ Counter | Cost$ G G U U | TargetType$ Spell | RememberCounteredCMC$ True | ValidTgts$ Card | SubAbility$ DBDelTrig | SpellDescription$ Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost. A:SP$ Counter | Cost$ G G U U | TargetType$ Spell | RememberCounteredCMC$ True | ValidTgts$ Card | SubAbility$ DBDelTrig | SpellDescription$ Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost.
SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | Execute$ AddMana | TriggerDescription$ At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost. | RememberNumber$ True | SubAbility$ DBCleanup SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | Execute$ AddMana | TriggerDescription$ At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost. | RememberNumber$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:AddMana:DB$ Mana | Produced$ Combo Any | Amount$ X | References$ X | AILogic$ MostProminentInComputerHand SVar:AddMana:DB$ Mana | Produced$ Combo Any | Amount$ X | References$ X | AILogic$ MostProminentInComputerHand
SVar:X:Count$TriggerRememberAmount SVar:X:Count$TriggerRememberAmount

View File

@@ -2,7 +2,7 @@ Name:Ventifact Bottle
ManaCost:3 ManaCost:3
Types:Artifact Types:Artifact
A:AB$ PutCounter | Cost$ X 1 T | CounterType$ CHARGE | CounterNum$ X | References$ X | SorcerySpeed$ True | SpellDescription$ Put X charge counters on Ventifact Bottle. Activate this ability only any time you could cast a sorcery. A:AB$ PutCounter | Cost$ X 1 T | CounterType$ CHARGE | CounterNum$ X | References$ X | SorcerySpeed$ True | SpellDescription$ Put X charge counters on Ventifact Bottle. Activate this ability only any time you could cast a sorcery.
T:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGetMana | CheckSVar$ Y | SVarCompare$ GE1 | TriggerDescription$ At the beginning of your precombat main phase, if CARDNAME has a charge counter on it, tap it and remove all charge counters from it. Add {C} to your mana pool for each charge counter removed this way. T:Mode$ Phase | Phase$ Main1 | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigGetMana | CheckSVar$ Y | SVarCompare$ GE1 | TriggerDescription$ At the beginning of your precombat main phase, if CARDNAME has a charge counter on it, tap it and remove all charge counters from it. Add {C} to your mana pool for each charge counter removed this way.
SVar:TrigGetMana:DB$ Mana | Produced$ C | Amount$ Y | SubAbility$ TrigRemove SVar:TrigGetMana:DB$ Mana | Produced$ C | Amount$ Y | SubAbility$ TrigRemove
SVar:TrigRemove:DB$ RemoveCounter | CounterType$ CHARGE | CounterNum$ Y | References$ Y | SubAbility$ DBTap SVar:TrigRemove:DB$ RemoveCounter | CounterType$ CHARGE | CounterNum$ Y | References$ Y | SubAbility$ DBTap
SVar:DBTap:DB$ Tap | Defined$ Self SVar:DBTap:DB$ Tap | Defined$ Self