Page 75 of 141

Re: Card Development Questions

PostPosted: 14 Nov 2011, 12:27
by moomarc
Flickering Ward | Open
Name:Flickering Ward
ManaCost:W
Types:Enchantment Aura
Text:no text
K:Enchant creature
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseColor | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose a color.
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInHumanDeck
A:SP$ Attach | Cost$ W | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddKeyword$ Protection:Card.ChosenColor:CARDNAME has protection from the chosen color. | Description$ Enchanted creature has protection from the chosen color. This effect doesn't remove Flickering Ward.
A:AB$ ChangeZone | Cost$ W | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return CARDNAME to its owner's hand.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/flickering_ward.jpg
End
At the moment the enchanted creature can't access the ChosenColor because it's stored on the aura card. Is there any way to pass the chosen color on to the enchanted creature to make this work? If not, is there a way to script the condition 'ChosenColor is White' in which case a static ability with a conditional can be set up for each color? There's 4 other auras with the exact same phrasing.

Edit: Actually the second option is better because it won't cause any issues if the enchanted creature already has a chosen color.

Re: Card Development Questions

PostPosted: 15 Nov 2011, 04:10
by Iran

Re: Card Development Questions

PostPosted: 15 Nov 2011, 12:15
by moomarc
Can anyone see the problem with this script.
No Quarter | Open
Name:No Quarter
ManaCost:3 R
Types:Enchantment
Text:no text
T:Mode$ Blocks | ValidCard$ Creature.powerLTX | ValidBlocked$ Creature | Execute$ DestroyBlocker | TriggerDescription$ Whenever a creature becomes blocked by a creature with lesser power, destroy the blocking creature.
T:Mode$ Blocks | ValidCard$ Creature | ValidBlocked$ Creature.powerLTY | Execute$ DestroyAttacker | TriggerDescription$ Whenever a creature blocks a creature with lesser power, destroy the attacking creature.
SVar:X:TriggeredAttacker$CardPower
SVar:Y:TriggeredBlocker$CardPower
SVar:DestroyBlocker:AB$Destroy | Cost$ 0 | Defined$ TriggeredBlocker
SVar:DestroyAttacker:AB$Destroy | Cost$ 0 | Defined$ TriggeredAttacker
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/no_quarter.jpg
End

I get the following NPE whenever it triggers:
Error | 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.

null


Version:
Forge version SVN

OS: Windows 7 Version: 6.1 Architecture: x86

Java Version: 1.6.0_29 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.NullPointerException
at forge.card.cardfactory.CardFactoryUtil.xCount(CardFactoryUtil.java:2874)
at forge.Card.hasProperty(Card.java:6649)
at forge.Card.isValid(Card.java:6284)
at forge.GameEntity.isValid(GameEntity.java:302)
at forge.card.trigger.Trigger.matchesValid(Trigger.java:531)
at forge.card.trigger.TriggerBlocks.performTest(TriggerBlocks.java:39)
at forge.card.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:374)
at forge.card.trigger.TriggerHandler.runTrigger(TriggerHandler.java:300)
at forge.CombatUtil.checkBlockedAttackers(CombatUtil.java:2383)
at forge.PhaseUtil.handleDeclareBlockers(PhaseUtil.java:602)
at forge.Phase.handleBeginPhase(Phase.java:331)
at forge.gui.input.InputControl.updateInput(InputControl.java:183)
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.Phase.nextPhase(Phase.java:509)
at forge.Phase.nextPhase(Phase.java:512)
at forge.GuiDisplay$33.actionPerformed(GuiDisplay.java:1144)
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: 15 Nov 2011, 17:42
by jeffwadsworth
Looks like a timing issue with ValidBlocked$ Creature.powerLTY, etc in regards to xCount. Everything else looks okay.

Re: Card Development Questions

PostPosted: 15 Nov 2011, 17:48
by jeffwadsworth
Malfegor is doable. Look for it soon.

Re: Card Development Questions

PostPosted: 15 Nov 2011, 18:05
by moomarc
jeffwadsworth wrote:Looks like a timing issue with ValidBlocked$ Creature.powerLTY, etc in regards to xCount. Everything else looks okay.
Timing issues have killed more cards than anything else. #-o Thanks for the feedback.

Re: Card Development Questions

PostPosted: 16 Nov 2011, 13:32
by Iran
Trying to script Manamorphose. I thought of something this way, but unfortunately it doesn't work.

"Manamorphose" | Open
Name:Manamorphose
ManaCost:1 RG
Types:Instant
Text:no text
A:AB$ Mana | Cost$ 1 RG | Produced$ B B | SpellDescription$ Add B B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B G | SpellDescription$ Add B G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B U | SpellDescription$ Add B U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B R | SpellDescription$ Add B R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B W | SpellDescription$ Add B W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G B | SpellDescription$ Add G B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G G | SpellDescription$ Add G G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G U | SpellDescription$ Add G U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G R | SpellDescription$ Add G R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G W | SpellDescription$ Add G W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U B | SpellDescription$ Add U B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U G | SpellDescription$ Add U G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U U | SpellDescription$ Add U U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U R | SpellDescription$ Add U R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U W | SpellDescription$ Add U W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R B | SpellDescription$ Add R B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R G | SpellDescription$ Add R G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R U | SpellDescription$ Add R U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R R | SpellDescription$ Add R R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R W | SpellDescription$ Add R W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W B | SpellDescription$ Add W B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W G | SpellDescription$ Add W G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W U | SpellDescription$ Add W U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W R | SpellDescription$ Add W R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W W | SpellDescription$ Add W W to your mana pool.
End

