It is currently 10 Jun 2025, 19:40
   
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 jeffwadsworth » 03 Mar 2011, 00:02

Here is some script for Exhume.

Code: Select all
Name:Exhume
ManaCost:1 B
Types:Sorcery
Text:no text
A:SP$ ChangeZone | Cost$ 1 B | Origin$ Graveyard | Destination$ Battlefield | Defined$ Opponent | ChangeType$ Creature.YouDontCtrl | ChangeNum$ 1 | Hidden$ True | SubAbility$ SVar=DBYou | SpellDescription$ Each player puts a creature card from his or her graveyard onto the battlefield.
SVar:DBYou:DB$ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature in your graveyard
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/exhume.jpg
SetInfo:USG|Common|http://magiccards.info/scans/en/us/134.jpg
End
Now, if you use the script for the AI by itself; things work fine and it puts a creature from its graveyard into play. When the two changezone's are put together; nothing happens at all. Perhaps someone can spot the issue. Note that you will have to remove the Exhume code from the codebase.
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 » 03 Mar 2011, 00:36

Exhume isn't targeted. On either end. It needs to be Hidden for both sides.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby ZzzzSleep » 03 Mar 2011, 00:54

friarsol wrote:Exhume isn't targeted. On either end. It needs to be Hidden for both sides.
Does this mean that Stampeding Wildebeests and Stampeding Serow need to have Hidden$True too, because they don't target?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby friarsol » 03 Mar 2011, 01:52

ZzzzSleep wrote:
friarsol wrote:Exhume isn't targeted. On either end. It needs to be Hidden for both sides.
Does this mean that Stampeding Wildebeests and Stampeding Serow need to have Hidden$True too, because they don't target?
Yep. If the decision occurs during resolution, it counts as Hidden$ no matter what the zone is. Certain Zones are Hidden$ by default, but the Battlefield and the Graveyard are not.
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 » 03 Mar 2011, 05:52

friarsol wrote:Exhume isn't targeted. On either end. It needs to be Hidden for both sides.
Thanks 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 Chris H. » 04 Mar 2011, 02:13

I scripted the card Kithkin Zealot. It refers to target opponent and I think that the SVar might take care of this. Not sure. The card works, but is this a card that we should hold off on or is this submittable?

Kithkin Zealot card | Open
Name:Kithkin Zealot
ManaCost:1 W
Types:Creature Kithkin Cleric
Text:no text
PT:1/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME enters the battlefield, you gain 1 life for each black and/or red permanent target opponent controls.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X
SVar:X:Count$Valid Permanent.Black+YouDontCtrl,Permanent.Red+YouDontCtrl
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/kithkin_zealot.jpg
End
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby friarsol » 04 Mar 2011, 03:03

I'd hold that one off Chris. The opponent needs to be targeted.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Chris H. » 04 Mar 2011, 03:13

