It is currently 14 Jun 2025, 15:13
   
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 Hellfish » 18 Jan 2011, 18:52

Phase mode only triggers on draw,untap,upkeep and endofturn steps currently. Also, Phase mode doesn't take a ValidCard parameter because, well, it's not triggered by a card. You should use the IsPresent parameter instead.
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 » 18 Jan 2011, 19:19

I added code to have it trigger during EndCombat. It seems like IsPresent isn't doing the trick either, but I have a feeling it's the IsPresent code that can't handle it, or I just don't know the right parameters. I tried a few different ones, but this is the closest I came.

Code: Select all
T:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | IsPresent$ Self.attacking,Self.blocking | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At end of combat, if CARDNAME attacked or blocked this combat, put a -0/-1 counter on CARDNAME and put a 0/1 white Deserter creature token onto the battlefield.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ M0M1 | CounterNum$ 1 | SubAbility$ SVar=DBToken
SVar:DBToken:DB$Token | TokenAmount$ 1 | TokenName$ Deserter | TokenTypes$ Creature,Deserter | TokenOwner$ Controller | TokenColors$ White | TokenPower$ 0 | TokenToughness$ 1
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 » 18 Jan 2011, 19:49

Hmmm, not sure then. I'll look into it.
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 » 18 Jan 2011, 20:03

Hellfish wrote:Hmmm, not sure then. I'll look into it.
I have a feeling it has to with Self not being a top level IsPresent check. I want to check if Self is attacking (Self.attacking), but the best I can do is see if Self is present and something is attacking (Card.Self+Creature.attacking)
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 » 18 Jan 2011, 20:05

friarsol wrote:
Hellfish wrote:Hmmm, not sure then. I'll look into it.
I have a feeling it has to with Self not being a top level IsPresent check. I want to check if Self is attacking (Self.attacking), but the best I can do is see if Self is present and something is attacking (Card.Self+Creature.attacking)
Have you tried Card.attacking+Self?
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 » 18 Jan 2011, 20:24

Hellfish wrote:Have you tried Card.attacking+Self?
Ahhh that did it. I was adding too much. Thanks.
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 » 18 Jan 2011, 21:01

This converted card works fine in terms of giving itself a counter, but other elves do not get them. Does anyone see the error? Joraga Warcaller.

Code: Select all
Name:Joraga Warcaller
ManaCost:G
Types:Creature Elf Warrior
Text:no text
PT:1/1
K:Multikicker 1 G
T:Mode$ ChangesZone | ValidCard$ Card.Self | Destination$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | CounterNum$ X | CounterType$ P1P1 | Defined$ Creature.Elf+Other+YouCtrl | SpellDescription$ Other Elf creatures you control get +1/+1 for each +1/+1 counter on CARDNAME.
SVar:X:Count$CardCounters.P1P1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/joraga_warcaller.jpg
SetInfo:WWK|Rare|http://magiccards.info/scans/en/wwk/106.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 » 18 Jan 2011, 21:04

His static pump ability should be exactly what it currently is:
Code: Select all
K:stPumpAll:Creature.Elf+Other+YouCtrl:X/X:no Condition:Other Elf creatures you control get +1/+1 for each +1/+1 counter on CARDNAME.
SVar:X:Count$CardCounters.P1P1
Edit: To clarify, he doesn't give other Elves counters. Just a +1/+1 static pump.
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 » 18 Jan 2011, 21:13

friarsol wrote:His static pump ability should be exactly what it currently is:
Code: Select all
K:stPumpAll:Creature.Elf+Other+YouCtrl:X/X:no Condition:Other Elf creatures you control get +1/+1 for each +1/+1 counter on CARDNAME.
SVar:X:Count$CardCounters.P1P1
Edit: To clarify, he doesn't give other Elves counters. Just a +1/+1 static pump.
Yikes, missed that. 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 jeffwadsworth » 19 Jan 2011, 15:34

