It is currently 28 May 2025, 23:05
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

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

Re: Card Development Questions

Postby moomarc » 08 Nov 2011, 09:58

From initial list of 27, I'm down to these last 15 cards. Could one of the pro-scripters here check my assessment of which of the remaining cards are scriptable, and see if I've got it right:


Basalt Golem | Open
Code: Select all
Name:Basalt Golem
ManaCost:5
Types:Artifact Creature Golem
Text:CARDNAME can't be blocked by artifact creatures.
PT:2/4
K:CantBeBlockedBy Artifact.Creature
T:Mode$ Blocks | ValidCard$ Creature | ValidBlocked$ Card.Self | DelayedTrigger$ DelTrigBlocker | RememberBlockingSource$ True | TriggerDescription$ Whenever CARDNAME becomes blocked by a creature, that creature's controller sacrifices it at end of combat. If the player does, he or she puts a 0/2 colorless Wall artifact creature token with defender onto the battlefield.
SVar:DelTrigBlocker:DB$DelayedTrigger | Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Each | RememberCard$ Remembered | Execute$ TrigSacBlocker | TriggerDescription$ Sacrifice blocking creature at end of combat. If the player does, he or she puts a 0/2 colorless Wall artifact creature token with defender onto the battlefield.
SVar:TrigSacBlocker:AB$Sacrifice | Cost$ 0 | Defined$ Opponent | SacValid$ Creature.IsRemembered | SacMessage$ creature that blocked CARDNAME | SubAbility$ SVar=MakeToken
SVar:MakeToken:DB$Token | TokenImage$ C 0 2 Wall | TokenName$ Wall | TokenColors$ Colorless | TokenTypes$ Artifact,Creature,Wall | TokenPower$ 0 | TokenToughness$ 2 | TokenOwner$ Opponent | TokenAmount$ 1 | TokenKeywords$ Defender
SVar:Rarity:Uncommon
End
Keeper of the Beasts | Open
Code: Select all
Name:Keeper of the Beasts
ManaCost:G G
Types:Creature Human Wizard
Text:no text
PT:1/2
A:AB$ LoseLife | Cost$ G T | ValidTgts$ Opponent | LifeAmount$ 0 | CheckSVar$ X | SVarCompare$ LTY | SubAbility$ DBToken | SpellDescription$ Choose target opponent who controlled more creatures than you did as you activated this ability.
SVar:X:Count$Valid Creature.YouCtrl
SVar:Y:Count$Valid Creature.YouDontCtrl
SVar:DBToken:DB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Beast | TokenTypes$ Creature,Beast | TokenOwner$ You | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2 | SpellDescription$ Put a 2/2 green Beast creature token onto the battlefield.
SVar:RemAIDeck:True
SVar:Rarity:Rare
End

# Note:The LoseLife AF serves as a selector only
Ideally needs a Select AF that does nothing but pick targets, supports SubAbility/Delayed triggers, and checks activation restrictions. Currently the stack description makes this unuseable.

Tatsumasa, the Dragon's Fang | Open
Code: Select all
Name:Tatsumasa, the Dragon's Fang
ManaCost:6
Types:Legendary Artifact Equipment
Text:Equipped creature gets +5/+5.
K:eqPump 3:+5/+5
A:AB$ Token | Cost$ 6 Exile<1/CARDNAME> | TokenAmount$ 1 | TokenName$ Dragon Spirit | TokenTypes$ Creature,Dragon,Spirit | TokenOwner$ You | TokenColors$ Blue | TokenPower$ 5 | TokenToughness$ 5 | RememberTokens$ True | DelayedTrigger$ DelTrigDies | TokenKeywords$ Flying | SpellDescription$ Put a 5/5 blue Dragon Spirit creature token with flying onto the battlefield. Return Tatsumasa to the battlefield under its owner's control when that token dies.
SVar:DelTrigDies:DB$DelayedTrigger | Mode$ ChangesZone | ValidCard$ Creature.IsRemembered | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Exile |Execute$ TrigReturn | TriggerDescription$ Return CARDNAME to the battlefield under its owner's control.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Origin$ Exile | Destination$ Battlefield | Defined$ Self | SubAbility$ DBCleanUp
SVar:DBCleanUp:DB$Cleanup | ClearRemembered$ True
SVar:Rarity:Rare
End
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby Sloth » 08 Nov 2011, 10:58

Here is a slightly more elegant script for Keeper of the Beasts:

| Open
Name:Keeper of the Beasts
ManaCost:G G
Types:Creature Human Wizard
Text:no text
PT:1/2
A:AB$ Token | Cost$ G T | ValidTgts$ Opponent | CheckSVar$ X | SVarCompare$ LTY | TokenAmount$ 1 | TokenName$ Beast | TokenTypes$ Creature,Beast | TokenOwner$ You | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2 | SpellDescription$ Choose target opponent who controlled more creatures than you did as you activated this ability. Put a 2/2 green Beast creature token onto the battlefield.
SVar:X:Count$Valid Creature.YouCtrl
SVar:Y:Count$Valid Creature.YouDontCtrl
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/keeper_of_the_beasts.jpg
End

