Page 34 of 141

Re: Card Development Questions

PostPosted: 14 May 2011, 22:00
by slapshot5
SoulStorm wrote:Based upon your suggestion Slapshot, I tried the following code, but now no cards can be put into play. Other suggestions, or do you believe the infrastructure necessary isn't in place yet?

Code: Select all
Name:Protean Hulk
ManaCost:5 G G
Types:Creature Beast
Text:no text
PT:6/6
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChange | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, search you libray for any number of creature cards with total converted mana cost 6 or less and put them onto the battlefield.  Then shuffle your library.
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Origin$ Library | Destination$ Battlefield | ChangeType$ Creature.cmcLE6 | ChangeNum$ XFetch
SVar:XFetch:Count$cmcLE6
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/protean_hulk.jpg
End
The infrastructure isn't there. We just need to implement "valid" checking for all zones. That would fix this.

-slapshot5

Re: Card Development Questions

PostPosted: 14 May 2011, 22:26
by SoulStorm
Ok, thanks for the info. Slapshot.

Re: Card Development Questions

PostPosted: 15 May 2011, 12:22
by SoulStorm
Here's another one that may be premature, but I thought I'd give it a shot anyway. It crashes when played. I'm sure the x variable is the problem, but I don't know if there's a way to fix it. I also considered trying this card using Animate, but every example targets. Is there a way to make this work, or am I being premature again?

Code: Select all
Name:Opalescence
ManaCost:2 W W
Types:Enchantment
Text:no text
K:stPumpAll:Enchantment.nonAura:0/0/Types=Creature:No Condition:Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost.  It's still an enchantment.
K:stPumpAll:Enchantment.nonAura:x/x:No Condition:Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost.  It's still an enchantment.
SVar:X:CardManaCost
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/opalescence.jpg
End

Re: Card Development Questions

PostPosted: 15 May 2011, 13:10
by slapshot5
SoulStorm wrote:Here's another one that may be premature, but I thought I'd give it a shot anyway. It crashes when played. I'm sure the x variable is the problem, but I don't know if there's a way to fix it. I also considered trying this card using Animate, but every example targets. Is there a way to make this work, or am I being premature again?

Code: Select all
Name:Opalescence
ManaCost:2 W W
Types:Enchantment
Text:no text
K:stPumpAll:Enchantment.nonAura:0/0/Types=Creature:No Condition:Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost.  It's still an enchantment.
K:stPumpAll:Enchantment.nonAura:x/x:No Condition:Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost.  It's still an enchantment.
SVar:X:CardManaCost
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/opalescence.jpg
End
Does it crash because you're using lower case "x" in stPumpAll vs upper case "X" in SVar? Can you post the crash?

We don't have an elegant way to do static animates right now, like Living Lands too, but this doesn't seem wholly unreasonable...

-slapshot5

Re: Card Development Questions

PostPosted: 15 May 2011, 13:20
by SoulStorm
Whoops, I'll try it with an uppercase X.

Also, while playing around with Followed Footsteps, I discovered that if I played it on an AI controlled creature, the token came into play under the AI's control. I know AB$Token has TokenOwner$, will that work with CopyPermanent, or does it need to be implemented?

Re: Card Development Questions

PostPosted: 15 May 2011, 13:28
by SoulStorm
Tested Opalescence with upper case fix, here's the error report:

Also tested Followed Footsteps with TokenOwner$ You, but it doesn't work. Didn't think it would, but gave it a shot anyway.

