Page 8 of 141

Re: Card Development Questions

PostPosted: 17 Jan 2011, 01:27
by slapshot5
jeffwadsworth wrote:Is there a way to script the removal of a keyword like flying? Testing Emerald Charm.
Not that I know of. That probably has to be the next round AbilityFactory, along with add/replace color and add/replace type.

-slapshot5

Re: Card Development Questions

PostPosted: 17 Jan 2011, 01:30
by slapshot5
Trying to add Echo Tracer via Triggers. Here's what I have:

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
It doesn't work (i.e. nothing goes on the stack). Am I missing something simple?

-slapshot5

Re: Card Development Questions

PostPosted: 17 Jan 2011, 02:01
by friarsol
Other future AFs Animate (turning non-Creatures into Creatures). I was also considering doing a Conditional AF for things like Flipping Coins.

Re: Card Development Questions

PostPosted: 17 Jan 2011, 02:56
by jeffwadsworth
slapshot5 wrote:Trying to add Echo Tracer via Triggers. Here's what I have:

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
It doesn't work (i.e. nothing goes on the stack). Am I missing something simple?

-slapshot5
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.

Re: Card Development Questions

PostPosted: 17 Jan 2011, 08:37
by Hellfish
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.

Re: Card Development Questions

PostPosted: 17 Jan 2011, 14:36
by jeffwadsworth
Yeah, Morphing is broken. It worked fine yesterday.

Edit: Sol fixed it. Hellfish fix resolved the Echo Tracer issue.

Re: Card Development Questions

PostPosted: 17 Jan 2011, 18:16
by Hellfish
friarsol wrote:Other future AFs Animate (turning non-Creatures into Creatures). I was also considering doing a Conditional AF for things like Flipping Coins.
I was considering AFs for Spell Copying ,Clashing and Aura/Equipment Attaching before I got stuck in triggers :lol:

Re: Card Development Questions

PostPosted: 17 Jan 2011, 22:29
by jeffwadsworth
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.

Re: Card Development Questions

PostPosted: 17 Jan 2011, 22:33
by Hellfish
My gut instinct says at least those two are better off hardcoded, insanely messy spaghetti-scripting notwithstanding.

Re: Card Development Questions

PostPosted: 18 Jan 2011, 03:29
by slapshot5
jeffwadsworth wrote:Yeah, Morphing is broken. It worked fine yesterday.

Edit: Sol fixed it. Hellfish fix resolved the Echo Tracer issue.
Eek. I think I broke it. Thanks Sol.

Re: Card Development Questions

PostPosted: 18 Jan 2011, 03:30
by slapshot5
jeffwadsworth wrote:Hellfish fix resolved the Echo Tracer issue.
Thanks guys. I've added Echo Tracer now.

-slapshot5

Re: Card Development Questions

PostPosted: 18 Jan 2011, 15:38
by jeffwadsworth
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
Here is the Null dump:

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)
Any clues?

Re: Card Development Questions

PostPosted: 18 Jan 2011, 17:53
by Hellfish
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?

Re: Card Development Questions

PostPosted: 18 Jan 2011, 18:22
by friarsol
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?
Yep. It should be Null.

Re: Card Development Questions

PostPosted: 18 Jan 2011, 18:42
by friarsol
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?
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