It is currently 20 Sep 2025, 07:53
   
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 friarsol » 24 Jan 2012, 04:40

Hey Jeff,

For Adarkar Valkyrie why do you do:

Code: Select all
SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Graveyard | Destination$ Battlefield | SubAbility$ DBGainControl
SVar:DBGainControl:DB$ GainControl | Defined$ Remembered
instead of what's used in Ashen Powder
Code: Select all
A:SP$ ChangeZone | Cost$ 2 B B | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | TgtPrompt$ Choose target creature card in an opponent's graveyard | ValidTgts$ Creature.YouDontCtrl | SpellDescription$ Put target creature card from an opponent's graveyard onto the battlefield under your control.
I'm worried the ETB triggers won't be controlled by the right person.
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 » 24 Jan 2012, 13:32

friarsol wrote:Hey Jeff,

For Adarkar Valkyrie why do you do:

Code: Select all
SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Graveyard | Destination$ Battlefield | SubAbility$ DBGainControl
SVar:DBGainControl:DB$ GainControl | Defined$ Remembered
instead of what's used in Ashen Powder
Code: Select all
A:SP$ ChangeZone | Cost$ 2 B B | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | TgtPrompt$ Choose target creature card in an opponent's graveyard | ValidTgts$ Creature.YouDontCtrl | SpellDescription$ Put target creature card from an opponent's graveyard onto the battlefield under your control.
I'm worried the ETB triggers won't be controlled by the right person.
Forgot about the ChangeZone GainControl parameter. I was concerned about that too but figured it would have read, "gain control of that card and return it to the battlefield" if that was the case. Anyway, I will change it today. Thanks for the clarification.
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 » 24 Jan 2012, 16:37

Looking at Devoted Caretaker. Does anyone know the correct attributes for "Gains$" here? If it is even possible, of course.

| Open
Name:Devoted Caretaker
ManaCost:W
Types:Creature Human Cleric
Text:no text
PT:1/2
A:AB$ Protection | Cost$ W T | Gains$ instant,sorcery | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target permanent you control | SpellDescription$ Target permanent you control gains protection from instant spells and from sorcery spells until end of turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/devoted_caretaker.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 jeffwadsworth » 24 Jan 2012, 16:54

This is my "attempt" at converting Scroll Rack. Note that you can not put the cards back in any order during the last step. If anyone can get this to work correctly, we can remove that long bit of hard code.

| Open
Name:Scroll Rack
ManaCost:2
Types:Artifact
Text:no text
A:AB$ ChangeZone | Cost$ 1 T | Origin$ Hand | Destination$ Exile | ExileFaceDown$ True | ChangeType$ Card | ChangeNum$ X | RememberChanged$ True | SubAbility$ DBDraw | SpellDescription$ Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order.
SVar:DBDraw:DB$ Draw | NumCards$ Y | SubAbility$ DBChangeZoneAll
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | Origin$ Exile | Destination$ Library | ChangeType$ Remembered | ChangeNum$ Y | LibraryPosition$ 0 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$InYourHand
SVar:Y:Remembered$Amount
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/scroll_rack.jpg
SetInfo:TMP|Rare|http://magiccards.info/scans/en/tp/298.jpg
Oracle:{1}, {T}: Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order.
End


Edit: added Cleanup.
Last edited by jeffwadsworth on 24 Jan 2012, 17:45, edited 1 time in total.
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 friarsol » 24 Jan 2012, 17:01

Make sure you clear out the the Remembered afterwards for Scroll Rack. I think for things going to an ordered Zone simultaneously, we should do it like this: (pseudo-code)

Code: Select all
if cards.length > 1
 if orderer == human && prompt("Would you like to order the way these cards are placed in library/graveyard?")
   allow human to order them however they like
 else
   just put them back in whatever order they are in now.
This can be used in ChangeZone, CZAll, Dig, DigUntil, Mill. Not sure what else?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Sloth » 24 Jan 2012, 20:42

jeffwadsworth wrote:Looking at Devoted Caretaker. Does anyone know the correct attributes for "Gains$" here? If it is even possible, of course.

