Page 51 of 141

Re: Card Development Questions

PostPosted: 03 Aug 2011, 19:39
by Sloth
jeffwadsworth wrote:
ArsenalNut wrote:
jeffwadsworth wrote:Elephant Resurgence. Is there a way to get something like this to work currently?

| Open
Name:Elephant Resurgence
ManaCost:1 G
Types:Sorcery
Text:no text
A:SP$ Token | Cost$ 1 G | TokenAmount$ 1 | TokenName$ Elephant | TokenTypes$ Creature,Elephant | TokenOwner$ You | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | TokenTriggers$ TrigPump | TokenSVars$ X | SubAbility$ DBComputerToken | SpellDescription$ Each player puts a green Elephant creature token onto the battlefield. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
SVar:TrigPump:Mode$ Continuous | Affected$ Self | SetPower$ X | SetToughness$ X | CharacteristicDefining$ True
SVar:TrigPump2:Mode$ Continuous | Affected$ Self | SetPower$ Y | SetToughness$ Y | CharacteristicDefining$ True
SVar:DBComputerToken:DB$Token | TokenAmount$ 1 | TokenName$ Elephant | TokenTypes$ Creature,Elephant | TokenOwner$ Opponent | TokenColors$ Green | TokenPower$ Y | TokenToughness$ Y | TokenTriggers$ TrigPump2 | TokenSVars$ Y
SVar:X:Count$InYourYard.Creature
SVar:Y:Count$InOppYard.Creature
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/elephant_resurgence.jpg
End
I think to do this right you would need a keyword that you could give the token when its created. Because of the "those creatures" text, you need to apply the ability to the specific token instances created by the spell and not just all tokens that match the desired type. I haven't found a mechanism to do this with pump and continuous effects. I ran across this when I was trying to script Gilt-Leaf Ambush. I could give all Elf Warrior token deathtouch till end of turn but not just the ones created by the spell.
That is why the "Affected$ Self" is in there.
Wouldn't it be better to grant static abilities to tokens? I will see what I can do.

EDIT: It's there now. Use "TokenStaticAbilities" pointing to an SVar (see Chimeric Mass using AF Animate).

Re: Card Development Questions

PostPosted: 03 Aug 2011, 20:29
by jeffwadsworth
Here is a simplified version of Elephant Resurgence (doesn't include the opponents token). I am getting an error during startup.

| Open
Name:Elephant Resurgence
ManaCost:1 G
Types:Sorcery
Text:no text
A:SP$ Token | Cost$ 1 G | TokenAmount$ 1 | TokenName$ Elephant | TokenTypes$ Creature,Elephant | TokenOwner$ You | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | TokenStaticAbilities$ StaticYou | TokenSVars$ X | SpellDescription$ Each player puts a green Elephant creature token onto the battlefield. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
SVar:StaticYou:Mode$ Continuous | SetPower$ X | SetToughness$ X | EffectZone$ Battlefield | CharacteristicDefining$ True | Description$ This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard.
SVar:X:Count$InYourYard.Creature
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/elephant_resurgence.jpg
End



The error:

| Open
null


Version:
Forge -- official beta: $Date$, SVN revision: $Revision$

OS: Windows 7 Version: 6.1 Architecture: x86

Java Version: 1.6.0_26 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.abilityFactory.AbilityFactory_Token.<init>(AbilityFactory_Token.java:91)
at forge.card.abilityFactory.AbilityFactory.getAbility(AbilityFactory.java:590)
at forge.card.cardFactory.AbstractCardFactory.getCard2(AbstractCardFactory.java:436)
at forge.card.cardFactory.AbstractCardFactory.getCard(AbstractCardFactory.java:360)
at forge.card.cardFactory.PreloadingCardFactory.<init>(PreloadingCardFactory.java:55)
at forge.AllZone.getCardFactory(AllZone.java:258)
at forge.deck.generate.GenerateConstructedDeck.getCards(GenerateConstructedDeck.java:91)
at forge.deck.generate.GenerateConstructedDeck.get2ColorDeck(GenerateConstructedDeck.java:100)
at forge.deck.generate.GenerateConstructedDeck.generateDeck(GenerateConstructedDeck.java:50)
at forge.Gui_NewGame.generateConstructedDeck(Gui_NewGame.java:957)
at forge.Gui_NewGame.genDecks(Gui_NewGame.java:928)
at forge.Gui_NewGame.startButton_actionPerformed(Gui_NewGame.java:858)
at forge.Gui_NewGame$14.actionPerformed(Gui_NewGame.java:617)
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)

