mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-13 05:57:00 -04:00
type_over for combined_editor;
keyword compatability disabled for new file versions git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@278 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+28
-42
@@ -201,6 +201,10 @@ init script:
|
|||||||
# step 2 : surround by <i> tags
|
# step 2 : surround by <i> tags
|
||||||
{ "<i-flavor>" + input + "</i-flavor>" }
|
{ "<i-flavor>" + input + "</i-flavor>" }
|
||||||
|
|
||||||
|
# Move the cursor past the separator in the p/t and type boxes
|
||||||
|
type_over_pt := replace_rule(match:"/$", replace:"")
|
||||||
|
type_over_type := replace_rule(match:" ?-$", replace:"")
|
||||||
|
|
||||||
# Converted mana cost
|
# Converted mana cost
|
||||||
cmc := {
|
cmc := {
|
||||||
1 * number_of_items(in: sort(order:"SWUBRG")) # colored mana
|
1 * number_of_items(in: sort(order:"SWUBRG")) # colored mana
|
||||||
@@ -411,6 +415,7 @@ card field:
|
|||||||
name: super type
|
name: super type
|
||||||
icon: stats/creature_type.png
|
icon: stats/creature_type.png
|
||||||
editable: false
|
editable: false
|
||||||
|
script: type_over_type(value)
|
||||||
card field:
|
card field:
|
||||||
type: text
|
type: text
|
||||||
name: sub type
|
name: sub type
|
||||||
@@ -428,9 +433,7 @@ card field:
|
|||||||
separator: " — ",
|
separator: " — ",
|
||||||
field2: card.sub_type,
|
field2: card.sub_type,
|
||||||
soft_before_empty: true,
|
soft_before_empty: true,
|
||||||
hide_when_empty: true,
|
hide_when_empty: true
|
||||||
type_over1: " -",
|
|
||||||
type_over2: "-"
|
|
||||||
)
|
)
|
||||||
card list visible: true
|
card list visible: true
|
||||||
card list column:4
|
card list column:4
|
||||||
@@ -504,6 +507,7 @@ card field:
|
|||||||
name: power
|
name: power
|
||||||
icon: stats/power.png
|
icon: stats/power.png
|
||||||
editable: false
|
editable: false
|
||||||
|
script: type_over_pt(value)
|
||||||
card field:
|
card field:
|
||||||
type: text
|
type: text
|
||||||
name: toughness
|
name: toughness
|
||||||
@@ -519,8 +523,7 @@ card field:
|
|||||||
separator: "/",
|
separator: "/",
|
||||||
field2: card.toughness,
|
field2: card.toughness,
|
||||||
soft_before_empty: true,
|
soft_before_empty: true,
|
||||||
hide_when_empty: true,
|
hide_when_empty: true
|
||||||
type_over1: "/"
|
|
||||||
)
|
)
|
||||||
card list visible: true
|
card list visible: true
|
||||||
card list column: 5
|
card list column: 5
|
||||||
@@ -628,6 +631,7 @@ card field:
|
|||||||
icon: stats/creature_type.png
|
icon: stats/creature_type.png
|
||||||
editable: false
|
editable: false
|
||||||
show statistics: false
|
show statistics: false
|
||||||
|
script: type_over_type(value)
|
||||||
card field:
|
card field:
|
||||||
type: text
|
type: text
|
||||||
name: sub type 2
|
name: sub type 2
|
||||||
@@ -643,10 +647,8 @@ card field:
|
|||||||
field1: card.super_type_2,
|
field1: card.super_type_2,
|
||||||
separator: " — ",
|
separator: " — ",
|
||||||
field2: card.sub_type_2,
|
field2: card.sub_type_2,
|
||||||
hide_when_empty: true,
|
|
||||||
soft_before_empty: true,
|
soft_before_empty: true,
|
||||||
type_over1: " -",
|
hide_when_empty: true
|
||||||
type_over2: "-"
|
|
||||||
)
|
)
|
||||||
show statistics: false
|
show statistics: false
|
||||||
card field:
|
card field:
|
||||||
@@ -689,6 +691,7 @@ card field:
|
|||||||
icon: stats/power.png
|
icon: stats/power.png
|
||||||
editable: false
|
editable: false
|
||||||
show statistics: false
|
show statistics: false
|
||||||
|
script: type_over_pt(value)
|
||||||
card field:
|
card field:
|
||||||
type: text
|
type: text
|
||||||
name: toughness 2
|
name: toughness 2
|
||||||
@@ -705,8 +708,7 @@ card field:
|
|||||||
separator: "/",
|
separator: "/",
|
||||||
field2: card.toughness_2,
|
field2: card.toughness_2,
|
||||||
soft_before_empty: true,
|
soft_before_empty: true,
|
||||||
hide_when_empty: true,
|
hide_when_empty: true
|
||||||
type_over1: "/"
|
|
||||||
)
|
)
|
||||||
card list width: 50
|
card list width: 50
|
||||||
card list name: P/T2
|
card list name: P/T2
|
||||||
@@ -1039,14 +1041,12 @@ keyword:
|
|||||||
reminder: You have threshold as long as seven or more cards are in your graveyard.
|
reminder: You have threshold as long as seven or more cards are in your graveyard.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Flashback
|
keyword: Flashback
|
||||||
separator: whitespace [ ]
|
match: Flashback <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: You may play this card from your graveyard for its flashback cost. Then remove it from the game.
|
reminder: You may play this card from your graveyard for its flashback cost. Then remove it from the game.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Morph
|
keyword: Morph
|
||||||
separator: whitespace [ ]
|
match: Morph <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: You may play this face down as a 2/2 creature for [3]. Turn it face up any time for its morph cost.
|
reminder: You may play this face down as a 2/2 creature for [3]. Turn it face up any time for its morph cost.
|
||||||
keyword:
|
keyword:
|
||||||
@@ -1068,26 +1068,22 @@ keyword:
|
|||||||
reminder: When you play this spell, copy it for each spell played before it this turn. You may choose new targets for the copies.
|
reminder: When you play this spell, copy it for each spell played before it this turn. You may choose new targets for the copies.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Affinity for
|
keyword: Affinity for
|
||||||
separator: whitespace [ ]
|
match: Affinity for <atom-param>name</atom-param>
|
||||||
parameter: name
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: This spell costs <sym>1</sym> less to play for each {param1} you control.
|
reminder: This spell costs <sym>1</sym> less to play for each {param1} you control.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Entwine
|
keyword: Entwine
|
||||||
separator: whitespace [ ]
|
match: Entwine <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: Choose both if you pay the entwine cost.
|
reminder: Choose both if you pay the entwine cost.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Equip
|
keyword: Equip
|
||||||
separator: whitespace [ ]
|
match: Equip <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. This card comes into play unattached and stays in play if the creature leaves play.
|
reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. This card comes into play unattached and stays in play if the creature leaves play.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Imprint
|
keyword: Imprint
|
||||||
separator: dash [ - ]
|
match: Imprint - <atom-param>action</atom-param>
|
||||||
parameter: action
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: The removed card is imprinted on this artifact.
|
reminder: The removed card is imprinted on this artifact.
|
||||||
keyword:
|
keyword:
|
||||||
@@ -1111,26 +1107,22 @@ keyword:
|
|||||||
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.
|
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:
|
||||||
keyword: Offering
|
keyword: Offering
|
||||||
separator: dash [ - ]
|
match: Offering - <atom-param>name</atom-param>
|
||||||
parameter: name
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: You may play this card any time you could play an instant by sacrificing a {param1} and paying the difference in mana costs between this and the sacrificed {param1}. Mana cost includes color.
|
reminder: You may play this card any time you could play an instant by sacrificing a {param1} and paying the difference in mana costs between this and the sacrificed {param1}. Mana cost includes color.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Bushido
|
keyword: Bushido
|
||||||
separator: whitespace [ ]
|
match: Bushido <atom-param>number</atom-param>
|
||||||
parameter: number
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: When this blocks or becomes blocked, it gets +{param1}/+{param1} until end of turn.
|
reminder: When this blocks or becomes blocked, it gets +{param1}/+{param1} until end of turn.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Ninjutsu
|
keyword: Ninjutsu
|
||||||
separator: whitespace [ ]
|
match: Ninjutsu <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: {param1}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking.
|
reminder: {param1}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Soulshift
|
keyword: Soulshift
|
||||||
separator: whitespace [ ]
|
match: Soulshift <atom-param>number</atom-param>
|
||||||
parameter: number
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: When this is put into a graveyard from play, you may return target Spirit card with converted mana cost {param1} or less from you graveyard to your hand.
|
reminder: When this is put into a graveyard from play, you may return target Spirit card with converted mana cost {param1} or less from you graveyard to your hand.
|
||||||
keyword:
|
keyword:
|
||||||
@@ -1143,8 +1135,7 @@ keyword:
|
|||||||
reminder: Each creature you tap while playing this spell reduces its cost by <sym>1</sym> or by one mana of that creature’s color.
|
reminder: Each creature you tap while playing this spell reduces its cost by <sym>1</sym> or by one mana of that creature’s color.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Transmute
|
keyword: Transmute
|
||||||
separator: whitespace [ ]
|
match: Transmute <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: {param1}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Play only as a sorcery.
|
reminder: {param1}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Play only as a sorcery.
|
||||||
keyword:
|
keyword:
|
||||||
@@ -1153,14 +1144,12 @@ keyword:
|
|||||||
reminder: When this card is put into a graveyard from play, remove it from the game haunting target creature.
|
reminder: When this card is put into a graveyard from play, remove it from the game haunting target creature.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Bloodthirst
|
keyword: Bloodthirst
|
||||||
separator: whitespace [ ]
|
match: Bloodthirst <atom-param>number</atom-param>
|
||||||
parameter: number
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: If an opponent was dealt damage this turn, this creature comes into play with {english_number_a(param1)} +1/+1 counter(s) on it.
|
reminder: If an opponent was dealt damage this turn, this creature comes into play with {english_number_a(param1)} +1/+1 counter(s) on it.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Replicate
|
keyword: Replicate
|
||||||
separator: whitespace [ ]
|
match: Replicate <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: When you play this spell, copy it for each time you paid its replicate cost. You may choose new targets for the copies.
|
reminder: When you play this spell, copy it for each time you paid its replicate cost. You may choose new targets for the copies.
|
||||||
keyword:
|
keyword:
|
||||||
@@ -1186,8 +1175,7 @@ keyword:
|
|||||||
reminder: This creature is unblockable as long as defending player controls a {param1}.
|
reminder: This creature is unblockable as long as defending player controls a {param1}.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Protection from
|
keyword: Protection from
|
||||||
separator: whitespace [ ]
|
match: Protection from <atom-param>name</atom-param>
|
||||||
parameter: name
|
|
||||||
mode: core
|
mode: core
|
||||||
reminder: This creature can’t be blocked, targeted, dealt damage, or enchanted by anything {param1}.
|
reminder: This creature can’t be blocked, targeted, dealt damage, or enchanted by anything {param1}.
|
||||||
keyword:
|
keyword:
|
||||||
@@ -1197,13 +1185,11 @@ keyword:
|
|||||||
reminder: As long as you have at least {english_number(param1)} card(s) in your library, if you would draw a card, you may instead put exactly {param1} card(s) from the top of your library into your graveyard and return this card from your graveyard to your hand.
|
reminder: As long as you have at least {english_number(param1)} card(s) in your library, if you would draw a card, you may instead put exactly {param1} card(s) from the top of your library into your graveyard and return this card from your graveyard to your hand.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Graft
|
keyword: Graft
|
||||||
separator: whitespace [ ]
|
match: Graft <atom-param>number</atom-param>
|
||||||
parameter: number
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: This creature comes into play with {english_number(param1)} +1/+1 counter(s) on it. Whenever another creature comes into play, you may move a +1/+1 counter from this creature onto it.
|
reminder: This creature comes into play with {english_number(param1)} +1/+1 counter(s) on it. Whenever another creature comes into play, you may move a +1/+1 counter from this creature onto it.
|
||||||
keyword:
|
keyword:
|
||||||
keyword: Forecast
|
keyword: Forecast
|
||||||
separator: whitespace [ ]
|
match: Forecast <atom-param>cost</atom-param>
|
||||||
parameter: cost
|
|
||||||
mode: expert
|
mode: expert
|
||||||
reminder: Play this ability only during your upkeep and only once each turn.
|
reminder: Play this ability only during your upkeep and only once each turn.
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ IMPLEMENT_REFLECTION(KeywordMode) {
|
|||||||
template <typename T> void read_compat(T&, const Keyword*) {}
|
template <typename T> void read_compat(T&, const Keyword*) {}
|
||||||
void read_compat(Reader& tag, Keyword* k) {
|
void read_compat(Reader& tag, Keyword* k) {
|
||||||
if (!k->match.empty()) return;
|
if (!k->match.empty()) return;
|
||||||
|
if (tag.file_app_version >= 301) return; // only for versions < 0.3.1
|
||||||
String separator, parameter;
|
String separator, parameter;
|
||||||
REFLECT(separator);
|
REFLECT(separator);
|
||||||
REFLECT(parameter);
|
REFLECT(parameter);
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ void TextValueEditor::replaceSelection(const String& replacement, const String&
|
|||||||
} else {
|
} else {
|
||||||
selection_end_i = selection_start_i = min(selection_end_i, selection_start_i) + replacement.size();
|
selection_end_i = selection_start_i = min(selection_end_i, selection_start_i) + replacement.size();
|
||||||
}
|
}
|
||||||
fixSelection(TYPE_INDEX, MOVE_MID);
|
fixSelection(TYPE_INDEX, MOVE_RIGHT);
|
||||||
// scroll with next update
|
// scroll with next update
|
||||||
scroll_with_cursor = true;
|
scroll_with_cursor = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user