From af4a13ce96a31619ab4b4ea0b31261a9cd4ba35d Mon Sep 17 00:00:00 2001 From: pichoro Date: Sun, 15 Aug 2010 02:15:52 +0000 Subject: [PATCH] Fixing type statistics in Magic - had a minor error. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1502 0fc631ac-6414-0410-93d0-97cfa31319b6 --- data/magic.mse-game/game | 2 +- data/magic.mse-game/script | 8 ++++---- data/magic.mse-game/statistics | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/magic.mse-game/game b/data/magic.mse-game/game index c305e599..39a4fa8d 100644 --- a/data/magic.mse-game/game +++ b/data/magic.mse-game/game @@ -5,7 +5,7 @@ installer group: magic/game files icon: card-back.png position hint: 01 -version: 2010-06-11 +version: 2010-08-14 depends on: magic-blends.mse-include 2010-04-07 depends on: magic-watermarks.mse-include 2007-09-23 diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index 528bbd7c..a91a054e 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -625,8 +625,8 @@ line_count := split_text@(match:"\n+",include_empty:false) + length #Remove supertypes or types to look at parts of the super_type field by themselves. remove_supertype := replace@(match: "(Legendary|Basic|Snow|World|Tribal|Token)", replace: "")+ - replace@(match: "^[ ]", replace: "")+ - replace@(match: "[ ]$", replace: "") + replace@(match: "[ ]+", in_context: "^", replace: "")+ + replace@(match: "[ ]+", in_context: "$", replace: "") remove_type := replace@(match: "(Artifact|Creature|Enchantment|Instant|Land|Planeswalker|Sorcery)", replace: "")+ - replace@(match: "^[ ]", replace: "")+ - replace@(match: "[ ]$", replace: "") + replace@(match: "[ ]+", in_context: "^", replace: "")+ + replace@(match: "[ ]+", in_context: "$", replace: "") diff --git a/data/magic.mse-game/statistics b/data/magic.mse-game/statistics index ebc4aae6..de499c53 100644 --- a/data/magic.mse-game/statistics +++ b/data/magic.mse-game/statistics @@ -47,14 +47,14 @@ statistics dimension: position hint: 27 icon: stats/card_type.png description: The card's supertype, not including types - script: remove_type(card.super_type) + script: remove_type(to_text(card.super_type)) statistics dimension: name: type position hint: 28 icon: stats/card_type.png description: The card's type, not including supertypes - script: remove_supertype(card.super_type) + script: remove_supertype(to_text(card.super_type)) statistics dimension: name: combined type