Commit dab72a71 authored by keyongyu's avatar keyongyu

2.2.9.6

parent 1bea0f6c
......@@ -3,7 +3,7 @@
using System.Text;
using System.Globalization;
namespace DataEditorX.Config
namespace DataEditorX.Common
{
public class ConfHelper
{
......@@ -105,7 +105,7 @@ public static int getIntegerValue(string line, int defalut)
/// </summary>
/// <param name="dic"></param>
/// <param name="line"></param>
public static void DicAdd(Dictionary<long, string> dic, string line)
public static void DicAdd(SortedList<long, string> dic, string line)
{
int i = line.IndexOf("0x");
int j = (i > 0) ? line.IndexOf(SEP_LINE, i + 1) : -1;
......
......@@ -10,6 +10,7 @@ namespace DataEditorX.Core
{
public struct Card : IEquatable<Card>
{
public const int STR_MAX = 0x10;
#region 构造
/// <summary>
/// 卡片
......@@ -18,24 +19,32 @@ public struct Card : IEquatable<Card>
/// <param name="cardName">名字</param>
public Card(long cardCode)
{
int i;
this.id = cardCode;
this.name="";
this.ot = 0;
this.alias = 0;
this.setcode = 0;
this.type = 0;
this.atk = 0;
this.def = 0;
this.level = 0;
this.race = 0;
this.attribute = 0;
this.category = 0;
this.desc = "";
this.str = new string[0x10];
for(i=0;i<0x10;i++)
str[i]="";
this.id = cardCode;
this.name = "";
this.ot = 0;
this.alias = 0;
this.setcode = 0;
this.type = 0;
this.atk = 0;
this.def = 0;
this.level = 0;
this.race = 0;
this.attribute = 0;
this.category = 0;
this.desc = "";
int i;
this.str = new string[STR_MAX];
for (i = 0; i < STR_MAX; i++)
str[i] = "";
}
public void InitStrs()
{
int i;
this.str = new string[STR_MAX];
for (i = 0; i < STR_MAX; i++)
str[i] = "";
}
#endregion
#region 成员
......
......@@ -14,6 +14,7 @@ namespace DataEditorX.Core
/// </summary>
public enum CardRace : long
{
RACE_NONE = 0,
///<summary>战士</summary>
RACE_WARRIOR = 0x1,
///<summary>魔法师</summary>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace DataEditorX.Core
{
public enum CardRule :int
{
/// <summary>无</summary>
NONE = 0,
/// <summary>OCG</summary>
OCG =1,
/// <summary>TCG</summary>
TCG = 2,
/// <summary>OT</summary>
OCGTCG = 3,
/// <summary>DIY,原创卡</summary>
DIY = 4,
}
}
......@@ -297,6 +297,8 @@ public static string GetSelectSQL(Card c)
{
StringBuilder sb=new StringBuilder();
sb.Append("SELECT datas.*,texts.* FROM datas,texts WHERE datas.id=texts.id ");
if (c == null)
return sb.ToString();
if(!string.IsNullOrEmpty(c.name)){
if(c.name.IndexOf("%%")>=0)
c.name=c.name.Replace("%%","%");
......@@ -350,6 +352,10 @@ public static string GetSelectSQL(Card c)
/// <returns>SQL语句</returns>
public static string GetInsertSQL(Card c, bool ignore)
{
if (c == null)
return "";
if (c.str == null)
c.InitStrs();
StringBuilder st = new StringBuilder();
if(ignore)
st.Append("INSERT or ignore into datas values(");
......@@ -393,6 +399,10 @@ public static string GetInsertSQL(Card c, bool ignore)
public static string GetUpdateSQL(Card c)
{
StringBuilder st = new StringBuilder();
if (c == null)
return "";
if (c.str == null)
c.InitStrs();
st.Append("update datas set ot="); st.Append(c.ot.ToString());
st.Append(",alias="); st.Append(c.alias.ToString());
st.Append(",setcode="); st.Append(c.setcode.ToString());
......
......@@ -12,19 +12,27 @@
using System.Text;
using DataEditorX.Language;
using System.Globalization;
using DataEditorX.Common;
using DataEditorX.Config;
namespace DataEditorX.Config
namespace DataEditorX.Core.Mse
{
/// <summary>
/// Description of MSEConfig.
/// </summary>
public class MSEConfig
{
#region 常量
public const string TAG = "mse";
/// <summary>存档头部</summary>
public const string TAG_HEAD = "head";
/// <summary>存档尾部</summary>
public const string TAG_END = "end";
/// <summary>简体转繁体</summary>
public const string TAG_CN2TW = "cn2tw";
/// <summary>魔法标志格式</summary>
public const string TAG_SPELL = "spell";
/// <summary>陷阱标志格式</summary>
public const string TAG_TRAP = "trap";
public const string TAG_REG_PENDULUM = "pendulum-text";
public const string TAG_REG_MONSTER = "monster-text";
......@@ -42,7 +50,7 @@ public class MSEConfig
public const string FILE_CONFIG_NAME = "Chinese-Simplified";
public const string PATH_IMAGE = "Images";
public string configName = FILE_CONFIG_NAME;
#endregion
public MSEConfig(string path)
{
init(path);
......@@ -56,10 +64,10 @@ public void SetConfig(string config, string path)
//设置文件名
configName = MyPath.getFullFileName(MSEConfig.TAG, config);
replaces = new Dictionary<string, string>();
replaces = new SortedList<string, string>();
typeDic = new Dictionary<long, string>();
raceDic = new Dictionary<long, string>();
typeDic = new SortedList<long, string>();
raceDic = new SortedList<long, string>();
string[] lines = File.ReadAllLines(config, Encoding.UTF8);
foreach (string line in lines)
{
......@@ -137,7 +145,7 @@ public void init(string path)
//简体转繁体?
public bool Iscn2tw;
//特数字替换
public Dictionary<string, string> replaces;
public SortedList<string, string> replaces;
//效果文正则提取
public string regx_pendulum;
public string regx_monster;
......@@ -145,7 +153,7 @@ public void init(string path)
public string head;
//存档结尾
public string end;
public Dictionary<long, string> typeDic;
public Dictionary<long, string> raceDic;
public SortedList<long, string> typeDic;
public SortedList<long, string> raceDic;
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace DataEditorX.Core.Mse
{
public class MseAttribute
{
/// <summary>无</summary>
public const string NONE = "none";
/// <summary>暗</summary>
public const string DARK = "dark";
/// <summary>神</summary>
public const string DIVINE = "divine";
/// <summary>地</summary>
public const string EARTH = "earth";
/// <summary>火</summary>
public const string FIRE = "fire";
/// <summary>光</summary>
public const string LIGHT = "light";
/// <summary>水</summary>
public const string WATER = "water";
/// <summary>风</summary>
public const string WIND = "wind";
/// <summary>魔法</summary>
public const string SPELL = "spell";
/// <summary>陷阱</summary>
public const string TRAP = "trap";
}
public class MseSpellTrap
{
/// <summary>装备</summary>
public const string EQUIP = "+";
/// <summary>速攻</summary>
public const string QUICKPLAY = "$";
/// <summary>场地</summary>
public const string FIELD = "&";
/// <summary>永续</summary>
public const string CONTINUOUS = "%";
/// <summary>仪式</summary>
public const string RITUAL = "#";
/// <summary>反击</summary>
public const string COUNTER = "!";
/// <summary>通常</summary>
public const string NORMAL = "^";
}
public class MseCardType
{
/// <summary>通常</summary>
public const string CARD_NORMAL = "normal monster";
/// <summary>效果</summary>
public const string CARD_EFFECT = "effect monster";
/// <summary>超量</summary>
public const string CARD_XYZ = "xyz monster";
/// <summary>仪式</summary>
public const string CARD_RITUAL = "ritual monster";
/// <summary>融合</summary>
public const string CARD_FUSION = "fusion monster";
/// <summary>衍生物</summary>
public const string CARD_TOKEN = "token monster";
/// <summary>衍生物无种族</summary>
public const string CARD_TOKEN2 = "token card";
/// <summary>同调</summary>
public const string CARD_SYNCHRO = "synchro monster";
/// <summary>魔法</summary>
public const string CARD_SPELL = "spell card";
/// <summary>陷阱</summary>
public const string CARD_TRAP = "trap card";
}
}
......@@ -12,8 +12,9 @@
using Microsoft.VisualBasic;
using DataEditorX.Config;
using DataEditorX.Language;
namespace DataEditorX.Core
namespace DataEditorX.Core.Mse
{
/// <summary>
/// MSE制作
......@@ -43,39 +44,10 @@ public class MseMaker
public const string TAG_PSCALE2 = "pendulum scale 2";
public const string TAG_PEND_TEXT = "pendulum text";
public const string TAG_CODE = "gamecode";
/// <summary>无</summary>
public const string KEY_ATTRIBUTE_NONE = "none";
/// <summary>暗</summary>
public const string KEY_ATTRIBUTE_DARK = "dark";
/// <summary>神</summary>
public const string KEY_ATTRIBUTE_DIVINE = "divine";
/// <summary>地</summary>
public const string KEY_ATTRIBUTE_EARTH = "earth";
/// <summary>火</summary>
public const string KEY_ATTRIBUTE_FIRE = "fire";
/// <summary>光</summary>
public const string KEY_ATTRIBUTE_LIGHT = "light";
/// <summary>水</summary>
public const string KEY_ATTRIBUTE_WATER = "water";
/// <summary>风</summary>
public const string KEY_ATTRIBUTE_WIND = "wind";
/// <summary>通常</summary>
public const string CARD_NORMAL = "normal monster";
/// <summary>效果</summary>
public const string CARD_EFFECT = "effect monster";
/// <summary>超量</summary>
public const string CARD_XYZ = "xyz monster";
/// <summary>仪式</summary>
public const string CARD_RITUAL = "ritual monster";
/// <summary>融合</summary>
public const string CARD_FUSION = "fusion monster";
/// <summary>衍生物</summary>
public const string CARD_TOKEN = "token monster";
/// <summary>衍生物无种族</summary>
public const string CARD_TOKEN2 = "token card";
/// <summary>同调</summary>
public const string CARD_SYNCHRO = "synchro monster";
public const string UNKNOWN_ATKDEF = "?";
public const int UNKNOWN_ATKDEF_VALUE = -2;
public const string TAG_REP_TEXT = "%text%";
public const string TAG_REP_PTEXT = "%ptext%";
#endregion
#region 成员,初始化
......@@ -102,13 +74,13 @@ public MSEConfig GetConfig()
{
return cfg;
}
#endregion
#endregion
#region 数据处理
//合并
public string GetLine(string key, string word)
{
return " "+key+": "+word;
return " " + key + ": " + word;
}
//特殊字
public string reItalic(string str)
......@@ -131,23 +103,23 @@ public string cn2tw(string str)
return str;
}
//获取魔法陷阱的类型符号
public string GetST(Card c, bool isSpell)
public string GetSpellTrapSymbol(Card c, bool isSpell)
{
string level;
if (c.IsType(CardType.TYPE_EQUIP))
level = "+";
level = MseSpellTrap.EQUIP;
else if (c.IsType(CardType.TYPE_QUICKPLAY))
level = "$";
level = MseSpellTrap.QUICKPLAY;
else if (c.IsType(CardType.TYPE_FIELD))
level = "&";
level = MseSpellTrap.FIELD;
else if (c.IsType(CardType.TYPE_CONTINUOUS))
level = "%";
level = MseSpellTrap.CONTINUOUS;
else if (c.IsType(CardType.TYPE_RITUAL))
level = "#";
level = MseSpellTrap.RITUAL;
else if (c.IsType(CardType.TYPE_COUNTER))
level = "!";
level = MseSpellTrap.COUNTER;
else if (cfg.str_spell == MSEConfig.TAG_REP && cfg.str_trap == MSEConfig.TAG_REP)
level = "^";//带文字的图片
level = MseSpellTrap.NORMAL;//带文字的图片
else
level = "";
......@@ -201,33 +173,33 @@ public static string GetCardImagePath(string picpath, Card c)
}
return "";
}
//获取属性
//获取属性
public static string GetAttribute(int attr)
{
CardAttribute cattr = (CardAttribute)attr;
string sattr = KEY_ATTRIBUTE_NONE;
string sattr = MseAttribute.NONE;
switch (cattr)
{
case CardAttribute.ATTRIBUTE_DARK:
sattr = KEY_ATTRIBUTE_DARK;
sattr = MseAttribute.DARK;
break;
case CardAttribute.ATTRIBUTE_DEVINE:
sattr = KEY_ATTRIBUTE_DIVINE;
sattr = MseAttribute.DIVINE;
break;
case CardAttribute.ATTRIBUTE_EARTH:
sattr = KEY_ATTRIBUTE_EARTH;
sattr = MseAttribute.EARTH;
break;
case CardAttribute.ATTRIBUTE_FIRE:
sattr = KEY_ATTRIBUTE_FIRE;
sattr = MseAttribute.FIRE;
break;
case CardAttribute.ATTRIBUTE_LIGHT:
sattr = KEY_ATTRIBUTE_LIGHT;
sattr = MseAttribute.LIGHT;
break;
case CardAttribute.ATTRIBUTE_WATER:
sattr = KEY_ATTRIBUTE_WATER;
sattr = MseAttribute.WATER;
break;
case CardAttribute.ATTRIBUTE_WIND:
sattr = KEY_ATTRIBUTE_WIND;
sattr = MseAttribute.WIND;
break;
}
return sattr;
......@@ -243,9 +215,10 @@ public static string GetDesc(string cdesc, string regx)
if (mc.Success)
return ((mc.Groups.Count > 1) ?
mc.Groups[1].Value : mc.Groups[0].Value)
.Replace("\n","\n\t\t");
.Replace("\n", "\n\t\t");
return "";
}
public string ReText(string text)
{
StringBuilder sb = new StringBuilder(text);
......@@ -286,44 +259,46 @@ public string GetType(CardType ctype)
public string[] GetTypes(Card c)
{
//卡片类型,效果1,效果2,效果3
string[] types = new string[] { CARD_NORMAL, "", "", "" };
string[] types = new string[] {
MseCardType.CARD_NORMAL, "", "", "" };
if (c.IsType(CardType.TYPE_MONSTER))
{//卡片类型和第1效果
if (c.IsType(CardType.TYPE_XYZ))
{
types[0] = CARD_XYZ;
types[0] = MseCardType.CARD_XYZ;
types[1] = GetType(CardType.TYPE_XYZ);
}
else if (c.IsType(CardType.TYPE_TOKEN))
{
types[0] = (c.race == 0) ? CARD_TOKEN2
: CARD_TOKEN;
types[0] = (c.race == 0) ?
MseCardType.CARD_TOKEN2
: MseCardType.CARD_TOKEN;
types[1] = GetType(CardType.TYPE_TOKEN);
}
else if (c.IsType(CardType.TYPE_RITUAL))
{
types[0] = CARD_RITUAL;
types[0] = MseCardType.CARD_RITUAL;
types[1] = GetType(CardType.TYPE_RITUAL);
}
else if (c.IsType(CardType.TYPE_FUSION))
{
types[0] = CARD_FUSION;
types[0] = MseCardType.CARD_FUSION;
types[1] = GetType(CardType.TYPE_FUSION);
}
else if (c.IsType(CardType.TYPE_SYNCHRO))
{
types[0] = CARD_SYNCHRO;
types[0] = MseCardType.CARD_SYNCHRO;
types[1] = GetType(CardType.TYPE_SYNCHRO);
}
else if (c.IsType(CardType.TYPE_EFFECT))
{
types[0] = CARD_EFFECT;
types[0] = MseCardType.CARD_EFFECT;
}
else
types[0] = CARD_NORMAL;
types[0] = MseCardType.CARD_NORMAL;
//同调
if (types[0] == CARD_SYNCHRO
|| types[0] == CARD_TOKEN)
if (types[0] == MseCardType.CARD_SYNCHRO
|| types[0] == MseCardType.CARD_TOKEN)
{
if (c.IsType(CardType.TYPE_TUNER)
&& c.IsType(CardType.TYPE_EFFECT))
......@@ -340,14 +315,14 @@ public string[] GetTypes(Card c)
types[2] = GetType(CardType.TYPE_EFFECT);
}
}
else if (types[0] == CARD_NORMAL)
else if (types[0] == MseCardType.CARD_NORMAL)
{
if (c.IsType(CardType.TYPE_PENDULUM))//灵摆
types[1] = GetType(CardType.TYPE_PENDULUM);
else if (c.IsType(CardType.TYPE_TUNER))//调整
types[1] = GetType(CardType.TYPE_TUNER);
}
else if (types[0] != CARD_EFFECT)
else if (types[0] != MseCardType.CARD_EFFECT)
{//效果
if (c.IsType(CardType.TYPE_EFFECT))
types[2] = GetType(CardType.TYPE_EFFECT);
......@@ -410,6 +385,7 @@ public string[] WriteSet(string file, Card[] cards)
else
sw.WriteLine(getMonster(c, jpg, c.IsType(CardType.TYPE_PENDULUM)));
}
sw.WriteLine(cfg.end);
sw.Close();
}
......@@ -443,15 +419,15 @@ string getMonster(Card c, string img, bool isPendulum)
sb.AppendLine(GetLine(TAG_PSCALE1, ((c.level >> 0x18) & 0xff).ToString()));
sb.AppendLine(GetLine(TAG_PSCALE2, ((c.level >> 0x10) & 0xff).ToString()));
sb.AppendLine(" " + TAG_PEND_TEXT + ":");
sb.AppendLine(" "+GetDesc(c.desc, cfg.regx_pendulum));
sb.AppendLine(" " + GetDesc(c.desc, cfg.regx_pendulum));
}
else//一般怪兽
{
sb.AppendLine(" " + TAG_TEXT + ":");
sb.AppendLine(" " + ReText(c.desc));
}
sb.AppendLine(GetLine(TAG_ATK, (c.atk < 0) ? "?" : c.atk.ToString()));
sb.AppendLine(GetLine(TAG_DEF, (c.def < 0) ? "?" : c.def.ToString()));
sb.AppendLine(GetLine(TAG_ATK, (c.atk < 0) ? UNKNOWN_ATKDEF : c.atk.ToString()));
sb.AppendLine(GetLine(TAG_DEF, (c.def < 0) ? UNKNOWN_ATKDEF : c.def.ToString()));
sb.AppendLine(GetLine(TAG_CODE, c.idString));
return sb.ToString();
......@@ -460,11 +436,11 @@ string getMonster(Card c, string img, bool isPendulum)
string getSpellTrap(Card c, string img, bool isSpell)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine(TAG_CARD+":");
sb.AppendLine(TAG_CARD + ":");
sb.AppendLine(GetLine(TAG_CARDTYPE, isSpell ? "spell card" : "trap card"));
sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
sb.AppendLine(GetLine(TAG_ATTRIBUTE, isSpell ? "spell" : "trap"));
sb.AppendLine(GetLine(TAG_LEVEL, GetST(c, isSpell)));
sb.AppendLine(GetLine(TAG_LEVEL, GetSpellTrapSymbol(c, isSpell)));
sb.AppendLine(GetLine(TAG_IMAGE, img));
sb.AppendLine(" " + TAG_TEXT + ":");
sb.AppendLine(" " + ReText(c.desc));
......@@ -472,5 +448,276 @@ string getSpellTrap(Card c, string img, bool isSpell)
return sb.ToString();
}
#endregion
#region 读存档
public static int GetAttributeInt(string cattr)
{
int iattr = 0;
switch (cattr)
{
case MseAttribute.DARK:
iattr = (int)CardAttribute.ATTRIBUTE_DARK;
break;
case MseAttribute.DIVINE:
iattr = (int)CardAttribute.ATTRIBUTE_DEVINE;
break;
case MseAttribute.EARTH:
iattr = (int)CardAttribute.ATTRIBUTE_EARTH;
break;
case MseAttribute.FIRE:
iattr = (int)CardAttribute.ATTRIBUTE_FIRE;
break;
case MseAttribute.LIGHT:
iattr = (int)CardAttribute.ATTRIBUTE_LIGHT;
break;
case MseAttribute.WATER:
iattr = (int)CardAttribute.ATTRIBUTE_WATER;
break;
case MseAttribute.WIND:
iattr = (int)CardAttribute.ATTRIBUTE_WIND;
break;
}
return iattr;
}
long GetRaceInt(string race)
{
if (!string.IsNullOrEmpty(race))
{
foreach (long key in cfg.raceDic.Keys)
{
if (race.Equals(cfg.raceDic[key]))
return key;
}
}
return (long)CardRace.RACE_NONE;
}
long GetTypeInt(string type)
{
if (!string.IsNullOrEmpty(type))
{
foreach (long key in cfg.typeDic.Keys)
{
if (type.Equals(cfg.typeDic[key]))
return key;
}
}
return 0;
}
static string GetValue(string content, string tag)
{
Regex regx = new Regex(@"^[\t]+?" + tag + @":([\s\S]*?)$", RegexOptions.Multiline);
Match m = regx.Match(content);
if (m.Success)
{
if (m.Groups.Count >= 2)
return RemoveTag(m.Groups[1].Value);
}
return "";
}
//多行
static string GetMultiValue(string content, string tag)
{
//TODO
content = content.Replace("\t\t", "");
Regex regx = new Regex(@"^[\t]+?" + tag + @":([\S\s]*?)^\t[\S\s]+?:", RegexOptions.Multiline);
Match m = regx.Match(content);
if (m.Success)
{
if (m.Groups.Count >= 2)
{
string word = m.Groups[1].Value;
return RemoveTag(word).Replace("^", "").Replace("\t", "");
}
}
return "";
}
long GetSpellTrapType(string level)
{
long type = 0;
//魔法陷阱
if (level.Contains(MseSpellTrap.EQUIP))
type = (long)CardType.TYPE_EQUIP;
if (level.Contains(MseSpellTrap.QUICKPLAY))
type = (long)CardType.TYPE_QUICKPLAY;
if (level.Contains(MseSpellTrap.FIELD))
type = (long)CardType.TYPE_FIELD;
if (level.Contains(MseSpellTrap.CONTINUOUS))
type = (long)CardType.TYPE_CONTINUOUS;
if (level.Contains(MseSpellTrap.RITUAL))
type = (long)CardType.TYPE_RITUAL;
if (level.Contains(MseSpellTrap.COUNTER))
type = (long)CardType.TYPE_COUNTER;
return type;
}
long GetMonsterType(string cardtype)
{
long type = 0;
if (cardtype.Equals(MseCardType.CARD_SPELL))
type = (long)CardType.TYPE_SPELL;
else if (cardtype.Equals(MseCardType.CARD_TRAP))
type = (long)CardType.TYPE_TRAP;
else
{
type = (long)CardType.TYPE_MONSTER;
switch (cardtype)
{
case MseCardType.CARD_NORMAL:
type |= (long)CardType.TYPE_NORMAL;
break;
case MseCardType.CARD_EFFECT:
type |= (long)CardType.TYPE_EFFECT;
break;
case MseCardType.CARD_XYZ:
type |= (long)CardType.TYPE_XYZ;
break;
case MseCardType.CARD_RITUAL:
type |= (long)CardType.TYPE_RITUAL;
break;
case MseCardType.CARD_FUSION:
type |= (long)CardType.TYPE_FUSION;
break;
case MseCardType.CARD_TOKEN:
case MseCardType.CARD_TOKEN2:
type |= (long)CardType.TYPE_TOKEN;
break;
case MseCardType.CARD_SYNCHRO:
type |= (long)CardType.TYPE_SYNCHRO;
break;
default:
type |= (long)CardType.TYPE_NORMAL;
break;
}
}
return type;
}
//卡片类型
long GetCardType(string cardtype, string level, string type1,
string type2, string type3)
{
long type = 0;
//魔法陷阱
type |= GetSpellTrapType(level);
//怪兽
type |= GetMonsterType(cardtype);
//type2-4是识别怪兽效果类型
type |= GetTypeInt(type1);
type |= GetTypeInt(type2);
type |= GetTypeInt(type3);
return type;
}
static string RemoveTag(string word)
{
//移除标签<>
word = Regex.Replace(word, "<[^>]+?>", "");
return word.Trim().Replace("\t", "");
}
//解析卡片
public Card ReadCard(string content, out string img)
{
string tmp;
int itmp;
Card c = new Card();
c.ot = (int)CardRule.OCGTCG;
//卡名
c.name = GetValue(content, TAG_NAME);
tmp = GetValue(content, TAG_LEVEL);
//卡片种族
c.race = GetRaceInt(GetValue(content, TAG_TYPE1));
//卡片类型
c.type = GetCardType(GetValue(content, TAG_CARDTYPE), tmp,
GetValue(content, TAG_TYPE2),
GetValue(content, TAG_TYPE3),
GetValue(content, TAG_TYPE4));
long t = GetSpellTrapType(GetValue(content, TAG_LEVEL));
//不是魔法,陷阱卡片的星数
if (!(c.IsType(CardType.TYPE_SPELL)
|| c.IsType(CardType.TYPE_TRAP)) && t == 0)
c.level = GetValue(content, TAG_LEVEL).Length;
//属性
c.attribute = GetAttributeInt(GetValue(content, TAG_ATTRIBUTE));
//密码
long.TryParse(GetValue(content, TAG_CODE), out c.id);
//ATK
tmp = GetValue(content, TAG_ATK);
if (tmp == UNKNOWN_ATKDEF)
c.atk = UNKNOWN_ATKDEF_VALUE;
else
int.TryParse(tmp, out c.atk);
//DEF
tmp = GetValue(content, TAG_DEF);
if (tmp == UNKNOWN_ATKDEF)
c.def = UNKNOWN_ATKDEF_VALUE;
else
int.TryParse(tmp, out c.def);
//图片
img = GetValue(content, TAG_IMAGE);
//摇摆
if (c.IsType(CardType.TYPE_PENDULUM))
{//根据预设的模版,替换内容
tmp = cfg.temp_text.Replace(TAG_REP_TEXT,
GetMultiValue(content,TAG_TEXT));
tmp = tmp.Replace(TAG_REP_PTEXT,
GetMultiValue(content, TAG_PEND_TEXT));
c.desc = tmp;
}
else
c.desc = GetMultiValue(content,TAG_TEXT);
//摇摆刻度
int.TryParse(GetValue(content, TAG_PSCALE1), out itmp);
c.level += (itmp << 0x18);
int.TryParse(GetValue(content, TAG_PSCALE2), out itmp);
c.level += (itmp << 0x10);
return c;
}
//读取所有卡片
public Card[] ReadCards(string set, bool repalceOld)
{
List<Card> cards = new List<Card>();
if (!File.Exists(set))
return null;
string allcontent = File.ReadAllText(set, Encoding.UTF8);
Regex regx = new Regex(@"^card:[\S\s]+?gamecode:[\S\s]+?$",
RegexOptions.Multiline);
MatchCollection matchs = regx.Matches(allcontent);
int i = 0;
foreach (Match match in matchs)
{
string content = match.Groups[0].Value;
i++;
string img;
Card c = ReadCard(content, out img);
if (c.id <= 0)
c.id = i;
//添加卡片
cards.Add(c);
//已经解压出来的图片
string saveimg = MyPath.Combine(cfg.imagepath, img);
if (!File.Exists(saveimg))//没有解压相应的图片
continue;
//改名后的图片
img = MyPath.Combine(cfg.imagepath, c.idString + ".jpg");
if (img == saveimg)//文件名相同
continue;
if (File.Exists(img))
{
if (repalceOld)//如果存在,则备份原图
{
File.Delete(img + ".bak");//删除备份
File.Move(img, img + ".bak");//备份
File.Move(saveimg, img);//改名
}
}
else
File.Move(saveimg, img);
}
File.Delete(set);
return cards.ToArray();
}
#endregion
}
}
......@@ -18,6 +18,7 @@
using DataEditorX.Language;
using DataEditorX.Common;
using DataEditorX.Config;
using DataEditorX.Core.Mse;
namespace DataEditorX.Core
{
......@@ -35,6 +36,8 @@ public enum MyTask
CutImages,
///<summary>转换图片</summary>
ConvertImages,
///<summary>读取MSE存档</summary>
ReadMSE,
}
/// <summary>
/// 任务
......@@ -55,6 +58,13 @@ public class TaskHelper
/// </summary>
private Card[] cardlist;
/// <summary>
/// 当前卡片列表
/// </summary>
public Card[] CardList
{
get { return cardlist; }
}
/// <summary>
/// 任务参数
/// </summary>
private string[] mArgs;
......@@ -99,6 +109,7 @@ public bool IsCancel()
}
public void Cancel()
{
isRun = false;
isCancel = true;
}
public MyTask getLastTask()
......@@ -246,7 +257,7 @@ public void ConvertImages(string imgpath, string gamepath, bool isreplace)
#endregion
#region MSE存档
public string MSEImage
public string MSEImagePath
{
get { return mseHelper.ImagePath; }
}
......@@ -303,6 +314,25 @@ public void SaveMSE(int num, string file, Card[] cards, bool isUpdate)
}
File.Delete(setFile);
}
public Card[] ReadMSE(string mseset, bool repalceOld)
{
//解压所有文件
using (ZipStorer zips = ZipStorer.Open(mseset,FileAccess.Read))
{
zips.EncodeUTF8 = true;
List<ZipStorer.ZipFileEntry> files = zips.ReadCentralDir();
int count = files.Count;
int i = 0;
foreach (ZipStorer.ZipFileEntry file in files)
{
worker.ReportProgress(i / count, string.Format("{0}/{1}", i, count));
string savefilename = MyPath.Combine(mseHelper.ImagePath, file.FilenameInZip);
zips.ExtractFile(file, savefilename);
}
}
string setfile = MyPath.Combine(mseHelper.ImagePath, "set");
return mseHelper.ReadCards(setfile, repalceOld);
}
#endregion
#region 导出数据
......@@ -406,6 +436,18 @@ public void Run()
SaveMSEs(mArgs[0], cardlist, replace);
}
break;
case MyTask.ReadMSE:
if (mArgs != null && mArgs.Length >= 2)
{
replace = false;
if (mArgs.Length >= 2)
{
if (mArgs[1] == Boolean.TrueString)
replace = true;
}
cardlist = ReadMSE(mArgs[0], replace);
}
break;
case MyTask.ConvertImages:
if (mArgs != null && mArgs.Length >= 2)
{
......@@ -422,7 +464,8 @@ public void Run()
isRun = false;
lastTask = nowTask;
nowTask = MyTask.NONE;
cardlist = null;
if(lastTask != MyTask.ReadMSE)
cardlist = null;
mArgs = null;
}
#endregion
......
......@@ -53,7 +53,6 @@ private void InitializeComponent()
this.menuitem_readydk = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_readimages = new System.Windows.Forms.ToolStripMenuItem();
this.tsep6 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_compdb = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_exportdata = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_findluafunc = new System.Windows.Forms.ToolStripMenuItem();
this.tsep5 = new System.Windows.Forms.ToolStripSeparator();
......@@ -120,6 +119,7 @@ private void InitializeComponent()
this.lv_cardlist = new System.Windows.Forms.DListView();
this.ch_cardcode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ch_cardname = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.menuitem_compdb = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenu.SuspendLayout();
this.SuspendLayout();
//
......@@ -141,6 +141,7 @@ private void InitializeComponent()
this.menuitem_file.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_open,
this.menuitem_new,
this.menuitem_compdb,
this.toolStripSeparator3,
this.menuitem_copyselectto,
this.menuitem_copyto,
......@@ -233,7 +234,6 @@ private void InitializeComponent()
this.menuitem_readydk,
this.menuitem_readimages,
this.tsep6,
this.menuitem_compdb,
this.menuitem_exportdata,
this.menuitem_findluafunc,
this.tsep5,
......@@ -252,96 +252,90 @@ private void InitializeComponent()
// menuitem_readydk
//
this.menuitem_readydk.Name = "menuitem_readydk";
this.menuitem_readydk.Size = new System.Drawing.Size(212, 22);
this.menuitem_readydk.Size = new System.Drawing.Size(205, 22);
this.menuitem_readydk.Text = "Cards Form ydk file(&Y)";
this.menuitem_readydk.Click += new System.EventHandler(this.Menuitem_readydkClick);
//
// menuitem_readimages
//
this.menuitem_readimages.Name = "menuitem_readimages";
this.menuitem_readimages.Size = new System.Drawing.Size(212, 22);
this.menuitem_readimages.Size = new System.Drawing.Size(205, 22);
this.menuitem_readimages.Text = "Cards From Images(&I)";
this.menuitem_readimages.Click += new System.EventHandler(this.Menuitem_readimagesClick);
//
// tsep6
//
this.tsep6.Name = "tsep6";
this.tsep6.Size = new System.Drawing.Size(209, 6);
//
// menuitem_compdb
//
this.menuitem_compdb.Name = "menuitem_compdb";
this.menuitem_compdb.Size = new System.Drawing.Size(212, 22);
this.menuitem_compdb.Text = "Compression DataBase";
this.menuitem_compdb.Click += new System.EventHandler(this.Menuitem_compdbClick);
this.tsep6.Size = new System.Drawing.Size(202, 6);
//
// menuitem_exportdata
//
this.menuitem_exportdata.Name = "menuitem_exportdata";
this.menuitem_exportdata.Size = new System.Drawing.Size(212, 22);
this.menuitem_exportdata.Size = new System.Drawing.Size(205, 22);
this.menuitem_exportdata.Text = "Export Data";
this.menuitem_exportdata.Click += new System.EventHandler(this.Menuitem_exportdataClick);
//
// menuitem_findluafunc
//
this.menuitem_findluafunc.Name = "menuitem_findluafunc";
this.menuitem_findluafunc.Size = new System.Drawing.Size(212, 22);
this.menuitem_findluafunc.Size = new System.Drawing.Size(205, 22);
this.menuitem_findluafunc.Text = "Find Lua Function";
this.menuitem_findluafunc.Click += new System.EventHandler(this.menuitem_findluafunc_Click);
//
// tsep5
//
this.tsep5.Name = "tsep5";
this.tsep5.Size = new System.Drawing.Size(209, 6);
this.tsep5.Size = new System.Drawing.Size(202, 6);
//
// menuitem_readmse
//
this.menuitem_readmse.Name = "menuitem_readmse";
this.menuitem_readmse.Size = new System.Drawing.Size(212, 22);
this.menuitem_readmse.Size = new System.Drawing.Size(205, 22);
this.menuitem_readmse.Text = "Read from MSE";
this.menuitem_readmse.Click += new System.EventHandler(this.menuitem_readmse_Click);
//
// menuitem_saveasmse_select
//
this.menuitem_saveasmse_select.Name = "menuitem_saveasmse_select";
this.menuitem_saveasmse_select.Size = new System.Drawing.Size(212, 22);
this.menuitem_saveasmse_select.Size = new System.Drawing.Size(205, 22);
this.menuitem_saveasmse_select.Text = "Select Save As MSE";
this.menuitem_saveasmse_select.Click += new System.EventHandler(this.Menuitem_saveasmse_selectClick);
//
// menuitem_saveasmse
//
this.menuitem_saveasmse.Name = "menuitem_saveasmse";
this.menuitem_saveasmse.Size = new System.Drawing.Size(212, 22);
this.menuitem_saveasmse.Size = new System.Drawing.Size(205, 22);
this.menuitem_saveasmse.Text = "All Now Save As MSE";
this.menuitem_saveasmse.Click += new System.EventHandler(this.Menuitem_saveasmseClick);
//
// tsep3
//
this.tsep3.Name = "tsep3";
this.tsep3.Size = new System.Drawing.Size(209, 6);
this.tsep3.Size = new System.Drawing.Size(202, 6);
//
// menuitem_cutimages
//
this.menuitem_cutimages.Name = "menuitem_cutimages";
this.menuitem_cutimages.Size = new System.Drawing.Size(212, 22);
this.menuitem_cutimages.Size = new System.Drawing.Size(205, 22);
this.menuitem_cutimages.Text = "Cut Images";
this.menuitem_cutimages.Click += new System.EventHandler(this.Menuitem_cutimagesClick);
//
// menuitem_convertimage
//
this.menuitem_convertimage.Name = "menuitem_convertimage";
this.menuitem_convertimage.Size = new System.Drawing.Size(212, 22);
this.menuitem_convertimage.Size = new System.Drawing.Size(205, 22);
this.menuitem_convertimage.Text = "Import Images";
this.menuitem_convertimage.Click += new System.EventHandler(this.Menuitem_convertimageClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(209, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(202, 6);
//
// menuitem_cancelTask
//
this.menuitem_cancelTask.Name = "menuitem_cancelTask";
this.menuitem_cancelTask.Size = new System.Drawing.Size(212, 22);
this.menuitem_cancelTask.Size = new System.Drawing.Size(205, 22);
this.menuitem_cancelTask.Text = "Cancel Task";
this.menuitem_cancelTask.Click += new System.EventHandler(this.Menuitem_cancelTaskClick);
//
......@@ -972,6 +966,13 @@ private void InitializeComponent()
this.ch_cardname.Text = "Card Name";
this.ch_cardname.Width = 140;
//
// menuitem_compdb
//
this.menuitem_compdb.Name = "menuitem_compdb";
this.menuitem_compdb.Size = new System.Drawing.Size(232, 22);
this.menuitem_compdb.Text = "Compression DataBase";
this.menuitem_compdb.Click += new System.EventHandler(this.menuitem_compdb_Click);
//
// DataEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -1057,7 +1058,6 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox tb_setcode2;
private System.Windows.Forms.TextBox tb_setcode1;
private System.Windows.Forms.ToolStripSeparator tsep5;
private System.Windows.Forms.ToolStripMenuItem menuitem_compdb;
private System.Windows.Forms.ToolStripMenuItem menuitem_convertimage;
private System.Windows.Forms.ToolStripMenuItem menuitem_cutimages;
private System.Windows.Forms.ToolStripMenuItem menuitem_saveasmse;
......@@ -1126,5 +1126,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_importmseimg;
private System.Windows.Forms.ToolStripMenuItem menuitem_findluafunc;
private System.Windows.Forms.ToolStripSeparator tsep6;
private System.Windows.Forms.ToolStripMenuItem menuitem_compdb;
}
}
......@@ -20,6 +20,7 @@
using DataEditorX.Controls;
using DataEditorX.Config;
using DataEditorX.Core.Mse;
namespace DataEditorX
{
......@@ -445,6 +446,8 @@ void AddListView(int p)
void SetCard(Card c)
{
oldCard = c;
if (c.str == null)
c.InitStrs();
tb_cardname.Text = c.name;
tb_cardtext.Text = c.desc;
......@@ -1137,7 +1140,7 @@ void BgWorker1ProgressChanged(object sender, System.ComponentModel.ProgressChang
//任务完成
void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
{
//
//还原标题
int t = title.LastIndexOf(" (");
if (t > 0)
{
......@@ -1145,12 +1148,15 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
SetTitle();
}
if (e.Error != null)
{
{//出错
if (tasker != null)
tasker.Cancel();
if (bgWorker1.IsBusy)
bgWorker1.CancelAsync();
MyMsg.Show(LANG.GetMsg(LMSG.TaskError) + "\n" + e.Error);
}
else if (tasker.IsCancel() || e.Cancelled)
{
{//取消任务
MyMsg.Show(LMSG.CancelTask);
}
else
......@@ -1172,6 +1178,11 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
case MyTask.ConvertImages:
MyMsg.Show(LMSG.ConvertImageOK);
break;
case MyTask.ReadMSE:
//保存读取的卡片
SaveCards(tasker.CardList);
MyMsg.Show(LMSG.ReadMSEisOK);
break;
}
}
}
......@@ -1204,28 +1215,32 @@ public Card[] getCardList(bool onlyselect)
}
void Menuitem_copytoClick(object sender, EventArgs e)
{
CopyTo(false);
if (!Check())
return;
CopyTo(getCardList(false));
}
void Menuitem_copyselecttoClick(object sender, EventArgs e)
{
CopyTo(true);
if (!Check())
return;
CopyTo(getCardList(true));
}
//保存卡片
//保存卡片到当前数据库
public void SaveCards(Card[] cards)
{
if (!Check())
return;
if (cards == null || cards.Length == 0)
return;
bool replace = MyMsg.Question(LMSG.IfReplaceExistingCard);
DataBase.CopyDB(nowCdbFile, !replace, cards);
Search(srcCard, true);
}
void CopyTo(bool onlyselect)
//卡片另存为
void CopyTo(Card[] cards)
{
if (!Check())
return;
Card[] cards = getCardList(onlyselect);
if (cards == null)
if (cards == null || cards.Length == 0)
return;
//select file
bool replace = false;
......@@ -1331,9 +1346,9 @@ void ImportImage(string file, string tid)
}
if (menuitem_importmseimg.Checked)
{
if (!Directory.Exists(tasker.MSEImage))
Directory.CreateDirectory(tasker.MSEImage);
f = MyPath.Combine(tasker.MSEImage, tid + ".jpg");
if (!Directory.Exists(tasker.MSEImagePath))
Directory.CreateDirectory(tasker.MSEImagePath);
f = MyPath.Combine(tasker.MSEImagePath, tid + ".jpg");
File.Copy(file, f, true);
}
else
......@@ -1357,8 +1372,8 @@ void setImage(long id)
pl_image.BackgroundImage.Dispose();
Bitmap temp;
string pic = MyPath.Combine(PICPATH, id + ".jpg");
string pic2 = MyPath.Combine(tasker.MSEImage, id + ".jpg");
string pic3 = MyPath.Combine(tasker.MSEImage, new Card(id).idString + ".jpg");
string pic2 = MyPath.Combine(tasker.MSEImagePath, id + ".jpg");
string pic3 = MyPath.Combine(tasker.MSEImagePath, new Card(id).idString + ".jpg");
if (menuitem_importmseimg.Checked && File.Exists(pic2))
{
temp = new Bitmap(pic2);
......@@ -1377,13 +1392,6 @@ void setImage(long id)
else
pl_image.BackgroundImage = m_cover;
}
void Menuitem_compdbClick(object sender, EventArgs e)
{
if (!Check())
return;
DataBase.Compression(nowCdbFile);
MyMsg.Show(LMSG.CompDBOK);
}
void Menuitem_convertimageClick(object sender, EventArgs e)
{
if (!Check())
......@@ -1607,5 +1615,37 @@ private void cb_setname4_SelectedIndexChanged(object sender, EventArgs e)
setCode_Selected(4, cb_setname4, tb_setcode4);
}
#endregion
#region 读取MSE存档
private void menuitem_readmse_Click(object sender, EventArgs e)
{
if (!Check())
return;
if (isRun())
return;
//select open mse-set
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.selectMseset);
dlg.Filter = LANG.GetMsg(LMSG.MseType);
if (dlg.ShowDialog() == DialogResult.OK)
{
bool isUpdate = false;//是否替换存在的图片
isUpdate = MyMsg.Question(LMSG.IfReplaceExistingImage);
tasker.SetTask(MyTask.ReadMSE, null,
dlg.FileName, isUpdate.ToString());
Run(LANG.GetMsg(LMSG.ReadMSE));
}
}
}
#endregion
private void menuitem_compdb_Click(object sender, EventArgs e)
{
if (!Check())
return;
DataBase.Compression(nowCdbFile);
MyMsg.Show(LMSG.CompDBOK);
}
}
}
......@@ -68,7 +68,7 @@
<DependentUpon>CodeEditForm.cs</DependentUpon>
</Compile>
<Compile Include="Common\CheckUpdate.cs" />
<Compile Include="Config\ConfHelper.cs" />
<Compile Include="Common\ConfHelper.cs" />
<Compile Include="Controls\DoubleContorl.cs">
<SubType>Component</SubType>
</Compile>
......@@ -88,6 +88,7 @@
<Compile Include="Core\Card.cs" />
<Compile Include="Core\CardAttribute.cs" />
<Compile Include="Core\CardRace.cs" />
<Compile Include="Core\CardRule.cs" />
<Compile Include="Core\CardType.cs" />
<Compile Include="Config\CodeConfig.cs" />
<Compile Include="Core\DataBase.cs" />
......@@ -95,8 +96,9 @@
<Compile Include="Config\DataManager.cs" />
<Compile Include="Config\ImageSet.cs" />
<Compile Include="Core\LuaFunction.cs" />
<Compile Include="Core\MseMaker.cs" />
<Compile Include="Config\MSEConfig.cs" />
<Compile Include="Core\Mse\MSECons.cs" />
<Compile Include="Core\Mse\MseMaker.cs" />
<Compile Include="Core\Mse\MSEConfig.cs" />
<Compile Include="Core\TaskHelper.cs" />
<Compile Include="Core\YGOUtil.cs" />
<Compile Include="DataEditForm.cs">
......
......@@ -88,6 +88,8 @@ public enum LMSG : uint
NewFile = 0x44,
SaveFileOK = 0x45,
IfSaveScript =0x46,
ReadMSE = 0x47,
ReadMSEisOK= 0x48,
COUNT,
}
}
......@@ -305,7 +305,7 @@ void Menuitem_openClick(object sender, EventArgs e)
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.OpenFile);
if (GetActive() != null)//判断当前窗口是不是DataEditor
if (GetActive() != null || dockPanel1.Contents.Count == 0)//判断当前窗口是不是DataEditor
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
else
dlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
......@@ -462,7 +462,6 @@ void CompareDB()
#endregion
#region 自动更新
private void bgWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
......
......@@ -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("2.2.9.5")]
[assembly: AssemblyVersion("2.2.9.6")]
......@@ -120,7 +120,7 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x27 正在检查更新
0x28 正在复制卡片
0x29 卡片复制完成
0x2a 保存MSE存档
0x2a MSE存档
0x2b MSE存档文件(*.mse-set)|*.mse-set|所有文件(*.*)|*.*
0x2c 正在导出MSE存档
0x2d 导出MSE存档完成
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x43 脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
0x46 是否保存脚本?
\ No newline at end of file
0x46 是否保存脚本?
0x47 读取MSE存档
0x48 读取MSE存档完成!
\ No newline at end of file
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall Close All
0x43 Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
0x46 If Save Script?
\ No newline at end of file
0x46 If Save Script?
0x47 Read MSE-set
0x48 Read MSE-set is OK.
\ No newline at end of file
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: CN\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: TW\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪獸效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -15,7 +15,7 @@ trap = %%
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: JP\r\n\tedition: \r\n\tST mark is text: yes\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = Pendulum Text :\n([\S\s]*?)\n\n
......
[DataEditorX]2.2.9.5[DataEditorX]
[DataEditorX]2.2.9.6[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association)
......@@ -80,6 +80,16 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.9.6
读取MSE存档
可能出现的bug:通常魔法类型识别出错,P怪兽文本提取出错,或者无法识别该卡
存档结构:(要求:每张卡的内容,开头是card,最后一行是gamecode,在MSE的card_fields修改gamecode为最后的元素)
card:
...
gamecode: 123456
card:
....
gamecode: 123456
2.2.9.5
优化选择框
2.2.9.4
......
No preview for this file type
# database history
F:\games\ygopro\p.cdb
F:\games\ygopro\cards.cdb
# script history
F:\games\ygopro\script\c168917.lua
......
......@@ -120,7 +120,7 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x27 正在检查更新
0x28 正在复制卡片
0x29 卡片复制完成
0x2a 保存MSE存档
0x2a MSE存档
0x2b MSE存档文件(*.mse-set)|*.mse-set|所有文件(*.*)|*.*
0x2c 正在导出MSE存档
0x2d 导出MSE存档完成
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x43 脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
0x46 是否保存脚本?
\ No newline at end of file
0x46 是否保存脚本?
0x47 读取MSE存档
0x48 读取MSE存档完成!
\ No newline at end of file
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall Close All
0x43 Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
0x46 If Save Script?
\ No newline at end of file
0x46 If Save Script?
0x47 Read MSE-set
0x48 Read MSE-set is OK.
\ No newline at end of file
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: CN\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: TW\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪獸效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -15,7 +15,7 @@ trap = %%
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: JP\r\n\tedition: \r\n\tST mark is text: yes\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = Pendulum Text :\n([\S\s]*?)\n\n
......
[DataEditorX]2.2.9.5[DataEditorX]
[DataEditorX]2.2.9.6[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association)
......@@ -80,6 +80,16 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.9.6
读取MSE存档
可能出现的bug:通常魔法类型识别出错,P怪兽文本提取出错,或者无法识别该卡
存档结构:(要求:每张卡的内容,开头是card,最后一行是gamecode,在MSE的card_fields修改gamecode为最后的元素)
card:
...
gamecode: 123456
card:
....
gamecode: 123456
2.2.9.5
优化选择框
2.2.9.4
......
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