Re: Card Development Questions

PostPosted: 03 Aug 2011, 20:36
by Sloth
jeffwadsworth wrote:Here is a simplified version of Elephant Resurgence (doesn't include the opponents token). I am getting an error during startup.

| Open
Name:Elephant Resurgence
ManaCost:1 G
Types:Sorcery
Text:no text
A:SP$ Token | Cost$ 1 G | TokenAmount$ 1 | TokenName$ Elephant | TokenTypes$ Creature,Elephant | TokenOwner$ You | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | TokenStaticAbilities$ StaticYou | TokenSVars$ X | SpellDescription$ Each player puts a green Elephant creature token onto the battlefield. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
SVar:StaticYou:Mode$ Continuous | SetPower$ X | SetToughness$ X | EffectZone$ Battlefield | CharacteristicDefining$ True | Description$ This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard.
SVar:X:Count$InYourYard.Creature
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/elephant_resurgence.jpg
End



The error:

| Open
null


Version:
Forge -- official beta: $Date$, SVN revision: $Revision$

OS: Windows 7 Version: 6.1 Architecture: x86

Java Version: 1.6.0_26 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.abilityFactory.AbilityFactory_Token.<init>(AbilityFactory_Token.java:91)
at forge.card.abilityFactory.AbilityFactory.getAbility(AbilityFactory.java:590)
at forge.card.cardFactory.AbstractCardFactory.getCard2(AbstractCardFactory.java:436)
at forge.card.cardFactory.AbstractCardFactory.getCard(AbstractCardFactory.java:360)
at forge.card.cardFactory.PreloadingCardFactory.<init>(PreloadingCardFactory.java:55)
at forge.AllZone.getCardFactory(AllZone.java:258)
at forge.deck.generate.GenerateConstructedDeck.getCards(GenerateConstructedDeck.java:91)
at forge.deck.generate.GenerateConstructedDeck.get2ColorDeck(GenerateConstructedDeck.java:100)
at forge.deck.generate.GenerateConstructedDeck.generateDeck(GenerateConstructedDeck.java:50)
at forge.Gui_NewGame.generateConstructedDeck(Gui_NewGame.java:957)
at forge.Gui_NewGame.genDecks(Gui_NewGame.java:928)
at forge.Gui_NewGame.startButton_actionPerformed(Gui_NewGame.java:858)
at forge.Gui_NewGame$14.actionPerformed(Gui_NewGame.java:617)
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)
Arg. Typo. Sorry Jeff.

Sidenote: Both tokens should have the same static ability and SVar.

Re: Card Development Questions

PostPosted: 03 Aug 2011, 22:52
by jeffwadsworth
Thanks Sloth. Worked perfectly.

Re: Card Development Questions

PostPosted: 05 Aug 2011, 12:47
by friarsol
Hey Jeff (or anyone really), can you fix this Bug for me? http://cardforge.org/bugz/view.php?id=104 My codebase is in a terrible state and I'd prefer not to mess with it to trigger to get only one file pushed to git.

Re: Card Development Questions

