Page 42 of 141

Re: Card Development Questions

PostPosted: 21 Jun 2011, 00:14
by jeffwadsworth
Script for Unstoppable Ash

| Open
Name:Unstoppable Ash
ManaCost:3 G
Types:Creature Treefolk Warrior
Text:no text
PT:5/5
K:Trample
K:Champion:Treefolk,Warrior:Treefolk or Warrior
T:Mode$ AttackerBlocked | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature you control becomes blocked, it gets +0/+5 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ TriggeredAttacker | NumDef$ +5
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/unstoppable_ash.jpg
End


Error when the block occurs

| Open
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: amd64

Java Version: 1.6.0_22 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.abilityFactory.AbilityFactory.getDefinedCards(AbilityFactory.java:1047)
at forge.CombatUtil.predictPowerBonusOfBlocker(CombatUtil.java:921)
at forge.CombatUtil.canDestroyBlocker(CombatUtil.java:1177)
at forge.ComputerUtil_Block2.getSafeBlockers(ComputerUtil_Block2.java:35)
at forge.ComputerUtil_Block2.makeGoodBlocks(ComputerUtil_Block2.java:106)
at forge.ComputerUtil_Block2.getBlockers(ComputerUtil_Block2.java:402)
at forge.ComputerAI_General.declare_blockers(ComputerAI_General.java:284)
at forge.gui.input.InputControl.updateInput(InputControl.java:116)
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:517)
at forge.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:42)
at forge.GuiInput.selectButtonOK(GuiInput.java:37)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:977)
at forge.GuiDisplay4.access$3(GuiDisplay4.java:976)
at forge.GuiDisplay4$28.actionPerformed(GuiDisplay4.java:764)
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)

Re: Card Development Questions

PostPosted: 21 Jun 2011, 08:35
by Sloth
jeffwadsworth wrote:Script for Unstoppable Ash

| Open
Name:Unstoppable Ash
ManaCost:3 G
Types:Creature Treefolk Warrior
Text:no text
PT:5/5
K:Trample
K:Champion:Treefolk,Warrior:Treefolk or Warrior
T:Mode$ AttackerBlocked | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever a creature you control becomes blocked, it gets +0/+5 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ TriggeredAttacker | NumDef$ +5
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/unstoppable_ash.jpg
End


Error when the block occurs

| Open
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: amd64

Java Version: 1.6.0_22 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.abilityFactory.AbilityFactory.getDefinedCards(AbilityFactory.java:1047)
at forge.CombatUtil.predictPowerBonusOfBlocker(CombatUtil.java:921)
at forge.CombatUtil.canDestroyBlocker(CombatUtil.java:1177)
at forge.ComputerUtil_Block2.getSafeBlockers(ComputerUtil_Block2.java:35)
at forge.ComputerUtil_Block2.makeGoodBlocks(ComputerUtil_Block2.java:106)
at forge.ComputerUtil_Block2.getBlockers(ComputerUtil_Block2.java:402)
at forge.ComputerAI_General.declare_blockers(ComputerAI_General.java:284)
at forge.gui.input.InputControl.updateInput(InputControl.java:116)
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:517)
at forge.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:42)
at forge.GuiInput.selectButtonOK(GuiInput.java:37)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:977)
at forge.GuiDisplay4.access$3(GuiDisplay4.java:976)
at forge.GuiDisplay4$28.actionPerformed(GuiDisplay4.java:764)
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)
I will fix this up. The Script is ok.

Re: Card Development Questions

PostPosted: 21 Jun 2011, 11:21
by Sloth
OK Jeff. Now your card should be ok.

Re: Card Development Questions

PostPosted: 21 Jun 2011, 15:38
by jeffwadsworth
Sloth wrote:OK Jeff. Now your card should be ok.
Hmm, I still get this error when after declare attackers step:

| Open
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_24 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.abilityFactory.AbilityFactory.getDefinedCards(AbilityFactory.java:1047)
at forge.CombatUtil.predictPowerBonusOfBlocker(CombatUtil.java:925)
at forge.CombatUtil.canDestroyBlocker(CombatUtil.java:1203)
at forge.ComputerUtil_Block2.getSafeBlockers(ComputerUtil_Block2.java:35)
at forge.ComputerUtil_Block2.makeGoodBlocks(ComputerUtil_Block2.java:106)
at forge.ComputerUtil_Block2.getBlockers(ComputerUtil_Block2.java:402)
at forge.ComputerAI_General.declare_blockers(ComputerAI_General.java:284)
at forge.gui.input.InputControl.updateInput(InputControl.java:116)
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:517)
at forge.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:42)
at forge.GuiInput.selectButtonOK(GuiInput.java:37)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:977)
at forge.GuiDisplay4.access$3(GuiDisplay4.java:976)
at forge.GuiDisplay4$28.actionPerformed(GuiDisplay4.java:764)
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.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(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)