| Open
Name:Devoted Caretaker
ManaCost:W
Types:Creature Human Cleric
Text:no text
PT:1/2
A:AB$ Protection | Cost$ W T | Gains$ instant,sorcery | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target permanent you control | SpellDescription$ Target permanent you control gains protection from instant spells and from sorcery spells until end of turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/devoted_caretaker.jpg
End
I would use AF Pump with "Protection:Spell.Instant,Spell.Sorcery:Protection from instant spells and from sorcery spells" as keyword.
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 slapshot5 » 25 Jan 2012, 01:01

friarsol wrote:Make sure you clear out the the Remembered afterwards for Scroll Rack. I think for things going to an ordered Zone simultaneously, we should do it like this: (pseudo-code)

Code: Select all
if cards.length > 1
 if orderer == human && prompt("Would you like to order the way these cards are placed in library/graveyard?")
   allow human to order them however they like
 else
   just put them back in whatever order they are in now.
This can be used in ChangeZone, CZAll, Dig, DigUntil, Mill. Not sure what else?
I think I wrote at least some ordering when I did AFDig (minus Sol's prompt up front). I'll start looking at implementing this in the next couple days unless someone else wants to.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Development Questions

Postby moomarc » 25 Jan 2012, 07:41

Scripted Electryte but think its too unfair to the AI until we can script AI logic (maybe a mustBlock?)
Electryte | Open
Name:Electryte
ManaCost:3 R R
Types:Creature Beast
Text:no text
PT:3/3
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDmgBlockers | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME deals combat damage to defending player, it deals damage equal to its power to each blocking creature.
SVar:TrigDmgBlockers:AB$DamageAll | Cost$ 0 | ValidCards$ Creature.blocking | NumDmg$ X | ValidDescription$ each blocking creature
SVar:X:Count$CardPower
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/electryte.jpg
SetInfo:USG|Rare|http://magiccards.info/scans/en/us/183.jpg
Oracle:Whenever Electryte deals combat damage to defending player, it deals damage equal to its power to each blocking creature.
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 squee1968 » 25 Jan 2012, 09:23

Here's Ageless Sentinels. I've playtested it, and it seems to work correctly, but I've posted it here because I fear there are issues with it that I'm not aware of.

Code: Select all
Name:Ageless Sentinels
ManaCost:3 W
Types:Creature Wall
Text:no text
PT:4/4
K:Flying
K:Defender
T:Mode$ Blocks | ValidCard$ Card.Self | Execute$ TrigDebuff | TriggerDescription$ When CARDNAME blocks, it becomes a Bird Giant, and it loses defender.
SVar:TrigDebuff:DB$Debuff | Keywords$ Defender | Defined$ TriggeredBlocker | Permanent$ True | SubAbility$ Animate
SVar:Animate:DB$Animate | Defined$ TriggeredBlocker | Types$ Bird,Giant | OverwriteTypes$ True | KeepSupertypes$ True | KeepCardTypes$ True | Permanent$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/ageless_sentinels.jpg
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SetInfo:SCG|Rare|http://magiccards.info/scans/en/sc/1.jpg
Oracle:Defender, flying\nWhen Ageless Sentinels blocks, it becomes a Bird Giant, and it loses defender.
End
squee1968
 
Posts: 254
Joined: 18 Nov 2011, 03:28
Has thanked: 110 times
Been thanked: 45 times

Re: Card Development Questions

Postby Sloth » 25 Jan 2012, 11:45

moomarc wrote:Scripted Electryte but think its too unfair to the AI until we can script AI logic (maybe a mustBlock?)
Electryte | Open
Name:Electryte
ManaCost:3 R R
Types:Creature Beast
Text:no text
PT:3/3
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigDmgBlockers | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME deals combat damage to defending player, it deals damage equal to its power to each blocking creature.
SVar:TrigDmgBlockers:AB$DamageAll | Cost$ 0 | ValidCards$ Creature.blocking | NumDmg$ X | ValidDescription$ each blocking creature
SVar:X:Count$CardPower
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/electryte.jpg
SetInfo:USG|Rare|http://magiccards.info/scans/en/us/183.jpg
Oracle:Whenever Electryte deals combat damage to defending player, it deals damage equal to its power to each blocking creature.
End
You can use "SVar:MustBeBlocked:True" to improve the situation (it still needs some fine tuning though).

squee1968 wrote:Here's Ageless Sentinels. I've playtested it, and it seems to work correctly, but I've posted it here because I fear there are issues with it that I'm not aware of.
Added! Thanks squee1968.
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 friarsol » 25 Jan 2012, 16:47

Jeff, you had a question about Vexing Arcanix, but it looks like it's deleted? Did you figure it out? Otherwise, I'd suggest this:

This is very short-hand, but here's the idea.

Code: Select all
AB$ NameCard | SubAbility$ Dig
DB$ DigUntil | Valid$ Card.NamedCard | MaxRevealed$ 1 | FoundDestination$ Hand | RevealedDestination$ Graveyard | RememberRevealed$ True | SubAbility$ Damage
DB$ DealDamage | NumDmg$ 2 | ConditionSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ Cleanup
DB$ Cleanup
SVar:X:Remembered$Count
Edit: Using RememberRevealed instead of RememberFound because if there are no cards in Library, no Damage is dealt.
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 » 25 Jan 2012, 16:54

Vexing Arcanix. If the AF NameCard AI was added, we could roll with it. If the creator of AF NameCard does not wish to do it, please say so.

| Open
Name:Vexing Arcanix
ManaCost:4
Types:Artifact
Text:no text
A:AB$ NameCard | Cost$ 3 T | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDig | SpellDescription$ Target player names a card, then reveals the top card of his or her library. If it's the named card, the player puts it into his or her hand. Otherwise, the player puts it into his or her graveyard and CARDNAME deals 2 damage to him or her.
SVar:DBDig:DB$ Dig | DigNum$ 1 | Defined$ Targeted | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | Reveal$ True | RememberChanged$ True | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | NumDmg$ 2 | Defined$ Targeted | ConditionDefined$ Remembered | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ0 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/vexing_arcanix.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 jeffwadsworth » 25 Jan 2012, 16:55

friarsol wrote:Jeff, you had a question about Vexing Arcanix, but it looks like it's deleted? Did you figure it out? Otherwise, I'd suggest this:

This is very short-hand, but here's the idea.

Code: Select all
AB$ NameCard | SubAbility$ Dig
DB$ DigUntil | Valid$ Card.NamedCard | MaxRevealed$ 1 | FoundDestination$ Hand | RevealedDestination$ Graveyard | RememberRevealed$ True | SubAbility$ Damage
DB$ DealDamage | NumDmg$ 2 | ConditionSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ Cleanup
DB$ Cleanup
SVar:X:Remembered$Count
Edit: Using RememberRevealed instead of RememberFound because if there are no cards in Library, no Damage is dealt.
I used RememberChanged instead of RememberRevealed and it worked. Now if only we had the AI for it. :) Thanks for the reply Sol.
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 Sloth » 25 Jan 2012, 18:03

jeffwadsworth wrote:I used RememberChanged instead of RememberRevealed and it worked. Now if only we had the AI for it.
I will cobble something together.
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 » 25 Jan 2012, 23:20

Testing Gravestorm.
This works fine for the human, AFAICT, but in the computer's hands, it will target itself. Does anyone see the issue?

| Open
Name:Gravestorm
ManaCost:B B B
Types:Enchantment
Text:no text
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigChangeZone | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, target opponent may exile a card from his or her graveyard. If that player doesn't, you may draw a card.
SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | Hidden$ True | Chooser$ Targeted | RememberChanged$ True | OptionalDecider$ Targeted | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | NumCards$ 1 | Defined$ You | OptionalDecider$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/gravestorm.jpg
End
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 26 guests

Main Menu

User Menu

Our Partners


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 8079 on 20 Sep 2025, 00:02

Users browsing this forum: No registered users and 26 guests

Login Form