Page 2 of 3

Re: Dragon Presence Cards

PostPosted: 13 May 2015, 18:04
by Agetian
I'm trying to implement Scaleguard Sentinels but I'm not sure how to properly script the ETB counter portion - I'm trying something like this:

K:etbCounter:P1P1:1:CheckSVar$ DragonPresence:<description>

but that's failing in case I'm revealing a dragon from my hand (paying the optional cost). Should it be hooked somewhere in the code for this to work? I also tried more hacky things such as writing a special sub-ability that set SVar DragonPresence to 1 for Card.Self+pseudokicked, but that didn't work either for some reason...

- Agetian

Re: Dragon Presence Cards

PostPosted: 14 May 2015, 14:50
by friarsol
Yea you can't just use the SVar. Since that doesn't check the pseudokicked-ness part of it.

Re: Dragon Presence Cards

PostPosted: 14 May 2015, 19:55
by Agetian
Makes sense. I noticed that Orator of Ojutai uses ValidCard to detect whether a card was "pseudo-kicked" or not - is anything like that viable for Scaleguard Sentinels?

- Agetian

Re: Dragon Presence Cards

PostPosted: 14 May 2015, 20:38
by friarsol
The following might work -

SVar:Y:Count$Valid Permanent.Self+pseudokicked+wasCast
SVar:X:SVar$DragonPresence/Plus.Y

Y should be 0 or 1, Dragon Presence should be 0 or 1. So you'll get 0-2, but it only matters if it's non-zero.

And then use X as the condition for etbCounter (since I believe GE1 is the default comparison).


