Words that Cards.txt recognizes
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Words that Cards.txt recognizes
by Chris H. » 06 Apr 2009, 12:28
Keywords recognized as of MTG Forge 04-04-2009 are:
EDIT:
Some changes were recently made to this list. Please view the newer content below:
http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701&p=12905#p12905
EDIT:
Some changes were recently made to this list. Please view the newer content below:
http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701&p=12905#p12905
Last edited by Chris H. on 20 Apr 2009, 23:34, edited 1 time in total.
-
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: Words that Cards.txt recognizes
by GandoTheBard » 06 Apr 2009, 18:10
Is it possible we could name this:
Whenever a creature dealt damage by this card this turn is put into a graveyard, put a +1/+1 counter on this card.
Vampirism?
I know its not an official wotc term but its sensible and short and not hard to remember.
Whenever a creature dealt damage by this card this turn is put into a graveyard, put a +1/+1 counter on this card.
Vampirism?
I know its not an official wotc term but its sensible and short and not hard to remember.
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Words that Cards.txt recognizes
by Rob Cashwalker » 06 Apr 2009, 18:46
It's also a real card... an aura, no less. And the ability isn't the same.... If wotc were to name a standard effect, it would be named the original effect's Aura card name.GandoTheBard wrote:Is it possible we could name this:
Whenever a creature dealt damage by this card this turn is put into a graveyard, put a +1/+1 counter on this card.
Vampirism?
I know its not an official wotc term but its sensible and short and not hard to remember.
Not all cards with that effect are vampires - Blood Cultist, Sengir Bats and Trophy Hunter are the only ones that matched my quick search.
The Aura that provides the effect is Vampiric Embrace. The oldest card with the effect is Sengir Vampire.
So my suggestion is either "Sengir 1" or "Vampiric 1" (allowing for any other number of +1/+1 counters in other cards or future design space)
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Words that Cards.txt recognizes
by DennisBergkamp » 06 Apr 2009, 19:05
And yes, Baron Sengir would have a Sengir:2 or Vampiric:2.
It works either way for me...
It works either way for me...
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Words that Cards.txt recognizes
by GandoTheBard » 06 Apr 2009, 22:30
Yeah Vampiric works better...cant win them all
Glad you were around to save me from my bad inspiration Rob :p

visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Words that Cards.txt recognizes
by Rob Cashwalker » 06 Apr 2009, 23:38
Don't worry... it was still your inspiration to not be satisfied with a long-ass keyword.....GandoTheBard wrote:Yeah Vampiric works better...cant win them allGlad you were around to save me from my bad inspiration Rob :p