I think it works correct ruleswise.

Basalt Golem has multiple problems (RememberBlockingSource and RememberCard for delayed triggers do not exist).

Tatsumasa, the Dragon's Fang should work in the future (since already submitted cards have this problem too).

Spiny Starfish should be doable, I will try to implement this.

EDIT:
Spiny Starfish should be scriptable now. Use RegeneratedThisTurn in count.
Tetravus should also be scriptable, the keyword "CARDNAME can't be enchanted." is now available.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby moomarc » 08 Nov 2011, 11:55

Thanks Sloth. I hadn't realised you could just slot ValidTgts in like that. It works perfectly as far as I can tell. So down to 14 on my list :D

Edit: And thanks for the new parameters.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby Iran » 08 Nov 2011, 11:58

Is possible to script Haakon, Stromgald Scourge? I think I see a way to play cards from graveyard.
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby Sloth » 08 Nov 2011, 12:09

Iran wrote:Is possible to script Haakon, Stromgald Scourge? I think I see a way to play cards from graveyard.
I'm not sure about "but not from anywhere else". There are funky rules interactions.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby Sloth » 08 Nov 2011, 13:03

jeffwadsworth wrote:Testing Crown of Convergence. Does anyone spot the issue with this part of the script?

| Open
S:Mode$ Continuous | Affected$ TopLibrary.SharesColorWith+Creature+YouCtrl | AddPower$ 1 | AddToughness$ 1 | TopCardOfLibraryIs$ Creature | Description$ As long as the top card of your library is a creature card, creatures you control that share a color with that card get +1/+1.


Now this works for something like ValidCards$, but has issues with Affected$.
I've added the property "SharesColorWith TopOfLibrary". It's untested but should do the trick:

Code: Select all
Affected$ Creature.SharesColorWith TopOfLibrary+YouCtrl
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby jeffwadsworth » 08 Nov 2011, 20:47

slowe wrote:
jeffwadsworth wrote:Testing Cloud Cover. This fires even if the target of the spell or ability is a permanent you do not control.

| Open
Name:Cloud Cover
ManaCost:2 W U
Types:Enchantment
Text:no text
T:Mode$ BecomesTarget | TargetsValid$ Permanent.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigBounce | OptionalDecider$ You | TriggerDescription$ Whenever another permanent you control becomes the target of a spell or ability an opponent controls, you may return that permanent to its owner's hand.
SVar:TrigBounce:AB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand | Defined$ TriggeredTarget
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloud_cover.jpg
End


Does anyone see the issue?
That's strange ... I don't see anything wrong with it. It needs to be ValidTarget, not TargetsValid. I've done the same sort of thing plenty of times.
It does need a ValidSource$ parameter (SpellAbility.YouDontCtrl ?), though, because the card has that restriction.
The reason TargetsValid$ is in there was due to my previous testing with Mode$ SpellAbilityCast which apparently does not allow one to specify a TriggeredTarget for the Defined$. Anyway, all is well now.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby jeffwadsworth » 08 Nov 2011, 21:02

Sloth wrote:
jeffwadsworth wrote:Testing Crown of Convergence. Does anyone spot the issue with this part of the script?

| Open
S:Mode$ Continuous | Affected$ TopLibrary.SharesColorWith+Creature+YouCtrl | AddPower$ 1 | AddToughness$ 1 | TopCardOfLibraryIs$ Creature | Description$ As long as the top card of your library is a creature card, creatures you control that share a color with that card get +1/+1.


Now this works for something like ValidCards$, but has issues with Affected$.
I've added the property "SharesColorWith TopOfLibrary". It's untested but should do the trick:

Code: Select all
Affected$ Creature.SharesColorWith TopOfLibrary+YouCtrl
Cool. Actually, you mean TopCardOfLibrary. Works perfectly.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby Iran » 09 Nov 2011, 02:17

Is possible to script Garza's Assassin and Deepcavern Imp?
I think the cost of Recover and Echo keywords of these cards is dificult to implement... Am I right?
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby jeffwadsworth » 09 Nov 2011, 02:45

Iran wrote:Is possible to script Garza's Assassin and Deepcavern Imp?
I think the cost of Recover and Echo keywords of these cards is dificult to implement... Am I right?
The first card is interesting. I will test it.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby Iran » 09 Nov 2011, 03:13

jeffwadsworth wrote:
Iran wrote:Is possible to script Garza's Assassin and Deepcavern Imp?
I think the cost of Recover and Echo keywords of these cards is dificult to implement... Am I right?
The first card is interesting. I will test it.
With Deepcavern Imp I can do this deck

"Madbent!" | Open
3 Keldon Megaliths
7 Mountain
10 Swamp
4 Tresserhorn Sinks

--------------------------------------------------------------------------------
24 lands

4 Deepcavern Imp
4 Gathan Raiders
4 Rakdos Guildmage
3 Reckless Wurm
4 Shadow Guildmage
2 Undertaker

--------------------------------------------------------------------------------
21 creatures