Re: Card Development Questions

PostPosted: 16 Nov 2011, 13:59
by jeffwadsworth
Iran wrote:Trying to script Manamorphose. I thought of something this way, but unfortunately it doesn't work.

"Manamorphose" | Open
Name:Manamorphose
ManaCost:1 RG
Types:Instant
Text:no text
A:AB$ Mana | Cost$ 1 RG | Produced$ B B | SpellDescription$ Add B B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B G | SpellDescription$ Add B G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B U | SpellDescription$ Add B U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B R | SpellDescription$ Add B R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ B W | SpellDescription$ Add B W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G B | SpellDescription$ Add G B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G G | SpellDescription$ Add G G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G U | SpellDescription$ Add G U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G R | SpellDescription$ Add G R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ G W | SpellDescription$ Add G W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U B | SpellDescription$ Add U B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U G | SpellDescription$ Add U G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U U | SpellDescription$ Add U U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U R | SpellDescription$ Add U R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ U W | SpellDescription$ Add U W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R B | SpellDescription$ Add R B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R G | SpellDescription$ Add R G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R U | SpellDescription$ Add R U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R R | SpellDescription$ Add R R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ R W | SpellDescription$ Add R W to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W B | SpellDescription$ Add W B to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W G | SpellDescription$ Add W G to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W U | SpellDescription$ Add W U to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W R | SpellDescription$ Add W R to your mana pool.
A:AB$ Mana | Cost$ 1 RG | Produced$ W W | SpellDescription$ Add W W to your mana pool.
End
This is why we don't script these. It gets out of control.

Re: Card Development Questions

PostPosted: 16 Nov 2011, 14:52
by friarsol
Manamorphose will probably have to wait for this feature to be added: http://cardforge.org/bugz/view.php?id=163

Re: Card Development Questions

PostPosted: 16 Nov 2011, 15:46
by jeffwadsworth
Perhaps someone can get this to work correctly. Script for Mercy Killing.

| Open
Name:Mercy Killing
ManaCost:2 GW
Types:Instant
Text:no text
A:SP$ Sacrifice | Cost$ 2 GW | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBToken | SpellDescription$ Target creature's controller sacrifices it, then puts X 1/1 green and white Elf Warrior creature tokens onto the battlefield, where X is that creature's power.
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenPower$ 1 | TokenToughness$ 1 | TokenName$ Elf Warrior | TokenTypes$ Creature,Elf,Warrior | TokenColors$ Green,White | TokenOwner$ TargetedController
SVar:X:Targeted$CardPower
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/mercy_killing.jpg
End


The targeted creature controller does not have to sacrifice it with this script. Perhaps there is another way?

Re: Card Development Questions

PostPosted: 16 Nov 2011, 15:53
by moomarc
Does Mandatory$ True not work? Not near my computer at the moment so can't try it.

Re: Card Development Questions

PostPosted: 16 Nov 2011, 17:22
by Iran
jeffwadsworth wrote:
Iran wrote:Is possible to script Garza's Assassin and Deepcavern Imp?
I think the cost of Recover and Echo keywords of these cards is dificult to implement... Am I right?
The Imp can not handle Echo non-mana costs. Anyway, the Assassin will be ready once the keyword Recover is fixed.

| Open
Name:Garza's Assassin
ManaCost:B B B
Types:Creature Human Assassin
Text:no text
PT:2/2
K:Recover:PayLife<X>
A:AB$ Destroy | Cost$ Sac<1/CARDNAME> | ValidTgts$ Creature.nonBlack | TgtPrompt$ Select target nonblack creature | SpellDescription$ Destroy target nonblack creature.
SVar:X:Count$YourLifeTotal/HalfUp
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/garzas_assassin.jpg
End
what pitty, because of the imp :(

Re: Card Development Questions

PostPosted: 16 Nov 2011, 17:26
by jeffwadsworth
moomarc wrote:Does Mandatory$ True not work? Not near my computer at the moment so can't try it.
No, I believe the issue is related to the way Sacrifice is coded.

Re: Card Development Questions

PostPosted: 16 Nov 2011, 19:04
by Sloth
jeffwadsworth wrote:
moomarc wrote:Does Mandatory$ True not work? Not near my computer at the moment so can't try it.
No, I believe the issue is related to the way Sacrifice is coded.
You have to use AF Destroy instead. Look at Shape Anew.

Re: Card Development Questions

PostPosted: 16 Nov 2011, 20:51
by jeffwadsworth
Is there still an issue with Sarkhan the Mad's script? That Destroy "Sacrifice" addition would cover the second ability at least.