Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by SoulStorm » 27 Oct 2011, 20:38
Thanks for the help Moomarc and Chris. None of those suggestions worked, however. But then I got radical and deleted and reinstalled everything, and now it's working fine.
The only thing I haven't done is download and install the Maven zip file and mess around with those dependencies. I have limited experience with such things, so I think I'll wait until I'm feeling more motivated before playing around with that. I also probably need to email someone to get commit permission again, so if someone would like to commit the Explorer's Scope in the meantime please do so.
Thanks again!
One more thing. I noticed that putting a land into play doesn't seen to be optional even though I included Optional$ True.

The only thing I haven't done is download and install the Maven zip file and mess around with those dependencies. I have limited experience with such things, so I think I'll wait until I'm feeling more motivated before playing around with that. I also probably need to email someone to get commit permission again, so if someone would like to commit the Explorer's Scope in the meantime please do so.
Thanks again!
One more thing. I noticed that putting a land into play doesn't seen to be optional even though I included Optional$ True.
Re: Card Development Questions
by friarsol » 28 Oct 2011, 00:33
Commit permission is given by going to User Control Panel, then Usergroups and adding yourself to Developers Forge.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 28 Oct 2011, 19:17
Looking at Coalition Victory. This appears to need multiple conditionals. I am thinking something like:
SP$ WinsGame | Cost$ 0 | Defined$ You | ConditionPresent$ Swamp.YouCtrl | ConditionCompare$ GE1 | ConditionPresent2$ Plains.YouCtrl | ConditionCompare2$ GE1, etc
Does anyone see an alternative?
SP$ WinsGame | Cost$ 0 | Defined$ You | ConditionPresent$ Swamp.YouCtrl | ConditionCompare$ GE1 | ConditionPresent2$ Plains.YouCtrl | ConditionCompare2$ GE1, etc
Does anyone see an alternative?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 28 Oct 2011, 19:24
We should be able to do this with Math and a single SVar adding up the required parts. Also, you can use Domain for the Basic Lands.(SVar:X:Count$Domain)jeffwadsworth wrote:Looking at Coalition Victory. This appears to need multiple conditionals. I am thinking something like:
SP$ WinsGame | Cost$ 0 | Defined$ You | ConditionPresent$ Swamp.YouCtrl | ConditionCompare$ GE1 | ConditionPresent2$ Plains.YouCtrl | ConditionCompare2$ GE1, etc
Does anyone see an alternative?
The Final SVar would be compared to 10 most likely.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 28 Oct 2011, 19:37
Well, we would need a domain type deal for creatures.friarsol wrote:We should be able to do this with Math and a single SVar adding up the required parts. Also, you can use Domain for the Basic Lands.(SVar:X:Count$Domain)jeffwadsworth wrote:Looking at Coalition Victory. This appears to need multiple conditionals. I am thinking something like:
SP$ WinsGame | Cost$ 0 | Defined$ You | ConditionPresent$ Swamp.YouCtrl | ConditionCompare$ GE1 | ConditionPresent2$ Plains.YouCtrl | ConditionCompare2$ GE1, etc
Does anyone see an alternative?
The Final SVar would be compared to 10 most likely.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 28 Oct 2011, 19:42
Domain should only return you from 0-5 (we already use it for things). Maybe it'd be simplest to just add Property similar to Domain but for Colored Creatures. That way we'd just have Domain + "Coalition" Compared EQ 10.jeffwadsworth wrote:Well, the problem with that approach is if you have more than 1 of any one thing. 2 swamps, etc. Unless you have a magical way to differentiate.friarsol wrote:We should be able to do this with Math and a single SVar adding up the required parts. Also, you can use Domain for the Basic Lands.(SVar:X:Count$Domain)jeffwadsworth wrote:Looking at Coalition Victory. This appears to need multiple conditionals. I am thinking something like:
SP$ WinsGame | Cost$ 0 | Defined$ You | ConditionPresent$ Swamp.YouCtrl | ConditionCompare$ GE1 | ConditionPresent2$ Plains.YouCtrl | ConditionCompare2$ GE1, etc
Does anyone see an alternative?
The Final SVar would be compared to 10 most likely.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 28 Oct 2011, 19:53
Yes, I changed my original reply, but not fast enough apparently. I will add that domain deal for creatures.friarsol wrote:Domain should only return you from 0-5 (we already use it for things). Maybe it'd be simplest to just add Property similar to Domain but for Colored Creatures. That way we'd just have Domain + "Coalition" Compared EQ 10.jeffwadsworth wrote:Well, the problem with that approach is if you have more than 1 of any one thing. 2 swamps, etc. Unless you have a magical way to differentiate.friarsol wrote:[
We should be able to do this with Math and a single SVar adding up the required parts. Also, you can use Domain for the Basic Lands.(SVar:X:Count$Domain)
The Final SVar would be compared to 10 most likely.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by jeffwadsworth » 28 Oct 2011, 21:12
Anyway to get the conditionals to use X?
Example:
Example:
- | Open
- Name:Coalition Victory
ManaCost:3 W U B R G
Types:Sorcery
Text:no text
A:SP$ WinsGame | Cost$ 3 W U B R G | Defined$ You | ConditionDefined$ X | ConditionCompare$ EQ10 | Description$ If you have all basic lands and all colored creatures, you win dude.
SVar:Y:Count$ColoredCreatures
SVar:Z:Count$Domain
SVar:X:Count$Y/Plus.Z
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/coalition_victory.jpg
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by jeffwadsworth » 28 Oct 2011, 21:28
I do not believe that is the correct conditional.friarsol wrote:CheckSVar$ X I think?
- | Open
- When Coalition Victory resolves, it checks for the five basic land types (Plains, Island, Swamp, Mountain, Forest) and the five colors (white, blue, black, red, green). If a single land has multiple types and/or a single creature is multiple colors, it will count all those types and/or colors.
Thus, I think we need your Condition script code here...otherwise the spell does not fire.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 29 Oct 2011, 03:54
I see what the problem is. The same "CheckSVar" parameter is listed in both Conditionals and Restrictions. We'll need to rename the Conditional one to ConditionCheckSVar so it's only checked on resolution, and not checked in both slots. I wonder if there's a bug with cards that use this that you can Activate them when the CheckSVar passes, but don't resolve if the CheckSVar fails during Resolution.jeffwadsworth wrote:I do not believe that is the correct conditional.
Thus, I think we need your Condition script code here...otherwise the spell does not fire.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 29 Oct 2011, 15:33
Converting Tezzeret the Seeker to script. The changezone is failing to work in the following script. If I substitute a number for X in the "ChangeType$ Artifact.cmcEQX", it works perfectly. With X, it shows me the library, but nothing after that.
- | Open
- Name:Tezzeret the Seeker
ManaCost:3 U U
Types:Planeswalker Tezzeret
Text:no text
Loyalty:4
A:AB$ Untap | Cost$ AddCounter<1/LOYALTY> | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | TargetMin$ 0 | TargetMax$ 2 | Planeswalker$ True | SpellDescription$ Untap up to two target artifacts.
A:AB$ ChangeZone | Cost$ SubCounter<X/LOYALTY> | Origin$ Library | Destination$ Battlefield | ChangeType$ Artifact.cmcEQX | ChangeNum$ 1 | Planeswalker$ True | SpellDescription$ Search your library for an artifact card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.
A:AB$ AnimateAll | Cost$ SubCounter<5/LOYALTY> | ValidCards$ Artifact.YouCtrl | Power$ 5 | Toughness$ 5 | Types$ Creature,Artifact | Planeswalker$ True | Ultimate$ True | SpellDescription$ Artifacts you control become 5/5 artifact creatures until end of turn.
SVar:X:XChoice
SVar:Rarity:Mythic
SVar:Picture:http://www.wizards.com/global/images/magic/general/tezzeret_the_seeker.jpg
SetInfo:ALA|Mythic|http://magiccards.info/scans/en/ala/60.jpg
Oracle:[+1] Untap up to two target artifacts.\n-X: Search your library for an artifact card with converted mana cost X or less and put it onto the battlefield. Then shuffle your library.\n[-5] Artifacts you control become 5/5 artifact creatures until end of turn.
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 29 Oct 2011, 15:37
I believe you need to be using "ChosenX" as the Value. Like how it's used in other places.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 29 Oct 2011, 16:05
ChosenX in the place of X (ChangeType$ Artifact.cmcEQChosenX) causes this error:friarsol wrote:I believe you need to be using "ChosenX" as the Value. Like how it's used in other places.
- | Open
- This is a Crash Report. An error has occurred. Please save this message to a file.
Please follow the instructions at this address to submit this Crash Report, plus what you were doing at the time:
http://tinyurl.com/3zzrnyb
Reporting bugs in Forge is very important. We thank you for your time.
For input string: "ChosenX"
Version:
Forge version SVN
OS: Windows 7 Version: 6.1 Architecture: amd64
Java Version: 1.6.0_26 Vendor: Sun Microsystems Inc.
Detailed error trace:
java.lang.NumberFormatException: For input string: "ChosenX"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at forge.Card.hasProperty(Card.java:6643)
at forge.Card.isValid(Card.java:6302)
at forge.GameEntity.isValid(GameEntity.java:302)
at forge.CardList$16.addCard(CardList.java:812)
at forge.CardFilter.filter(CardFilter.java:268)
at forge.CardList.filter(CardList.java:639)
at forge.CardList.getValidCards(CardList.java:810)
at forge.card.abilityFactory.AbilityFactory.filterListByType(AbilityFactory.java:2168)
at forge.card.abilityFactory.AbilityFactory_ChangeZone.changeHiddenOriginResolveHuman(AbilityFactory_ChangeZone.java:789)
at forge.card.abilityFactory.AbilityFactory_ChangeZone.changeHiddenOriginResolve(AbilityFactory_ChangeZone.java:703)
at forge.card.abilityFactory.AbilityFactory_ChangeZone.changeZoneResolve(AbilityFactory_ChangeZone.java:330)
at forge.card.abilityFactory.AbilityFactory_ChangeZone.access$1(AbilityFactory_ChangeZone.java:325)
at forge.card.abilityFactory.AbilityFactory_ChangeZone$1.resolve(AbilityFactory_ChangeZone.java:72)
at forge.card.abilityFactory.AbilityFactory.resolve(AbilityFactory.java:2283)
at forge.MagicStack.resolveStack(MagicStack.java:866)
at forge.Phase.passPriority(Phase.java:805)
at forge.ComputerAI_General.stackResponse(ComputerAI_General.java:520)
at forge.ComputerAI_General.stackNotEmpty(ComputerAI_General.java:460)
at forge.gui.input.InputControl.updateInput(InputControl.java:241)
at forge.GuiInput.update(GuiInput.java:34)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at forge.MyObservable.updateObservers(MyObservable.java:21)
at forge.gui.input.InputControl.resetInput(InputControl.java:128)
at forge.Phase.passPriority(Phase.java:795)
at forge.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:54)
at forge.GuiInput.selectButtonOK(GuiInput.java:68)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:1416)
at forge.GuiDisplay4.access$25(GuiDisplay4.java:1415)
at forge.GuiDisplay4$33.actionPerformed(GuiDisplay4.java:1136)
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)
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 29 Oct 2011, 18:35
Ah. Well ChosenX is right for the Variable. CMC (as well as power and toughness) just don't use variables in the right manner.
- Code: Select all
if (property.substring(z).equals("X")) {
x = CardFactoryUtil.xCount(source, source.getSVar("X"));
} else if (property.substring(z).equals("Y")) {
x = CardFactoryUtil.xCount(source, source.getSVar("Y"));
} else {
x = Integer.parseInt(property.substring(z));
}
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Who is online
Users browsing this forum: No registered users and 31 guests