The board set up is attached.

Re: Card Development Questions

PostPosted: 21 Jun 2011, 16:41
by Sloth
jeffwadsworth wrote:
Sloth wrote:OK Jeff. Now your card should be ok.
Hmm, I still get this error when after declare attackers step:
Ah, sorry. Fixed now in the right place.

Re: Card Development Questions

PostPosted: 21 Jun 2011, 16:51
by jeffwadsworth
Sloth wrote:
jeffwadsworth wrote:
Sloth wrote:OK Jeff. Now your card should be ok.
Hmm, I still get this error when after declare attackers step:
Ah, sorry. Fixed now in the right place.
Works perfectly now. Thanks!

Re: Card Development Questions

PostPosted: 23 Jun 2011, 16:51
by jeffwadsworth
Land's Edge script:

| Open
Name:Land's Edge
ManaCost:1 R R
Types:World Enchantment
Text:no text
A:AB$ DealDamage | Cost$ Discard<1/Card> | ConditionDefined$ Discarded | ConditionPresent$ Land | ConditionCompare$ EQ1 | NumDmg$ 2 | ValidTgts$ Player | TgtPrompt$ Select target player | AnyPlayer$ True | SpellDescription$ If the discarded card is a land card, CARDNAME deals 2 damage to target player. Any player may activate this ability.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/lands_edge.jpg
End


After a card is discarded , the stack locks up. Discarded appears to be a valid defined...

Re: Card Development Questions

PostPosted: 23 Jun 2011, 22:01
by jeffwadsworth
Script for Teleport.

| Open
Name:Teleport
ManaCost:U U U
Types:Instant
Text:no text
A:SP$ Pump | Cost$ U U U | ActivationPhases$ Declare Attackers - Play Instants and Abilities | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Unblockable | SpellDescription$ Cast CARDNAME only during the declare attackers step. Target creature is unblockable this turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/teleport.jpg
End


This should work, but it can't be cast during that specified phase. Anyone see the issue?

Re: Card Development Questions

PostPosted: 28 Jun 2011, 12:25
by SoulStorm
Could someone please tell me why Sadistic Sacrament doesn't work? Kicked or otherwise, the spell does nothing when it resolves.

Ok, tested the card again, this time cards were exiled, but I wasn't able to choose the cards. I could have sworn it didn't work at all the last time I tested it.

Code: Select all
Name:Sadistic Sacrament
ManaCost:B B B
Types:Sorcery
Text:no text
A:SP$ ChangeZone | Cost$ 7 B B B | Origin$ Library | Destination$ Exile | ValidTgts$ Player | ChangeType$ Card | ChangeNum$ 15 | IsCurse$ True | SpellDescription$ Kicker 7 (You may pay an additional 7 as you cast this spell.)
A:SP$ ChangeZone | Cost$ B B B | Origin$ Library | Destination$ Exile | ValidTgts$ Player | ChangeType$ Card | ChangeNum$ 3 | IsCurse$ True | SpellDescription$ Search target player's library for up to three cards, exile them, then that player shuffles his or her library. If Sadistic Sacrament was kicked, instead search that player's library for up to fifteen cards, exile them, then that player shuffles his or her library.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sadistic_sacrament.jpg
End

Re: Card Development Questions

PostPosted: 28 Jun 2011, 14:03
by friarsol
SoulStorm,
Probably what is happening is the AI is choosing the cards as the Target of the spell. Take a look to see how Jester's Cap works and compare the differences.

Re: Card Development Questions

PostPosted: 28 Jun 2011, 20:39
by SoulStorm
I looked at Jester's Cap Sol. I couldn't see any differences, so I tested Jester's Cap and it also doesn't let you choose the cards to be exiled.

Re: Card Development Questions

PostPosted: 28 Jun 2011, 20:46
by Sloth
SoulStorm wrote:I looked at Jester's Cap Sol. I couldn't see any differences, so I tested Jester's Cap and it also doesn't let you choose the cards to be exiled.
You are correct, Jester's Cap is wrong. Look at Rootwater Thief instead.

Re: Card Development Questions

PostPosted: 28 Jun 2011, 21:35
by SoulStorm
Works fine now, thanks Sloth!

Re: Card Development Questions

PostPosted: 28 Jun 2011, 21:56
by friarsol
Bah. Jester's Cap used to work.

Re: Card Development Questions

PostPosted: 28 Jun 2011, 22:59
by SoulStorm
friarsol wrote:Bah. Jester's Cap used to work.
If I had a nickel for every time I've said that about a card! :D