mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Update to Yugioh
- Better typeline system. - Moved text replacements out of scripts and into auto_replace file. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1420 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
############################################################## Auto replace
|
||||
|
||||
auto replace:
|
||||
match: (C)
|
||||
replace: ©
|
||||
auto replace:
|
||||
match: CR
|
||||
replace: ©
|
||||
auto replace:
|
||||
match: TM
|
||||
replace: ™
|
||||
whole word: false
|
||||
auto replace:
|
||||
match: ~
|
||||
replace: CARDNAME
|
||||
@@ -78,39 +78,60 @@ card field:
|
||||
name: image
|
||||
show statistics: false
|
||||
############################# Card type
|
||||
# Keep type1, type2, and separator fields for backwards compatibility until two or three versions after 0.3.8.
|
||||
card field:
|
||||
type: text
|
||||
name: type1
|
||||
script: monster_type_filter(value)
|
||||
default: " "
|
||||
default: " "
|
||||
editable: false
|
||||
card field:
|
||||
type: text
|
||||
name: separator
|
||||
script: " / "
|
||||
show statistics: false
|
||||
editable: false
|
||||
card field:
|
||||
type: text
|
||||
name: type2
|
||||
script: card_class_filter(value)
|
||||
editable: false
|
||||
show statistics: false
|
||||
card field:
|
||||
type: text
|
||||
name: separator
|
||||
script: " / "
|
||||
editable: false
|
||||
save value: false
|
||||
show statistics: false
|
||||
# These are the new type fields.
|
||||
card field:
|
||||
type: text
|
||||
name: type 1
|
||||
script: monster_type_filter(value)
|
||||
default: card.type1 # Remove when card.type1 is removed.
|
||||
card field:
|
||||
type: text
|
||||
name: type 2
|
||||
script: card_class_filter(value)
|
||||
default: split_text(match:" / ", card.type2).0 # Remove when card.type2 is removed.
|
||||
card field:
|
||||
type: text
|
||||
name: type 3
|
||||
script: card_class_filter(value)
|
||||
default: if contains(card.type2, match:" / ") then split_text(match:" / ", card.type2).1 else "" # Remove when card.type2 is removed.
|
||||
card field:
|
||||
type: text
|
||||
name: monster type
|
||||
script:
|
||||
# Either just monster, monster / type1
|
||||
combined_editor(
|
||||
field1: card.type1,
|
||||
separator: card.separator,
|
||||
field2: card.type2,
|
||||
field1: card.type_1,
|
||||
separator1: " / ",
|
||||
field2: card.type_2,
|
||||
separator2: " / ",
|
||||
field3: card.type_3,
|
||||
soft_before_empty: true,
|
||||
hide_when_empty: true,
|
||||
type_over1: " /",
|
||||
type_over2: "/"
|
||||
hide_when_empty: true
|
||||
)
|
||||
card list visible: true
|
||||
card list column: 3
|
||||
show statistics: false
|
||||
############################# Edition and Card ID
|
||||
card field:
|
||||
type: text
|
||||
@@ -200,5 +221,4 @@ card field:
|
||||
type: text
|
||||
name: copyright
|
||||
default: set.copyright
|
||||
script: copyright_filter(value)
|
||||
show statistics: false
|
||||
|
||||
@@ -5,7 +5,7 @@ installer group: Yugioh/game files
|
||||
icon: card-back.png
|
||||
position hint: 4
|
||||
|
||||
version: 2009-08-08
|
||||
version: 2009-08-09
|
||||
|
||||
############################################################## The script
|
||||
|
||||
@@ -17,5 +17,6 @@ include file: card_fields
|
||||
include file: set_fields
|
||||
include file: packs
|
||||
include file: word_lists
|
||||
include file: auto_replace
|
||||
|
||||
############################################################## Other stuff
|
||||
+15
-24
@@ -13,7 +13,7 @@
|
||||
tag_remove_rule(tag: "<sym-auto>") +
|
||||
# step 2 : expand shortcut words ~ and CARDNAME
|
||||
replace_rule(
|
||||
match: "~|~THIS~|CARDNAME",
|
||||
match: "CARDNAME",
|
||||
in_context: "(^|[[:space:]]|\\()<match>", # TODO: Allow any punctuation before
|
||||
replace: "<atom-cardname></atom-cardname>"
|
||||
) +
|
||||
@@ -44,15 +44,6 @@
|
||||
replace_rule(
|
||||
match: "\\?",
|
||||
replace: "<sym-auto>&</sym-auto>" );
|
||||
copyright_filter :=
|
||||
# step 1 : trademark symbol
|
||||
replace_rule(
|
||||
match: "TM",
|
||||
replace: "™") +
|
||||
# step 2 : copyright symbol
|
||||
replace_rule(
|
||||
match: "CR|\\(C\\)",
|
||||
replace: "©")
|
||||
|
||||
# the flavor text filter
|
||||
flavor_text_filter :=
|
||||
@@ -61,7 +52,7 @@
|
||||
# step 2 : surround by <i> tags
|
||||
{ "<i-flavor>" + input + "</i-flavor>" };
|
||||
|
||||
type_over_list := replace_rule(match:" ?-$", replace:"")
|
||||
type_over_list := replace_rule(match:" ?/", replace:"")
|
||||
|
||||
monster_type_filter :=
|
||||
tag_remove_rule(tag: "<word-list-") +
|
||||
@@ -82,19 +73,19 @@
|
||||
else if contains(card.level, match:"Spell Card") then "spell card"
|
||||
else if card.attribute == "trap" then "trap card"
|
||||
else if contains(card.level, match:"Trap Card") then "trap card"
|
||||
else if card.type1 == "<word-list-monster>Divine-Beast</word-list-monster>" then "obelisk"
|
||||
else if card.type1 == "<word-list-monster>Legendary Dragon</word-list-monster>" then "legendary dragons"
|
||||
else if contains(card.type2, match:"Fusion") then "fusion monster"
|
||||
else if contains(card.type2, match:"Ritual") then "ritual monster"
|
||||
else if contains(card.type2, match:"Dark Synchro") then "dark synchro monster"
|
||||
else if contains(card.type2, match:"Dark Tuner") then "effect monster"
|
||||
else if contains(card.type2, match:"Synchro") then "synchro monster"
|
||||
else if contains(card.type2, match:"Effect") then "effect monster"
|
||||
else if contains(card.type2, match:"Spirit") then "effect monster"
|
||||
else if contains(card.type2, match:"Toon") then "effect monster"
|
||||
else if contains(card.type2, match:"Tuner") then "effect monster"
|
||||
else if contains(card.type2, match:"Union") then "effect monster"
|
||||
else "normal monster"
|
||||
else if card.type_1 == "<word-list-monster>Divine-Beast</word-list-monster>" then "obelisk"
|
||||
else if card.type_1 == "<word-list-monster>Legendary Dragon</word-list-monster>" then "legendary dragons"
|
||||
else if contains(card.monster_type, match:"Fusion") then "fusion monster"
|
||||
else if contains(card.monster_type, match:"Ritual") then "ritual monster"
|
||||
else if contains(card.monster_type, match:"Dark Synchro") then "dark synchro monster"
|
||||
else if contains(card.monster_type, match:"Dark Tuner") then "effect monster"
|
||||
else if contains(card.monster_type, match:"Synchro") then "synchro monster"
|
||||
else if contains(card.monster_type, match:"Effect") then "effect monster"
|
||||
else if contains(card.monster_type, match:"Spirit") then "effect monster"
|
||||
else if contains(card.monster_type, match:"Toon") then "effect monster"
|
||||
else if contains(card.monster_type, match:"Tuner") then "effect monster"
|
||||
else if contains(card.monster_type, match:"Union") then "effect monster"
|
||||
else "normal monster"
|
||||
}
|
||||
# Default 'attribute' of card
|
||||
attribute := {
|
||||
|
||||
Reference in New Issue
Block a user