Words that Cards.txt recognizes
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Words that Cards.txt recognizes
by Chris H. » 02 Jan 2010, 00:25
See new topic located at Keywords recognized by Forge.
Last edited by Chris H. on 12 Apr 2010, 01:48, 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 Chris H. » 18 Jan 2010, 02:13
See new topic located at Keywords recognized by Forge.
Last edited by Chris H. on 12 Apr 2010, 01:47, 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 Chris H. » 27 Jan 2010, 00:48
See new topic located at Keywords recognized by Forge.
Last edited by Chris H. on 12 Apr 2010, 01:47, 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
Re: Words that Cards.txt recognizes
by Rob Cashwalker » 27 Jan 2010, 17:08
Actually all pump abilities got rolled into abPump, so just remove this line, abTgtPTPump, KPump, PTPump, PTKPump and TgtKPump; add abPump[Tgt].TgtKPump {cost}:{keyword} will become abTgtKPump
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
-
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 frwololo » 28 Jan 2010, 04:21
I wrote a "translation" for Wagic at: viewtopic.php?f=47&t=2208 based on Chris H.'s latest update
Who knows, maybe someday someone will write a tool to convert from one to the other
The complete syntax for Wagic can be found at http://wololo.net/miki/index.php/Wagic/CardCode
Who knows, maybe someday someone will write a tool to convert from one to the other

The complete syntax for Wagic can be found at http://wololo.net/miki/index.php/Wagic/CardCode
Re: Words that Cards.txt recognizes
by mtgrares » 28 Jan 2010, 20:16
The number of keywords is astounding. Thanks Rob and Chris.
It is interesting that many of the keywords are similar to the Wagic project. Maybe great minds think alike. (Or great minds steal from each other, who knows.)
It is interesting that many of the keywords are similar to the Wagic project. Maybe great minds think alike. (Or great minds steal from each other, who knows.)
- 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 zerker2000 » 29 Jan 2010, 02:02
Many great minds feel the compulsion to outdo each others' accomplishments...
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
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: Words that Cards.txt recognizes
by Rob Cashwalker » 29 Jan 2010, 04:03
Actually, I'm not responsible for most of them.... Dennis did a lot of work on making all of those "Whenevers" into functional abilities.
My keywords center on many of the basic game tasks, which vary in scale, but are all essentially the same thing and same code.
I read the wagic translation table, and I don't see very much similarity. I can say for sure, that some of the actions are shorter and the targeting restriction is easily applied to just about everything. But if I didn't have a reference, I wouldn't know what half of them did.... Take the P/T Pump ability.... "auto=p/t" OK, so is this a one time effect or a global continuous effect? Is it an ability of a permanent or the effect of a spell? Target any creature or only self?
Most people could read "abPump R:+1/+0" and know immediately what it does, or "spPumpTgt:+3/+3" (when I get to it, one-time multi pumps would be "spMultiPump:+1/+1:{Restrictions}"
Magic Wars is another example of where the scripting language is modeled after the mechanics to the point where non-coders can understand the bulk of what a card does without looking at the card text.
My keywords center on many of the basic game tasks, which vary in scale, but are all essentially the same thing and same code.
I read the wagic translation table, and I don't see very much similarity. I can say for sure, that some of the actions are shorter and the targeting restriction is easily applied to just about everything. But if I didn't have a reference, I wouldn't know what half of them did.... Take the P/T Pump ability.... "auto=p/t" OK, so is this a one time effect or a global continuous effect? Is it an ability of a permanent or the effect of a spell? Target any creature or only self?
Most people could read "abPump R:+1/+0" and know immediately what it does, or "spPumpTgt:+3/+3" (when I get to it, one-time multi pumps would be "spMultiPump:+1/+1:{Restrictions}"
Magic Wars is another example of where the scripting language is modeled after the mechanics to the point where non-coders can understand the bulk of what a card does without looking at the card text.
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 » 29 Jan 2010, 10:13
Haha, that's actually the magic of itRob Cashwalker wrote:I read the wagic translation table, and I don't see very much similarity. I can say for sure, that some of the actions are shorter and the targeting restriction is easily applied to just about everything. But if I didn't have a reference, I wouldn't know what half of them did.... Take the P/T Pump ability.... "auto=p/t" OK, so is this a one time effect or a global continuous effect? Is it an ability of a permanent or the effect of a spell? Target any creature or only self?

Example:
auto={R}:1/0 means: pay one red mana and (this creature) gets +1/+0 until end of turn. Where does the "until end of turn" comes from? It's because whenever a cost is involved, a p/t boost ALWAYS lasts until end of turn, otherwise it's called a counter and is a different mechanics. Where does the "this creature" comes from? It's because no other target is specified. If the card is an aura, obviously we mean "the target of the aura" unless another target is specified, etc...
auto=1/0 means: +1/+0. If the card is an aura, it means: "my target gets +1/+0" (continuous effect, obviously, since no cost is involved). If the card is an instant or a sorcery, the effect lasts until end of turn.
Basically Wagic does the thinking based on 1) the type of the card that has the ability 2) the cost involved with the ability
This works fairly well for most of the cards

