It is currently 09 Jun 2025, 01:34
   
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 SoulStorm » 19 May 2011, 17:26

Jeff, the exercise began as an attempt to add a card. Then it turned into, "let's see what happens if I do this.". :mrgreen:
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby jeffwadsworth » 20 May 2011, 16:08

CopyPermanent. Any plans to include an option to make multiple copies like tokenamount$?
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 SoulStorm » 20 May 2011, 19:56

Also regarding CopyPermanent, I'd like to see TokenOwner$ and whatever infrastructure is needed to add cards like Phyrexian Metamorph.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby jeffwadsworth » 21 May 2011, 18:02

Here is a script for Telling Time.

Code: Select all
Name:Telling Time
ManaCost:1 U
Types:Instant
Text:no text
A:SP$ Dig | Cost$ 1 U | DigNum$ 3 | LibraryPosition2$ 0 | SubAbility$ SVar=DBDig | SpellDescription$ Look at the top three cards of your library. Put one of those cards into your hand, one on top of your library, and one on the bottom of your library.
SVar:DBDig:DB$Dig | DigNum$ 2 | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ -1
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/telling_time.jpg
SetInfo:RAV|Uncommon|http://magiccards.info/scans/en/rav/69.jpg
SetInfo:10E|Uncommon|http://magiccards.info/scans/en/10e/114.jpg
End
Does anyone have any ideas to streamline this? The second dig may confuse people.
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 » 27 May 2011, 20:14

Would this simpler version of Undergrowth be incorrect?

Code: Select all
Name:Undergrowth
ManaCost:G
Types:Instant
Text:no text
A:SP$ Fog | Cost$ G | SpellDescription$ Prevent all combat damage that would be dealt this turn.
A:SP$ PumpAll | Cost$ G 2 R | ValidCards$ Creature.nonRed | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | SpellDescription$ Prevent all combat damage that would be dealt this turn by non-red creatures.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/undergrowth.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 friarsol » 27 May 2011, 20:25

PumpAll doesn't work in this situation because Undergrowth can affect cards after it is cast. You need to use the Effect AF. Check out Falter for a similar card.
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 » 27 May 2011, 21:29

Here is a script for Winter's Night

Code: Select all
Name:Winter's Night
ManaCost:R G W
Types:World Enchantment
Text:no text
T:Mode$ Taps | ValidCard$ Land.Snow | Execute$ TrigMana | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player taps a snow land for mana, that player adds one mana to his or her mana pool of any type that land produced. That land doesn't untap during its controller's next untap step.
SVar:TrigMana:AB$ManaReflected | Cost$ 0 | ColorOrType$ Type | Valid$ TriggeredCard | ReflectProperty$ Produce
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/winters_night.jpg
End
Anyone see the issue here? Perhaps TriggeredCard is not supported by Valid$
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 Hellfish » 27 May 2011, 21:35

Exactly right, Triggered-variables currently only work with Defined$ expressions. Perhaps I can make an addition to hasProperty that will let you use something like "Card.IsTriggered<Triggered-variable name>" that returns true if the card being evaluated is equal to what is in the Triggered-variable of the evaluating card. I think that could be useful elsewhere too.

EDIT:Oh yeah, and the tapped land should be Pumped with "This card doesn't untap during it's controllers next untap step." or whatever the proper keyword is.
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Card Development Questions

Postby jeffwadsworth » 27 May 2011, 21:49

Excellent. Yes, I didn't add the tapped land part yet.
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 Hellfish » 27 May 2011, 22:16

Alright, you can now use "Card.IsTriggeredCard" or "Card.IsTriggeredSource" or any other TriggeredVariable that returns a card.

The next problem is how AF_ReflectedMana takes being run by the AI. Looks like the human always gets to make the choice. (Makes sense since the aI can't make much of a decision with no mana pool.)
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Card Development Questions

Postby jeffwadsworth » 27 May 2011, 22:27

Works great. Thanks.
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 » 27 May 2011, 22:39

Hellfish wrote:Alright, you can now use "Card.IsTriggeredCard" or "Card.IsTriggeredSource" or any other TriggeredVariable that returns a card.

The next problem is how AF_ReflectedMana takes being run by the AI. Looks like the human always gets to make the choice. (Makes sense since the aI can't make much of a decision with no mana pool.)
Oh right. I forgot about that too. I'll try to not write up lists when I'm not thinking about AI functionality.
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 » 28 May 2011, 20:19

Berserk. I have tried effect based scripting, but neither "targeted" nor "remembered" are supported by stpump yet...to my knowledge.
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 lazylockie » 28 May 2011, 20:57

Is there a "Rest of the game" duration variable for AB$Effect? I'm trying to create emblems, but the API only states "End of turn".
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

Re: Card Development Questions

Postby friarsol » 28 May 2011, 21:13

lazylockie wrote:Is there a "Rest of the game" duration variable for AB$Effect? I'm trying to create emblems, but the API only states "End of turn".
Duration$ Permanent
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 10 guests


Who is online

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

Login Form