@Hellfish Is TargetsValid$ for the SpellCast$ Mode implemented yet? Either I am coding the card mentioned earlier in this thread incorrectly or I am jumping the gun. I noticed on the SVN that you did some work on it. Angelic Protector.
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 » 19 Jan 2011, 16:39

jeffwadsworth wrote:@Hellfish Is TargetsValid$ for the SpellCast$ Mode implemented yet? Either I am coding the card mentioned earlier in this thread incorrectly or I am jumping the gun. I noticed on the SVN that you did some work on it. Angelic Protector.
I think for things that say "When CARDNAME is the target of a spell or ability" needs a more flexible Trigger than SpellCast. I don't know if anything uses SpellCast yet, so we could probably just expand it out to OnSpellAbility or something. And allow both spells and abilities to trigger it. This way we could do something like Angelic Protector or Frost Titan with it.
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 » 19 Jan 2011, 22:38

Re: SpellCast.

I'm testing out things to commmit that will expand the SpellCast trigger to handle Spells,Abilities or either being cast. ("SpellCast","AbilityCast","SpellAbilityCast" as modes) TargetsValid has been fixed and it captures the spellability, letting you speciy a valid activating player or a valid controlling player ("ValidActivatingPlayer" and "ValidControllingPlayer" parameters respectively) and yes they can be different if it's an ability any player may activate.
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 Jaedayr » 21 Jan 2011, 19:30

I am trying to add Dwarven Strike Force, patterned after Daring Leap. The haste buff works but the first strike does not appear in the text. Any ideas?

Code: Select all
Name:Dwarven Strike Force
ManaCost:4 R
Types:Creature Dwarf Berserker
Text:no text
PT:4/3
A:AB$Pump | Cost$ Discard<1/Random> | KW$ First Strike & Haste | SpellDescription$ CARDNAME gains first strike and haste until end of turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dwarven_strike_force.jpg
SetInfo:ODY|Uncommon|http://magiccards.info/scans/en/od/188.jpg
End
Code: Select all
Name:Daring Leap
ManaCost:1 W U
Types:Instant
Text:no text
A:SP$Pump | Cost$ 1 W U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +1 | NumDef$ +1 | KW$ Flying & First Strike | SpellDescription$ Target creature gets +1/+1 and gains flying and first strike until end of turn.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/daring_leap.jpg
SetInfo:PLS|Common|http://magiccards.info/scans/en/ps/101.jpg
End
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby Corwin72 » 21 Jan 2011, 20:27

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.
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 » 21 Jan 2011, 20:29

Jaedayr wrote:I am trying to add Dwarven Strike Force, patterned after Daring Leap. The haste buff works but the first strike does not appear in the text. Any ideas?

Code: Select all
Name:Dwarven Strike Force
ManaCost:4 R
Types:Creature Dwarf Berserker
Text:no text
PT:4/3
A:AB$Pump | Cost$ Discard<1/Random> | KW$ First Strike & Haste | SpellDescription$ CARDNAME gains first strike and haste until end of turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dwarven_strike_force.jpg
SetInfo:ODY|Uncommon|http://magiccards.info/scans/en/od/188.jpg
End
Code: Select all
Name:Daring Leap
ManaCost:1 W U
Types:Instant
Text:no text
A:SP$Pump | Cost$ 1 W U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +1 | NumDef$ +1 | KW$ Flying & First Strike | SpellDescription$ Target creature gets +1/+1 and gains flying and first strike until end of turn.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/daring_leap.jpg
SetInfo:PLS|Common|http://magiccards.info/scans/en/ps/101.jpg
End
I added "Defined$ Self" to your Dwarven Strike Force and it worked fine. Note that the second card that you are modeling after actually requires you to pick the target.
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: Bing [Bot] and 21 guests


Who is online

In total there are 22 users online :: 1 registered, 0 hidden and 21 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: Bing [Bot] and 21 guests

Login Form