Gatecrash Spoiler Season
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Gatecrash Spoiler Season
by ZzzzSleep » 20 Jan 2013, 11:16
Another quick one!
- Ground Assault | Open
- Code: Select all
Name:Ground Assault
ManaCost:R G
Types:Sorcery
Text:no text
A:SP$ DealDamage | Cost$ R G | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X | References$ X | SpellDescription$ CARDNAME deals damage equal to the number of lands you control to target creature.
SVar:X:Count$TypeYouCtrl.Land
SVar:Rarity:Uncommon
End
Re: Gatecrash Spoiler Season
by friarsol » 22 Jan 2013, 04:11
Ok, if I'm reading this correctly multiple triggers is the way Cipher works
702.97a Cipher appears on some instants and sorceries. It represents two static abilities, one that functions while the spell is on the stack and one that functions while the card with cipher is in the exile zone. "Cipher" means "If this spell is represented by a card, you may exile this card encoded on a creature you control" and "As long as this card is encoded on that creature, that creature has 'Whenever this creature deals combat damage to a player, you may copy this card and you may cast the copy without paying its mana cost.'"
Also, we should probably confirm this already happens appropriately
If a creature with an encoded card deals combat damage to more than one player simultaneously (perhaps because some of the combat damage was redirected), the triggered ability will trigger once for each player it deals combat damage to. Each ability will create a copy of the exiled card and allow you to cast it.
702.97a Cipher appears on some instants and sorceries. It represents two static abilities, one that functions while the spell is on the stack and one that functions while the card with cipher is in the exile zone. "Cipher" means "If this spell is represented by a card, you may exile this card encoded on a creature you control" and "As long as this card is encoded on that creature, that creature has 'Whenever this creature deals combat damage to a player, you may copy this card and you may cast the copy without paying its mana cost.'"
Also, we should probably confirm this already happens appropriately
If a creature with an encoded card deals combat damage to more than one player simultaneously (perhaps because some of the combat damage was redirected), the triggered ability will trigger once for each player it deals combat damage to. Each ability will create a copy of the exiled card and allow you to cast it.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 22 Jan 2013, 04:55
The encode effect sets up a separate trigger for each card encoded on a creature, e.g. two cards encoded => two triggers when combat damage done. I haven't tested the damage to more than one player aspect but I suspect it works based on how triggers are created.friarsol wrote:Ok, if I'm reading this correctly multiple triggers is the way Cipher works
Also, we should probably confirm this already happens appropriately
If a creature with an encoded card deals combat damage to more than one player simultaneously (perhaps because some of the combat damage was redirected), the triggered ability will trigger once for each player it deals combat damage to. Each ability will create a copy of the exiled card and allow you to cast it.
I interpreted this to mean that you don't even get the choice to exile the card if you don't control a creature."If this spell is represented by a card, you may exile this card encoded on a creature you control"
This needs some work. Catching the card with cipher leaving exile is definitely not being done.702.97c The card with cipher remains encoded on the chosen creature as long as the card with cipher remains exiled and the creature remains on the battlefield. The card remains encoded on that object even if it changes controller or stops being a creature, as long as it remains on the battlefield.
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 22 Jan 2013, 04:59
Curse you WotC!!! I can't get Guardian of the Gateless to work correctly due to this little statement in the Gatecrash FAQ
Edit: Update here's a script I got to work but it seems like a kludge.
I dug through the combat trigger code but didn't see an easy way to make this work right.Guardian of the Gateless's last ability triggers only once when it's declared as a blocker no matter how many creatures it's blocking.
Edit: Update here's a script I got to work but it seems like a kludge.
- Guardian of the Gateless | Open
- Name:Guardian of the Gateless
ManaCost:4 W
Types:Creature Angel
Text:no text
PT:3/3
K:Flying
K:CARDNAME can block any number of creatures.
#This static trigger counts number of activations per combat
T:Mode$ Blocks | ValidCard$ Card.Self | Execute$ TrigIncrement | Static$ True | Secondary$ True
SVar:TrigIncrement:DB$ StoreSVar | SVar$ TrigsThisCombat | Type$ CountSVar | Expression$ TrigsThisCombat/Plus.1
# Actual blocking trigger
T:Mode$ Blocks | ValidCard$ Card.Self | Execute$ TrigPump | CheckSVar$ TrigsThisCombat | SVarCompare$ EQX | TriggerDescription$ Whenever CARDNAME blocks, it gets +1/+1 until end of turn for each creature it's blocking.
SVar:TrigPump:AB$ Pump | Cost$ 0 | Defined$ Self | NumAtt$ X | NumDef$ X | References$ X
# Static trigger to reset count at end of combat
T:Mode$ Phase | Phase$ EndCombat | Execute$ ResetTrig | Static$ True | Secondary$ True
SVar:ResetTrig:DB$ StoreSVar | SVar$ TrigsThisCombat | Type$ Number | Expression$ 0
SVar:X:Count$Valid Creature.blockedBySource
SVar:TrigsThisCombat:Number$0
SVar:Picture:http://www.wizards.com/global/images/magic/general/guardian_of_the_gateless.jpg
End
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by swordshine » 22 Jan 2013, 10:17
Lairwatch Giant from Lorwyn has the same issue.ArsenalNut wrote:Curse you WotC!!! I can't get Guardian of the Gateless to work correctly due to this little statement in the Gatecrash FAQ...
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 22 Jan 2013, 14:15
I think I have a solution but I want to check with the rules experts on how things should work. How many triggers go on the stack when a creature like Giant Badger blocks multiple attackers because something like Entangler is allowing it extra blocks?swordshine wrote:Lairwatch Giant from Lorwyn has the same issue.ArsenalNut wrote:Curse you WotC!!! I can't get Guardian of the Gateless to work correctly due to this little statement in the Gatecrash FAQ...
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by Hellfish » 22 Jan 2013, 14:37
. Giant Badger triggers only once regardless since it's "When ~ blocks...".
If it had "When ~ blocks a creature..." then it would trigger once for each blocked creature.
See rule group 509.4
If it had "When ~ blocks a creature..." then it would trigger once for each blocked creature.
See rule group 509.4
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 22 Jan 2013, 23:40
Thanks for the pointer to the rules section. I ran a test in Forge with Giant Badger and Entangler. I had the Giant Badger block three creatures and three Pump trigger went on the stack. Good for the Giant Badger but not rightHellfish wrote:. Giant Badger triggers only once regardless since it's "When ~ blocks...".
If it had "When ~ blocks a creature..." then it would trigger once for each blocked creature.
See rule group 509.4
After studying the code, I believe the blocking triggers should be reorganized. The blocking triggers that use the phrasing that does an action to the blocked creature like Cockatrice should be converted to use "AttackerBlocked" instead of "Blocks". Some cards like Wall of Frost are already scripted this way. Right now the "Blocks" triggers are run inside a loop over the attackers which is why multiple trigger go on the stack. To fix this issue, I will move these triggers outside this loop so they will only happen once per combat.
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 23 Jan 2013, 06:56
I've checked in my fixes to the blocking triggers. Lairwatch Giant should scriptable using a "Blocks" trigger now. Guardian of the Gateless now works with a much cleaner script. Also the erroneous multiple triggers in the Giant Badger enchanted with Entangler blocking multiple creatures are fixed.swordshine wrote:Lairwatch Giant from Lorwyn has the same issue.
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by friarsol » 23 Jan 2013, 13:24
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Gatecrash Spoiler Season
by swordshine » 24 Jan 2013, 12:20
A few issues about some Gatecrash cards:
Killing Glare: I think "ValidTgts$ Creature.powerLEX" is not scriptable, because in Forge usually targetting comes first. Its spell effect is like Minamo Sightbender. Minamo Sightbender has a SVar "Targeted$CardPower" to define the cost, which I think is not perfectly scripted.
Bane Alley Broker: my script is here.
There is a remaining issue. When I use the first ability to exile a card from my hand face down, then I untap it and activate the second activated ability, the faced down cards could not see the name in the choice box. But if I click the exile zone to see the faced down cards and then activate the return card ability, those names show up. Could someone look into it and find out if there is a possible card script update or code update to fix the bug?
Killing Glare: I think "ValidTgts$ Creature.powerLEX" is not scriptable, because in Forge usually targetting comes first. Its spell effect is like Minamo Sightbender. Minamo Sightbender has a SVar "Targeted$CardPower" to define the cost, which I think is not perfectly scripted.
Bane Alley Broker: my script is here.
- | Open
- Name:Bane Alley Broker
ManaCost:1 U B
Types:Creature Human Rogue
Text:no text
PT:0/3
A:AB$ Draw | Cost$ T | NumCards$ 1 | SubAbility$ DBExile | SpellDescription$ Draw a card, then exile a card from your hand face down.
SVar:DBExile:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | ExileFaceDown$ True | RememberChanged$ True
S:Mode$ Continuous | Affected$ Card.IsRemembered | AffectedZone$ Exile | AddHiddenKeyword$ You may look at this card. | Description$ You may look at cards exiled with CARDNAME.
A:AB$ ChooseCard | Cost$ U B T | Defined$ You | Amount$ 1 | Mandatory$ True | ChoiceTitle$ Choose a card to put into your hand | Choices$ Card.IsRemembered | ChoiceZone$ Exile | SubAbility$ MoveChosen | SpellDescription$ Return a card exiled with CARDNAME to its owner's hand.
SVar:MoveChosen:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | Defined$ ChosenCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Excute$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/bane_alley_broker.jpg
End
There is a remaining issue. When I use the first ability to exile a card from my hand face down, then I untap it and activate the second activated ability, the faced down cards could not see the name in the choice box. But if I click the exile zone to see the faced down cards and then activate the return card ability, those names show up. Could someone look into it and find out if there is a possible card script update or code update to fix the bug?
Last edited by swordshine on 26 Jan 2013, 09:48, edited 1 time in total.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 24 Jan 2013, 23:52
Looking for feedback on implementation of Glaring Spotlight before I check in the change. I couldn't add a keyword to hexproof creatures very easily because the effect should only work for the controller of Glaring Spotlight. Instead, I implemented it as giving the controller of Glaring Spotlight the keyword "Spells and abilities you control can target hexproof creatures".
Here's the change I made to forge.Card.canBeTargetedBy(SpellAbility)
- Glaring Spotlight | Open
- Name:Glaring Spotlight
ManaCost:1
Types:Artifact
Text:no text
S:Mode$ Continuous | Affected$ You | AddKeyword$ Spells and abilities you control can target hexproof creatures | Description$ Creatures your opponents control with hexproof can be the targets of spells and abilities you control as though they didn't have hexproof.
A:AB$ PumpAll | Cost$ 3 Sac<1/CARDNAME> | ValidCards$ Creature.YouCtrl | KW$ Hexproof | SubAbility$ GSEffect | SpellDescription$ Creatures you control gain hexproof until end of turn and are unblockable this turn.
SVar:GSEffect:DB$ Effect | Name$ Glaring Spotlight Effect | StaticAbilities$ KWPump
SVar:KWPump:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Battlefield | Affected$ Creature.YouCtrl | AddHiddenKeyword$ Unblockable | Description$ Creatures you control are unblockable this turn.
SVar:Picture:http://www.wizards.com/global/images/magic/general/glaring_spotlight.jpg
End
Here's the change I made to forge.Card.canBeTargetedBy(SpellAbility)
- Code: Select all
if (kw.equals("Hexproof")) {
if (!sa.getActivatingPlayer().equals(this.getController())) {
if (!sa.getActivatingPlayer().getKeywords().contains("Spells and abilities you control can target hexproof creatures")) {
return false;
}
}
}
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by friarsol » 25 Jan 2013, 00:13
That seems ok, but you do need to check if the activatingPlayer is an opponent of the controller of the Hexproof card in the case of teammates. (I know this isn't something you added, but we should add it while we're in there).ArsenalNut wrote:Here's the change I made to forge.Card.canBeTargetedBy(SpellAbility)Are there any issues with implementing the card this way?
- Code: Select all
if (kw.equals("Hexproof")) {
if (!sa.getActivatingPlayer().equals(this.getController())) {
if (!sa.getActivatingPlayer().getKeywords().contains("Spells and abilities you control can target hexproof creatures")) {
return false;
}
}
}
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Gatecrash Spoiler Season
by ArsenalNut » 25 Jan 2013, 03:32
I changed the first check to compare whether or not the activating player and the controller are opponents.friarsol wrote:That seems ok, but you do need to check if the activatingPlayer is an opponent of the controller of the Hexproof card in the case of teammates. (I know this isn't something you added, but we should add it while we're in there).ArsenalNut wrote:Here's the change I made to forge.Card.canBeTargetedBy(SpellAbility)Are there any issues with implementing the card this way?
- Code: Select all
if (kw.equals("Hexproof")) {
if (!sa.getActivatingPlayer().equals(this.getController())) {
if (!sa.getActivatingPlayer().getKeywords().contains("Spells and abilities you control can target hexproof creatures")) {
return false;
}
}
}
So many cards, so little time
-

ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: Gatecrash Spoiler Season
by friarsol » 25 Jan 2013, 04:47
Anyone interested in merging the Gatecrash branch back in sometime on Friday?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Who is online
Users browsing this forum: No registered users and 28 guests