Page 47 of 141

Re: Card Development Questions

PostPosted: 10 Jul 2011, 14:07
by jeffwadsworth
Would it be practical to convert the Leveler's to Static Effects? Below is a sample for Zulaport Enforcer:

| Open
Name:Zulaport Enforcer
ManaCost:B
Types:Creature Human Warrior
Text:no text
PT:1/1
K:Level up:4
K:maxLevel:3
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 3 | SetToughness$ 3 | CheckSVar$ X | SVarCompare$ EQ1 | Description$ LEVEL 1-2 3/3
S:Mode$ Continuous | Affected$ Card.Self | SetPower$ 5 | SetToughness$ 5 | AddKeyword$ HIDDEN CARDNAME can't be blocked except by black creatures. | CheckSVar$ Y | SVarCompare$ EQ1 | Description$ LEVEL 3+ 5/5 Can't be blocked by black creatures
SVar:X:Count$Valid Card.Self+countersGE1LEVEL+countersLT3LEVEL
SVar:Y:Count$Valid Card.Self+countersGE3LEVEL
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/zulaport_enforcer.jpg
SetInfo:ROE|Common|http://magiccards.info/scans/en/roe/133.jpg
End



Current script:

| Open
Name:Zulaport Enforcer
ManaCost:B
Types:Creature Human Warrior
Text:no text
PT:1/1
K:stSetPT:1:1:LevelGE1:3:3:LevelGE3:5:5:LEVEL 1-2 3/3 LEVEL 3+ 5/5 CARDNAME can't be blocked except by black creatures.
K:stPumpSelf:Creature.countersGE3LEVEL:0/0/HIDDEN CantBeBlockedBy Creature.nonBlack:No Condition:no text
K:Level up:4
K:maxLevel:3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/zulaport_enforcer.jpg
SetInfo:ROE|Common|http://magiccards.info/scans/en/roe/133.jpg
End


The Level Up text would need a space, but otherwise does this look okay?

Re: Card Development Questions

PostPosted: 10 Jul 2011, 14:57
by slapshot5
jeffwadsworth wrote:
friarsol wrote:
jeffwadsworth wrote:When a creature is put into the battlefield tapped and attacking, it does not show up in the game info window as attacking. Ideas? Yore-Tiller Nephilim is similar, but uses ValidTgts$ due to it pulling from the graveyard.
Does it have the attacking icon? It might just be the Combat Window isn't refreshing properly.
No damage is done by the chosen creature...only by the Kaalia of the Vast.
The Hidden resolve doesn't support Attacking$ True

-slapshot5

Re: Card Development Questions

PostPosted: 10 Jul 2011, 16:01
by jeffwadsworth
Testing new script for Yavimaya's Embrace:

| Open
Name:Yavimaya's Embrace
ManaCost:5 G U U
Types:Enchantment Aura
Text:no text
K:Enchant creature
A:SP$ Attach | Cost$ 5 G U U | ValidTgts$ Creature | AILogic$ GainControl
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 2 | AddToughness$ 2 | AddKeyword$ Trample | Description$ Enchanted creature gets +2/+2 and has trample.
SVar:PlayMain1:TRUE
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/yavimayas_embrace.jpg
SetInfo:APC|Rare|http://magiccards.info/scans/en/ap/127.jpg
End



If the AI has the card in hand, and plays any creature, this error occurs:


| Open
There is an error in the card code for Yavimaya's Embrace:



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.abilityFactory.AbilityFactory_Attach.attachAIControlPreference(AbilityFactory_Attach.java:211)
at forge.card.abilityFactory.AbilityFactory_Attach.attachToCardAIPreferences(AbilityFactory_Attach.java:166)
at forge.card.abilityFactory.AbilityFactory_Attach.attachPreference(AbilityFactory_Attach.java:140)
at forge.card.abilityFactory.AbilityFactory_Attach.attachCanPlayAI(AbilityFactory_Attach.java:459)
at forge.card.abilityFactory.AbilityFactory_Attach$1.canPlayAI(AbilityFactory_Attach.java:50)
at forge.ComputerUtil.canBePlayedAndPayedByAI(ComputerUtil.java:336)
at forge.ComputerAI_General.getPlayable(ComputerAI_General.java:261)
at forge.ComputerAI_General.getMain2(ComputerAI_General.java:185)
at forge.ComputerAI_General.playCards(ComputerAI_General.java:58)
at forge.ComputerAI_General.main2(ComputerAI_General.java:49)
at forge.ComputerAI_Input.think(ComputerAI_Input.java:83)
at forge.ComputerAI_Input.showMessage(ComputerAI_Input.java:47)
at forge.GuiInput.setInput(GuiInput.java:43)
at forge.GuiInput.update(GuiInput.java:32)
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.gui.input.Input_PassPriority.selectButtonOK(Input_PassPriority.java:50)
at forge.GuiInput.selectButtonOK(GuiInput.java:57)
at forge.GuiDisplay4.okButtonActionPerformed(GuiDisplay4.java:1122)
at forge.GuiDisplay4.access$3(GuiDisplay4.java:1121)
at forge.GuiDisplay4$32.actionPerformed(GuiDisplay4.java:875)
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)



