Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by friarsol » 11 Mar 2011, 04:53
Alright the Put Away issue noted above is fixed. If nothing is chosen for the target for Put Away you Spell Description looks a little funky. I added an issue for this:
http://code.google.com/p/cardforge/issues/detail?id=121
http://code.google.com/p/cardforge/issues/detail?id=121
- 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 Mar 2011, 05:54
Thanks. I like funky, though.friarsol wrote:Alright the Put Away issue noted above is fixed. If nothing is chosen for the target for Put Away you Spell Description looks a little funky. I added an issue for this:
http://code.google.com/p/cardforge/issues/detail?id=121
- 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 » 11 Mar 2011, 06:19
Script for Caltrops. It triggers but does not deal any damage to the triggered card...and no, TriggeredAttacker simply crashes the client.
- Code: Select all
Name:Caltrops
ManaCost:3
Types:Artifact
Text:no text
T:Mode$ Attacks | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigDamage | TriggerDescription$ Whenever a creature attacks, CARDNAME deals 1 damage to it.
SVar:TrigDamage:AB$DealDamage | Cost$ 0 | Defined$ TriggeredCard | NumDmg$ 1
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/caltrops.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 Hellfish » 11 Mar 2011, 10:05
EDIT: There was a java rant here, it's gone now. It showed why I program at night instead of in the morning. I can't think straight when I just woke up.
I'll submit a fix for the Caltrops issue right away. It should indeed be TriggeredAttacker but the getDefined methods was treating it like a player instead of a card.
I'll submit a fix for the Caltrops issue right away. It should indeed be TriggeredAttacker but the getDefined methods was treating it like a player instead of a card.
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
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
-
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
by jeffwadsworth » 11 Mar 2011, 18:06
Thanks for the fix, Hellfish.
Here is another issue for the Devs.
I was testing Unwilling Recruit and noticed that if I used it on my own creature, at the end of turn, my creature would pop over to the computer's side. According to the rules, this isn't supposed to happen.
Script for Unwilling Recruit:
Here is another issue for the Devs.
I was testing Unwilling Recruit and noticed that if I used it on my own creature, at the end of turn, my creature would pop over to the computer's side. According to the rules, this isn't supposed to happen.
Script for Unwilling Recruit:
- Code: Select all
Name:Unwilling Recruit
ManaCost:X R R R
Types:Sorcery
Text:no text
A:SP$ GainControl | Cost$ X R R R | ValidTgts$ Creature | TgtPrompt$ Select target creature | LoseControl$ EOT | Untap$ True | AddKWs$ Haste | SubAbility$ SVar=DBPump | SpellDescription$ Gain control of target creature until end of turn. Untap that creature. It gets +X/+0 and gains haste until end of turn.
SVar:DBPump:DB$Pump | Defined$ Targeted | NumAtt$ X
SVar:X:Count$xPaid
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/unwilling_recruit.jpg
End
- Code: Select all
You may target a creature you already control with Unwilling Recruit. If you do, you'll gain control of that creature (which usually won't have any visible effect), untap it, and it'll get +X/+0 until end of turn.
- 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 » 11 Mar 2011, 22:53
Here is the script for Scourge of the Nobilis.
- Code: Select all
Name:Scourge of the Nobilis
ManaCost:2 RW
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:+0/+0
K:stPumpEnchanted:Creature.Red:1/1/SVar=Pump:No Condition:As long as enchanted creature is red, it gets +1/+1 and has "RW: This creature gets +1/+0 until end of turn."
K:stPumpEnchanted:Creature.White:1/1/Lifelink:No Condition:As long as enchanted creature is white, it gets +1/+1 and has lifelink. (Damage dealt by the creature also causes its controller to gain that much life.)
SVar:Pump:AB$Pump | Cost$ RW | Defined$ Enchanted | NumAtt$ +1
SVar:BuffedBy:Creature.Red,Creature.White
SVar:PlayMain1:TRUE
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/scourge_of_the_nobilis.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 Hellfish » 12 Mar 2011, 08:32
You could try setting "Defined$ Self" in the ability given to the enchanted creature, since that ability will reside with the enchanted creature, not in the aura.
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
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
-
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
by jeffwadsworth » 12 Mar 2011, 18:46
No go either.Hellfish wrote:You could try setting "Defined$ Self" in the ability given to the enchanted creature, since that ability will reside with the enchanted creature, not in the aura.
- 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 SoulStorm » 12 Mar 2011, 19:56
Having text display issue with Sky Hussar:
Name:Sky Hussar
ManaCost:3 W U
Types:Creature Human Knight
Text:no text
PT:4/3
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigUntapAll | TriggerDescription$ When CARDNAME enters the battlefield, untap all creatures you control.
SVar:TrigUntapAll:AB$UntapAll | Cost$ 0 | ValidCards$ Creature.YouCtrl | SpellDescription$ untap all creatures you control.
A:AB$ Draw | Cost$ tapXType<2/Creature.White,Blue> | NumCards$ 1 | ActivatingZone$ Hand | ActivationLimit$ 1 | PlayerTurn$ True | ActivatingPhases$ Upkeep | PrecostDesc$ Forecast - | SpellDescription$ Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/sky_hussar.jpg
End
The Forecast description reads like this in game:
Forecast - Tap two untapped Creature.White, Blues you control: Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
I thought the issue might be the comma separating White and Blue, so I removed the comma and Blue just to trouble shoot, but it displayed like this:
Forecast - Tap two untapped Creature.Whites you control: Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
I don't know if I'm doing something wrong or if there is a problem outside my control.
Thanks!
Name:Sky Hussar
ManaCost:3 W U
Types:Creature Human Knight
Text:no text
PT:4/3
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigUntapAll | TriggerDescription$ When CARDNAME enters the battlefield, untap all creatures you control.
SVar:TrigUntapAll:AB$UntapAll | Cost$ 0 | ValidCards$ Creature.YouCtrl | SpellDescription$ untap all creatures you control.
A:AB$ Draw | Cost$ tapXType<2/Creature.White,Blue> | NumCards$ 1 | ActivatingZone$ Hand | ActivationLimit$ 1 | PlayerTurn$ True | ActivatingPhases$ Upkeep | PrecostDesc$ Forecast - | SpellDescription$ Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/sky_hussar.jpg
End
The Forecast description reads like this in game:
Forecast - Tap two untapped Creature.White, Blues you control: Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
I thought the issue might be the comma separating White and Blue, so I removed the comma and Blue just to trouble shoot, but it displayed like this:
Forecast - Tap two untapped Creature.Whites you control: Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
I don't know if I'm doing something wrong or if there is a problem outside my control.
Thanks!
Last edited by SoulStorm on 12 Mar 2011, 22:16, edited 1 time in total.
Re: Card Development Questions
by friarsol » 12 Mar 2011, 20:49
Try it like this:
- Code: Select all
A:AB$ Draw | Cost$ tapXType<2/Creature.White,Creature.Blue> | NumCards$ 1 | ActivatingZone$ Hand | ActivationLimit$ 1 | PlayerTurn$ True | ActivatingPhases$ Upkeep | PrecostDesc$ Forecast - | CostDesc$ Tap two untapped white and/or blue creatures you control: | SpellDescription$ Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by Chris H. » 12 Mar 2011, 21:50
I am having troubles scripting Lethal Vapors. The "Whenever a creature enters the battlefield, destroy it." ability is working correctly.
The "Destroy Lethal Vapors" ability works, but the draw back is giving the extra turn not to the opponent, but to me and I am the one who activated this ability.
I just play tested a new card which is similar, Chronosavant. Chronosavant also is using:
and this works for Chronosavant. I must be missing something.
The "Destroy Lethal Vapors" ability works, but the draw back is giving the extra turn not to the opponent, but to me and I am the one who activated this ability.
I just play tested a new card which is similar, Chronosavant. Chronosavant also is using:
- Code: Select all
SVar:SkipTurn:DB$AddTurn | Defined$ Opponent | NumTurns$ 1
and this works for Chronosavant. I must be missing something.
- Lethal Vapors card | Open
- Name:Lethal Vapors
ManaCost:2 B B
Types:Enchantment
Text:no text
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature | TriggerZones$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ Whenever a creature enters the battlefield, destroy it.
SVar:TrigDestroy:AB$Destroy | Cost$ 0 | Defined$ TriggeredCard
A:AB$ Destroy | Cost$ 0 | Defined$ Self | AnyPlayer$ True | SubAbility$ SVar=SkipTurn | SpellDescription$ Destroy Lethal Vapors. You skip your next turn. Any player may activate this ability.
SVar:SkipTurn:DB$AddTurn | Defined$ Opponent | NumTurns$ 1
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/lethal_vapors.jpg
End
Last edited by Chris H. on 12 Mar 2011, 21:51, edited 1 time in total.
Reason: spelling
Reason: spelling
-
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
by friarsol » 12 Mar 2011, 22:02
It looks like the activating player is being overwritten somehow? Because it looks like the stack description is coming up right, but by the time it's going to resolve the activatingPlayer isn't set properly.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by SoulStorm » 12 Mar 2011, 22:20
Thanks Sol, The card displays properly now, however, the Forecast ability still doesn't work. On the positive side, the comes into play trigger works fine. Any further thougths to get the Forecast ability working?friarsol wrote:Try it like this:
- Code: Select all
A:AB$ Draw | Cost$ tapXType<2/Creature.White,Creature.Blue> | NumCards$ 1 | ActivatingZone$ Hand | ActivationLimit$ 1 | PlayerTurn$ True | ActivatingPhases$ Upkeep | PrecostDesc$ Forecast - | CostDesc$ Tap two untapped white and/or blue creatures you control: | SpellDescription$ Reveal Sky Hussar from your hand: Draw a card. (Activate this ability only during your upkeep and only once each turn.)
Re: Card Development Questions
by Replika » 12 Mar 2011, 22:32
There is currently no card in Forge with "Tap X this and/or that cards you control", so the problem is probably the tapXType in the cost. I just checked the spelling and it seems to be correct.
Re: Card Development Questions
by slapshot5 » 12 Mar 2011, 22:32
Chris - Does it work if you take the AnyPlayer$ True out temporarily?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Who is online
Users browsing this forum: No registered users and 41 guests