It is currently 13 Jun 2025, 13:31
   
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 » 21 Jan 2011, 20:35

Corwin72 wrote:Build 5398
Playing against the Aragorn Medium deck I think.
Grazing Gladehart triggering twice while in deck not in play when computer plays a land.
Everything like this works in the newest SVN. Bugs were squashed by Hellfish.
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 » 21 Jan 2011, 20:40

jeffwadsworth wrote:
Corwin72 wrote:Everything like this works in the newest SVN. Bugs were squashed by Hellfish.
Actually the Gladehart wasn't working but it was fixed in the SVN before this report was posted.
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 » 21 Jan 2011, 20:46

friarsol wrote:
jeffwadsworth wrote:
Corwin72 wrote:Everything like this works in the newest SVN. Bugs were squashed by Hellfish.
Actually the Gladehart wasn't working but it was fixed in the SVN before this report was posted.
I noted the TriggerZones$ Battlefield and thought this issue was resolved.
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 » 21 Jan 2011, 20:56

Yep. No worries. Corwin did say his revision number was before the revision that fixed the problem.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Corwin72 » 21 Jan 2011, 21:49

Build 5398
Baloth Woodcrasher triggered lanfall on me putting a land into play.
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: Card Development Questions

Postby jeffwadsworth » 23 Jan 2011, 01:17

Here is a test card that is causing me fits. Using r.5553 SVN.
Code: Select all
Name:Electropotence
ManaCost:2 R
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigDamage | TriggerDescription$ Whenever a creature enters the battlefield under your control, you may pay 2 R.  If you do, that creature deals damage equal to its power to target creature or player.
SVar:TrigDamage:AB$DealDamage | Cost$ 2 R | Tgt$ TgtCP | NumDmg$ X | TgtPrompt$ Select target creature or player.
SVar:X:Count$CardPower
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/electropotence.jpg
End
Yet, it will always deal 0 damage. Any ideas? I changed the X count to things like TypeInYourYard.Land and it did the same thing.
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 » 23 Jan 2011, 01:24

jeffwadsworth wrote:Here is a test card that is causing me fits. Using r.5553 SVN.
Code: Select all
Name:Electropotence
ManaCost:2 R
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigDamage | TriggerDescription$ Whenever a creature enters the battlefield under your control, you may pay 2 R.  If you do, that creature deals damage equal to its power to target creature or player.
SVar:TrigDamage:AB$DealDamage | Cost$ 2 R | Tgt$ TgtCP | NumDmg$ X | TgtPrompt$ Select target creature or player.
SVar:X:Count$CardPower
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/electropotence.jpg
End
Yet, it will always deal 0 damage. Any ideas? I changed the X count to things like TypeInYourYard.Land and it did the same thing.
Well, Count$CardPower will count Electropotence's card power, which is 0. Possibly use Triggered$CardPower

-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 jeffwadsworth » 23 Jan 2011, 01:36

I just saw Hellfish's post. Yeah, that is it. 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 Hellfish » 23 Jan 2011, 08:33

That Electropotence code is technically incorrect, but it won't show 90% of the time. The card specifies that the creature that entered the battlefield deals damage, but right now, it's Electropotence that deals the damage. This matters if, say, a green creature of yours enters the battlefield and you try to use Electropotence to deal damage to a creature with Protection from Red. It should work, but it doesn't since the damage source is the red Electropotence.

Unfortunately, there's nothing to be done scripting-wise currently.
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 friarsol » 23 Jan 2011, 16:04

Oh I didn't even notice the creature was the source of the damage. We could add an Optional SourceDefined in DealDamage to handle this. By default the source would be the hostCard, but in circumstances like this it could look up (though the Defined functions) what the Source of the damage would be and use that instead of the host 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 Hellfish » 23 Jan 2011, 16:23

Yeah, that sounds good. Covers all the cases I can think of (admittedly not that many :P ,Electropotence Wing Puncture Ana Battlemage etc)
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 » 24 Jan 2011, 21:30

I was looking at 3 cards in context of the new "remembered" addition to abilities. Seraph, The Wretched, Phyrexian Colossus.

Perhaps the following is already implemented...

Would it be possible to use remembered as the execution step in a trigger? For Phyrexian Colossus, we would then check the number of blockers, etc.
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 » 24 Jan 2011, 21:38

Remembered doesn't quite work that way. The only cards that get remembered currently are the targets of abilities, not targets of general damage. And by the time triggers get run, it's too late to do anything about the creatures blocking Phyrexian Colossus. :/
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 friarsol » 24 Jan 2011, 21:51

Hellfish wrote:And by the time triggers get run, it's too late to do anything about the creatures blocking Phyrexian Colossus. :/
Yea I think Phyrexian Colossus would need to have a keyword like MinBlockers:3 then in the appropriate AI section the AI would decide if he wants to block with that many creatures. If so the creatures are assigned as blockers in a section and all is well.

For the Human side of things I think the only "fair" way to handle this is let the Blockers get chosen as they are now. Once Blocking is finished, if all the Blocks are legal, we move on. Otherwise, all Blockers are cleared (or maybe the illegal Blockers are cleared) and the Human goes back to being able to Declare Blockers until a legal Block is setup.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby lazylockie » 27 Jan 2011, 02:23

Is there a way to code Drana, Kalastria Bloodchief using AB$Pump? I can make it -0/-X, but I can't link on the same line the +X/+0 part.

A:AB$Pump | Cost$ X | NumAtt$ 0 | NumDef$ -X | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Target creature gets -0/-X until end of turn.
SVar:X:Count$xPaid
lazylockie
 
Posts: 508
Joined: 13 Jul 2010, 22:44
Has thanked: 74 times
Been thanked: 15 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 11 guests


Who is online

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

Login Form