Apparently, AILogic$ Pump works with StaticEffect, but GainControl doesn't?

Re: Card Development Questions

PostPosted: 10 Jul 2011, 16:16
by friarsol
It doesn't have to do with that. It was just a missed null check. There weren't any valid targets.

Re: Card Development Questions

PostPosted: 10 Jul 2011, 19:42
by jeffwadsworth
Duplicant. The script below just has the "power/toughness" part...no other checks until that part works.


| Open
Name:Duplicant
ManaCost:6
Types:Artifact Creature Shapeshifter
Text:no text
PT:2/4
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile target nontoken creature.
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Card.Creature+nonToken | ChangeNum$ 1
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ Y | Description$ As long as the exiled card is a creature card, CARDNAME has that card's power, toughness, and creature types. It's still a Shapeshifter.
SVar:X:Imprinted$CardPower
SVar:Y:Imprinted$CardToughness
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/duplicant.jpg
End


This does not work. Is it related to the Imprinted card being out of play?

Re: Card Development Questions

PostPosted: 10 Jul 2011, 19:52
by Sloth
jeffwadsworth wrote:Duplicant. The script below just has the "power/toughness" part...no other checks until that part works.


| Open
Name:Duplicant
ManaCost:6
Types:Artifact Creature Shapeshifter
Text:no text
PT:2/4
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile target nontoken creature.
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Card.Creature+nonToken | ChangeNum$ 1
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ Y | Description$ As long as the exiled card is a creature card, CARDNAME has that card's power, toughness, and creature types. It's still a Shapeshifter.
SVar:X:Imprinted$CardPower
SVar:Y:Imprinted$CardToughness
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/duplicant.jpg
End


This does not work. Is it related to the Imprinted card being out of play?
Imprinted is not handled in xcount. It was hacked into stPump to work somehow, but I think it would be better and easy to handle this in xcount using the expected expressions: count$ImprintedCardPower.

Re: Card Development Questions

PostPosted: 10 Jul 2011, 20:25
by jeffwadsworth
Thanks.

The reason I chose

SVar:X:Imprinted$CardPower
SVar:Y:Imprinted$CardToughness

is due to Phyrexian Ingester

| Open
Name:Phyrexian Ingester
ManaCost:6 U
Types:Creature Beast
Text:no text
PT:3/3
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint - When CARDNAME enters the battlefield, you may exile target nontoken creature.
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | ValidTgts$ Creature.nonToken | TgtPrompt$ Select target nontoken creature | Origin$ Battlefield | Destination$ Exile
K:stPumpSelf:Creature:X/Y:Imprint:CARDNAME gets +X/+Y, where X is the exiled creature card's power and Y is its toughness.
SVar:X:Imprinted$CardPower
SVar:Y:Imprinted$CardToughness
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_ingester.jpg
SetInfo:NPH|Rare|http://magiccards.info/scans/en/nph/41.jpg
End


Your suggestion did not work either.

Re: Card Development Questions

PostPosted: 10 Jul 2011, 20:40
by Sloth
jeffwadsworth wrote:Thanks. By the way, Veridian Betrayers will probably need PlayersPoisoned$ coded for StaticEffect.

The reason I chose

SVar:X:Imprinted$CardPower
SVar:Y:Imprinted$CardToughness

is due to Phyrexian Ingester

| Open
Name:Phyrexian Ingester
ManaCost:6 U
Types:Creature Beast
Text:no text
PT:3/3
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint - When CARDNAME enters the battlefield, you may exile target nontoken creature.
SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | ValidTgts$ Creature.nonToken | TgtPrompt$ Select target nontoken creature | Origin$ Battlefield | Destination$ Exile
K:stPumpSelf:Creature:X/Y:Imprint:CARDNAME gets +X/+Y, where X is the exiled creature card's power and Y is its toughness.
SVar:X:Imprinted$CardPower
SVar:Y:Imprinted$CardToughness
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_ingester.jpg
SetInfo:NPH|Rare|http://magiccards.info/scans/en/nph/41.jpg
End


Your suggestion did not work either.
I suggested it to be coded to be in xcount. It's not there yet.

Re: Card Development Questions

PostPosted: 11 Jul 2011, 01:04
by jeffwadsworth
Okay, I just need StaticAbility_Continuous to have a SetType$. For the check creature condition, the CheckSVar just makes sure the Imprinted card's toughness is GE1.

Re: Card Development Questions