4 Fiery Temper
4 Persecute
4 Rift Bolt
3 Smallpox

--------------------------------------------------------------------------------
15 other spells


With Garza's Assassin I can do this deck

"Naoko Sato's Monoblack The Rack Discard" | Open
2 Ghost Quarter
18 Swamp
1 Urborg, Tomb of Yawgmoth

--------------------------------------------------------------------------------
21 lands

4 Dark Confidant
2 Garza's Assassin
4 Mindlash Sliver
4 Ravenous Rats
3 Stromgald Crusader

--------------------------------------------------------------------------------
17 creatures

3 Call to the Netherworld
2 Cruel Edict
4 Cry of Contrition
4 Funeral Charm
2 Phyrexian Totem
4 Smallpox
4 The Rack

--------------------------------------------------------------------------------
23 other spells
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

Re: Card Development Questions

Postby moomarc » 09 Nov 2011, 07:39

It looks like Tetravus still can't be done without additional code. The script so far is:
Tetravus | Open
Code: Select all
Name:Tetravus
ManaCost:6
Types:Artifact Creature Construct
Text:no text
PT:1/1
K:etbCounter:P1P1:3
K:Flying
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, you may remove any number of +1/+1 counters from CARDNAME. If you do, put that many 1/1 colorless Tetravite artifact creature tokens onto the battlefield. They each have flying and "This creature can't be enchanted."
SVar:TrigToken:AB$Token | Cost$ SubCounter<X/P1P1> | TokenAmount$ ChosenX | TokenName$ Tetravite | TokenTypes$ Artifact,Creature,Tetravite | TokenOwner$ You | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying<>CARDNAME can't be enchanted. | RememberTokens$ True
SVar:X:XChoice
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounters | TriggerDescription$ At the beginning of your upkeep, you may exile any number of tokens put onto the battlefield with CARDNAME. If you do, put that many +1/+1 counters on CARDNAME.
SVar:TrigPutCounters:AB$PutCounter | Cost$ Exile<Y/Creature.isRemembered/Tetravite> | Defined$ Self | CounterType$ P1P1 | CounterNum$ ChosenX | CostDesc$ Exile any number of tokens put onto the battlefield with CARDNAME.
SVar:Y:XChoice
SVar:Rarity:Rare
End
Basically only the first XChoice is occuring, so I think we need an XChoice2 with ChosenX2 or YChoice with ChosenY. The other problem is that the isRemembered restriction on the second trigger is causing there to be no valid targets. Hopefully I'm just doing something wrong. :(

There may be more issues though. I may be wrong, but I don't think the card is 100% rules compliant as exiling the tokens or removing the counters aren't technically costs. Instead they should trigger the abilities so that the opponent could, for instance, wait for you to remove counters then Stifle putting the tokens in play. If that is the case then we're even further from scripting this because we'd have to support multiple remembered lists that can be counted and cleared individually.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Card Development Questions

Postby friarsol » 09 Nov 2011, 13:02

moomarc wrote:There may be more issues though. I may be wrong, but I don't think the card is 100% rules compliant as exiling the tokens or removing the counters aren't technically costs. Instead they should trigger the abilities so that the opponent could, for instance, wait for you to remove counters then Stifle putting the tokens in play. If that is the case then we're even further from scripting this because we'd have to support multiple remembered lists that can be counted and cleared individually.
I don't believe trigger costs are paid while the trigger is on the stack. I believe they are paid while it's resolving (which is correct)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby jeffwadsworth » 09 Nov 2011, 18:08

Iran wrote:Is possible to script Garza's Assassin and Deepcavern Imp?
I think the cost of Recover and Echo keywords of these cards is dificult to implement... Am I right?
The Imp can not handle Echo non-mana costs. Anyway, the Assassin will be ready once the keyword Recover is fixed.

| Open
Name:Garza's Assassin
ManaCost:B B B
Types:Creature Human Assassin
Text:no text
PT:2/2
K:Recover:PayLife<X>
A:AB$ Destroy | Cost$ Sac<1/CARDNAME> | ValidTgts$ Creature.nonBlack | TgtPrompt$ Select target nonblack creature | SpellDescription$ Destroy target nonblack creature.
SVar:X:Count$YourLifeTotal/HalfUp
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/garzas_assassin.jpg
End
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Card Development Questions

Postby Iran » 11 Nov 2011, 02:16

About Malfegor and Springjack Pasture? Is Possible to script them?
Exists the Remember$Discarded? Can the third abilitie of the Springjack Pasture can be script with Any parameter?

This Way:

A:AB$ Mana | Cost$ Sac<X/Creature.goat> | Produced$ Any | Amount$ ChosenX | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Cost$ 0 | LifeAmount$ ChosenX
SVar:X:XChoice#XChosenX
Iran
 
Posts: 251
Joined: 11 Jul 2011, 04:36
Has thanked: 61 times
Been thanked: 4 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 26 guests


Who is online

In total there are 26 users online :: 0 registered, 0 hidden and 26 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 26 guests

Login Form