Commit 6c280092 authored by keyongyu's avatar keyongyu

1.6.5.0

parent 80231b64
Images/ Images/
*.tmp *.tmp
mse-set.txt
################# #################
## Eclipse ## Eclipse
################# #################
......
...@@ -49,7 +49,7 @@ public class MSE ...@@ -49,7 +49,7 @@ public class MSE
cfg=new MSEConfig(path); cfg=new MSEConfig(path);
mTypedic = typedic; mTypedic = typedic;
mRacedic = racedic; mRacedic = racedic;
MSEConvert.Init(typedic, racedic, cfg.Iscn2tw, cfg.STisEn); MSEConvert.Init(typedic, racedic, cfg);
isInit=true; isInit=true;
} }
...@@ -147,15 +147,7 @@ static string getSpellTrap(Card c,string img,bool isSpell) ...@@ -147,15 +147,7 @@ static string getSpellTrap(Card c,string img,bool isSpell)
sb.Replace("%type%", isSpell?"spell card":"trap card"); sb.Replace("%type%", isSpell?"spell card":"trap card");
sb.Replace("%name%", MSE.reItalic(c.name)); sb.Replace("%name%", MSE.reItalic(c.name));
sb.Replace("%attribute%", isSpell?"spell":"trap"); sb.Replace("%attribute%", isSpell?"spell":"trap");
if(cfg.STisEn) sb.Replace("%level%", MSEConvert.GetST(c, isSpell));
sb.Replace("%level%",
"["+
(isSpell?"Spell Card":"Trap Card")
+MSEConvert.GetST(c)
+"]"
);
else
sb.Replace("%level%", MSEConvert.GetST(c));
sb.Replace("%image%", img); sb.Replace("%image%", img);
sb.Replace("%desc%", MSEConvert.ReDesc(c.desc)); sb.Replace("%desc%", MSEConvert.ReDesc(c.desc));
sb.Replace("%code%", c.id.ToString("00000000")); sb.Replace("%code%", c.id.ToString("00000000"));
......
...@@ -56,8 +56,10 @@ public MSEConfig(string path) ...@@ -56,8 +56,10 @@ public MSEConfig(string path)
continue; continue;
if(line.StartsWith("cn2tw")) if(line.StartsWith("cn2tw"))
Iscn2tw=(getValue(line).ToLower()=="true")?true:false; Iscn2tw=(getValue(line).ToLower()=="true")?true:false;
else if(line.StartsWith("STisEn")) else if(line.StartsWith("spell"))
STisEn=(getValue(line).ToLower()=="true")?true:false; str_spell=getValue(line);
else if(line.StartsWith("trap"))
str_trap=getValue(line);
else if(line.StartsWith("pendulum-text")) else if(line.StartsWith("pendulum-text"))
regx_pendulum=getRegex(getValue(line)); regx_pendulum=getRegex(getValue(line));
else if(line.StartsWith("monster-text")) else if(line.StartsWith("monster-text"))
...@@ -74,6 +76,10 @@ public MSEConfig(string path) ...@@ -74,6 +76,10 @@ public MSEConfig(string path)
} }
} }
if(str_spell=="%%" && str_trap =="%%")
st_is_symbol=true;
else
st_is_symbol=false;
} }
else else
{ {
...@@ -96,7 +102,9 @@ string read(string path,string name) ...@@ -96,7 +102,9 @@ string read(string path,string name)
string tmp=Path.Combine(path, name); string tmp=Path.Combine(path, name);
return File.Exists(tmp)?File.ReadAllText(tmp):""; return File.Exists(tmp)?File.ReadAllText(tmp):"";
} }
public bool STisEn; public bool st_is_symbol;
public string str_spell;
public string str_trap;
public bool Iscn2tw; public bool Iscn2tw;
public List<RegStr> replaces; public List<RegStr> replaces;
public string regx_pendulum; public string regx_pendulum;
......
...@@ -19,20 +19,19 @@ namespace DataEditorX.Core ...@@ -19,20 +19,19 @@ namespace DataEditorX.Core
/// </summary> /// </summary>
public class MSEConvert public class MSEConvert
{ {
static bool Iscn2tw,STisEN; static MSEConfig cfg;
static Dictionary<long,string> mTypedic=null; static Dictionary<long,string> mTypedic=null;
static Dictionary<long,string> mRacedic=null; static Dictionary<long,string> mRacedic=null;
public static void Init(Dictionary<long,string> typedic, public static void Init(Dictionary<long,string> typedic,
Dictionary<long,string> racedic, Dictionary<long,string> racedic,
bool iscn2tw,bool stisen) MSEConfig _cfg)
{ {
mTypedic = typedic; mTypedic = typedic;
mRacedic = racedic; mRacedic = racedic;
Iscn2tw=iscn2tw; cfg=_cfg;
STisEN=stisen;
} }
public static string GetST(Card c) public static string GetST(Card c,bool isSpell)
{ {
string level; string level;
if(c.IsType(CardType.TYPE_EQUIP)) if(c.IsType(CardType.TYPE_EQUIP))
...@@ -47,16 +46,21 @@ public static string GetST(Card c) ...@@ -47,16 +46,21 @@ public static string GetST(Card c)
level="#"; level="#";
else if(c.IsType(CardType.TYPE_COUNTER)) else if(c.IsType(CardType.TYPE_COUNTER))
level="!"; level="!";
else if(STisEN) else if(cfg.st_is_symbol)
level="^";
else
level=""; level="";
if(isSpell)
level=cfg.str_spell.Replace("%%",level);
else else
level="^"; level=cfg.str_trap.Replace("%%",level);
return level; return level;
} }
public static string cn2tw(string str) public static string cn2tw(string str)
{ {
if(Iscn2tw){ if(cfg.Iscn2tw){
str= Strings.StrConv(str,VbStrConv.TraditionalChinese,0); str= Strings.StrConv(str,VbStrConv.TraditionalChinese,0);
str=str.Replace("巖","岩"); str=str.Replace("巖","岩");
} }
......
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
// //
// You can specify all the values or you can use the default the Revision and // You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below: // Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.6.4.0")] [assembly: AssemblyVersion("1.6.5.0")]
cn2tw = true cn2tw = true
STisEn = false spell = [魔法卡%%]
trap = [陷阱卡%%]
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【 pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
monster-text = [果|介|述|報]】\n([\S\s]*) monster-text = [果|介|述|報]】\n([\S\s]*)
replace = ([\\|鮟|鱇]) <i>$1</i> replace = ([\\|鮟|鱇]) <i>$1</i>
......
...@@ -4,5 +4,5 @@ stylesheet: standard ...@@ -4,5 +4,5 @@ stylesheet: standard
set info: set info:
language: TW language: TW
edition: edition:
ST mark is text: yes ST mark is text: no
pendulum image is small: yes pendulum image is small: yes
\ No newline at end of file
[DataEditorX]1.6.4.0[DataEditorX] [DataEditorX]1.6.5.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。 ★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
...@@ -56,6 +56,8 @@ DataEditorX.exe.config ...@@ -56,6 +56,8 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么) 描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史 ★更新历史
1.6.5.0
改进自定义魔法陷阱
1.6.4.0 1.6.4.0
修复setcode输入错误 修复setcode输入错误
搜索为空的错误 搜索为空的错误
......
No preview for this file type
cn2tw = true cn2tw = true
STisEn = false spell = [魔法卡%%]
trap = [陷阱卡%%]
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【 pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
monster-text = [果|介|述|報]】\n([\S\s]*) monster-text = [果|介|述|報]】\n([\S\s]*)
replace = ([\\|鮟|鱇]) <i>$1</i> replace = ([\\|鮟|鱇]) <i>$1</i>
......
...@@ -4,5 +4,5 @@ stylesheet: standard ...@@ -4,5 +4,5 @@ stylesheet: standard
set info: set info:
language: TW language: TW
edition: edition:
ST mark is text: yes ST mark is text: no
pendulum image is small: yes pendulum image is small: yes
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
[DataEditorX]1.6.4.0[DataEditorX] [DataEditorX]1.6.5.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。 ★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
...@@ -56,6 +56,8 @@ DataEditorX.exe.config ...@@ -56,6 +56,8 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么) 描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史 ★更新历史
1.6.5.0
改进自定义魔法陷阱
1.6.4.0 1.6.4.0
修复setcode输入错误 修复setcode输入错误
搜索为空的错误 搜索为空的错误
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment