Page 1 of 1

A Little "Tool" to Assist with Testing Scripts

PostPosted: 13 Jan 2012, 17:52
by moomarc
I've found that at times it can be arduous to build decks for testing scripts so I've created a Developer's Little Helper:
Trained Kraj | Open
Code: Select all
Name:Trained Kraj
ManaCost:0
Types:Legendary Creature Kraj
Text:This card is for the developers to use for testing different situations that can't be done through normal DevMode functions:

#These should make the AI ignore it mostly but not die too easily:
PT:0/4
K:Hexproof
K:CARDNAME can't attack or block.

# Basic damage and gaining/losing life that will trigger life gain/loss counts:
A:AB$ GainLife | Cost$ 0 | ValidTgts$ Player | TgtPrompt$Target a player to gain a life | LifeAmount$ 1 | SpellDescription$ Target player gains 1 life.
A:AB$ LoseLife | Cost$ 0 | ValidTgts$ Player | TgtPrompt$Target a player to lose a life | LifeAmount$ 1 | SpellDescription$ Target player loses 1 life.
A:AB$ Poison | Cost$ 0 | ValidTgts$ Player | TgtPrompt$Target a player to poison | Num$ 1 | SpellDescription$ Target player gets a poison counter.
A:AB$ DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 1 | SpellDescription$ Deal 1 damage to target creature or player.

# Destroy and sacrifice:
A:AB$Destroy | Cost$ 0 | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | SpellDescription$ Destroy target permanent.

# For returning cards to the battlefield or to player's hand:
A:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Card | TgtPrompt$ Choose target card in a graveyard | Origin$ Graveyard | Destination$ Hand | SpellDescription$ Return target card from a graveyard to its owner's hand.
A:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Card | TgtPrompt$ Select target permanent | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return target permanent to its owner's hand.
A:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Permanent | TgtPrompt$ Choose target permanent in a graveyard | Origin$ Graveyard | Destination$ Battlefield | SpellDescription$ Return target permanent from a graveyard to the battlefield under its owner's control.
A:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Permanent | TgtPrompt$ Choose target permanent in a graveyard | Origin$ Graveyard | Destination$ Battlefield | GainControl$ True | SpellDescription$ Return target permanent from a graveyard to the battlefield under your control.

# General:
A:AB$ Regenerate | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Regenerate target creature.
A:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Test Subject | TokenTypes$ Creature,Test,Subject | TokenOwner$ You | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 colorless token named Test Subject onto the battlefield under your control.
A:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Test Subject | TokenTypes$ Creature,Test,Subject | TokenOwner$ Opponent | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 colorless token named Test Subject onto the battlefield under your opponent's control.

# For testing color effected situations:
A:AB$ Animate | Cost$ 0 | Tgt$ TgtC | Colors$ White | SpellDescription$ Target creature is white.
A:AB$ Animate | Cost$ 0 | Tgt$ TgtC | Colors$ Blue | SpellDescription$ Target creature is blue.
A:AB$ Animate | Cost$ 0 | Tgt$ TgtC | Colors$ Black | SpellDescription$ Target creature is black.
A:AB$ Animate | Cost$ 0 | Tgt$ TgtC | Colors$ Red | SpellDescription$ Target creature is red.
A:AB$ Animate | Cost$ 0 | Tgt$ TgtC | Colors$ Green | SpellDescription$ Target creature is green.

# Return Developer's Little Helper to your hand if it dies or is exiled (static trigger):
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ KrajGrave | Static$ True | TriggerDescription$ Return Developer's Little Helper to your hand if it dies or is exiled.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Exile | ValidCard$ Card.Self | Execute$ KrajExiled | Static$ True
SVar:KrajGrave:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand
SVar:KrajExiled:AB$ChangeZone | Cost$ 0 | Origin$ Exile | Destination$ Hand

SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.marc-fowler-design.com/cardforge/promos/trained_kraj.jpg
SetInfo:MBP|Special|http://www.marc-fowler-design.com/cardforge/promos/trained_kraj.jpg
End
He fills in the holes not covered by the dev mode. You can finally return creatures to play or to your hand at will. Destroy anything or deal damage to target anything. He even creates token critters for you (or your opponent) to experiment on so that you don't have to load your deck unnecessarily. He can make them any color to help test any color-related restrictions. Tweak his script to train him further if you need access to counterspells or give him the ability to turn things into artifacts or enchantments at will. I included most of the things I use frequently so most cards can be tested by dropping it in a deck with one of these with dev mode active.

And to help prevent him from interfering too much with the opponents decisions, he can't attack or block, and has hexproof.

Best of all he even comes with a picture. Drop it in the MBP folder and you're set.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 13 Jan 2012, 19:34
by Tranberry
It will die to Tribute to Hunger, unless dev-mode can work around that.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 13 Jan 2012, 19:56
by Hellfish
It's returned to your hand as a static trigger in that case. Should probably give it Flash though, just in case.

In other news, AWW YEAH, now I feel like a mad scientist. :D

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 13 Jan 2012, 21:02
by silly freak
indestructible, anybody? or did I overlook something in the script?

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 13 Jan 2012, 21:12
by moomarc
Yeah, I figured everyone could tailor it to their own needs. I just wanted to provide a base that covered the main things I miss when testing.

Having it able to die was a conscious decision. Sometimes you need to just kill your helper :twisted:

Hope some of you can get some use out of him.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 28 Jan 2012, 16:23
by moomarc
For anyone that uses the token generating ability of the Trained Kraj, here's a token image. Just drop in your tokens folder.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 28 Jan 2012, 17:56
by Hellfish
That is adorable... What the hell is it?

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 28 Jan 2012, 18:55
by jeffwadsworth
Hellfish wrote:That is adorable... What the hell is it?
A Choad.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 28 Jan 2012, 21:12
by moomarc
Hellfish wrote:That is adorable... What the hell is it?
Something cute and fluffy enough to test your nefarious spells on. Yet with enough spikes to be 1/1 :mrgreen: And I think the artist had the same idea.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 28 Jan 2012, 21:46
by timmermac
Kind of looks like a cross between a mini-lion and the dog-like creature from the episode of the original Star Trek where Kirk gets split into good-Kirk and bad-Kirk.

Re: A Little "Tool" to Assist with Testing Scripts

PostPosted: 30 Jan 2012, 15:13
by Rob Cashwalker
jeffwadsworth wrote:A Choad.
FYI folks, don't Google this..