Edit: Actually, if that works, we should be able to use the same exact trick for Dragonlord's Prerogative. And Silumgar's Scorn should be the same Condition that the first two I did used.

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 03:33
by Agetian
Thanks a lot for help, Sol! I'll try this idea out over the weekend and see if I can get a workable version out! :) I'll keep you posted! (I'm trying it out later today or tomorrow).

- Agetian

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 16:02
by Agetian
Ok, this seems to work fine (I had to change "Valid" to "ValidStack" in the Y SVar line to make it correctly detect the permanent that is being cast and is thus put on stack):

Code: Select all
Name:Scaleguard Sentinels
ManaCost:G G
Types:Creature Human Soldier
PT:2/3
Text:As an additional cost to cast Scaleguard Sentinels, you may reveal a Dragon card from your hand.
K:Kicker Reveal<1/Dragon> : Generic
K:etbCounter:P1P1:1:CheckSVar$ X:CARDNAME enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast CARDNAME.
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ StoreDragons | Static$ True
SVar:Y:Count$ValidStack Permanent.Self+pseudokicked+wasCast
SVar:X:SVar$DragonPresence/Plus.Y
SVar:DragonPresence:Number$0
SVar:StoreDragons:DB$ StoreSVar | SVar$ DragonPresence | Type$ Number | Expression$ 1 | ConditionPresent$ Dragon.YouCtrl | SubAbility$ StoreNoDragons
SVar:StoreNoDragons:DB$ StoreSVar | SVar$ DragonPresence | Type$ Number | Expression$ 0 | ConditionPresent$ Dragon.YouCtrl | ConditionCompare$ EQ0
SVar:Picture:http://www.wizards.com/global/images/magic/general/scaleguard_sentinels.jpg
Oracle:As an additional cost to cast Scaleguard Sentinels, you may reveal a Dragon card from your hand.\nScaleguard Sentinels enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast Scaleguard Sentinels.
I tested in all three basic modes (no dragon reveal, dragon reveal, dragon presence on the battlefield) and it seems to work correctly. Is this workable enough to be committed?

- Agetian

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 16:18
by friarsol
Agetian wrote:Ok, this seems to work fine (I had to change "Valid" to "ValidStack" in the Y SVar line to make it correctly detect the permanent that is being cast and is thus put on stack):
I tested in all three basic modes (no dragon reveal, dragon reveal, dragon presence on the battlefield) and it seems to work correctly. Is this workable enough to be committed?

- Agetian
Should be fine. I'd just run a quick test with Clone. Pseudokick the Sentinels (without a Dragon in play) and then Clone the Sentinel and see what happens. It'd be good to know what happens in these cases. Obviously, since the Clone doesn't have the dragon presence on casting check it will never get the bonus from that.

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 16:22
by Agetian
Ok, thanks, will check soon! Also, do you have an idea as to how to implement a conditional "can't be countered" for Dragonlord's Prerogative? Can CheckSVar also be slabbed onto the "K:CARDNAME can't be countered." keyword declaration?

EDIT: Just ran the Clone test - it appears to work fine (the Clone did not receive the dragon presence ETB counter).

- Agetian

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 16:33
by friarsol
Agetian wrote:Ok, thanks, will check soon! Also, do you have an idea as to how to implement a conditional "can't be countered" for Dragonlord's Prerogative? Can CheckSVar also be slabbed onto the "K:CARDNAME can't be countered." keyword declaration?
Should be similar to Banefire?

S:Mode$ Continuous | Affected$ Self | AffectedZone$ Stack | EffectZone$ All | AddHiddenKeyword$ CARDNAME can't be countered. | CheckSVar$ X | SVarCompare$ GE1

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 16:37
by Agetian
Haha interestingly enough for some reason that was the card I also thought about and I'm currently looking at - trying to get it to work, will get back with more info soon :) Thanks!

- Agetian

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 16:46
by Agetian
Ok, this works for Dragonlord's Prerogative - two down, one to go...

Code: Select all
Name:Dragonlord's Prerogative
ManaCost:4 U U
Types:Instant
K:Kicker Reveal<1/Dragon> : Generic
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ StoreDragons | Static$ True
S:Mode$ Continuous | Affected$ Self | AffectedZone$ Stack | EffectZone$ All | CharacteristicDefining$ True | AddHiddenKeyword$ CARDNAME can't be countered. | CheckSVar$ X | SVarCompare$ GE1 | Description$ If you revealed a Dragon card or controlled a Dragon as you cast CARDNAME, CARDNAME can't be countered.
SVar:Y:Count$ValidStack Card.Self+pseudokicked+wasCast
SVar:X:SVar$DragonPresence/Plus.Y
SVar:DragonPresence:Number$0
SVar:StoreDragons:DB$ StoreSVar | SVar$ DragonPresence | Type$ Number | Expression$ 1 | ConditionPresent$ Dragon.YouCtrl | SubAbility$ StoreNoDragons
SVar:StoreNoDragons:DB$ StoreSVar | SVar$ DragonPresence | Type$ Number | Expression$ 0 | ConditionPresent$ Dragon.YouCtrl | ConditionCompare$ EQ0
A:SP$ Draw | Cost$ 4 U U | NumCards$ 4 | SpellDescription$ Draw four cards.
SVar:Picture:http://www.wizards.com/global/images/magic/general/dragonlords_prerogative.jpg
Oracle:As an additional cost to cast Dragonlord's Prerogative, you may reveal a Dragon card from your hand.\nIf you revealed a Dragon card or controlled a Dragon as you cast Dragonlord's Prerogative, Dragonlord's Prerogative can't be countered.\nDraw four cards.

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 17:13
by Agetian
And here's Silumgar's Scorn. All appears to work, at least when it comes to basic functionality... I'll commit to trunk I think.

Code: Select all
Name:Silumgar's Scorn
ManaCost:U U
Types:Instant
K:Kicker Reveal<1/Dragon> : Generic
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ StoreDragons | Static$ True
A:SP$ Counter | Cost$ U U | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell | UnlessCost$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | StackDescription$ SpellDescription | SubAbility$ DBCounter | SpellDescription$ Counter target spell unless its controller pays {1}. If you revealed a Dragon card or controlled a Dragon as you cast CARDNAME, counter that spell instead.
SVar:DBCounter:DB$ Counter | Defined$ Targeted | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | StackDescription$ None
SVar:Y:Count$ValidStack Card.Self+pseudokicked+wasCast
SVar:X:SVar$DragonPresence/Plus.Y
SVar:DragonPresence:Number$0
SVar:StoreDragons:DB$ StoreSVar | SVar$ DragonPresence | Type$ Number | Expression$ 1 | ConditionPresent$ Dragon.YouCtrl | SubAbility$ StoreNoDragons
SVar:StoreNoDragons:DB$ StoreSVar | SVar$ DragonPresence | Type$ Number | Expression$ 0 | ConditionPresent$ Dragon.YouCtrl | ConditionCompare$ EQ0
SVar:Picture:http://www.wizards.com/global/images/magic/general/silumgars_scorn.jpg
Oracle:As an additional cost to cast Silumgar's Scorn, you may reveal a Dragon card from your hand.\nCounter target spell unless its controller pays {1}. If you revealed a Dragon card or controlled a Dragon as you cast Silumgar's Scorn, counter that spell instead.
EDIT: All three are in r29395.
- Agetian

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 17:48
by Agetian
I think it was well worth implementing this set of cards - the number of unsupported recently posted decks from MTGDecks.net deck lists has shrunk from 1223 all the way down to 144. The tournament relevant cards from Dragons of Tarkir that are still unsupported but that appear in the still-unsupported decks are Commune with Lava and Hedonist's Trove.

- Agetian

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 17:59
by friarsol
Agetian wrote:The tournament relevant cards from Dragons of Tarkir that are still unsupported but that appear in the still-unsupported decks are Commune with Lava and Hedonist's Trove.
According to my records, those are the only two cards that aren't scripted from DTK, tournament relevance or not.

Re: Dragon Presence Cards

PostPosted: 15 May 2015, 18:09
by Agetian
Hehe yep apparently so, I also checked the per-set tracking results listing for the set now.

- Agetian