The original MTGForge had - "This creature can't be blocked except by creatures with flying." I had the inspiration to suggest to rares, to simply add "or Card.Keyword.Contains("Reach")"
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Words that Cards.txt recognizes
by frwololo » 07 Apr 2009, 01:13
I'm watching this topic quite closely as Wagic has the same kind of plain text parsing engine. I'm getting lots of inspiration from this discussion and thought you might get some from me too
the keywords handled by Wagic can be found at: http://wololo.net/wagic/create-your-own-cards/
here is a summary
"abilities"
"cloud" is the equivalent of "can only block creatures with flying"
"rampage" is equivalent of Rampage:1, and I plan to move it one day
I dont exactly know what foresthome, etc... do as I'm not the one who coded them
cool keywords:
target is a string describing valid targets, and allows things such as :
the keywords handled by Wagic can be found at: http://wololo.net/wagic/create-your-own-cards/
here is a summary
"abilities"
- Code: Select all
“trample”,
“forestwalk”,
“islandwalk”,
“mountainwalk”,
“swampwalk”,
“plainwalk”,
“flying”,
“first strike”,
“double strike”,
“fear”,
“flash”,
“haste”,
“lifelink”,
“reach”,
“shroud”,
“vigilance”,
“defender”,
“banding”,
“protection from green”,
“protection from blue”,
“protection from red”,
“protection from black”,
“protection from white”,
“unblockable”,
“wither”,
“persist”,
“retrace”,
“exalted”,
“legendary”,
“shadow”,
“reachshadow”,
“foresthome”,
“islandhome”,
“moutainhome”,
“swamphome”,
“plainshome”,
“flanking”,
“rampage”,
“cloud”
"cloud" is the equivalent of "can only block creatures with flying"
"rampage" is equivalent of Rampage:1, and I plan to move it one day
I dont exactly know what foresthome, etc... do as I'm not the one who coded them
cool keywords:
cost is a parsed cost that involves { T } for tapping, { R },{ G },...for mana cost, and { S } for sacrifice (S is a poor choice as it is the "official" key for Snow mana I believe).[{cost}:]regenerate [target] ability for one card to regenerated if its controller pays {cost}
[{cost}:]bury [target] : destroys target, cannot be regenerated
[{cost}:]destroy [target]: destroy target
bury all(targets) : destroys all cards of type “targets”, cannot be regenerated.targets is anything that would be accepted by the “target=” line.
destroy all(targets): destroy all cards of type “targets”. targets is anything that would be accepted by the “target=” line.
[{cost}:]Damage:n [target] Does n damage to target
[{cost}:]n/m [target] : gives +n/+m to creature. n and m can be negative values. For auras, instants and sorceries, cost is usually empty. For instants, sorceries, and activated abilities, the effect lasts until end of turn. For auras, it lasts as long as the aura is present.
[{cost}:][-]ability [target] : gives ability to target. “ability” can be any of the keywords described in the ability section previously. For auras, instants and sorceries, cost is usually empty. For instants, sorceries, and activated abilities, the effect lasts until end of turn. For auras, it lasts as long as the aura is present.If a minus sign is used, this removes the ability from target.
[{cost}:]add{mana} : Mana producer. Adds mana if the user pays {cost}. {cost} can be emtpy, or contain only {t}, which is the case for basic lands
lord(targets) n/m [includeself]: n and m are values for power and toughness. For example, lord of Atlantis is lord(merfolk) 1/1. includeself is used if the ability is valid for the lord too.
lord(targets) ability [includeself]: ability is any ability. For example, lord of Atlantis is lord(merfolk) islandwalk.includeself is used if the ability is valid for the lord too.
[{cost}:]moveTo(zone) [target]: moves target card into specified zone.
[{cost}:]tap [target]: taps a target. if no target is provided, taps self
[{cost}:]untap [target]: untaps a target. if no target is provided, untaps self
[{cost}:]life:n you gain n life. if n is negative, you lose n life
[{cost}:]token(name,types, p/t,abilities colors)[*n] puts n tokens with name “name”, types “types”, power p, toughness t, abilities “abilities” and colors “colors. For example, for Dragon Roost (10E): auto={5}{R}{R}:token(Dragon,creature dragon, 5/5,flying red). Default value for n is 1.
[@]Draw:n: you draw n cards
(values inside brackets are optional)
target is a string describing valid targets, and allows things such as :
This allows to code way more card than you would expect at first. For example, the "lord" ability works for Bad moon ...creature
any creature in play
artifact,enchantment
any artifact or enchantment in play
*|graveyard
any card in any graveyard
creature,player
any creature or player in play
mountains
one or more mountains in play
artifact,enchantment|mygraveyard
any artifact or enchantment in your graveyard
creature[-black;-artifact]
any non black, non artifact creature in play (that’s what acutally used for terror)
elf[attacking]|opponentinplay
Attacking elf creature controlled by opponent
Re: Words that Cards.txt recognizes
by mtgrares » 08 Apr 2009, 17:48
Using plaintext for creatures and later spells is a godsend aka super great. I initially used plaintext for just plain creatures and then added keywords like flying. The plaintext saved me lots of coding. Later DennisBergkamp and others have added plaintext spells like Shock, which is great.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Words that Cards.txt recognizes
by Rob Cashwalker » 09 Apr 2009, 13:47
I had begun to work on some code that would be able to parse cards with all sorts of parameters. But it quickly degenerated into a mess of spaghetti to account for each possible variable. Making up a keyword scripting language is what we're slowly building with the pump effects and shock effects.
I like the use of the term "Lord" to refer to the ability.
I like the use of the term "Lord" to refer to the ability.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Words that Cards.txt recognizes
by mtgrares » 09 Apr 2009, 19:25
Rob my idea is to put cards into a format like below.
Royal Assassin
Type: Creature - Human Assassin
Cost: 1BB
Resolve: summon creature, 2/2
Type: Activated Ability
Text: tap: Destroy target tapped creature.
Cost: tap
Target: creature - tapped
Resolve: destroy creature
This way you can associate the left side with the right side with a simple map, Map.get("Cost") returns "1BB". This way the order of the elements doesn't matter and it makes it very easy to read and parse (and we all know parsing is generally hard and error prone). Feel free to make up your own syntax of course.
Royal Assassin
Type: Creature - Human Assassin
Cost: 1BB
Resolve: summon creature, 2/2
Type: Activated Ability
Text: tap: Destroy target tapped creature.
Cost: tap
Target: creature - tapped
Resolve: destroy creature
This way you can associate the left side with the right side with a simple map, Map.get("Cost") returns "1BB". This way the order of the elements doesn't matter and it makes it very easy to read and parse (and we all know parsing is generally hard and error prone). Feel free to make up your own syntax of course.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Words that Cards.txt recognizes
by frwololo » 15 Apr 2009, 03:23
You should remove the redundancy:mtgrares wrote:Rob my idea is to put cards into a format like below.
Royal Assassin
Type: Creature - Human Assassin
Cost: 1BB
Resolve: summon creature, 2/2
Type: Activated Ability
Text: tap: Destroy target tapped creature.
Cost: tap
Target: creature - tapped
Resolve: destroy creature
Target: creature - tapped
Resolve: destroy
No ability in MTG will ever allow you to code something like:
Target: creature - tapped
Resolve: destroy Land
so the "creature" after "destroy" is redundant.
Here's the "text" version of this ability in Wagic:
- Code: Select all
{T}:destroy target (creature[tapped])
Re: Words that Cards.txt recognizes
by GandoTheBard » 15 Apr 2009, 05:50
I can think of two land destroyers off the top of my head Helldozer and Demonic Hordes. ==Edit== but duh of course you meant "if target creature is tapped destroy target land" which does not currently exist but I wouldn't put it past the R&D department to come up with something like that.frwololo wrote:You should remove the redundancy:mtgrares wrote:Rob my idea is to put cards into a format like below.
Royal Assassin
Type: Creature - Human Assassin
Cost: 1BB
Resolve: summon creature, 2/2
Type: Activated Ability
Text: tap: Destroy target tapped creature.
Cost: tap
Target: creature - tapped
Resolve: destroy creature
Target: creature - tapped
Resolve: destroy
No ability in MTG will ever allow you to code something like:
Target: creature - tapped
Resolve: destroy Land
so the "creature" after "destroy" is redundant.
Here's the "text" version of this ability in Wagic:You'll want to take into account the zones in which the ability can target. For Wagic, the default one is "inplay", but in the long term you will want to target cards in other areas of the game
- Code: Select all
{T}:destroy target (creature[tapped])

visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Words that Cards.txt recognizes
by mtgrares » 15 Apr 2009, 20:16
Yes that is the trial of Magic, how to add the normal activated abilities, since most abilities only work when the permanent is in play and the abnormal abilities like cycling which only work when the card is in hand.frwololo wrote:
You'll want to take into account the zones in which the ability can target. For Wagic, the default one is "inplay", but in the long term you will want to target cards in other areas of the game
Transforming plain text into a spell is hard and there are a million different ways to do it. Cards.txt does well with just creatures and simple burn spells like Shock. I am actually very bad as parsing because there are so many possible errors, so by using maps and by associating the "left with the right" I'm trying to make a simple parser (if such a thing exists).
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Words that Cards.txt recognizes
by Chris H. » 20 Apr 2009, 23:32
Keywords recognized as of MTG Forge 04-19-2009 are:
EDIT:
Some changes were recently made to this list. Please view the newer content below:
http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701&p=12905#p13671
EDIT:
Some changes were recently made to this list. Please view the newer content below:
http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701&p=12905#p13671
Last edited by Chris H. on 05 May 2009, 13:15, edited 2 times in total.
-
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: Words that Cards.txt recognizes
by Chris H. » 05 May 2009, 13:13
Keywords recognized as of MTG Forge 05-03-2009 are:
EDIT:
Some changes were recently made to this list. Please view the newer content below:
http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701&start=60#p14260
EDIT:
Some changes were recently made to this list. Please view the newer content below:
http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=701&start=60#p14260
Last edited by Chris H. on 18 May 2009, 13:43, edited 3 times in total.
-
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
Who is online
Users browsing this forum: No registered users and 32 guests