Regarding target, the rule is simple. If no "target" is mentioned in the ability itself, it means "self" for a creature or "my target" for an aura, and instant, or a sorcery.
The whole system avoids redundancy.
examples:
text=enchanted creature gets +1/+0
type=aura
target=creature
auto=1/0
text={R}:enchanted creature gets +1/+0 until end of turn
type=aura
target=creature
auto={R}:1/0
text=target creature gets +1/+0 until end of turn
type=sorcery
target=creature
auto=1/0
name=Super Goblin
text={R}:Super Goblin gets +3/+3 until end of turn
type=creature
auto={R}:3/3
The idea is that if you write it the most simple way you can think about, it will most likely do what you expect it to do. That's less control for the card creator's point of view but it "feels" easier (at least that was the initial goal...)name=Super Goblin Shaman
text={R}:Target goblin gets +3/+3 until end of turn
type=creature
auto={R}:3/3 target(goblin)
One note: I think you're mistaken in believing that the effects of a spell or an activated ability should be different keywords. Until end of turn (one shot) and continuous are a different problem, but activated abilities VS spells is a false problem.
This also means that when we add a keyword in Wagic, it immediately works for activated abilities as well as instants/sorceries, whereas I'm assuming you have to add a different keyword for spells VS abilities in Forge.
Re: Words that Cards.txt recognizes
by Rob Cashwalker » 29 Jan 2010, 17:02
I agree it would be good to provide that kind of uniformity, but the reason I didn't do it that way is simple - Java doesn't have goto. So if I tried to use the card type alone, it would turn into an even bigger if-elseif-else party than CardFactory already is. Another issue would be when Wizards does weird stuff with the card types that might trigger the wrong section of code.One note: I think you're mistaken in believing that the effects of a spell or an activated ability should be different keywords. Until end of turn (one shot) and continuous are a different problem, but activated abilities VS spells is a false problem.
This also means that when we add a keyword in Wagic, it immediately works for activated abilities as well as instants/sorceries, whereas I'm assuming you have to add a different keyword for spells VS abilities in Forge.
With a goto, I could just jump to the sections of code that dealt with the difference in AI between self-targeting, target-other and spell-target. The resolve code is the same in all cases.
Continuous effects would need to be different, as those cards have code in a different file. The current architecture makes some of these concepts difficult. If all card code was really in a CardFactory file, then maybe it makes sense, and I would've done it that way.
Great thing is, that now the code for spPumpTgt and abPumpTgt are both able to deal with the same types of parameters, so if we wanted to try to unify the keyword, this would be a prime candidate....
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 Chris H. » 10 Feb 2010, 12:34
See new topic located at Keywords recognized by Forge.
Last edited by Chris H. on 12 Apr 2010, 01:47, 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 Chris H. » 23 Feb 2010, 02:40
See new topic located at Keywords recognized by Forge.
Last edited by Chris H. on 12 Apr 2010, 01:46, 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 Chris H. » 27 Feb 2010, 14:27
See new topic located at Keywords recognized by Forge.
Last edited by Chris H. on 12 Apr 2010, 01:46, 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 Rob Cashwalker » 01 Mar 2010, 06:22
There were two 2/21/2010 releases? 

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
Who is online
Users browsing this forum: No registered users and 25 guests