Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by slapshot5 » 17 Jan 2011, 01:27
Not that I know of. That probably has to be the next round AbilityFactory, along with add/replace color and add/replace type.jeffwadsworth wrote:Is there a way to script the removal of a keyword like flying? Testing Emerald Charm.
-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 slapshot5 » 17 Jan 2011, 01:30
Trying to add Echo Tracer via Triggers. Here's what I have:
-slapshot5
- Code: Select all
Name:Echo Tracer
ManaCost:2 U
Types:Creature Human Wizard
Text:no text
PT:2/2
K:Morph:2 U
T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ TrigBounce | TriggerDescription$ When CARDNAME is turned face up, return target creature to its owner's hand.
SVar:TrigBounce:AB$ChangeZone | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/echo_tracer.jpg
End
-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 friarsol » 17 Jan 2011, 02:01
Other future AFs Animate (turning non-Creatures into Creatures). I was also considering doing a Conditional AF for things like Flipping Coins.
- 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 » 17 Jan 2011, 02:56
Okay, I got it to sort of work if I used at least 2 at the same time. Note the picture. But, it would just continue to stack the ability when I selected the creature until I pressed Cancel. It then reported that 3 abilities were on the stack to resolve. I chose Ok and the creature was sent to the AI's hand. Needs some more work it appears.slapshot5 wrote:Trying to add Echo Tracer via Triggers. Here's what I have:It doesn't work (i.e. nothing goes on the stack). Am I missing something simple?
- Code: Select all
Name:Echo Tracer
ManaCost:2 U
Types:Creature Human Wizard
Text:no text
PT:2/2
K:Morph:2 U
T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ TrigBounce | TriggerDescription$ When CARDNAME is turned face up, return target creature to its owner's hand.
SVar:TrigBounce:AB$ChangeZone | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Hand
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/echo_tracer.jpg
End
-slapshot5
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: Card Development Questions
by Hellfish » 17 Jan 2011, 08:37
Theres another issue that complicates testing Echo Tracer for me. I never get the option to cast it morphed, enough mana available or not. Same with other Morph cards.
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 » 17 Jan 2011, 14:36
Yeah, Morphing is broken. It worked fine yesterday.
Edit: Sol fixed it. Hellfish fix resolved the Echo Tracer issue.
Edit: Sol fixed it. Hellfish fix resolved the Echo Tracer issue.
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: Card Development Questions
by Hellfish » 17 Jan 2011, 18:16
I was considering AFs for Spell Copying ,Clashing and Aura/Equipment Attaching before I got stuck in triggersfriarsol wrote:Other future AFs Animate (turning non-Creatures into Creatures). I was also considering doing a Conditional AF for things like Flipping Coins.
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 » 17 Jan 2011, 22:29
Other than the Kicker functionality in Triggers, would it be feasible to handle a card like The Wretched or Seraph? I suppose it would require a list of creatures that blocked it before anything else.
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: Card Development Questions
by Hellfish » 17 Jan 2011, 22:33
My gut instinct says at least those two are better off hardcoded, insanely messy spaghetti-scripting notwithstanding.
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 slapshot5 » 18 Jan 2011, 03:29
Eek. I think I broke it. Thanks Sol.jeffwadsworth wrote:Yeah, Morphing is broken. It worked fine yesterday.
Edit: Sol fixed it. Hellfish fix resolved the Echo Tracer issue.
- 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 slapshot5 » 18 Jan 2011, 03:30
Thanks guys. I've added Echo Tracer now.jeffwadsworth wrote:Hellfish fix resolved the Echo Tracer issue.
-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 » 18 Jan 2011, 15:38
Hmm. Here is test card for Angelic Protector. I get a null error every time a spell is cast by any one at any time.
- Code: Select all
Name:Angelic Protector
ManaCost:3 W
Types: Creature Angel
Text:no text
PT:2/2
K:Flying
T:Mode$ SpellCast | TargetsValid$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME becomes the target of a spell or ability, CARDNAME gets +0/+3 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ Self | NumDef$ +3
SVar:Rarity:uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/angelic_protector.jpg
End
- Code: Select all
An error has occured. You can copy/paste this message or save it to a file.
Please report this, plus what you tried to do, to:
http://www.slightlymagic.net/forum/viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
mtgerror@yahoo.com
null
Version:
Forge -- official beta: $Date: 2011-01-06 10:34:48 -0600 (Thu, 06 Jan 2011) $, SVN revision: $Revision: 4891 $
OS: Windows 7 Version: 6.1 Architecture: x86
Java Version: 1.6.0_23 Vendor: Sun Microsystems Inc.
Detailed error trace:
java.lang.NullPointerException
at forge.Trigger_SpellCast.performTest(Unknown Source)
at forge.TriggerHandler.runSingleTrigger(Unknown Source)
at forge.TriggerHandler.runTrigger(Unknown Source)
at forge.MagicStack.add(Unknown Source)
at forge.MagicStack.addAndUnfreeze(Unknown Source)
at forge.ComputerUtil.playCards(Unknown Source)
at forge.ComputerAI_General.playCards(Unknown Source)
at forge.ComputerAI_General.main1(Unknown Source)
at forge.ComputerAI_Input.think(Unknown Source)
at forge.ComputerAI_Input.showMessage(Unknown Source)
at forge.GuiInput.setInput(Unknown Source)
at forge.GuiInput.update(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at forge.MyObservable.updateObservers(Unknown Source)
at forge.Phase.nextPhase(Unknown Source)
at forge.GuiDisplay4$24.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Last edited by jeffwadsworth on 19 Jan 2011, 15:35, edited 1 time in total.
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: Card Development Questions
by Hellfish » 18 Jan 2011, 17:53
I'll look into this when I get home but I suspect it fails when it tries to get the target object.
EDIT: Actually, I'm pretty sure that's it. getTarget() returns null from untargeted SpellAbilities,right?
EDIT: Actually, I'm pretty sure that's it. getTarget() returns null from untargeted SpellAbilities,right?
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 friarsol » 18 Jan 2011, 18:22
Yep. It should be Null.Hellfish wrote:I'll look into this when I get home but I suspect it fails when it tries to get the target object.
EDIT: Actually, I'm pretty sure that's it. getTarget() returns null from untargeted SpellAbilities,right?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by friarsol » 18 Jan 2011, 18:42
Hellfish, I was trying to do Kjeldoran Home Guard but it seems like the ValidCard isn't checked in Phase.
Did you ever get something in place to handle that conditional? Can we send in optional parameters if they exist to also check on?
Did you ever get something in place to handle that conditional? Can we send in optional parameters if they exist to also check on?
- Code: Select all
T:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ Player | ValidCard$ 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
Who is online
Users browsing this forum: No registered users and 31 guests