Detailed error trace:
java.lang.ArrayIndexOutOfBoundsException: 1
at forge.GameActionUtil$5.execute(GameActionUtil.java:5776)
at forge.GameAction.checkStateEffects(GameAction.java:507)
at forge.MagicStack.resolveStack(MagicStack.java:798)
at forge.Phase.passPriority(Phase.java:537)
at forge.ComputerAI_General.stackResponse(ComputerAI_General.java:346)
at forge.ComputerAI_General.stack_not_empty(ComputerAI_General.java:285)
at forge.gui.input.InputControl.updateInput(InputControl.java:151)
at forge.GuiInput.update(GuiInput.java:21)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at forge.MyObservable.updateObservers(MyObservable.java:9)
at forge.gui.input.InputControl.resetInput(InputControl.java:58)
at forge.Phase.passPriority(Phase.java:527)
at forge.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:42)
at forge.GuiInput.selectButtonOK(GuiInput.java:37)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:954)
at forge.GuiDisplay4.access$3(GuiDisplay4.java:953)
at forge.GuiDisplay4$25.actionPerformed(GuiDisplay4.java:741)
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 org.jvnet.substance.utils.RolloverButtonListener.mouseReleased(RolloverButtonListener.java:111)
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)

Re: Card Development Questions

PostPosted: 15 May 2011, 13:49
by slapshot5
SoulStorm wrote:Tested Opalescence upper case fix, here's the error report:

Also tested Followed Footsteps with TokenOwner$ You, but it doesn't work. Didn't think it would, but gave it a shot anyway.

Detailed error trace:
java.lang.ArrayIndexOutOfBoundsException: 1
at forge.GameActionUtil$5.execute(GameActionUtil.java:5776)
at forge.GameAction.checkStateEffects(GameAction.java:507)
at forge.MagicStack.resolveStack(MagicStack.java:798)
at forge.Phase.passPriority(Phase.java:537)
<snip />
at java.awt.EventDispatchThread.run(Unknown Source)
Well, that exception is because SVar needs to have SVar:X:Count$CardManaCost

But I ran into this problem yesterday with Phyrexian Ingester. stPump will use the Opalescence CMC in this case, not the CMC of the pumped card.

This may not be too far away from being correct though. Let me look into it a bit.

Re: Card Development Questions

PostPosted: 15 May 2011, 13:53
by SoulStorm
Cool, thanks Slapshot!

Re: Card Development Questions

PostPosted: 15 May 2011, 13:57
by slapshot5
Here's what I just used:

Code: Select all
Name:Opalescence
ManaCost:2 W W
Types:Enchantment
Text:no text
K:stPumpAll:Enchantment.nonAura+Other:0/0/Types=Creature:No Condition:Each other non-Aura enchantment is a creature with power and toughness each equal to its converted mana cost.  It's still an enchantment.
K:stPumpAll:Enchantment.nonAura+Other:X/X:No Condition:no text
SVar:X:Count$CardManaCost
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/opalescence.jpg
End
I realize it has the wrong P/T, but other than that, let me know how rules-compliant this looks to you.

-slapshot5

Re: Card Development Questions

PostPosted: 15 May 2011, 14:57
by SoulStorm
Looks great! I actually missed the "Other" variable until I noticed that you added it.

Re: Card Development Questions

PostPosted: 15 May 2011, 15:03
by slapshot5
And I should be able to get that all on one line. Just need to change the order of stuff in code probably.

Now, let me see if I can get the correct P/T in there...

-slapshot5

Re: Card Development Questions

PostPosted: 15 May 2011, 15:42
by SoulStorm
That would be awesome! If you can get the P/T correct, we should be able to add March of the Machines as well.

Re: Card Development Questions

PostPosted: 15 May 2011, 15:50
by slapshot5
Well, the is going to take more work than I feared. This needs to be a stSetPT instead of a stPump keyword. Just look what happens if you have 2 Opalescences in play.

-slapshot5

Re: Card Development Questions

PostPosted: 15 May 2011, 15:51
by Sloth
SoulStorm wrote:That would be awesome! If you can get the P/T correct, we should be able to add March of the Machines as well.
Note that euipment that becomes a creature will fall off.

Re: Card Development Questions

PostPosted: 15 May 2011, 15:57
by SoulStorm
Duh, I didn't think of what would happen with 2 Opalescence in play either. Well, that's why you guys get paid the big bucks. :mrgreen: