Changing Cost Parsing Punctuation
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
4 posts
• Page 1 of 1
Changing Cost Parsing Punctuation
by friarsol » 05 Jan 2011, 19:45
This is related to issue 96
Originally, I had used commas to separate costs in the valid form from each other because that's a common use for commas. However, since certain magic cards have commas in them, it causes an issue when the name of the card needs to appear in the cost. Right now, only two cards use a comma in the Cost portion: Knight of the Reliquary and Surge of Strength.
So I'm considering changing Cost to separate by semicolon instead of by commas (or some other punctuation if that makes more sense). This would allow us to convert Baru, Fist of Krosa and friends to AFs (well at least the Green Red and Black ones). The other two can at least than use abCost in a code block if someone feels like coding that up.
I'd rather this not be confusing, where Cost uses semicolons to separate and Target uses commas. So I'm considering moving all of those over as well. It looks like there are 100+ of those.
Any opinions about this? I'm in the middle of getting the developer mode menu options up, but once I'm done with that I think I might clean this up next. Is there anything I might be missing by going down that path?
Originally, I had used commas to separate costs in the valid form from each other because that's a common use for commas. However, since certain magic cards have commas in them, it causes an issue when the name of the card needs to appear in the cost. Right now, only two cards use a comma in the Cost portion: Knight of the Reliquary and Surge of Strength.
So I'm considering changing Cost to separate by semicolon instead of by commas (or some other punctuation if that makes more sense). This would allow us to convert Baru, Fist of Krosa and friends to AFs (well at least the Green Red and Black ones). The other two can at least than use abCost in a code block if someone feels like coding that up.
I'd rather this not be confusing, where Cost uses semicolons to separate and Target uses commas. So I'm considering moving all of those over as well. It looks like there are 100+ of those.
Any opinions about this? I'm in the middle of getting the developer mode menu options up, but once I'm done with that I think I might clean this up next. Is there anything I might be missing by going down that path?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Changing Cost Parsing Punctuation
by Hellfish » 07 Jan 2011, 10:11
Semicolon sounds good. Even better if we could standardize it across all lists in text files, but maybe that's just me.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Changing Cost Parsing Punctuation
by Huggybaby » 09 Jan 2011, 22:03
But semicolons can also appear in text, so you might have to change formatting again in the future if you use those.
-

Huggybaby - Administrator
- Posts: 3229
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 754 times
- Been thanked: 601 times
Re: Changing Cost Parsing Punctuation
by friarsol » 09 Jan 2011, 23:57
I think it mostly only appears as separators for keywords, so we may be ok. But definitely something to be wary of.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests