It is currently 04 Jul 2025, 06:27
   
Text Size

Words that Cards.txt recognizes

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Words that Cards.txt recognizes

Postby 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
Last edited by Chris H. on 20 Apr 2009, 23:34, edited 1 time in total.
User avatar
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

Postby 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.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Words that Cards.txt recognizes

Postby Rob Cashwalker » 06 Apr 2009, 18:46

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.
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.
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.
User avatar
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

Postby DennisBergkamp » 06 Apr 2009, 19:05

And yes, Baron Sengir would have a Sengir:2 or Vampiric:2.
It works either way for me...
User avatar
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

Postby 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
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Words that Cards.txt recognizes

Postby Rob Cashwalker » 06 Apr 2009, 23:38

GandoTheBard wrote:Yeah Vampiric works better...cant win them all :) Glad you were around to save me from my bad inspiration Rob :p
Don't worry... it was still your inspiration to not be satisfied with a long-ass keyword..... :idea:

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.
User avatar
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

Postby 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"
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”
note that "legendary" as an ability was probably not a good move, same goes for "protection from" which should be more flexible
"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}:]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)
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).
target is a string describing valid targets, and allows things such as :
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
This allows to code way more card than you would expect at first. For example, the "lord" ability works for Bad moon ...
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: Words that Cards.txt recognizes

Postby 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

Postby 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.
The Force will be with you, Always.
User avatar
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

Postby 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.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Words that Cards.txt recognizes

Postby frwololo » 15 Apr 2009, 03:23

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
You should remove the redundancy:
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])
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
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: Words that Cards.txt recognizes

Postby GandoTheBard » 15 Apr 2009, 05:50

frwololo wrote:
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
You should remove the redundancy:
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])
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
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. :)
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: Words that Cards.txt recognizes

Postby mtgrares » 15 Apr 2009, 20:16

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
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.

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

Postby 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
Last edited by Chris H. on 05 May 2009, 13:15, edited 2 times in total.
User avatar
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

Postby 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
Last edited by Chris H. on 18 May 2009, 13:43, edited 3 times in total.
User avatar
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

PreviousNext

Return to Forge

Who is online

Users browsing this forum: No registered users and 27 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 27 guests

Login Form