mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Nicer colors for card list/stats panel;
Keywords updated so <name><cost> splits correctly git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@352 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -297,17 +297,137 @@ choice colors:
|
||||
hybrid vertical black / artifact : rgb(243,26,136)
|
||||
hybrid vertical red / artifact : rgb(243,26,136)
|
||||
hybrid vertical green / artifact : rgb(243,26,136)
|
||||
# TODO : Add the rest
|
||||
|
||||
# ... and for the card list
|
||||
choice colors cardlist:
|
||||
white : rgb(130,130,110)
|
||||
white : rgb(156,134,90)
|
||||
blue : rgb(0,64,168)
|
||||
black : rgb(0,0,0)
|
||||
red : rgb(168,0,0)
|
||||
green : rgb(0,168,0)
|
||||
colorless : rgb(72,90,100)
|
||||
colorless : rgb(119,83,83)
|
||||
artifact : rgb(72,90,100)
|
||||
multicolor : rgb(120,120,0)
|
||||
land : rgb(84,84,60)
|
||||
land : rgb(109,62,39)
|
||||
# Sub menus, same colors
|
||||
multicolor 2 color white / blue : rgb(120,120,0)
|
||||
multicolor 2 color blue / black : rgb(120,120,0)
|
||||
multicolor 2 color black / red : rgb(120,120,0)
|
||||
multicolor 2 color red / green : rgb(120,120,0)
|
||||
multicolor 2 color green / white : rgb(120,120,0)
|
||||
multicolor 2 color white / black : rgb(120,120,0)
|
||||
multicolor 2 color blue / red : rgb(120,120,0)
|
||||
multicolor 2 color black / green : rgb(120,120,0)
|
||||
multicolor 2 color red / white : rgb(120,120,0)
|
||||
multicolor 2 color green / blue : rgb(120,120,0)
|
||||
multicolor 3 color white / blue / black : rgb(120,120,0)
|
||||
multicolor 3 color blue / black / red : rgb(120,120,0)
|
||||
multicolor 3 color black / red / green : rgb(120,120,0)
|
||||
multicolor 3 color red / green / white : rgb(120,120,0)
|
||||
multicolor 3 color green / white / blue : rgb(120,120,0)
|
||||
multicolor 3 color white / black / red : rgb(120,120,0)
|
||||
multicolor 3 color blue / red / green : rgb(120,120,0)
|
||||
multicolor 3 color black / green / white : rgb(120,120,0)
|
||||
multicolor 3 color red / white / blue : rgb(120,120,0)
|
||||
multicolor 3 color green / blue / black : rgb(120,120,0)
|
||||
multicolor 4 color white / blue / black / red : rgb(120,120,0)
|
||||
multicolor 4 color blue / black / red / green : rgb(120,120,0)
|
||||
multicolor 4 color black / red / green / white : rgb(120,120,0)
|
||||
multicolor 4 color red / green / white / blue : rgb(120,120,0)
|
||||
multicolor 4 color green / white / blue / black : rgb(120,120,0)
|
||||
multicolor 5 color white / blue / black / red / green : rgb(120,120,0)
|
||||
multicolor 5 color horizontal white / blue / black / red / green: rgb(120,120,0)
|
||||
land 1 color white : rgb(109,62,39)
|
||||
land 1 color blue : rgb(109,62,39)
|
||||
land 1 color black : rgb(109,62,39)
|
||||
land 1 color red : rgb(109,62,39)
|
||||
land 1 color green : rgb(109,62,39)
|
||||
land 1 color multicolor : rgb(109,62,39)
|
||||
land 2 color white / blue : rgb(109,62,39)
|
||||
land 2 color blue / black : rgb(109,62,39)
|
||||
land 2 color black / red : rgb(109,62,39)
|
||||
land 2 color red / green : rgb(109,62,39)
|
||||
land 2 color green / white : rgb(109,62,39)
|
||||
land 2 color white / black : rgb(109,62,39)
|
||||
land 2 color blue / red : rgb(109,62,39)
|
||||
land 2 color black / green : rgb(109,62,39)
|
||||
land 2 color red / white : rgb(109,62,39)
|
||||
land 2 color green / blue : rgb(109,62,39)
|
||||
hybrid 2 color white / blue : rgb(115,0,160) # purple
|
||||
hybrid 2 color blue / black : rgb(115,0,160)
|
||||
hybrid 2 color black / red : rgb(115,0,160)
|
||||
hybrid 2 color red / green : rgb(115,0,160)
|
||||
hybrid 2 color green / white : rgb(115,0,160)
|
||||
hybrid 2 color white / black : rgb(115,0,160)
|
||||
hybrid 2 color blue / red : rgb(115,0,160)
|
||||
hybrid 2 color black / green : rgb(115,0,160)
|
||||
hybrid 2 color red / white : rgb(115,0,160)
|
||||
hybrid 2 color green / blue : rgb(115,0,160)
|
||||
hybrid 2 color artifact / white : rgb(115,0,160)
|
||||
hybrid 2 color artifact / blue : rgb(115,0,160)
|
||||
hybrid 2 color artifact / black : rgb(115,0,160)
|
||||
hybrid 2 color artifact / red : rgb(115,0,160)
|
||||
hybrid 2 color artifact / green : rgb(115,0,160)
|
||||
hybrid 3 color white / blue / black : rgb(115,0,160)
|
||||
hybrid 3 color blue / black / red : rgb(115,0,160)
|
||||
hybrid 3 color black / red / green : rgb(115,0,160)
|
||||
hybrid 3 color red / green / white : rgb(115,0,160)
|
||||
hybrid 3 color green / white / blue : rgb(115,0,160)
|
||||
hybrid 3 color white / black / red : rgb(115,0,160)
|
||||
hybrid 3 color blue / red / green : rgb(115,0,160)
|
||||
hybrid 3 color black / green / white : rgb(115,0,160)
|
||||
hybrid 3 color red / white / blue : rgb(115,0,160)
|
||||
hybrid 3 color green / blue / black : rgb(115,0,160)
|
||||
hybrid 3 color horizontal white / blue / black : rgb(115,0,160)
|
||||
hybrid 3 color horizontal blue / black / red : rgb(115,0,160)
|
||||
hybrid 3 color horizontal black / red / green : rgb(115,0,160)
|
||||
hybrid 3 color horizontal red / green / white : rgb(115,0,160)
|
||||
hybrid 3 color horizontal green / white / blue : rgb(115,0,160)
|
||||
hybrid 3 color horizontal white / black / red : rgb(115,0,160)
|
||||
hybrid 3 color horizontal blue / red / green : rgb(115,0,160)
|
||||
hybrid 3 color horizontal black / green / white : rgb(115,0,160)
|
||||
hybrid 3 color horizontal red / white / blue : rgb(115,0,160)
|
||||
hybrid 3 color horizontal green / blue / black : rgb(115,0,160)
|
||||
hybrid 4 color white / blue / black / red : rgb(115,0,160)
|
||||
hybrid 4 color blue / black / red / green : rgb(115,0,160)
|
||||
hybrid 4 color black / red / green / white : rgb(115,0,160)
|
||||
hybrid 4 color red / green / white / blue : rgb(115,0,160)
|
||||
hybrid 4 color green / white / blue / black : rgb(115,0,160)
|
||||
hybrid 4 color horizontal white / blue / black / red : rgb(115,0,160)
|
||||
hybrid 4 color horizontal blue / black / red / green : rgb(115,0,160)
|
||||
hybrid 4 color horizontal black / red / green / white : rgb(115,0,160)
|
||||
hybrid 4 color horizontal red / green / white / blue : rgb(115,0,160)
|
||||
hybrid 4 color horizontal green / white / blue / black : rgb(115,0,160)
|
||||
hybrid 5 color white / blue / black / red / green : rgb(115,0,160)
|
||||
hybrid 5 color horizontal white / blue / black / red / green : rgb(115,0,160)
|
||||
hybrid vertical white / blue : rgb(115,0,160)
|
||||
hybrid vertical white / black : rgb(115,0,160)
|
||||
hybrid vertical white / red : rgb(115,0,160)
|
||||
hybrid vertical white / green : rgb(115,0,160)
|
||||
hybrid vertical blue / white : rgb(115,0,160)
|
||||
hybrid vertical blue / black : rgb(115,0,160)
|
||||
hybrid vertical blue / red : rgb(115,0,160)
|
||||
hybrid vertical blue / green : rgb(115,0,160)
|
||||
hybrid vertical black / white : rgb(115,0,160)
|
||||
hybrid vertical black / blue : rgb(115,0,160)
|
||||
hybrid vertical black / red : rgb(115,0,160)
|
||||
hybrid vertical black / green : rgb(115,0,160)
|
||||
hybrid vertical red / white : rgb(115,0,160)
|
||||
hybrid vertical red / blue : rgb(115,0,160)
|
||||
hybrid vertical red / black : rgb(115,0,160)
|
||||
hybrid vertical red / green : rgb(115,0,160)
|
||||
hybrid vertical green / white : rgb(115,0,160)
|
||||
hybrid vertical green / blue : rgb(115,0,160)
|
||||
hybrid vertical green / red : rgb(115,0,160)
|
||||
hybrid vertical green / black : rgb(115,0,160)
|
||||
hybrid vertical artifact / white : rgb(115,0,160)
|
||||
hybrid vertical artifact / blue : rgb(115,0,160)
|
||||
hybrid vertical artifact / black : rgb(115,0,160)
|
||||
hybrid vertical artifact / red : rgb(115,0,160)
|
||||
hybrid vertical artifact / green : rgb(115,0,160)
|
||||
hybrid vertical white / artifact : rgb(115,0,160)
|
||||
hybrid vertical blue / artifact : rgb(115,0,160)
|
||||
hybrid vertical black / artifact : rgb(115,0,160)
|
||||
hybrid vertical red / artifact : rgb(115,0,160)
|
||||
hybrid vertical green / artifact : rgb(115,0,160)
|
||||
# TODO : Add the rest
|
||||
|
||||
+23
-13
@@ -157,7 +157,7 @@ init script:
|
||||
if input.separator_before == "—" then
|
||||
"<param-cost>{input.param}</param-cost>"
|
||||
else
|
||||
"<param-mana>{add}{input.param}</param-mana>"
|
||||
"{add}<param-mana>{input.param}</param-mana>"
|
||||
}
|
||||
alternative_cost := replace_rule(match:"^[A-Z]", replace: { to_lower() })
|
||||
format_alt_cost := {
|
||||
@@ -184,7 +184,7 @@ init script:
|
||||
|adds?|pay(ed)?[ ](with|using)
|
||||
)
|
||||
([ ]either)? # pay either X or Y
|
||||
([ ]<sym[^>]*>[STXYZWUBRG0-9/|]+</sym[^>]*>[ ](and|or))* # pay X or Y
|
||||
([ ]<sym[^>]*>[STXYZWUBRG0-9/|]+</sym[^>]*>[ ](and|or|and/or))* # pay X or Y
|
||||
[ ]<match>
|
||||
([,.)]|$ # (end of word)
|
||||
|[ ][^ .,]*$ # still typing...
|
||||
@@ -639,8 +639,8 @@ card field:
|
||||
basic land: rgb(109,62,39)
|
||||
common: rgb(33,33,33)
|
||||
uncommon: rgb(224,224,224)
|
||||
rare: rgb(214,196,94)
|
||||
special: rgb(58,7,80)
|
||||
rare: rgb(255,207,52)
|
||||
special: rgb(190,0,255)
|
||||
|
||||
############################# Text box
|
||||
card field:
|
||||
@@ -979,6 +979,16 @@ statistics dimension:
|
||||
multicolor : rgb(255,188,14)
|
||||
land : rgb(109,62,39)
|
||||
hybrid : rgb(243,26,136)
|
||||
group: white
|
||||
group: blue
|
||||
group: black
|
||||
group: red
|
||||
group: green
|
||||
group: colorless
|
||||
group: artifact
|
||||
group: multicolor
|
||||
group: land
|
||||
group: hybrid
|
||||
|
||||
statistics dimension:
|
||||
name: converted mana cost
|
||||
@@ -1006,6 +1016,7 @@ statistics dimension:
|
||||
|
||||
statistics category:
|
||||
name: color / rarity
|
||||
type: stack
|
||||
dimension: card color2
|
||||
dimension: rarity
|
||||
|
||||
@@ -1174,7 +1185,7 @@ keyword parameter type:
|
||||
match: [^(,\n]+
|
||||
keyword parameter type:
|
||||
name: name
|
||||
match: [^(.,\n-—]+
|
||||
match: [^(.,\n—-]+
|
||||
keyword parameter type:
|
||||
name: prefix
|
||||
description: Prefix for things like "<something>walk"
|
||||
@@ -1290,6 +1301,11 @@ keyword:
|
||||
match: Fading <atom-param>number</atom-param>
|
||||
mode: expert
|
||||
reminder: This comes into play with {english_number_a(param1)} fade counter(s) on it. At the beginning of your upkeep, remove a fade counter from it. If you can’t, sacrifice it.
|
||||
keyword:
|
||||
keyword: Kicker
|
||||
match: Kicker <atom-param>mana</atom-param> and/or <atom-param>mana</atom-param>
|
||||
mode: expert
|
||||
reminder: You may pay an additional {param1} and/or {param2} as you play this spell.
|
||||
keyword:
|
||||
keyword: Kicker
|
||||
match: Kicker <atom-param>cost</atom-param>
|
||||
@@ -1365,15 +1381,9 @@ keyword:
|
||||
match: Sunburst
|
||||
mode: expert
|
||||
reminder: This comes into play with a {if has_pt() then "+1/+1" else "charge"} counter on it for each color of mana used to pay its cost.
|
||||
#Two versions of splice needed because if there's no separator, the program doesn't know when to switch from param1 to param2.
|
||||
keyword:
|
||||
keyword: Splice (Mana Cost)
|
||||
match: Splice onto <atom-param>name</atom-param> <atom-param>mana</atom-param>
|
||||
mode: expert
|
||||
reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card’s effects to that spell.
|
||||
keyword:
|
||||
keyword: Splice (Alternative Cost)
|
||||
match: Splice onto <atom-param>name</atom-param>—<atom-param>action</atom-param>
|
||||
keyword: Splice
|
||||
match: Splice onto <atom-param>name</atom-param> <atom-param>cost</atom-param>
|
||||
mode: expert
|
||||
reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card’s effects to that spell.
|
||||
keyword:
|
||||
|
||||
@@ -359,6 +359,7 @@ void KeywordDatabase::add(const Keyword& kw) {
|
||||
// Add to trie
|
||||
String text; // normal text
|
||||
size_t param = 0;
|
||||
bool only_star = true;
|
||||
for (size_t i = 0 ; i < kw.match.size() ;) {
|
||||
Char c = kw.match.GetChar(i);
|
||||
if (is_substr(kw.match, i, _("<atom-param"))) {
|
||||
@@ -384,9 +385,18 @@ void KeywordDatabase::add(const Keyword& kw) {
|
||||
cur = cur->insert(text);
|
||||
text.clear();
|
||||
cur = cur->insertAnyStar();
|
||||
// enough?
|
||||
if (!only_star) {
|
||||
// If we have matched anything specific, this is a good time to stop
|
||||
// it doesn't really matter how long we go on, since the trie is only used
|
||||
// as an optimization to not have to match lots of regexes.
|
||||
// As an added bonus, we get a better behaviour of matching earlier keywords first.
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
text += c;
|
||||
i++;
|
||||
only_star = false;
|
||||
}
|
||||
}
|
||||
cur = cur->insert(text);
|
||||
|
||||
@@ -137,7 +137,11 @@ int KeywordList::OnGetItemImage(long pos) const {
|
||||
wxListItemAttr* KeywordList::OnGetItemAttr(long pos) const {
|
||||
// black for set keywords, grey for game keywords (uneditable)
|
||||
const Keyword& kw = *getKeyword(pos);
|
||||
if (!kw.fixed) return nullptr;
|
||||
item_attr.SetTextColour(lerp(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW),wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT),0.5));
|
||||
if (!kw.fixed && kw.valid) return nullptr;
|
||||
if (!kw.valid) {
|
||||
item_attr.SetTextColour(*wxRED);
|
||||
} else if (kw.fixed) {
|
||||
item_attr.SetTextColour(lerp(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW),wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT),0.5));
|
||||
}
|
||||
return &item_attr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user