From c7720c8cf66206e01af78d8643c69d696e712d9a Mon Sep 17 00:00:00 2001 From: twanvl Date: Sun, 9 Sep 2007 19:15:52 +0000 Subject: [PATCH] simplified type symbol script git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@684 0fc631ac-6414-0410-93d0-97cfa31319b6 --- data/magic.mse-game/game | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/data/magic.mse-game/game b/data/magic.mse-game/game index 1bf13b29..cc84152a 100644 --- a/data/magic.mse-game/game +++ b/data/magic.mse-game/game @@ -423,30 +423,18 @@ init script: # Shape of cards, can be changed in style files card_shape := { "normal" } - typesymbol_type:= { - type := to_text(card.super_type) - if contains(type, match:"Tribal") then "multitype" - else if contains(type, match:"Sorcery") then "sorcery" - else if contains(type, match:"Instant") then "instant" - else if contains(type, match:"Planeswalker") then "multitype" - else if contains(type, match:"Creature") and - not contains(type, match:"Land") and - not contains(type, match:"Artifact") and - not contains(type, match:"Enchantment") then "creature" - else if contains(type, match:"Artifact") and - not contains(type, match:"Land") and - not contains(type, match:"Creature") and - not contains(type, match:"Enchantment") then "artifact" - else if contains(type, match:"Land") and - not contains(type, match:"Creature") and - not contains(type, match:"Artifact") and - not contains(type, match:"Enchantment") then "land" - else if contains(type, match:"Enchantment") and - not contains(type, match:"Land") and - not contains(type, match:"Artifact") and - not contains(type, match:"Creature") then "enchantment" - else "multitype" - } + typesymbol_for := + to_text + + replace_rule(match: "(Legendary|Basic|Snow|World| )", replace: "") + + { if input == "Creature" then "creature" + else if input == "Sorcery" then "sorcery" + else if input == "Instant" then "instant" + else if input == "Artifact" then "artifact" + else if input == "Enchantment" then "enchantment" + else if input == "Land" then "land" + else "multitype" + } + typesymbol_type := { typesymbol_for(card.super_type) } ############################################################## Statistics utilities