Page 41 of 141

Re: Card Development Questions

PostPosted: 17 Jun 2011, 20:00
by jeffwadsworth
I could have sworn the correct way of activating an ability from Exile was simply ActivationZone$ Exile...

Re: Card Development Questions

PostPosted: 17 Jun 2011, 20:21
by friarsol
jeffwadsworth wrote:I could have sworn the correct way of activating an ability from Exile was simply ActivationZone$ Exile...
Is something wrong with that? I'm pretty sure that should be right. The only thing I can think of is if the ActivationFrom code doesn't check cards in Exile. Post a sample card file.

Re: Card Development Questions

PostPosted: 17 Jun 2011, 21:31
by Sloth
friarsol wrote:
jeffwadsworth wrote:I could have sworn the correct way of activating an ability from Exile was simply ActivationZone$ Exile...
Is something wrong with that? I'm pretty sure that should be right. The only thing I can think of is if the ActivationFrom code doesn't check cards in Exile. Post a sample card file.
The question is: How can the player use an ability from exile?

Re: Card Development Questions

PostPosted: 18 Jun 2011, 00:35
by jeffwadsworth
Sloth wrote:
friarsol wrote:
jeffwadsworth wrote:I could have sworn the correct way of activating an ability from Exile was simply ActivationZone$ Exile...
Is something wrong with that? I'm pretty sure that should be right. The only thing I can think of is if the ActivationFrom code doesn't check cards in Exile. Post a sample card file.
The question is: How can the player use an ability from exile?
The Interpreter strikes again!

Re: Card Development Questions

PostPosted: 18 Jun 2011, 00:38
by jeffwadsworth
friarsol wrote:
jeffwadsworth wrote:I could have sworn the correct way of activating an ability from Exile was simply ActivationZone$ Exile...
Is something wrong with that? I'm pretty sure that should be right. The only thing I can think of is if the ActivationFrom code doesn't check cards in Exile. Post a sample card file.
Script for Greater Gargadon

| Open
Name:Greater Gargadon
ManaCost:9 R
Types:Creature Beast
Text:no text
PT:9/7
K:Suspend:10:R
A:AB$ RemoveCounter | Cost$ Sac<1/Artifact;Creature;Land> | CostDesc$ Sacrifice an artifact, creature, or land: | CounterType$ TIME | CounterNum$ 1 | ActivationZone$ Exile | IsPresent$ Card.countersGE1TIME+Self | PresentZone$ Exile | SpellDescription$ Remove a time counter from CARDNAME. Activate this ability only if CARDNAME is suspended.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/greater_gargadon.jpg

Re: Card Development Questions

PostPosted: 18 Jun 2011, 02:02
by friarsol
Sloth wrote:The question is: How can the player use an ability from exile?
Using the inappropriately named "Flashback" button? We should really figure out a better name since it really means "Abilities in non-Battlefield/Hand zones"

Re: Card Development Questions

PostPosted: 18 Jun 2011, 07:56
by jeffwadsworth
Script for Sengir Nosferatu

| Open
Name:Sengir Nosferatu
ManaCost:3 B B
Types:Creature Vampire
Text:no text
PT:4/4
K:Flying
A:AB$ Token | Cost$ 1 B Exile<1/CARDNAME> | TokenAmount$ 1 | TokenName$ Bat | TokenTypes$ Creature,Bat | TokenOwner$ You | TokenColors$ Black | TokenPower$ 1 | TokenToughness$ 2 | TokenKeywords$ Flying | TokenAbilities$ ABReturn | SpellDescription$ Put a 1/2 black Bat creature token with flying onto the battlefield. It has "1 B, Sacrifice this creature: Return an exiled card named CARDNAME to the battlefield under its owner's control."
SVar:ABReturn:AB$ChangeZone | Cost$ 1 B Sac<1/CARDNAME> | ChangeType$ Card.namedSengir Nosferatu | ChangeNum$ 1 | Origin$ Exile | Destination$ Battlefield | SpellDescription$ Return an exiled card named Sengir Nosferatu to the battlefield under its owner's control
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sengir_nosferatu.jpg
End


When the ability on the Bat token is used, an NPE results.

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

