It is currently 27 Apr 2024, 05:51
   
Text Size

More Cards with the new keywords

Post MTG Forge Related Programming Questions Here

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

Re: More Cards with the new keywords

Postby zerker2000 » 07 Oct 2009, 02:48

It was probably left out since the description is already set in cards.txt :P.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby Resonantg » 24 Oct 2009, 05:20

Okay. Here's my first attempt at doing card.txt stuff. So hopefully I got them right. If not, any helpful hints are appreciated. I'll be doing more when I'm more awake and am on the right path. :) These 4 are from "The Dark". I'm just not sure where I can find the most current list of keywords so I can muddle my way through and figure out some stuff.


Fountain of Youth
0
2, Tap: You gain one life.


<><><>

Exorcist
W W
Creature Human Cleric
No Text
1/1
1 W, Tap: Destroy target black creature.


<><><>

Dust to Dust
W W 1
Sorcery
Exile 2 target artifacts.


<><><>

Venom
G G 1
Enchantment Aura
Enchant Creature. Deathtouch





Images

http://gatherer.wizards.com/Handlers/Im ... &type=card
http://gatherer.wizards.com/Handlers/Im ... &type=card
http://gatherer.wizards.com/Handlers/Im ... &type=card
http://gatherer.wizards.com/Handlers/Im ... &type=card

Resonantg
 
Posts: 172
Joined: 11 Oct 2009, 16:20
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby Sloth » 24 Oct 2009, 07:25

The keyword parsing is not that advanced yet Resonantg.

Here is a complete list of all recognized keywords:
viewtopic.php?f=26&t=701&start=105#p21847

Take a look at the cards.txt file to see how they are used and which cards are already implemented.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: More Cards with the new keywords

Postby Resonantg » 24 Oct 2009, 14:07

Thanks Sloth. I copied that list and at least I'm on the right track. Are these cards even workable I guess is the only other question I have. I'm starting to understand the keywords, just not always how they implement.
Resonantg
 
Posts: 172
Joined: 11 Oct 2009, 16:20
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby Chris H. » 24 Oct 2009, 18:58

The list tends to get updated with each release, you should check the list with each update.

I have almost finished a new keyword for Raise Dead type of spells. When I release this keyword I will provide the updated cards.txt entries for the four cards that are already implemented in Forge. The 4 cards being:

Disentomb
Raise Dead
Recover
Return to Battle

There are only 3 other cards that can be implemented via this new keyword. We can let you try to figure out how these three cards would look like in the cards.txt file. It would be good first hand experience and should provide a learning process.

The message link for this keyword:

spReturnGraveyardHandCreature
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: More Cards with the new keywords

Postby Marek14 » 25 Oct 2009, 10:41

Resonantg wrote:Thanks Sloth. I copied that list and at least I'm on the right track. Are these cards even workable I guess is the only other question I have. I'm starting to understand the keywords, just not always how they implement.
Also, there is quite a big difference between Venom and deathtouch. To name one, Venom will kill even a creature that doesn't take any damage from the enchanted creature.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: More Cards with the new keywords

Postby Resonantg » 26 Oct 2009, 01:36

Okay. Shows I definitely have long way to go before I get this.
Resonantg
 
Posts: 172
Joined: 11 Oct 2009, 16:20
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby Resonantg » 27 Oct 2009, 16:39

Okay, I'm not sure if I'm just failing on what exactly the cards.txt file does, and if modifying that can help make cards. So if this is not the case, then I'm totally lost on how to help in this regard. :?

That being said, I took a shot at trying to do another card for those of us who love land-damage decks, thanks to the implementation of the "Cursed Land" card. I took that which looks like this:

Cursed Land
2 B B
Enchantment Aura
At the beginning of the upkeep of enchanted land's controller, Cursed Land deals 1 damage to that player.
Enchant land
So I presumed that the syntax reading is sophisticated enough to read a Psychic Venom card set up almost exactly the same.

Psychic Venom
1 U
Enchantment Aura
Whenever enchanted land becomes tapped, Psychic Venom deals 2 damage to that land's controller.
Enchant land
Is this true, or what am I just not getting? Or will this work?
Resonantg
 
Posts: 172
Joined: 11 Oct 2009, 16:20
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby apthaven » 27 Oct 2009, 17:05

I don't think that the current keywords can support Psychic Venom yet. For one thing it functions with a tap mechanic as opposed to the upkeep step damage of Cursed Land.

To your question, if the syntax of a card contains purely wording and no keyword usage, then it is programmed into the Forge code.

If a card isn't programmed into the Forge code, and there is no keyword for it, then it won't work.

(I'm not a programmer by the way.)
"I am a man and real men do not consume pink beverages. Get thee gone woman, and bring me something brown." - Jace Wayland
apthaven
Tester
 
Posts: 242
Joined: 20 Jun 2009, 12:34
Has thanked: 0 time
Been thanked: 1 time

Re: More Cards with the new keywords

Postby Sloth » 27 Oct 2009, 17:13

Resonantg wrote:Is this true, or what am I just not getting? Or will this work?
The 4th line of a card in cards.txt is just the description that will appear ingame. It has no effect on what the card really does.
The 5th and following lines may contain one keyword each. Enchant Land is a keyword, so your cards will be able to enchant a land but will do nothing further.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: More Cards with the new keywords

Postby DennisBergkamp » 27 Oct 2009, 17:15

So I presumed that the syntax reading is sophisticated enough to read a Psychic Venom card set up almost exactly the same.
Oh this would be awesome :) But alas, Cursed Land took some extra coding (GameActionUtil.java).

Cards defined in cards.txt have a pretty set format:

Code: Select all
Name of the card
Cost of the card
Type of the card
Text of the card
(Keyword1)
(Keyword2)
...
"At the beginning of the upkeep of enchanted land's controller, Cursed Land deals 1 damage to that player." is merely the text of Cursed Land, functionality-wise, it doesn't do anything. Check out the "words cards.txt recognizes" thread :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby Rob Cashwalker » 27 Oct 2009, 17:18

cards.txt only holds the printed card descriptions, in an Oracle sort of manner. The description includes a name, a mana cost, the card types, any rules text that's not generated by the code, p/t for creatures and keywords. Cards that have Flying, have a keyword line that lists Flying, cards with Trample have a keyword line that lists Trample, cards that have both have two lines, one for Flying the other for Trample. These would be more inline with what Wizards defines "keywords"
Some other "keywords" we have made-up to make adding groups of similar cards easier. Some of these keywords are almost function-like, for example, "PumpPT R:+1/+0"; while others seem like free-flowing text, but since the precise wording is used in every example of the effect ever printed, it's recognized by the game and translated into the appropriate ability code, for example "When this card comes into play, draw a card."

This topic has our currently supported list of keywords:
viewtopic.php?f=26&t=701&start=105#p21847

Alas, I was beaten to the answer by people who didn't type as much as me....
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: More Cards with the new keywords

Postby Chris H. » 27 Oct 2009, 17:37

Some of the keywords that are recognized by Forge are fairly simple. The keyword "Flying" gives a creature flying. And the keyword "Forestwalk" gives the creature forestwalk.

Other keywords are more complicated. There is the keyword itself and then following the keyword are one or more fields containing further information which is used by the keyword.

A simple example of this would be the RegenerateMe:{cost} keyword. The "{cost}" is replaced with the actual mana value which is used to activate the regenerate keyword.
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: More Cards with the new keywords

Postby Resonantg » 27 Oct 2009, 17:45

Okay. I'm going to condense here to see if I get it and am on the right path. Sorry if this is just grating on the nerves, cause I'm #-o #-o #-o not getting it, but these last posts helped. Here's the summary of what I understand and maybe how it SHOULD be written?

Psychic Venom
1 U
Artifact
Whenever a land is put into a graveyard from the battlefield, Dingus Egg deals 2 damage to that land's controller.
Enchant land
tap: spDamageCP: 2

(AFAIK, this last keyword damages the 'controlling player', yes? if not, I need a glossary for the condensed keywords. I kinda have whittled some down. But would this be possible, or would it misread for the enchantment needing to be tapped, not the land?)

Of course, what cards am I looking at next? Dingus Egg, Ankh of Mishra, and Pooling Venom if I can figure this out.
Resonantg
 
Posts: 172
Joined: 11 Oct 2009, 16:20
Has thanked: 0 time
Been thanked: 0 time

Re: More Cards with the new keywords

Postby Chris H. » 27 Oct 2009, 18:13

I think you are getting closer, The cards.txt entry for the Dingus Egg card would look something like this:

Dingus Egg
4
Artifact
Whenever a land is put into a graveyard from the battlefield, Dingus Egg deals 2 damage to that land's controller.
keyword(s) would go here

Keywords that start with the letters "sp" can only be used with instants and sorceries. The "spDamageCP" keyword is used to create spells that are similar to Lightning Bolt. This keyword means:

"deals" number "damage to target creature or player."

When we search the cards.txt file for the Lightning Bolt spell this is what we find:

Lightning Bolt
R
Instant
no text
spDamageCP:3
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 Developer's Corner

Who is online

Users browsing this forum: No registered users and 92 guests


Who is online

In total there are 92 users online :: 0 registered, 0 hidden and 92 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 92 guests

Login Form