Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Sloth » 12 Jul 2011, 13:59
Yes, we need something to change spells. And cards on the stack also doesn't work at the moment (as seen with the "CARDNAME can't be countered" effects). My guess is that state based effect are checked before a card is moved to the stack and not after.friarsol wrote:Firstly it should change things on the battlefield "and permanents"jeffwadsworth wrote:The effect is changing the color of the cards on the battlefield also. Is there any way to restrict this?
Secondly, did you already remove the hardcoded Servant bits?
Edit: We may need a separate line for Spells on the Stack. Not sure if "Cards" on the Stack quite do it.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by jeffwadsworth » 13 Jul 2011, 21:57
Skinshifter
The keywords trample and flying do not go away once the card is animated from one creature type into another on the same turn. Is there a way to do this currently?
- | Open
- Name:Skinshifter
ManaCost:1 G
Types:Creature Human Shaman
Text:no text
PT:1/1
A:AB$ Animate | Cost$ G | Power$ 4 | Toughness$ 4 | OverwriteTypes$ True | Types$ Creature,Rhino | Keywords$ Trample | ActivationLimit$ 1 | PrecostDesc$ Choose one - | SpellDescription$ Until end of turn, CARDNAME becomes a 4/4 Rhino and gains trample;
A:AB$ Animate | Cost$ G | Power$ 2 | Toughness$ 2 | OverwriteTypes$ True | Types$ Creature,Bird | Keywords$ Flying | ActivationLimit$ 1 | SpellDescription$ or until end of turn, CARDNAME becomes a 2/2 Bird and gains flying;
A:AB$ Animate | Cost$ G | Power$ 0 | Toughness$ 8 | OverwriteTypes$ True | Types$ Creature,Plant | ActivationLimit$ 1 | SpellDescription$ or until end of turn, CARDNAME becomes a 0/8 Plant. Activate this ability only once each turn.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/skinshifter.jpg
End
The keywords trample and flying do not go away once the card is animated from one creature type into another on the same turn. Is there a way to do this currently?
- 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 » 13 Jul 2011, 22:00
For Skinshifter
I don't think they would go away, but there's a deeper problem here, since all of the Animates are one ability, you shouldn't be able to activate a "different one" a "second time" so this will have to wait until we get an AF that handles this situation.
I don't think they would go away, but there's a deeper problem here, since all of the Animates are one ability, you shouldn't be able to activate a "different one" a "second time" so this will have to wait until we get an AF that handles this situation.
- 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 » 14 Jul 2011, 16:34
Gaze of Pain:
After selecting yes to activate the trigger, this Null error occurs:
Anyone see a way that might fix this issue?
- | Open
- Name:Gaze of Pain
ManaCost:1 B
Types:Sorcery
Text:no text
A:SP$ Effect | Cost$ 1 B | Name$ Gaze of Pain Effect | Triggers$ TrigAttackerUnblocked | SVars$ Damage,DBPump,X
SVar:TrigAttackerUnblocked:Mode$ AttackerUnblocked | ValidCard$ Creature.YouCtrl | Execute$ Damage | OptionalDecider$ You | TriggerDescription$ Until end of turn, whenever a creature you control attacks and isn't blocked, you may choose to have it deal damage equal to its power to a target creature. If you do, it assigns no combat damage this turn.
SVar:Damage:AB$DealDamage | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumDmg$ X | SubAbility$ DBPump
SVar:DBPump:DB$Pump | Defined$ TriggeredCard | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME.
SVar:X:TriggeredCard$CardPower
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/gaze_of_pain.jpg
End
After selecting yes to activate the trigger, this Null error occurs:
- | Open
- null
Version:
Forge -- official beta: $Date: 2011-07-01 23:20:39 -0500 (Fri, 01 Jul 2011) $, SVN revision: $Revision: 10300 $
OS: Windows 7 Version: 6.1 Architecture: amd64
Java Version: 1.6.0_26 Vendor: Sun Microsystems Inc.
Detailed error trace:
java.lang.NullPointerException
at forge.card.cardFactory.CardFactoryUtil.xCount(CardFactoryUtil.java:2744)
at forge.card.cardFactory.CardFactoryUtil.handlePaid(CardFactoryUtil.java:3259)
at forge.card.abilityFactory.AbilityFactory.calculateAmount(AbilityFactory.java:1130)
at forge.card.abilityFactory.AbilityFactory_DealDamage.getNumDamage(AbilityFactory_DealDamage.java:201)
at forge.card.abilityFactory.AbilityFactory_DealDamage.doResolve(AbilityFactory_DealDamage.java:602)
at forge.card.abilityFactory.AbilityFactory_DealDamage.access$3(AbilityFactory_DealDamage.java:599)
at forge.card.abilityFactory.AbilityFactory_DealDamage$1.resolve(AbilityFactory_DealDamage.java:60)
at forge.card.abilityFactory.AbilityFactory.resolve(AbilityFactory.java:1655)
at forge.card.spellability.SpellAbility_Requirements.finishPaying(SpellAbility_Requirements.java:136)
at forge.card.spellability.Cost_Payment.payCost(Cost_Payment.java:565)
at forge.card.spellability.SpellAbility_Requirements.startPaying(SpellAbility_Requirements.java:127)
at forge.card.spellability.SpellAbility_Requirements.needPayment(SpellAbility_Requirements.java:117)
at forge.card.spellability.SpellAbility_Requirements.fillRequirements(SpellAbility_Requirements.java:90)
at forge.GameAction.playSpellAbility_NoStack(GameAction.java:2054)
at forge.card.trigger.TriggerHandler$2.resolve(TriggerHandler.java:900)
at forge.card.abilityFactory.AbilityFactory.resolve(AbilityFactory.java:1655)
at forge.MagicStack.resolveStack(MagicStack.java:782)
at forge.Phase.passPriority(Phase.java:697)
at forge.ComputerAI_General.stackResponse(ComputerAI_General.java:442)
at forge.ComputerAI_General.stack_not_empty(ComputerAI_General.java:387)
at forge.gui.input.InputControl.updateInput(InputControl.java:183)
at forge.GuiInput.update(GuiInput.java:30)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at forge.MyObservable.updateObservers(MyObservable.java:17)
at forge.gui.input.InputControl.resetInput(InputControl.java:89)
at forge.Phase.passPriority(Phase.java:688)
at forge.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:46)
at forge.GuiInput.selectButtonOK(GuiInput.java:57)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:1117)
at forge.GuiDisplay4.access$3(GuiDisplay4.java:1116)
at forge.GuiDisplay4$32.actionPerformed(GuiDisplay4.java:870)
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)
Anyone see a way that might fix this issue?
- 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 Hellfish » 14 Jul 2011, 16:49
The null error is probably because of the X SVar. TriggeredCard was replaced by all the different Triggered-variables. TriggeredAttacker is the only one available for AttackerUnblocked.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Card Development Questions
by jeffwadsworth » 14 Jul 2011, 16:58
Yes, thanks.Hellfish wrote:The null error is probably because of the X SVar. TriggeredCard was replaced by all the different Triggered-variables. TriggeredAttacker is the only one available for AttackerUnblocked.
- 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 » 15 Jul 2011, 03:55
The card Mountain Titan is interesting. To my knowledge, it can't be done as an Effect, because you can't define it. Nor can it be done with StaticAbility due to the cost requirement. Does anyone see another way?
And while we are at it, Krovikan Vampire. I tried multiple ways to get this thing scripted, but nothing has worked so far.
And while we are at it, Krovikan Vampire. I tried multiple ways to get this thing scripted, but nothing has worked so far.
- 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 » 15 Jul 2011, 04:53
Ensouled Scimitar
Apparently, more work is needed for animated equipment.
- | Open
- Name:Ensouled Scimitar
ManaCost:3
Types:Artifact Equipment
Text:no text
K:eqPump 2:1/5
A:AB$ Animate | Cost$ 3 | Defined$ Self | Power$ 1 | Toughness$ 5 | Types$ Creature,Artifact,Spirit | Keywords$ Flying | SpellDescription$ CARDNAME becomes a 1/5 Spirit artifact creature with flying until end of turn. (Equipment that's a creature can't equip a creature.)
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/ensouled_scimitar.jpg
End
Apparently, more work is needed for animated equipment.
- 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 Hellfish » 15 Jul 2011, 06:28
Once we can AF_Pump triggers, Mountain Titan should be good.Currently you can only get the size of ThisTurnEntered lists(which seem a bit bugged,either way),so no Krovikan Vampire yet.
Re:Ensouled Scimitar.
I thought as much.
A check to detach it in the right place in AF_Animate and a check wether it's a creature or not in AF_Attach would be needed.
Re:Ensouled Scimitar.
I thought as much.
A check to detach it in the right place in AF_Animate and a check wether it's a creature or not in AF_Attach would be needed.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Card Development Questions
by jeffwadsworth » 16 Jul 2011, 22:26
Psychic Overload
The Tap AB can't use Targeted here. Would this need a Tap$ in the Attach AB?
- | Open
- Name:Psychic Overload
ManaCost:3 U
Types:Enchantment Aura
Text:no text
K:Enchant permanent
A:SP$ Attach | Cost$ 3 U | ValidTgts$ Permanent | AILogic$ Curse
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap enchanted permanent.
SVar:TrigTap:AB$Tap | Cost$ 0 | Defined$ Targeted
S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddKeyword$ HIDDEN CARDNAME doesn't untap during your untap step. | AddAbility$ Untap | Description$ Enchanted permanent doesn't untap during its controller's untap step. Enchanted permanent has "Discard two artifact cards: Untap this permanent."
SVar:Untap:AB$Untap | Cost$ Discard<2/Artifact> | Defined$ Self | SpellDescription$ Discard two artifact cards: Untap this permanent.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/psychic_overload.jpg
End
The Tap AB can't use Targeted here. Would this need a Tap$ in the Attach AB?
- 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 » 17 Jul 2011, 00:08
Nope not in the Attach. Did you try Defined$ Enchanted ?
- 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 » 17 Jul 2011, 03:25
That worked. Thanks Sol. It would be nice if those Defined checks were in one spot.friarsol wrote:Nope not in the Attach. Did you try Defined$ Enchanted ?
- 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 » 17 Jul 2011, 12:41
They are: AbilityFactory.getDefinedCards()jeffwadsworth wrote:That worked. Thanks Sol. It would be nice if those Defined checks were in one spot.friarsol wrote:Nope not in the Attach. Did you try Defined$ Enchanted ?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by beholder » 17 Jul 2011, 18:26
Making one of my first decks I found a card I wanted was missing (Mana Flare) so I toyed around a bit and made it. But unfortunately the AI can't handle it at all. It just taps 2 lands for 2 mana, never realizing that 1 land is enough. Any suggestions?
- Code: Select all
Name:Mana Flare
ManaCost:2 R
Types:Enchantment
Text:no text
T:Mode$ TapsForMana | ValidCard$ Land | Execute$ TrigMana | TriggerZones$ Battlefield | TriggerDescription$ Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced.
SVar:TrigMana:AB$ManaReflected | Cost$ 0 | ColorOrType$ Type | Valid$ Defined.Triggered | ReflectProperty$ Produced | Defined$ TriggeredPlayer
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/mana_flare.jpg
SetInfo:5ED|Rare|http://magiccards.info/scans/en/5e/249.jpg
End
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
beholder - Programmer
- Posts: 123
- Joined: 17 Jul 2011, 17:56
- Location: Netherlands
- Has thanked: 16 times
- Been thanked: 25 times
Re: Card Development Questions
by jeffwadsworth » 17 Jul 2011, 20:55
Beholder, I can add your card if you wish.
On a side note; the card Shred Memory:
Obviously, the target player part is not by the book. Is there another way that is acceptable?
On a side note; the card Shred Memory:
- | Open
- Name:Shred Memory
ManaCost:1 B
Types:Instant
Text:no text
K:Transmute:1 B B
A:SP$ ChangeZone | Cost$ 1 B | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card | ChangeNum$ 4 | Hidden$ True | ValidTgts$ Player | TgtPrompt$ Select target player | SpellDescription$ Exile up to four target cards from a single graveyard.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/shred_memory.jpg
End
Obviously, the target player part is not by the book. Is there another way that is acceptable?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Who is online
Users browsing this forum: No registered users and 20 guests