mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
handleLeylinesAndChancellors - scripted all actions performed from opening hand
now you may execute actions from opening hand in any order (rule 103.5)
This commit is contained in:
@@ -3,10 +3,11 @@ ManaCost:4 B B B
|
|||||||
Types:Creature Vampire
|
Types:Creature Vampire
|
||||||
Text:You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way.
|
Text:You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way.
|
||||||
PT:6/6
|
PT:6/6
|
||||||
K:MayEffectFromOpeningHand:DrainOnUpkeep
|
K:MayEffectFromOpeningHand:RevealCard
|
||||||
K:Flying
|
K:Flying
|
||||||
K:Lifelink
|
K:Lifelink
|
||||||
SVar:DrainOnUpkeep:AB$ Effect | Cost$ 0 | Triggers$ TrigDrain | SVars$ DrainLife,GainLife,RemoveMe,AFLifeLost | Name$ Chancellor of the Dross effect
|
SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ DrainOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way.
|
||||||
|
SVar:DrainOnUpkeep:DB$ Effect | Cost$ 0 | Triggers$ TrigDrain | SVars$ DrainLife,GainLife,RemoveMe,AFLifeLost | Name$ Chancellor of the Dross effect
|
||||||
SVar:TrigDrain:Mode$ Phase | Phase$ Upkeep | Execute$ DrainLife | TriggerDescription$ At the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way.
|
SVar:TrigDrain:Mode$ Phase | Phase$ Upkeep | Execute$ DrainLife | TriggerDescription$ At the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way.
|
||||||
SVar:DrainLife:AB$ LoseLife | Cost$ 0 | Defined$ Player.Opponent | LifeAmount$ 3 | SubAbility$ GainLife
|
SVar:DrainLife:AB$ LoseLife | Cost$ 0 | Defined$ Player.Opponent | LifeAmount$ 3 | SubAbility$ GainLife
|
||||||
SVar:GainLife:DB$ GainLife | Defined$ You | LifeAmount$ AFLifeLost | SubAbility$ RemoveMe
|
SVar:GainLife:DB$ GainLife | Defined$ You | LifeAmount$ AFLifeLost | SubAbility$ RemoveMe
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ PT:5/5
|
|||||||
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ EffMassToken | TriggerDescription$ When CARDNAME enters the battlefield, put X 1/1 red Goblin creature tokens with haste onto the battlefield, where X is the number of creatures you control.
|
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ EffMassToken | TriggerDescription$ When CARDNAME enters the battlefield, put X 1/1 red Goblin creature tokens with haste onto the battlefield, where X is the number of creatures you control.
|
||||||
SVar:EffMassToken:AB$ Token | Cost$ 0 | TokenAmount$ X | TokenOwner$ You | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Haste | References$ X
|
SVar:EffMassToken:AB$ Token | Cost$ 0 | TokenAmount$ X | TokenOwner$ You | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Haste | References$ X
|
||||||
SVar:X:Count$Valid Creature.YouCtrl
|
SVar:X:Count$Valid Creature.YouCtrl
|
||||||
K:MayEffectFromOpeningHand:TokenOnUpkeep
|
K:MayEffectFromOpeningHand:RevealCard
|
||||||
SVar:TokenOnUpkeep:AB$ Effect | Cost$ 0 | Triggers$ TrigToken | SVars$ EffToken,RemoveMe | Name$ Chancellor of the Forge effect
|
SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ TokenOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||||
|
SVar:TokenOnUpkeep:DB$ Effect | Triggers$ TrigToken | SVars$ EffToken,RemoveMe | Name$ Chancellor of the Forge effect | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||||
SVar:TrigToken:Mode$ Phase | Phase$ Upkeep | Execute$ EffToken | TriggerDescription$ At the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
SVar:TrigToken:Mode$ Phase | Phase$ Upkeep | Execute$ EffToken | TriggerDescription$ At the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||||
SVar:EffToken:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenOwner$ You | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Haste | SubAbility$ RemoveMe
|
SVar:EffToken:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenOwner$ You | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Haste | SubAbility$ RemoveMe
|
||||||
SVar:RemoveMe:DB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Command | Destination$ Exile
|
SVar:RemoveMe:DB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ ManaCost:4 U U U
|
|||||||
Types:Creature Sphinx
|
Types:Creature Sphinx
|
||||||
Text:You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard.
|
Text:You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard.
|
||||||
PT:5/7
|
PT:5/7
|
||||||
K:MayEffectFromOpeningHand:DrainOnUpkeep
|
K:MayEffectFromOpeningHand:RevealCard
|
||||||
K:Flying
|
K:Flying
|
||||||
SVar:DrainOnUpkeep:AB$ Effect | Cost$ 0 | Triggers$ TrigMill | SVars$ Mill,RemoveMe | Name$ Chancellor of the Spires effect
|
SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ DrainOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard.
|
||||||
|
SVar:DrainOnUpkeep:DB$ Effect | Triggers$ TrigMill | SVars$ Mill,RemoveMe | Name$ Chancellor of the Spires effect
|
||||||
SVar:TrigMill:Mode$ Phase | Phase$ Upkeep | Execute$ Mill | TriggerDescription$ At the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard.
|
SVar:TrigMill:Mode$ Phase | Phase$ Upkeep | Execute$ Mill | TriggerDescription$ At the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard.
|
||||||
SVar:Mill:AB$ Mill | Cost$ 0 | NumCards$ 7 | Defined$ Player.Opponent | SubAbility$ RemoveMe
|
SVar:Mill:AB$ Mill | Cost$ 0 | NumCards$ 7 | Defined$ Player.Opponent | SubAbility$ RemoveMe
|
||||||
SVar:RemoveMe:DB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Command | Destination$ Exile
|
SVar:RemoveMe:DB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ PT:6/7
|
|||||||
K:MayEffectFromOpeningHand:ManaOnMain
|
K:MayEffectFromOpeningHand:ManaOnMain
|
||||||
K:Vigilance
|
K:Vigilance
|
||||||
K:Reach
|
K:Reach
|
||||||
SVar:ManaOnMain:AB$ Effect | Cost$ 0 | Triggers$ TrigMana | SVars$ EffMana,RemoveMe | Duration$ Permanent | Name$ Chancellor of the Tangle effect
|
SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ ManaOnMain | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of your first main phase, add G to your mana pool.
|
||||||
|
SVar:ManaOnMain:DB$ Effect | Triggers$ TrigMana | SVars$ EffMana,RemoveMe | Duration$ Permanent | Name$ Chancellor of the Tangle effect
|
||||||
SVar:TrigMana:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | Execute$ EffMana | TriggerDescription$ At the beginning of your first main phase, add G to your mana pool.
|
SVar:TrigMana:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | Execute$ EffMana | TriggerDescription$ At the beginning of your first main phase, add G to your mana pool.
|
||||||
SVar:EffMana:AB$ Mana | Cost$ 0 | Produced$ G | SubAbility$ RemoveMe
|
SVar:EffMana:AB$ Mana | Cost$ 0 | Produced$ G | SubAbility$ RemoveMe
|
||||||
SVar:RemoveMe:DB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Command | Destination$ Exile
|
SVar:RemoveMe:DB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
Name:Gemstone Caverns
|
Name:Gemstone Caverns
|
||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Legendary Land
|
Types:Legendary Land
|
||||||
|
K:MayEffectFromOpeningHand:FromOpeningHand:!PlayFirst
|
||||||
Text:If CARDNAME is in your opening hand and you're not playing first, you may begin the game with CARDNAME on the battlefield with a luck counter on it. If you do, exile a card from your hand.
|
Text:If CARDNAME is in your opening hand and you're not playing first, you may begin the game with CARDNAME on the battlefield with a luck counter on it. If you do, exile a card from your hand.
|
||||||
|
SVar:FromOpeningHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SubAbility$ LuckCounter | SpellDescription$ If CARDNAME is in your opening hand and you're not playing first, you may begin the game with CARDNAME on the battlefield with a luck counter on it.
|
||||||
|
SVar:LuckCounter:DB$ PutCounter | CounterType$ LUCK | CounterNum$ 1 | Defined$ Self | SubAbility$ ExileFromHand
|
||||||
|
SVar:ExileFromHand:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True | SpellDescription$ If you do, exile a card from your hand.
|
||||||
A:AB$ Mana | Cost$ T | Produced$ 1 | ConditionCheckSVar$ CheckCounter | ConditionSVarCompare$ EQ0 | SubAbility$ DBMana | SpellDescription$ Add 1 to your mana pool. If CARDNAME has a luck counter on it, instead add one mana of any color to your mana pool.
|
A:AB$ Mana | Cost$ T | Produced$ 1 | ConditionCheckSVar$ CheckCounter | ConditionSVarCompare$ EQ0 | SubAbility$ DBMana | SpellDescription$ Add 1 to your mana pool. If CARDNAME has a luck counter on it, instead add one mana of any color to your mana pool.
|
||||||
SVar:DBMana:DB$ Mana | Produced$ Any | ConditionCheckSVar$ CheckCounter | ConditionSVarCompare$ GE1
|
SVar:DBMana:DB$ Mana | Produced$ Any | ConditionCheckSVar$ CheckCounter | ConditionSVarCompare$ GE1
|
||||||
SVar:CheckCounter:Count$CardCounters.LUCK
|
SVar:CheckCounter:Count$CardCounters.LUCK
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Anticipation
|
|||||||
ManaCost:2 U U
|
ManaCost:2 U U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ You may cast nonland cards as though they had flash. | Description$ You may cast nonland cards as though they had flash.
|
S:Mode$ Continuous | Affected$ You | AddKeyword$ You may cast nonland cards as though they had flash. | Description$ You may cast nonland cards as though they had flash.
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_anticipation.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_anticipation.jpg
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Lifeforce
|
|||||||
ManaCost:2 G G
|
ManaCost:2 G G
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ Creature | AddHiddenKeyword$ CARDNAME can't be countered. | AffectedZone$ Stack | Description$ Creature spells can't be countered.
|
S:Mode$ Continuous | Affected$ Creature | AddHiddenKeyword$ CARDNAME can't be countered. | AffectedZone$ Stack | Description$ Creature spells can't be countered.
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Lightning
|
|||||||
ManaCost:2 R R
|
ManaCost:2 R R
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If Leyline of Lightning is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If Leyline of Lightning is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever you cast a spell, you may pay 1. If you do, CARDNAME deals 1 damage to target player.
|
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever you cast a spell, you may pay 1. If you do, CARDNAME deals 1 damage to target player.
|
||||||
SVar:TrigDealDamage:AB$DealDamage | Cost$ 1 | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 1
|
SVar:TrigDealDamage:AB$DealDamage | Cost$ 1 | ValidTgts$ Player | TgtPrompt$ Select target player | NumDmg$ 1
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Punishment
|
|||||||
ManaCost:2 R R
|
ManaCost:2 R R
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If Leyline of Punishment is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If Leyline of Punishment is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life.
|
S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life.
|
||||||
S:Mode$ Continuous | GlobalRule$ Damage can't be prevented. | Description$ Damage can't be prevented.
|
S:Mode$ Continuous | GlobalRule$ Damage can't be prevented. | Description$ Damage can't be prevented.
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Sanctity
|
|||||||
ManaCost:2 W W
|
ManaCost:2 W W
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ You | AddKeyword$ Hexproof | Description$ You have hexproof. (You can't be the target of spells or abilities your opponents control.)
|
S:Mode$ Continuous | Affected$ You | AddKeyword$ Hexproof | Description$ You have hexproof. (You can't be the target of spells or abilities your opponents control.)
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_sanctity.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_sanctity.jpg
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Singularity
|
|||||||
ManaCost:2 U U
|
ManaCost:2 U U
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If Leyline of Singularity is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If Leyline of Singularity is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ Permanent.nonLand | AddType$ Legendary | Description$ All nonland permanents are legendary.
|
S:Mode$ Continuous | Affected$ Permanent.nonLand | AddType$ Legendary | Description$ All nonland permanents are legendary.
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_singularity.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/leyline_of_singularity.jpg
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of the Meek
|
|||||||
ManaCost:2 W W
|
ManaCost:2 W W
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If Leyline of the Meek is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If Leyline of the Meek is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ Creature.token | AddPower$ 1 | AddToughness$ 1 | Description$ Creature tokens get +1/+1.
|
S:Mode$ Continuous | Affected$ Creature.token | AddPower$ 1 | AddToughness$ 1 | Description$ Creature tokens get +1/+1.
|
||||||
SVar:PlayMain1:TRUE
|
SVar:PlayMain1:TRUE
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of the Void
|
|||||||
ManaCost:2 B B
|
ManaCost:2 B B
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Graveyard | ValidCard$ Card.nonToken+OppOwn | ReplaceWith$ Exile | Description$ If a card would be put into an opponent's graveyard from anywhere, exile it instead.
|
R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Graveyard | ValidCard$ Card.nonToken+OppOwn | ReplaceWith$ Exile | Description$ If a card would be put into an opponent's graveyard from anywhere, exile it instead.
|
||||||
SVar:Exile:AB$ ChangeZone | Cost$ 0 | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard
|
SVar:Exile:AB$ ChangeZone | Cost$ 0 | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard
|
||||||
SVar:NonStackingEffect:True
|
SVar:NonStackingEffect:True
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Name:Leyline of Vitality
|
|||||||
ManaCost:2 G G
|
ManaCost:2 G G
|
||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
Text:If Leyline of Vitality is in your opening hand, you may begin the game with it on the battlefield.
|
Text:If Leyline of Vitality is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
|
K:MayEffectFromOpeningHand:FromHand
|
||||||
|
SVar:FromHand:AB$ ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Hand | Destination$ Battlefield | SpellDescription$ If CARDNAME is in your opening hand, you may begin the game with it on the battlefield.
|
||||||
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ 1 | Description$ Creatures you control get +0/+1.
|
S:Mode$ Continuous | Affected$ Creature.YouCtrl | AddToughness$ 1 | Description$ Creatures you control get +0/+1.
|
||||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigGainLife | TriggerDescription$ Whenever a creature enters the battlefield under your control, you may gain 1 life.
|
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigGainLife | TriggerDescription$ Whenever a creature enters the battlefield under your control, you may gain 1 life.
|
||||||
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ 1
|
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ 1
|
||||||
|
|||||||
@@ -733,9 +733,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// card has to be on battlefield or in own hand
|
|
||||||
boolean canUseInputToSelectCard = origin.size() == 1 && ( origin.get(0) == ZoneType.Battlefield || origin.get(0) == ZoneType.Hand && player == decider);
|
|
||||||
|
|
||||||
Card c;
|
Card c;
|
||||||
if (sa.hasParam("AtRandom")) {
|
if (sa.hasParam("AtRandom")) {
|
||||||
c = Aggregates.random(fetchList);
|
c = Aggregates.random(fetchList);
|
||||||
@@ -743,6 +740,8 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
c = fetchList.get(0);
|
c = fetchList.get(0);
|
||||||
} else {
|
} else {
|
||||||
boolean mustChoose = sa.hasParam("Mandatory");
|
boolean mustChoose = sa.hasParam("Mandatory");
|
||||||
|
// card has to be on battlefield or in own hand
|
||||||
|
boolean canUseInputToSelectCard = origin.size() == 1 && ( origin.get(0) == ZoneType.Battlefield || origin.get(0) == ZoneType.Hand && player == decider);
|
||||||
if( canUseInputToSelectCard ) {
|
if( canUseInputToSelectCard ) {
|
||||||
InputSelectCardsFromList inp = new InputSelectCardsFromList(1, 1, fetchList);
|
InputSelectCardsFromList inp = new InputSelectCardsFromList(1, 1, fetchList);
|
||||||
inp.setCancelAllowed(!mustChoose);
|
inp.setCancelAllowed(!mustChoose);
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ public class RevealEffect extends SpellAbilityEffect {
|
|||||||
revealed.add(Aggregates.random(cardsInHand));
|
revealed.add(Aggregates.random(cardsInHand));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (sa.hasParam("Defined")) {
|
||||||
|
revealed.addAll(AbilityUtils.getDefinedCards(sa.getSourceCard(), sa.getParam("Defined"), sa));
|
||||||
} else {
|
} else {
|
||||||
List<Card> valid = new ArrayList<Card>(cardsInHand);
|
List<Card> valid = new ArrayList<Card>(cardsInHand);
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ public class HumanPlaySpellAbility {
|
|||||||
|
|
||||||
if (isFree || this.payment.isFullyPaid()) {
|
if (isFree || this.payment.isFullyPaid()) {
|
||||||
if (skipStack) {
|
if (skipStack) {
|
||||||
|
game.getStack().unfreezeStack();
|
||||||
AbilityUtils.resolve(this.ability);
|
AbilityUtils.resolve(this.ability);
|
||||||
} else {
|
} else {
|
||||||
this.enusureAbilityHasDescription(this.ability);
|
this.enusureAbilityHasDescription(this.ability);
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ import forge.CounterType;
|
|||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.GameLogEntryType;
|
import forge.GameLogEntryType;
|
||||||
import forge.Singletons;
|
|
||||||
import forge.card.CardType;
|
import forge.card.CardType;
|
||||||
import forge.card.TriggerReplacementBase;
|
import forge.card.TriggerReplacementBase;
|
||||||
import forge.card.ability.AbilityFactory;
|
import forge.card.ability.AbilityFactory;
|
||||||
@@ -59,7 +58,6 @@ import forge.card.trigger.Trigger;
|
|||||||
import forge.card.trigger.TriggerType;
|
import forge.card.trigger.TriggerType;
|
||||||
import forge.card.trigger.ZCTrigger;
|
import forge.card.trigger.ZCTrigger;
|
||||||
import forge.game.ai.ComputerUtil;
|
import forge.game.ai.ComputerUtil;
|
||||||
import forge.game.ai.ComputerUtilCard;
|
|
||||||
import forge.game.event.GameEventCardDestroyed;
|
import forge.game.event.GameEventCardDestroyed;
|
||||||
import forge.game.event.GameEventCardRegenerated;
|
import forge.game.event.GameEventCardRegenerated;
|
||||||
import forge.game.event.GameEventCardSacrificed;
|
import forge.game.event.GameEventCardSacrificed;
|
||||||
@@ -75,8 +73,6 @@ import forge.game.zone.PlayerZoneBattlefield;
|
|||||||
import forge.game.zone.Zone;
|
import forge.game.zone.Zone;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.gui.GuiChoose;
|
import forge.gui.GuiChoose;
|
||||||
import forge.gui.GuiDialog;
|
|
||||||
import forge.gui.input.InputSelectCardsFromList;
|
|
||||||
import forge.util.Aggregates;
|
import forge.util.Aggregates;
|
||||||
import forge.util.maps.CollectionSuppliers;
|
import forge.util.maps.CollectionSuppliers;
|
||||||
import forge.util.maps.HashMapOfLists;
|
import forge.util.maps.HashMapOfLists;
|
||||||
@@ -1420,103 +1416,6 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleLeylinesAndChancellors(final Player first) {
|
|
||||||
for (Player p : game.getPlayers()) {
|
|
||||||
final List<Card> openingHand = new ArrayList<Card>(p.getCardsIn(ZoneType.Hand));
|
|
||||||
|
|
||||||
for (final Card c : openingHand) {
|
|
||||||
// check c.isInZone(ZoneType.Hand) because Gemstone Caverns would exile a card
|
|
||||||
if (!c.isInZone(ZoneType.Hand)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (p.isHuman()) {
|
|
||||||
for (String kw : c.getKeyword()) {
|
|
||||||
if (kw.startsWith("MayEffectFromOpeningHand")) {
|
|
||||||
final String effName = kw.split(":")[1];
|
|
||||||
|
|
||||||
final SpellAbility effect = AbilityFactory.getAbility(c.getSVar(effName), c);
|
|
||||||
effect.setActivatingPlayer(p);
|
|
||||||
if (GuiDialog.confirm(c, "Use " + c +"'s ability?")) {
|
|
||||||
// If we ever let the AI memorize cards in the players
|
|
||||||
// hand, this would be a place to do so.
|
|
||||||
HumanPlay.playSpellAbilityNoStack(p, effect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c.getName().startsWith("Leyline of")) {
|
|
||||||
if (GuiDialog.confirm(c, "Use " + c + "'s ability?")) {
|
|
||||||
game.getAction().moveToPlay(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c.getName().equals("Gemstone Caverns") && !p.equals(first)
|
|
||||||
&& GuiDialog.confirm(c, "Use " + c + "'s ability?")) {
|
|
||||||
c.addCounter(CounterType.LUCK, 1, true);
|
|
||||||
game.getAction().moveToPlay(c);
|
|
||||||
List<Card> remainingHand = new ArrayList<Card>(p.getCardsIn(ZoneType.Hand));
|
|
||||||
InputSelectCardsFromList inp = new InputSelectCardsFromList(1, 1, remainingHand);
|
|
||||||
inp.setCancelAllowed(false);
|
|
||||||
inp.setMessage("Choose a card in you hand to exile");
|
|
||||||
Singletons.getControl().getInputQueue().setInputAndWait(inp);
|
|
||||||
Card exiled = inp.getSelected().get(0);
|
|
||||||
game.getAction().exile(exiled);
|
|
||||||
}
|
|
||||||
} else { // Computer Leylines & Chancellors
|
|
||||||
if (!c.getName().startsWith("Leyline of") && !c.getName().equals("Gemstone Caverns")) {
|
|
||||||
for (String kw : c.getKeyword()) {
|
|
||||||
if (kw.startsWith("MayEffectFromOpeningHand")) {
|
|
||||||
final String effName = kw.split(":")[1];
|
|
||||||
|
|
||||||
final SpellAbility effect = AbilityFactory.getAbility(c.getSVar(effName), c);
|
|
||||||
effect.setActivatingPlayer(p);
|
|
||||||
// Is there a better way for the AI to decide this?
|
|
||||||
if (effect.doTrigger(false, p)) {
|
|
||||||
GuiDialog.message("Computer reveals " + c.getName() + "(" + c.getUniqueNumber() + ").");
|
|
||||||
ComputerUtil.playNoStack(p, effect, game);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c.getName().startsWith("Leyline of")
|
|
||||||
&& !(c.getName().startsWith("Leyline of Singularity")
|
|
||||||
&& (Iterables.any(game.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Leyline of Singularity"))))) {
|
|
||||||
game.getAction().moveToPlay(c);
|
|
||||||
//ga.checkStateEffects();
|
|
||||||
}
|
|
||||||
if (c.getName().equals("Gemstone Caverns") && !p.equals(first)
|
|
||||||
&& !Iterables.any(game.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Gemstone Caverns"))) {
|
|
||||||
c.addCounter(CounterType.LUCK, 1, true);
|
|
||||||
game.getAction().moveToPlay(c);
|
|
||||||
List<Card> remainingHand = new ArrayList<Card>(p.getCardsIn(ZoneType.Hand));
|
|
||||||
Card exiled = ComputerUtilCard.getWorstAI(remainingHand);
|
|
||||||
game.getAction().exile(exiled);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Player determineFirstTurnPlayer(final GameOutcome lastGameOutcome) {
|
|
||||||
// Only cut/coin toss if it's the first game of the match
|
|
||||||
Player goesFirst = null;
|
|
||||||
|
|
||||||
boolean isFirstGame = lastGameOutcome == null;
|
|
||||||
if (isFirstGame) {
|
|
||||||
game.fireEvent(new GameEventFlipCoin()); // Play the Flip Coin sound
|
|
||||||
goesFirst = Aggregates.random(game.getPlayers());
|
|
||||||
} else {
|
|
||||||
for(Player p : game.getPlayers()) {
|
|
||||||
if(!lastGameOutcome.isWinner(p.getLobbyPlayer())) {
|
|
||||||
goesFirst = p;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean willPlay = goesFirst.getController().getWillPlayOnFirstTurn(isFirstGame);
|
|
||||||
goesFirst = willPlay ? goesFirst : goesFirst.getOpponent();
|
|
||||||
return goesFirst;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void startGame() {
|
public void startGame() {
|
||||||
Player first = determineFirstTurnPlayer(game.getMatch().getLastGameOutcome());
|
Player first = determineFirstTurnPlayer(game.getMatch().getLastGameOutcome());
|
||||||
|
|
||||||
@@ -1540,7 +1439,7 @@ public class GameAction {
|
|||||||
if(game.getType() == GameType.Planechase)
|
if(game.getType() == GameType.Planechase)
|
||||||
first.initPlane();
|
first.initPlane();
|
||||||
|
|
||||||
handleLeylinesAndChancellors(first);
|
runOpeningHandActions(first);
|
||||||
checkStateEffects();
|
checkStateEffects();
|
||||||
|
|
||||||
// Run Trigger beginning of the game
|
// Run Trigger beginning of the game
|
||||||
@@ -1557,6 +1456,28 @@ public class GameAction {
|
|||||||
game.fireEvent(new GameEventGameFinished());
|
game.fireEvent(new GameEventGameFinished());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Player determineFirstTurnPlayer(final GameOutcome lastGameOutcome) {
|
||||||
|
// Only cut/coin toss if it's the first game of the match
|
||||||
|
Player goesFirst = null;
|
||||||
|
|
||||||
|
boolean isFirstGame = lastGameOutcome == null;
|
||||||
|
if (isFirstGame) {
|
||||||
|
game.fireEvent(new GameEventFlipCoin()); // Play the Flip Coin sound
|
||||||
|
goesFirst = Aggregates.random(game.getPlayers());
|
||||||
|
} else {
|
||||||
|
for(Player p : game.getPlayers()) {
|
||||||
|
if(!lastGameOutcome.isWinner(p.getLobbyPlayer())) {
|
||||||
|
goesFirst = p;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean willPlay = goesFirst.getController().getWillPlayOnFirstTurn(isFirstGame);
|
||||||
|
goesFirst = willPlay ? goesFirst : goesFirst.getOpponent();
|
||||||
|
return goesFirst;
|
||||||
|
}
|
||||||
|
|
||||||
private void performMulligans(final Player firstPlayer, final boolean isCommander) {
|
private void performMulligans(final Player firstPlayer, final boolean isCommander) {
|
||||||
List<Player> whoCanMulligan = Lists.newArrayList(game.getPlayers());
|
List<Player> whoCanMulligan = Lists.newArrayList(game.getPlayers());
|
||||||
int offset = whoCanMulligan.indexOf(firstPlayer);
|
int offset = whoCanMulligan.indexOf(firstPlayer);
|
||||||
@@ -1630,6 +1551,45 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void runOpeningHandActions(final Player first) {
|
||||||
|
Player takesAction = first;
|
||||||
|
do {
|
||||||
|
List<SpellAbility> usableFromOpeningHand = new ArrayList<SpellAbility>();
|
||||||
|
|
||||||
|
// Select what can be activated from a given hand
|
||||||
|
for (final Card c : takesAction.getCardsIn(ZoneType.Hand)) {
|
||||||
|
for (String kw : c.getKeyword()) {
|
||||||
|
if (kw.startsWith("MayEffectFromOpeningHand")) {
|
||||||
|
String[] split = kw.split(":");
|
||||||
|
final String effName = split[1];
|
||||||
|
if ( split.length > 2 && split[2].equalsIgnoreCase("!PlayFirst") && first == takesAction)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
final SpellAbility effect = AbilityFactory.getAbility(c.getSVar(effName), c);
|
||||||
|
effect.setActivatingPlayer(takesAction);
|
||||||
|
|
||||||
|
usableFromOpeningHand.add(effect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Players are supposed to return the effects in an order they want those to be resolved (Rule 103.5)
|
||||||
|
usableFromOpeningHand = takesAction.getController().chooseSaToActivateFromOpeningHand(usableFromOpeningHand);
|
||||||
|
|
||||||
|
for(final SpellAbility sa : usableFromOpeningHand ) {
|
||||||
|
if (!takesAction.getZone(ZoneType.Hand).contains(sa.getSourceCard()))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (takesAction.isHuman())
|
||||||
|
HumanPlay.playSpellAbilityNoStack(takesAction, sa);
|
||||||
|
else
|
||||||
|
ComputerUtil.playNoStack(takesAction, sa, game);
|
||||||
|
}
|
||||||
|
takesAction = game.getNextPlayerAfter(takesAction);
|
||||||
|
} while( takesAction != first );
|
||||||
|
// state effects are checked only when someone gets priority
|
||||||
|
}
|
||||||
|
|
||||||
// Invokes given runnable in Game thread pool - used to start game and perform actions from UI (when game-0 waits for input)
|
// Invokes given runnable in Game thread pool - used to start game and perform actions from UI (when game-0 waits for input)
|
||||||
public void invoke(final Runnable proc) {
|
public void invoke(final Runnable proc) {
|
||||||
if( FThreads.isGameThread() ) {
|
if( FThreads.isGameThread() ) {
|
||||||
|
|||||||
@@ -904,5 +904,45 @@ public class AiController {
|
|||||||
}
|
}
|
||||||
return toExile;
|
return toExile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SpellAbility> chooseSaToActivateFromOpeningHand(List<SpellAbility> usableFromOpeningHand) {
|
||||||
|
// AI would play everything. But limits to one copy of (Leyline of Singularity) and (Gemstone Caverns)
|
||||||
|
|
||||||
|
List<SpellAbility> result = new ArrayList<SpellAbility>();
|
||||||
|
for(SpellAbility sa : usableFromOpeningHand) {
|
||||||
|
// Is there a better way for the AI to decide this?
|
||||||
|
if (sa.doTrigger(false, player)) {
|
||||||
|
result.add(sa);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean hasLeyline1 = false;
|
||||||
|
SpellAbility saGemstones = null;
|
||||||
|
|
||||||
|
for(int i = 0; i < result.size(); i++) {
|
||||||
|
SpellAbility sa = result.get(i);
|
||||||
|
|
||||||
|
String srcName = sa.getSourceCard().getName();
|
||||||
|
if("Gemstone Caverns".equals(srcName)) {
|
||||||
|
if(saGemstones == null)
|
||||||
|
saGemstones = sa;
|
||||||
|
else
|
||||||
|
result.remove(i--);
|
||||||
|
} else if ("Leyline of Singularity".equals(srcName)) {
|
||||||
|
if(!hasLeyline1)
|
||||||
|
hasLeyline1 = true;
|
||||||
|
else
|
||||||
|
result.remove(i--);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Play them last
|
||||||
|
if( saGemstones != null ) {
|
||||||
|
result.remove(saGemstones);
|
||||||
|
result.add(saGemstones);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,9 +49,7 @@ import forge.game.Game;
|
|||||||
import forge.game.GlobalRuleChange;
|
import forge.game.GlobalRuleChange;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.player.PlayerController.ManaPaymentPurpose;
|
import forge.game.player.PlayerController.ManaPaymentPurpose;
|
||||||
import forge.game.zone.PlayerZone;
|
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.gui.GuiChoose;
|
|
||||||
import forge.gui.GuiDialog;
|
import forge.gui.GuiDialog;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.SDisplayUtil;
|
import forge.gui.framework.SDisplayUtil;
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ package forge.game.player;
|
|||||||
public enum PlayerActionConfirmMode {
|
public enum PlayerActionConfirmMode {
|
||||||
Random,
|
Random,
|
||||||
BraidOfFire,
|
BraidOfFire,
|
||||||
|
FromOpeningHand;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -129,6 +129,7 @@ public abstract class PlayerController {
|
|||||||
public abstract List<Card> chooseCardsToDelve(int colorLessAmount, List<Card> grave);
|
public abstract List<Card> chooseCardsToDelve(int colorLessAmount, List<Card> grave);
|
||||||
public abstract List<Card> chooseCardsToRevealFromHand(int min, int max, List<Card> valid);
|
public abstract List<Card> chooseCardsToRevealFromHand(int min, int max, List<Card> valid);
|
||||||
public abstract List<Card> chooseCardsToDiscardUnlessType(int min, List<Card> hand, String param, SpellAbility sa);
|
public abstract List<Card> chooseCardsToDiscardUnlessType(int min, List<Card> hand, String param, SpellAbility sa);
|
||||||
|
public abstract List<SpellAbility> chooseSaToActivateFromOpeningHand(List<SpellAbility> usableFromOpeningHand);
|
||||||
public abstract Mana chooseManaFromPool(List<Mana> manaChoices);
|
public abstract Mana chooseManaFromPool(List<Mana> manaChoices);
|
||||||
|
|
||||||
public abstract String chooseSomeType(String kindOfType, String aiLogic, List<String> validTypes, List<String> invalidTypes);
|
public abstract String chooseSomeType(String kindOfType, String aiLogic, List<String> validTypes, List<String> invalidTypes);
|
||||||
|
|||||||
@@ -325,4 +325,10 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -539,4 +539,27 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
public boolean payManaOptional(Card c, Cost attackCost, String prompt, ManaPaymentPurpose purpose) {
|
public boolean payManaOptional(Card c, Cost attackCost, String prompt, ManaPaymentPurpose purpose) {
|
||||||
return HumanPlay.payCostDuringAbilityResolve(player, c, attackCost, null);
|
return HumanPlay.payCostDuringAbilityResolve(player, c, attackCost, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see forge.game.player.PlayerController#chooseSaToActivateFromOpeningHand(java.util.List)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SpellAbility> chooseSaToActivateFromOpeningHand(List<SpellAbility> usableFromOpeningHand) {
|
||||||
|
List<Card> srcCards = new ArrayList<Card>();
|
||||||
|
for(SpellAbility sa : usableFromOpeningHand) {
|
||||||
|
srcCards.add(sa.getSourceCard());
|
||||||
|
}
|
||||||
|
List<Card> chosen = GuiChoose.order("Choose cards to activate from opening hand", "Activate first", -1, srcCards, null, null);
|
||||||
|
List<SpellAbility> result = new ArrayList<SpellAbility>();
|
||||||
|
for(Card c : chosen) {
|
||||||
|
for(SpellAbility sa : usableFromOpeningHand) {
|
||||||
|
if ( sa.getSourceCard() == c ) {
|
||||||
|
result.add(sa);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user