PostPosted: 05 Aug 2011, 13:54
by Chris H.
friarsol wrote:Hey Jeff (or anyone really), can you fix this Bug for me? http://cardforge.org/bugz/view.php?id=104 My codebase is in a terrible state and I'd prefer not to mess with it to trigger to get only one file pushed to git.
`
I attempted to fix it just now, Gitorious is unresponsive at this moment. I saw the same problem yesterday for awhile.

I will try again in a little while as it is a simple fix. :)

Re: Card Development Questions

PostPosted: 05 Aug 2011, 14:24
by Chris H.
Chris H. wrote:I attempted to fix it just now, Gitorious is unresponsive at this moment. I saw the same problem yesterday for awhile.

I will try again in a little while as it is a simple fix. :)
`
Made the correction and pushed the commit. It is not yet showing on the Gitorious commit log.

Re: Card Development Questions

PostPosted: 05 Aug 2011, 14:34
by friarsol
Chris H. wrote:Made the correction and pushed the commit. It is not yet showing on the Gitorious commit log.
Thanks Chris. I've noticed the Gitorious site is usually like 15 minutes or more behind the actual changes.

Re: Card Development Questions

PostPosted: 05 Aug 2011, 14:41
by jendave
friarsol wrote:
Chris H. wrote:Made the correction and pushed the commit. It is not yet showing on the Gitorious commit log.
Thanks Chris. I've noticed the Gitorious site is usually like 15 minutes or more behind the actual changes.
As much as I love git itself, gitorious has been frustrating: frequent outages, slowness of log updates and my personal pet peeve - no way to set the time zone I am in so I can watch the activity log properly! [/end rant]. Maybe moving back to SVN is not such a bad idea :evil:

Re: Card Development Questions

PostPosted: 05 Aug 2011, 14:46
by Rob Cashwalker
I remember pushing the bug report change for the in-game gui, but it didn't seem to be applied when I pulled it yesterday after your refactoring. I assumed you might not have had that particular update when you began the refactoring process, now I wonder if gitorious just forgot about my revision....

Re: Card Development Questions

PostPosted: 05 Aug 2011, 15:47
by friarsol
How are the tests going on the local svn here? I agree that I've noticed gitorious being down a fair amount. And while playing with git is cool and educational, not being able to commit code is a pain.

Re: Card Development Questions

PostPosted: 05 Aug 2011, 16:09
by jendave
friarsol wrote:How are the tests going on the local svn here? I agree that I've noticed gitorious being down a fair amount. And while playing with git is cool and educational, not being able to commit code is a pain.
It's going. Goblin Hero gave me access to the slightlymagic svn. I am in the process of converting the Git history to SVN history. I hope to have everything uploaded and working by late tonight (Pacific time). I am not sure how access is going to work though... Hopefully Goblin Hero can give Rob admin access to add new users.

Re: Card Development Questions

PostPosted: 05 Aug 2011, 17:19
by jendave
jendave wrote:
friarsol wrote:How are the tests going on the local svn here? I agree that I've noticed gitorious being down a fair amount. And while playing with git is cool and educational, not being able to commit code is a pain.
It's going. Goblin Hero gave me access to the slightlymagic svn. I am in the process of converting the Git history to SVN history. I hope to have everything uploaded and working by late tonight (Pacific time). I am not sure how access is going to work though... Hopefully Goblin Hero can give Rob admin access to add new users.
Hmm, maybe by the end of this weekend. Some of the commits in the "gitorious era" are giving my transfer procedure major headaches.

Re: Card Development Questions

PostPosted: 09 Aug 2011, 13:52
by ArsenalNut
I am trying to script Daybreak Coronet. The initial attach is no problem. Is there a way to count the number of other Auras attached to same the card that Daybreak Coronet is attached? I didn't find anything in the xCount code but I wanted to make sure I didn't miss something before I tried to add code to do it.

Re: Card Development Questions

PostPosted: 09 Aug 2011, 14:40
by friarsol
ArsenalNut wrote:I am trying to script Daybreak Coronet. The initial attach is no problem. Is there a way to count the number of other Auras attached to same the card that Daybreak Coronet is attached? I didn't find anything in the xCount code but I wanted to make sure I didn't miss something before I tried to add code to do it.
Someone else will have to chime in for the the xCount question, but make sure the Coronet falls off properly if the other Aura is removed.