PostPosted: 11 Jul 2011, 09:34
by Sloth
jeffwadsworth wrote:Okay, I just need StaticAbility_Continuous to have a SetType$. For the check creature condition, the CheckSVar just makes sure the Imprinted card's toughness is GE1.
Duplicant doesn't need SetType$ it should use AddType$. The unimplemented part is getting the creature types of the imprinted card as a parameter.

Re: Card Development Questions

PostPosted: 12 Jul 2011, 03:23
by jeffwadsworth
Script for Dead-Iron Sledge

| Open
Name:Dead-Iron Sledge
ManaCost:1
Types:Artifact Equipment
Text:no text
K:eqPump 2:0/0
T:Mode$ Blocks | ValidCard$ Creature.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigBlocks | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, destroy both creatures.
T:Mode$ AttackerBlocked | ValidCard$ Creature.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigBlocked | Secondary$ True | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, destroy both creatures.
SVar:TrigBlocks:AB$Destroy | Cost$ 0 | Defined$ TriggeredAttacker | SubAbility$ DBDestroy1
SVar:DBDestroy1:DB$Destroy | Defined$ Attached
SVar:TrigBlocked:AB$Destroy | Cost$ 0 | Defined$ TriggeredBlocker | SubAbility$ DBDestroy2
SVar:DBDestroy2:DB$Destroy | Defined$ Attached
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dead_iron_sledge.jpg
End


The blocker and attacker are destroyed, but the equipped card is not in both cases. I tried Creature.AttachedBy, Card.AttachedBy for the SubAbility Defined to no avail. Does someone see the issue?

Re: Card Development Questions

PostPosted: 12 Jul 2011, 03:37
by friarsol
jeffwadsworth wrote:Script for Dead-Iron Sledge

The blocker and attacker are destroyed, but the equipped card is not in both cases. I tried Creature.AttachedBy, Card.AttachedBy for the SubAbility Defined to no avail. Does someone see the issue?
Hmm try this?
Code: Select all
Name:Dead-Iron Sledge
ManaCost:1
Types:Artifact Equipment
Text:no text
K:eqPump 2:0/0
T:Mode$ Blocks | ValidCard$ Creature.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, destroy both creatures.
T:Mode$ AttackerBlocked | ValidCard$ Creature.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigDestroy| Secondary$ True | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, destroy both creatures.
SVar:TrigDestroy:AB$Destroy | Cost$ 0 | Defined$ TriggeredAttacker | SubAbility$ DBDestroy
SVar:DBDestroy:DB$Destroy | Defined$ TriggeredBlocker
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dead_iron_sledge.jpg
End

Re: Card Development Questions

PostPosted: 12 Jul 2011, 04:48
by jeffwadsworth
friarsol wrote:
jeffwadsworth wrote:Script for Dead-Iron Sledge

The blocker and attacker are destroyed, but the equipped card is not in both cases. I tried Creature.AttachedBy, Card.AttachedBy for the SubAbility Defined to no avail. Does someone see the issue?
Hmm try this?
Code: Select all
Name:Dead-Iron Sledge
ManaCost:1
Types:Artifact Equipment
Text:no text
K:eqPump 2:0/0
T:Mode$ Blocks | ValidCard$ Creature.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, destroy both creatures.
T:Mode$ AttackerBlocked | ValidCard$ Creature.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigDestroy| Secondary$ True | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, destroy both creatures.
SVar:TrigDestroy:AB$Destroy | Cost$ 0 | Defined$ TriggeredAttacker | SubAbility$ DBDestroy
SVar:DBDestroy:DB$Destroy | Defined$ TriggeredBlocker
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dead_iron_sledge.jpg
End
Yes, that worked. I didn't realize that TriggeredAttacker/TriggeredBlocker would both work off those two triggers. Thanks.

Re: Card Development Questions

PostPosted: 12 Jul 2011, 13:38
by jeffwadsworth
Converting Painter's Servant:

| Open
Name:Painter's Servant
ManaCost:2
Types:Artifact Creature Scarecrow
Text:no text
PT:1/3
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseColor | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose a color.\r\nAll cards that aren't on the battlefield, spells, and permanents are the chosen color in addition to their other colors.
S:Mode$ Continuous | Affected$ Card | AffectedZone$ Hand,Exile,Graveyard,Library,Stack | AddColor$ ChosenColor | Description$ All cards that aren't on the battlefield, spells, and permanents are the chosen color in addition to their other colors.
SVar:ChooseColor:AB$ ChooseColor | Cost$ 0 | Defined$ You
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/painters_servant.jpg
SetInfo:SHM|Rare|http://magiccards.info/scans/en/shm/257.jpg
End


The effect is changing the color of the cards on the battlefield also. Is there any way to restrict this?

Re: Card Development Questions

PostPosted: 12 Jul 2011, 13:44
by friarsol
jeffwadsworth wrote:The effect is changing the color of the cards on the battlefield also. Is there any way to restrict this?
Firstly it should change things on the battlefield "and permanents"
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.