Java Version: 1.6.0_22 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.abilityFactory.AbilityFactory_ChangeZone.changeKnownOriginResolve(AbilityFactory_ChangeZone.java:1156)
at forge.card.abilityFactory.AbilityFactory_ChangeZone.changeZoneResolve(AbilityFactory_ChangeZone.java:193)
at forge.card.abilityFactory.AbilityFactory_ChangeZone.access$1(AbilityFactory_ChangeZone.java:185)
at forge.card.abilityFactory.AbilityFactory_ChangeZone$1.resolve(AbilityFactory_ChangeZone.java:42)
at forge.card.abilityFactory.AbilityFactory.resolve(AbilityFactory.java:1449)
at forge.MagicStack.resolveStack(MagicStack.java:693)
at forge.Phase.passPriority(Phase.java:527)
at forge.ComputerAI_General.stackResponse(ComputerAI_General.java:357)
at forge.ComputerAI_General.stack_not_empty(ComputerAI_General.java:305)
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:516)
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: 18 Jun 2011, 13:04
by friarsol
Regarding Sengir Nosferatu, did you try it with the Hidden flag on?

Re: Card Development Questions

PostPosted: 18 Jun 2011, 14:11
by jeffwadsworth
friarsol wrote:Regarding Sengir Nosferatu, did you try it with the Hidden flag on?
That fixed it. I thought that was used in a different way. Thanks.

Re: Card Development Questions

PostPosted: 18 Jun 2011, 15:05
by friarsol
jeffwadsworth wrote:
friarsol wrote:Regarding Sengir Nosferatu, did you try it with the Hidden flag on?
That fixed it. I thought that was used in a different way. Thanks.
Hidden is for when the decision of "What is Changing Zones?" occurs during resolution. This is only necessary when the Origin Zone is Known Information and normally would require something to target.

Re: Card Development Questions

PostPosted: 18 Jun 2011, 17:03
by jeffwadsworth
Cheers.

Re: Card Development Questions

PostPosted: 18 Jun 2011, 18:06
by Chris H.
jeffwadsworth wrote:Voidmage Husher script

| Open
Name:Voidmage Husher
ManaCost:3 U
Types:Creature Human Wizard
Text:no text
PT:2/2
K:Flash
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target activated ability.
T:Mode$ SpellCast | ValidCard$ Card.YouCtrl | Execute$ TrigBounce | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever you cast a spell, you may return CARDNAME to its owner's hand.
SVar:TrigCounter:SP$Counter | Cost$ 0 | TargetType$ Activated | TgtPrompt$ Select target ability | ValidTgts$ Permanent
SVar:TrigBounce:SP$ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Hand
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/voidmage_husher.jpg
End


When this is cast to counter an ability, it works, but Voidmage Husher ends up in the graveyard. Apparently, it is countering itself also? On a big side note, OptionalDecider$ appears to be broken. It doesn't work here or with Zealot il-Vec.
`
If you changed the

Code: Select all
SVar:TrigCounter:SP$Counter
`
to

Code: Select all
SVar:TrigCounter:AB$Counter
`
this might keep the Voidmage Husher in play?

Re: Card Development Questions

PostPosted: 19 Jun 2011, 22:02
by jeffwadsworth
If Pump AB could use Remembered, we could script Erhnam Djinn. Forge just isn't the same without the guy.

| Open
Name:Erhnam Djinn
ManaCost:3 G
Types:Creature Djinn
Text:no text
PT:4/5
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, target non-Wall creature an opponent controls gains forestwalk until your next upkeep.
SVar:TrigPump:AB$Pump | Cost$ 0 | ValidTgts$ Creature.nonWall+YouDontCtrl | TgtPrompt$ Select target non-Wall creature an opponent controls | KW$ Forestwalk | RememberTargets$ True | ForgetOtherTargets$ True | SubAbility$ DelTrig | Permanent$ True
SVar:DelTrig:DB$DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigDebuff | SpellDescription$ Remove Forestwalk at your next upkeep.
SVar:TrigDebuff:AB$Debuff | Cost$ 0 | Defined$ Remembered | KW$ Forestwalk | SpellDescription$ Remove Forestwalk.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/erhnam_djinn.jpg
End

Re: Card Development Questions

PostPosted: 20 Jun 2011, 00:52
by friarsol
Unfortunately, Erhnam isn't a delayed trigger. It's a Pump that wears off on the activators Next Upkeep. We would need to work it into a Duration parameter somehow.

Re: Card Development Questions

PostPosted: 20 Jun 2011, 22:23
by jeffwadsworth
Cheers