Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by Sloth » 13 Feb 2011, 10:26
Yes, maybe blockers are cleared before the damage is dealt to the defender.jeffwadsworth wrote:Does anyone see an issue with this script? It does not deal any damage to blocking creatures. Perhaps it is a timing issue.
-
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 Feb 2011, 19:01
While testing Abduction, I based its bounce ability on Shade's Form. Neither work. Does anyone see a possible solution to the issue?
- Code: Select all
Name:Abduction
ManaCost:2 U U
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:0/0
A:AB$GainControl | Cost$ 0 | ValidTgts$ Creature.AttachedBy | LoseControl$ LeavesPlay | Untap$ True | SpellDescription$ When CARDNAME enters the battlefield, untap enchanted creature. You control enchanted creature.
T:Mode$ ChangesZone | ValidCard$ Card.AttachedBy | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | Execute$ TrigReturnOwner | TriggerDescription$ When enchanted creature is put into a graveyard, return that card to the battlefield under its owner's control.
SVar:TrigReturnOwner:AB$ChangeZone | Cost$ 0 | Defined$ Enchanted | Origin$ Graveyard | Destination$ Battlefield
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/abduction.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 Sloth » 13 Feb 2011, 20:40
Did you try to use something like:jeffwadsworth wrote:While testing Abduction, I based its bounce ability on Shade's Form. Neither work. Does anyone see a possible solution to the issue?
- Code: Select all
Name:Abduction
ManaCost:2 U U
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:0/0
A:AB$GainControl | Cost$ 0 | ValidTgts$ Creature.AttachedBy | LoseControl$ LeavesPlay | Untap$ True | SpellDescription$ When CARDNAME enters the battlefield, untap enchanted creature. You control enchanted creature.
T:Mode$ ChangesZone | ValidCard$ Card.AttachedBy | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | Execute$ TrigReturnOwner | TriggerDescription$ When enchanted creature is put into a graveyard, return that card to the battlefield under its owner's control.
SVar:TrigReturnOwner:AB$ChangeZone | Cost$ 0 | Defined$ Enchanted | Origin$ Graveyard | Destination$ Battlefield
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/abduction.jpg
End
SVar:TrigReturnOwner:AB$ChangeZone | Cost$ 0 | Defined$ Triggered | Origin$ Graveyard | Destination$ Battlefield
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
by friarsol » 13 Feb 2011, 20:43
Jeff, check out False Demise. I wrote and tested that first before anything similar was written and it worked when I wrote it. It uses a script similar to what Sloth suggests.
Edit: Also, use the same Keyword that Control Magic uses for gaining control of the creature K:enControlCreature
Edit: Also, use the same Keyword that Control Magic uses for gaining control of the creature K:enControlCreature
- 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 » 13 Feb 2011, 22:08
Strange. When I used Defined$ Triggered in the script during testing, it would crash the client. Now it works. Eh, whatever. Thanks.
- 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 » 13 Feb 2011, 23:03
Does anyone have any problem with this script for Venomous Fangs? Its effect is not technically a deathtouch according to this ruling:
Test script for Venomous FangsIf the damaged creature takes both lethal damage and is destroyed by this effect, you have to regenerate the creature twice to keep it alive.
- Code: Select all
Name:Venomous Fangs
ManaCost:2 G
Types:Enchantment Aura
Text:no text
K:Enchant creature
K:enPump:0/0
K:stPumpEnchanted:Creature:0/0/Deathtouch:No Condition:Whenever enchanted creature deals damage to a creature, destroy the other creature.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/venomous_fangs.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 friarsol » 13 Feb 2011, 23:22
Is there no way to do this with triggers?
- 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 » 13 Feb 2011, 23:31
Tried using "Defined$ Card.DamagedBy" and a few other variations...nothing worked. I need a defined that targets the creature damaged by the enchanted card.
- 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 Chris H. » 14 Feb 2011, 00:35
I am trying to convert Venerated Teacher and I am stuck. I think that my problem is with the value that I give via ValidCards$ to AB$PutCounterAll. There are not a lot of examples that are similar enough for me to figure out.
- Venerated Teacher | Open
- Name:Venerated Teacher
ManaCost:2 U
Types:Creature Human Wizard
Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounters | TriggerDescription$ When CARDNAME enters the battlefield, put two level counters on each creature you control with level up.
SVar:TrigPutCounters:AB$PutCounterAll | Cost$ 0 | ValidCards$ Creature.countersLEVEL+YouCtrl | CounterType$ LEVEL | CounterNum$ 2
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/venerated_teacher.jpg
SetInfo:ROE|Common|http://magiccards.info/scans/en/roe/93.jpg
End
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by jeffwadsworth » 14 Feb 2011, 01:06
@Chris, how about ValidCards$ Creature.countersGE1LEVEL+YouCtrl?
- 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 Chris H. » 14 Feb 2011, 01:24
`jeffwadsworth wrote:@Chris, how about ValidCards$ Creature.countersGE1LEVEL+YouCtrl?
I am tempted to try this version as it may be more rules compliant:
- Code: Select all
ValidCards$ Creature.countersGE0LEVEL+YouCtrl
but this might catch all creatures I control, not just the ones with level up.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by Chris H. » 14 Feb 2011, 02:48
`Chris H. wrote:`jeffwadsworth wrote:@Chris, how about ValidCards$ Creature.countersGE1LEVEL+YouCtrl?
I am tempted to try this version as it may be more rules compliant:`
- Code: Select all
ValidCards$ Creature.countersGE0LEVEL+YouCtrl
but this might catch all creatures I control, not just the ones with level up.
I tried both and the results were as expected.
ValidCards$ Creature.countersGE1LEVEL+YouCtrl will not give two counters to creatures with level up that are at zero counters.
ValidCards$ Creature.countersGE0LEVEL+YouCtrl gives two counters to all of my creatures, even those without level up.
We probably would need some code to handle this situation:
ValidCards$ Creature.withLevelUp
But is it worth the additional work for just a single card?

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Card Development Questions
by slapshot5 » 14 Feb 2011, 04:16
Probably. It lets us code the code and script the card.Chris H. wrote:But is it worth the additional work for just a single card?
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by friarsol » 14 Feb 2011, 04:45
Why don't we just have the Level Up code add a different LevelUp keyword that doesn't get parsed, but will be handled for the .with<keyword> 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 Jaedayr » 14 Feb 2011, 21:13
Coded Royal Trooper but the normal link for the LQ pic does not work. Can anybody supply one, or even tell me how to go about finding working pics myself? Has not been added to SVN, waiting for pic. Feel free to fix and add if that is quicker than explaining here.
- Code: Select all
Name:Royal Trooper
ManaCost:2 W
Types:Creature Human Soldier
Text:no text
PT:2/2
T:Mode$ Blocks | ValidCard$ Card.Self | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME blocks, it gets +2/+2 until end of turn.
SVar:TrigPump:AB$Pump | Cost$ 0 | Defined$ Self | NumAtt$ 2 | NumDef$ 2
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/royal_trooper.jpg
SetInfo:S99|Uncommon|http://magiccards.info/scans/en/st/25.jpg
End
Who is online
Users browsing this forum: No registered users and 24 guests