Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Starcrash » 04 Jun 2011, 23:25
What information is it possible to return from an imprinted card? For instance, is there an Imprinted$CardTypes (for Semblance Anvil)? Imprinted$Colors (for Chrome Mox)? Imprinted$CardName (for Strata Scythe)?
Re: Card Development Questions
by slapshot5 » 05 Jun 2011, 00:47
It's the same as anything else. Basically on things that are expressed as a number (power/toughness/cmc).Starcrash wrote:What information is it possible to return from an imprinted card? For instance, is there an Imprinted$CardTypes (for Semblance Anvil)? Imprinted$Colors (for Chrome Mox)? Imprinted$CardName (for Strata Scythe)?
-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
by Jaedayr » 05 Jun 2011, 02:54
Should all effects/etc of a card show up in the text box when you mouse over it? For example:
- Code: Select all
Name:Sylvok Lifestaff
ManaCost:1
Types:Artifact Equipment
Text:no text
K:eqPump 1:+1/+0
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.AttachedBy | Execute$ TrigGainLife | TriggerDescription$ Whenever equipped creature is put into a graveyard, you gain 3 life.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ 3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/sylvok_lifestaff.jpg
SetInfo:SOM|Common|http://magiccards.info/scans/en/som/209.jpg
End
Re: Card Development Questions
by Sloth » 05 Jun 2011, 08:50
Of course they should! Fixed! Thanks Jaedayr.Jaedayr wrote:Should all effects/etc of a card show up in the text box when you mouse over it?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by Jaedayr » 06 Jun 2011, 18:21
Continuing my wanderings in the card texts...
There are some Aura cards that have what appears to be correct text in the enPump section of the card. Here are a couple of examples. Should this be appearing in the text box? Why does it appear twice in Arrest? Before making any changes I want to verify if these should be fixed in the text or there is a bug in the display of enPump.
Name:Arrest
K:enPumpCurse:HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated.:Enchanted creature can't attack or block and its activated abilities can't be activated.
Name:Claws of Valakut
K:enPump:First Strike:Enchanted creature gets +1/+0 for each Mountain you control and has first strike.
K:stPumpEnchanted:Creature:X/0:no Condition:no text
SVar:X:Count$TypeYouCtrl.Mountain
SVar:BuffedBy:Mountain
There are some Aura cards that have what appears to be correct text in the enPump section of the card. Here are a couple of examples. Should this be appearing in the text box? Why does it appear twice in Arrest? Before making any changes I want to verify if these should be fixed in the text or there is a bug in the display of enPump.
Name:Arrest
K:enPumpCurse:HIDDEN CARDNAME can't attack or block. & HIDDEN CARDNAME's activated abilities can't be activated.:Enchanted creature can't attack or block and its activated abilities can't be activated.
Name:Claws of Valakut
K:enPump:First Strike:Enchanted creature gets +1/+0 for each Mountain you control and has first strike.
K:stPumpEnchanted:Creature:X/0:no Condition:no text
SVar:X:Count$TypeYouCtrl.Mountain
SVar:BuffedBy:Mountain
Re: Card Development Questions
by jeffwadsworth » 08 Jun 2011, 02:56
Perhaps I am going a little nutball. Here is Apathy.
- Code: Select all
Name:Apathy
ManaCost:U
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPumpCurse:HIDDEN CARDNAME doesn't untap during your untap step.:Enchanted creature doesn't untap during its controller's untap step.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ EnchantedController | TriggerZones$ Battlefield | OptionalDecider$ EnchantedController | Execute$ TrigDiscard | TriggerDescription$ At the beginning of the upkeep of enchanted creature's controller, that player may discard a card at random. If he or she does, untap that creature.
SVar:TrigDiscard:AB$Discard | Cost$ 0 | Defined$ EnchantedController | Mode$ Random | SubAbility$ SVar=DBUntap
SVar:DBUntap:DB$Untap | Defined$ Enchanted | SpellDescription$ Untap enchanted creature.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/apathy.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
by friarsol » 08 Jun 2011, 03:35
Jeff, whether or not that's the case it's incorrect. Apathy requires you to Discard a card but this script allows a player with an empty hand to discard nothing and untap. You really need to be discarding as a cost.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Starcrash » 08 Jun 2011, 16:49
Name:Turn to Mist
ManaCost:1 WU
Types:Instant
Text:no text
A:SP$ Effect | Cost$ 1 WU | Name$ Turn to Mist Effect | Triggers$ PhaseTrigger | SVars$ TrigReturn | SubAbility$ SVar=TrigExile
SVar:TrigExile:DB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature | RememberTargets$ True | TgtPrompt$ Select target creature | SpellDescription$ Exile target creature. Return that card to play under its owner's control at end of turn.
SVar:PhaseTrigger:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigReturn | TriggerDescription$ Return that card to play.
SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Creature | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/turn_to_mist.jpg
SetInfo:SHM|Common|http://magiccards.info/scans/en/shm/155.jpg
End
It's so close to working. This version does work, but requires that you target an exiled creature because it doesn't remember what it targeted with the first ChangeZone ability. Defined$ Remembered doesn't work... is there another possible Defined$ here? Or is it possible to add a target to the Effect emblem that will allow you to remember a target?
ManaCost:1 WU
Types:Instant
Text:no text
A:SP$ Effect | Cost$ 1 WU | Name$ Turn to Mist Effect | Triggers$ PhaseTrigger | SVars$ TrigReturn | SubAbility$ SVar=TrigExile
SVar:TrigExile:DB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Creature | RememberTargets$ True | TgtPrompt$ Select target creature | SpellDescription$ Exile target creature. Return that card to play under its owner's control at end of turn.
SVar:PhaseTrigger:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player | Execute$ TrigReturn | TriggerDescription$ Return that card to play.
SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Creature | Origin$ Exile | Destination$ Battlefield
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/turn_to_mist.jpg
SetInfo:SHM|Common|http://magiccards.info/scans/en/shm/155.jpg
End
It's so close to working. This version does work, but requires that you target an exiled creature because it doesn't remember what it targeted with the first ChangeZone ability. Defined$ Remembered doesn't work... is there another possible Defined$ here? Or is it possible to add a target to the Effect emblem that will allow you to remember a target?
Re: Card Development Questions
by jeffwadsworth » 08 Jun 2011, 17:10
Script for Planar Guide.
- Code: Select all
Name:Planar Guide
ManaCost:W
Types:Creature Human Cleric
Text:no text
PT:1/1
A:AB$ ChangeZoneAll | Cost$ 3 W Exile<1/CARDNAME> | ChangeType$ Creature | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | ForgetOtherRemembered$ True | SubAbility$ SVar=DBDelTrig | SpellDescription$ Exile all creatures. At the beginning of the next end step, return those cards to the battlefield under their owners' control.
SVar:DBDelTrig:DB$DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigReturn | TriggerDescription$ Return all creatures to owner's control.
SVar:TrigReturn:AB$ChangeZoneAll | Cost$ 0 | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/planar_guide.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
by jeffwadsworth » 09 Jun 2011, 04:18
Here is a script for Draining Whelk
- Code: Select all
Name:Draining Whelk
ManaCost:4 U U
Types:Creature Illusion
Text:no text
PT:1/1
K:Flash
K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost.
SVar:TrigCounter:AB$Counter | Cost$ 0 | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SubAbility$ SVar=DBPutCounter
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put X +1/+1 counters on CARDNAME.
SVar:X:Targeted$CardManaCost
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/draining_whelk.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
by Sloth » 09 Jun 2011, 05:12
Technically speaking, the counter ability targets a spellability on the stack and not a card. The expresssion "Targeted$CardManaCost" does not work because of this. If it would just link to the card it would still be problematic, since a spell on the stack has a different cmc than the printed card (for example X costs).jeffwadsworth wrote:Here is a script for Draining WhelkThe counters are not put onto the Draining Whelk. Does anyone see an issue here?
- Code: Select all
Name:Draining Whelk
ManaCost:4 U U
Types:Creature Illusion
Text:no text
PT:1/1
K:Flash
K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost.
SVar:TrigCounter:AB$Counter | Cost$ 0 | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SubAbility$ SVar=DBPutCounter
SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ X | SpellDescription$ Put X +1/+1 counters on CARDNAME.
SVar:X:Targeted$CardManaCost
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/draining_whelk.jpg
End
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by slapshot5 » 09 Jun 2011, 11:45
I'm trying to write up some code for Vesuva. Shouldn't be any different than Clone, right? Wrong. It's a *land*. I added a Spell like Clone, and hacked GameAction.playCard to let it through, and the Input generally works:
Seems like Input_PayManaCost should be smart enough that if there's nothing to pay, it just keeps going.
Or am I completely on the wrong track.
-slapshot5
- Code: Select all
Input runtime = new Input() {
private static final long serialVersionUID = -2212149199333372008L;
@Override
public void showMessage() {
AllZone.Display.showMessage(cardName+" - Select a land on the battlefield");
ButtonUtil.enableOnlyCancel();
}
@Override
public void selectButtonCancel() {
copyTarget[0] = null;
stop();
}
@Override
public void selectCard(Card c, PlayerZone z) {
if( z.is(Constant.Zone.Battlefield) && c.isLand()) {
copyTarget[0] = c;
stopSetNext(new Input_PayManaCost(copy, true));
}
}
};
Seems like Input_PayManaCost should be smart enough that if there's nothing to pay, it just keeps going.
Or am I completely on the wrong track.
-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
by jeffwadsworth » 09 Jun 2011, 14:42
Is UnlessCost$ limited to mana only?
- 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
by friarsol » 09 Jun 2011, 14:46
For now, yes.jeffwadsworth wrote:Is UnlessCost$ limited to mana only?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 11 Jun 2011, 02:51
Here is Zirilan of the Claw:
- Code: Select all
Name:Zirilan of the Claw
ManaCost:3 R R
Types:Legendary Creature Viashino Shaman
Text:no text
PT:3/4
A:AB$ ChangeZone | Cost$ 1 R R T | Origin$ Library | Destination$ Battlefield | ChangeType$ Dragon | ChangeNum$ 1 | Shuffle$ True | SubAbility$ DBPump | RememberChanged$ True | ForgetOtherRemembered$ True | SpellDescription$ Search your library for a Dragon permanent card and put that card onto the battlefield. Then shuffle your library. That Dragon gains haste until end of turn. Exile it at the beginning of the next end step.
SVar:DBPump:DB$Pump | Defined$ Remembered | KW$ Haste | SubAbility$ DBDelTrig
SVar:DBDelTrig:DB$DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigExile
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile dragon.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/zirilan_of_the_claw.jpg
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Who is online
Users browsing this forum: No registered users and 21 guests