Commit 6c280092 authored by keyongyu's avatar keyongyu

1.6.5.0

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