It is currently 29 Oct 2025, 11:27
   
Text Size

Changing Cost Parsing Punctuation

Post MTG Forge Related Programming Questions Here

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

Changing Cost Parsing Punctuation

Postby 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?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Changing Cost Parsing Punctuation

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

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

Postby 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


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 20 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 20 users online :: 0 registered, 0 hidden and 20 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 20 guests

Login Form