It is currently 26 Apr 2024, 19:17
   
Text Size

Dragon Presence Cards

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Dragon Presence Cards

Postby Agetian » 13 May 2015, 18:04

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby friarsol » 14 May 2015, 14:50

Yea you can't just use the SVar. Since that doesn't check the pseudokicked-ness part of it.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Dragon Presence Cards

Postby Agetian » 14 May 2015, 19:55

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby friarsol » 14 May 2015, 20:38

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 03:33

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 16:02

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby friarsol » 15 May 2015, 16:18

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 16:22

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby friarsol » 15 May 2015, 16:33

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
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 16:37

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 16:46

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.
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 17:13

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 17:48

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
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Dragon Presence Cards

Postby friarsol » 15 May 2015, 17:59

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Dragon Presence Cards

Postby Agetian » 15 May 2015, 18:09

Hehe yep apparently so, I also checked the per-set tracking results listing for the set now.

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 100 guests


Who is online

In total there are 100 users online :: 0 registered, 0 hidden and 100 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 100 guests

Login Form