friarsol wrote:I'd hold that one off Chris. The opponent needs to be targeted.
`
No problem. People have wondered about how to handle these types of cards. We have "Defined$ Opponent" but I think that this is for cards that refer to your opponent but without the targeting.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby ZzzzSleep » 04 Mar 2011, 03:22

Looking at Walker of Secret Ways, is there an ability to look at your opponents hand? Would a discard with NumCards$ 0 and Mode$ RevealYouChoose work?
ZzzzSleep
 
Posts: 182
Joined: 29 Oct 2010, 02:19
Has thanked: 18 times
Been thanked: 18 times

Re: Card Development Questions

Postby friarsol » 04 Mar 2011, 04:06

I just saw that Walking Dream someone said we couldn't do on the wiki, did it not work with a conditional stPump?

Also, it lists Angelic Favor as not possible, but I'm not sure why that would be the case? Just look at Tradewind Rider for that cost.
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 » 04 Mar 2011, 04:42

friarsol wrote:I just saw that Walking Dream someone said we couldn't do on the wiki, did it not work with a conditional stPump?

Also, it lists Angelic Favor as not possible, but I'm not sure why that would be the case? Just look at Tradewind Rider for that cost.
Angelic Favor is already done as of 2/22/2011. As for Walking Dream, anyone know how to handle the isValid within the stpump?
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 Replika » 04 Mar 2011, 13:32

I have been trying to do Surge of Thoughtweft. My first (and slightly wrong) solution looks like this:

Code: Select all
Name:Surge of Thoughtweft
ManaCost:1 W
Types:Tribal Instant Kithkin
Text:no text
A:SP$PumpAll | Cost$ 1 W | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | IsPresent$ Kithkin.YouCtrl | PresentCompare$ EQ0 | SpellDescription$ Creatures you control get +1/+1 until end of turn.
A:SP$PumpAll | Cost$ 1 W | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | IsPresent$ Kithkin.YouCtrl | SubAbility$ SVar=DBDraw | SpellDescription$ Creatures you control get +1/+1 until end of turn. If you control a Kithkin, draw a card.
SVar:DBDraw:DB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1
SVar:Rarity:Common
SetInfo:LRW|Common|http://magiccards.info/lw/en/43.html
End
This works smoothly (you never actually have to choose a mode), but it doesn't work if you flash in/kill all Kithkins with Surge of Thoughtweft on the stack.

My second idea would look something like this:

Code: Select all
A:SP$PumpAll | Cost$ 1 W | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | SubAbility$ SVar=DBDraw | SpellDescription$ Creatures you control get +1/+1 until end of turn. If you control a Kithkin, draw a card.
SVar:DBDraw:DB$Draw | Cost$ 0 | Defined$ You | NumCards$ X
SVar:X:Count$NumTypeYouCtrl.Kithkin/HalfUp/HalfUp/HalfUp/HalfUp/HalfUp
or
Code: Select all
SVar:X:Y/HalfUp
SVar:Y:Z/HalfUp
SVar:Z:Count$NumTypeYouCtrl.Kithkin/HalfUp
HalfUpping anything but zero a bunch of times will result in one card drawn (unless you control thousands of Kithkins), and HalfUpping zero will stay zero. However, none of the above ways to script the HalfUps seems to work. Do you guys know a way to do this?
Replika
 
Posts: 115
Joined: 30 Jan 2011, 21:15
Has thanked: 2 times
Been thanked: 3 times

Re: Card Development Questions

Postby friarsol » 04 Mar 2011, 13:46

Surge of Thoughtweft is another one of those cards just dying for a Conditional during resolution. I think this will just have to wait until that exists.
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 » 07 Mar 2011, 01:46

Testing Counterbore. This one looks like an issue with Targeted being used with Counter.


Code: Select all
Name:Counterbore
ManaCost:3 U U
Types:Instant
Text:no text
A:SP$ Counter | Cost$ 3 U U | Type$ Spell | Destination$ Graveyard | SubAbility$ SVar=DBChangeZoneAll | SpellDescription$ Counter target spell. Search its controller's graveyard, hand, and library for all cards with the same name as that spell and exile them. Then that player shuffles his or her library.
SVar:DBChangeZoneAll:DB$ChangeZoneAll | Defined$ TargetedController | ChangeType$ Targeted.sameName | Origin$ Graveyard | Destination$ Exile | SubAbility$ SVar=DBChangeZoneAll2
SVar:DBChangeZoneAll2:DB$ChangeZoneAll | Defined$ TargetedController | ChangeType$ Targeted.sameName | Origin$ Hand | Destination$ Exile | SubAbility$ SVar=DBChangeZoneAll3
SVar:DBChangeZoneAll3:DB$ChangeZoneAll | Defined$ TargetedController | ChangeType$ Targeted.sameName | Origin$ Library | Destination$ Exile | Shuffle$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/counterbore.jpg
End
Is that the case?
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 slapshot5 » 07 Mar 2011, 02:44

jeffwadsworth wrote:Testing Counterbore. This one looks like an issue with Targeted being used with Counter.


Code: Select all
Name:Counterbore
ManaCost:3 U U
Types:Instant
Text:no text
A:SP$ Counter | Cost$ 3 U U | Type$ Spell | Destination$ Graveyard | SubAbility$ SVar=DBChangeZoneAll | SpellDescription$ Counter target spell. Search its controller's graveyard, hand, and library for all cards with the same name as that spell and exile them. Then that player shuffles his or her library.
SVar:DBChangeZoneAll:DB$ChangeZoneAll | Defined$ TargetedController | ChangeType$ Targeted.sameName | Origin$ Graveyard | Destination$ Exile | SubAbility$ SVar=DBChangeZoneAll2
SVar:DBChangeZoneAll2:DB$ChangeZoneAll | Defined$ TargetedController | ChangeType$ Targeted.sameName | Origin$ Hand | Destination$ Exile | SubAbility$ SVar=DBChangeZoneAll3
SVar:DBChangeZoneAll3:DB$ChangeZoneAll | Defined$ TargetedController | ChangeType$ Targeted.sameName | Origin$ Library | Destination$ Exile | Shuffle$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/counterbore.jpg
End
Is that the case?
Yep. Definitely the case. AF_CounterMagic lies outside the normal Targets. That's why it kind of has it's own implementation of drawbacks. The long-term solution is to let Spells be Targets (instead of just the cards).

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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

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

Login Form