Commit 787dfd6d authored by DailyShana's avatar DailyShana

add TYPE_LINK

parent ced927d6
...@@ -36,6 +36,7 @@ public void InitMember(string conf) ...@@ -36,6 +36,7 @@ public void InitMember(string conf)
dicCardRules = new Dictionary<long, string>(); dicCardRules = new Dictionary<long, string>();
dicSetnames = new Dictionary<long, string>(); dicSetnames = new Dictionary<long, string>();
dicCardTypes = new Dictionary<long, string>(); dicCardTypes = new Dictionary<long, string>();
dicLinkMarkers = new Dictionary<long, string>();
dicCardcategorys = new Dictionary<long, string>(); dicCardcategorys = new Dictionary<long, string>();
dicCardAttributes = new Dictionary<long, string>(); dicCardAttributes = new Dictionary<long, string>();
dicCardRaces = new Dictionary<long, string>(); dicCardRaces = new Dictionary<long, string>();
...@@ -47,6 +48,7 @@ public void InitMember(string conf) ...@@ -47,6 +48,7 @@ public void InitMember(string conf)
dicCardRules = DataManager.Read(text, MyConfig.TAG_RULE); dicCardRules = DataManager.Read(text, MyConfig.TAG_RULE);
dicSetnames = DataManager.Read(text, MyConfig.TAG_SETNAME); dicSetnames = DataManager.Read(text, MyConfig.TAG_SETNAME);
dicCardTypes = DataManager.Read(text, MyConfig.TAG_TYPE); dicCardTypes = DataManager.Read(text, MyConfig.TAG_TYPE);
dicLinkMarkers = DataManager.Read(text, MyConfig.TAG_MARKER);
dicCardcategorys = DataManager.Read(text, MyConfig.TAG_CATEGORY); dicCardcategorys = DataManager.Read(text, MyConfig.TAG_CATEGORY);
dicCardAttributes = DataManager.Read(text, MyConfig.TAG_ATTRIBUTE); dicCardAttributes = DataManager.Read(text, MyConfig.TAG_ATTRIBUTE);
dicCardRaces = DataManager.Read(text, MyConfig.TAG_RACE); dicCardRaces = DataManager.Read(text, MyConfig.TAG_RACE);
...@@ -78,6 +80,10 @@ public void InitMember(string conf) ...@@ -78,6 +80,10 @@ public void InitMember(string conf)
/// </summary> /// </summary>
public Dictionary<long, string> dicCardTypes = null; public Dictionary<long, string> dicCardTypes = null;
/// <summary> /// <summary>
/// 连接标志
/// </summary>
public Dictionary<long, string> dicLinkMarkers = null;
/// <summary>
/// 效果类型 /// 效果类型
/// </summary> /// </summary>
public Dictionary<long, string> dicCardcategorys = null; public Dictionary<long, string> dicCardcategorys = null;
......
...@@ -165,6 +165,10 @@ public class MyConfig : XMLReader ...@@ -165,6 +165,10 @@ public class MyConfig : XMLReader
/// 系列名 /// 系列名
/// </summary> /// </summary>
public const string TAG_SETNAME = "setname"; public const string TAG_SETNAME = "setname";
/// <summary>
/// 连接标志
/// </summary>
public const string TAG_MARKER = "link marker";
#endregion #endregion
#region 读取内容 #region 读取内容
......
...@@ -123,11 +123,11 @@ public void SetSetCode(params string[] setcodes) ...@@ -123,11 +123,11 @@ public void SetSetCode(params string[] setcodes)
} }
public long GetLeftScale() public long GetLeftScale()
{ {
return (this.level >> 0x18) & 0xff; return (this.level >> 24) & 0xff;
} }
public long GetRightScale() public long GetRightScale()
{ {
return (this.level >> 0x10) & 0xff; return (this.level >> 16) & 0xff;
} }
#endregion #endregion
......
...@@ -342,7 +342,11 @@ public static string GetSelectSQL(Card c) ...@@ -342,7 +342,11 @@ public static string GetSelectSQL(Card c)
sb.Append(" and datas.attribute = "+c.attribute.ToString()); sb.Append(" and datas.attribute = "+c.attribute.ToString());
if ((c.level & 0xff) > 0) if ((c.level & 0xff) > 0)
sb.Append(" and (datas.level & 255) = "+toInt(c.level & 0xff)); sb.Append(" and (datas.level & 255) = "+toInt(c.level & 0xff));
if(c.race>0) if ((c.level & 0xff000000) > 0)
sb.Append(" and (datas.level & 4278190080) = " + toInt(c.level & 0xff000000));
if ((c.level & 0xff0000) > 0)
sb.Append(" and (datas.level & 16711680) = " + toInt(c.level & 0xff0000));
if (c.race>0)
sb.Append(" and datas.race = "+toInt(c.race)); sb.Append(" and datas.race = "+toInt(c.race));
if(c.type>0) if(c.type>0)
sb.Append(" and datas.type & "+toInt(c.type)+" = "+toInt(c.type)); sb.Append(" and datas.type & "+toInt(c.type)+" = "+toInt(c.type));
...@@ -353,11 +357,17 @@ public static string GetSelectSQL(Card c) ...@@ -353,11 +357,17 @@ public static string GetSelectSQL(Card c)
sb.Append(" and datas.type & 1 = 1 and datas.atk = 0"); sb.Append(" and datas.type & 1 = 1 and datas.atk = 0");
else if(c.atk<0 || c.atk>0) else if(c.atk<0 || c.atk>0)
sb.Append(" and datas.atk = "+c.atk.ToString()); sb.Append(" and datas.atk = "+c.atk.ToString());
if (c.IsType(Info.CardType.TYPE_LINK))
if(c.def==-1) {
sb.Append(" and datas.def &" + c.def.ToString() + "=" + c.def.ToString());
}
else
{
if (c.def == -1)
sb.Append(" and datas.type & 1 = 1 and datas.def = 0"); sb.Append(" and datas.type & 1 = 1 and datas.def = 0");
else if(c.def<0 || c.def>0) else if (c.def < 0 || c.def > 0)
sb.Append(" and datas.def = "+c.def.ToString()); sb.Append(" and datas.def = " + c.def.ToString());
}
if(c.id>0 && c.alias>0) if(c.id>0 && c.alias>0)
sb.Append(" and datas.id BETWEEN "+c.alias.ToString()+" and "+c.id.ToString()); sb.Append(" and datas.id BETWEEN "+c.alias.ToString()+" and "+c.id.ToString());
......
...@@ -63,5 +63,7 @@ public enum CardRace : long ...@@ -63,5 +63,7 @@ public enum CardRace : long
RACE_CREATORGOD = 0x400000, RACE_CREATORGOD = 0x400000,
///<summary>幻龙</summary> ///<summary>幻龙</summary>
RACE_WYRM = 0x800000, RACE_WYRM = 0x800000,
///<summary>电子界</summary>
RACE_CYBERSE = 0x1000000,
} }
} }
...@@ -52,14 +52,18 @@ public enum CardType : long ...@@ -52,14 +52,18 @@ public enum CardType : long
TYPE_FIELD =0x80000 , TYPE_FIELD =0x80000 ,
///<summary>反击</summary> ///<summary>反击</summary>
TYPE_COUNTER =0x100000 , TYPE_COUNTER =0x100000 ,
///<summary>转</summary> ///<summary>转</summary>
TYPE_FLIP =0x200000 , TYPE_FLIP =0x200000 ,
///<summary>卡通</summary> ///<summary>卡通</summary>
TYPE_TOON =0x400000 , TYPE_TOON =0x400000 ,
///<summary>超量</summary> ///<summary>超量</summary>
TYPE_XYZ =0x800000 , TYPE_XYZ =0x800000 ,
///<summary>摆</summary> ///<summary>摆</summary>
TYPE_PENDULUM =0x1000000 , TYPE_PENDULUM =0x1000000 ,
///<summary>特殊召唤</summary>
TYPE_SPSUMMON =0x2000000 ,
///<summary>连接</summary>
TYPE_LINK =0x4000000 ,
} }
} }
...@@ -73,6 +73,7 @@ private void InitializeComponent() ...@@ -73,6 +73,7 @@ private void InitializeComponent()
this.menuitem_convertimage = new System.Windows.Forms.ToolStripMenuItem(); this.menuitem_convertimage = new System.Windows.Forms.ToolStripMenuItem();
this.tsep1 = new System.Windows.Forms.ToolStripSeparator(); this.tsep1 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_cancelTask = new System.Windows.Forms.ToolStripMenuItem(); this.menuitem_cancelTask = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_autoreturn = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem(); this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem(); this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_language = new System.Windows.Forms.ToolStripMenuItem(); this.menuitem_language = new System.Windows.Forms.ToolStripMenuItem();
...@@ -128,9 +129,10 @@ private void InitializeComponent() ...@@ -128,9 +129,10 @@ private void InitializeComponent()
this.pl_cardtype = new DataEditorX.DFlowLayoutPanel(); this.pl_cardtype = new DataEditorX.DFlowLayoutPanel();
this.lb_scripttext = new DataEditorX.DListBox(); this.lb_scripttext = new DataEditorX.DListBox();
this.lv_cardlist = new DataEditorX.DListView(); this.lv_cardlist = new DataEditorX.DListView();
this.ch_cardcode = new System.Windows.Forms.ColumnHeader(); this.ch_cardcode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ch_cardname = new System.Windows.Forms.ColumnHeader(); this.ch_cardname = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.menuitem_autoreturn = new System.Windows.Forms.ToolStripMenuItem(); this.lb_markers = new System.Windows.Forms.Label();
this.pl_markers = new DataEditorX.DFlowLayoutPanel();
this.mainMenu.SuspendLayout(); this.mainMenu.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -418,6 +420,13 @@ private void InitializeComponent() ...@@ -418,6 +420,13 @@ private void InitializeComponent()
this.menuitem_cancelTask.Text = "Cancel Task"; this.menuitem_cancelTask.Text = "Cancel Task";
this.menuitem_cancelTask.Click += new System.EventHandler(this.Menuitem_cancelTaskClick); this.menuitem_cancelTask.Click += new System.EventHandler(this.Menuitem_cancelTaskClick);
// //
// menuitem_autoreturn
//
this.menuitem_autoreturn.Name = "menuitem_autoreturn";
this.menuitem_autoreturn.Size = new System.Drawing.Size(212, 22);
this.menuitem_autoreturn.Text = "*Auto return";
this.menuitem_autoreturn.Click += new System.EventHandler(this.Menuitem_autoreturnClick);
//
// menuitem_help // menuitem_help
// //
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
...@@ -846,7 +855,7 @@ private void InitializeComponent() ...@@ -846,7 +855,7 @@ private void InitializeComponent()
// //
this.lb_categorys.Anchor = System.Windows.Forms.AnchorStyles.Top; this.lb_categorys.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.lb_categorys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.lb_categorys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.lb_categorys.Location = new System.Drawing.Point(547, 155); this.lb_categorys.Location = new System.Drawing.Point(547, 198);
this.lb_categorys.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.lb_categorys.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.lb_categorys.Name = "lb_categorys"; this.lb_categorys.Name = "lb_categorys";
this.lb_categorys.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); this.lb_categorys.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
...@@ -897,7 +906,7 @@ private void InitializeComponent() ...@@ -897,7 +906,7 @@ private void InitializeComponent()
// //
this.lb_tiptexts.Anchor = System.Windows.Forms.AnchorStyles.Top; this.lb_tiptexts.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.lb_tiptexts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.lb_tiptexts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.lb_tiptexts.Location = new System.Drawing.Point(547, 342); this.lb_tiptexts.Location = new System.Drawing.Point(547, 386);
this.lb_tiptexts.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.lb_tiptexts.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.lb_tiptexts.Name = "lb_tiptexts"; this.lb_tiptexts.Name = "lb_tiptexts";
this.lb_tiptexts.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); this.lb_tiptexts.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
...@@ -1000,7 +1009,7 @@ private void InitializeComponent() ...@@ -1000,7 +1009,7 @@ private void InitializeComponent()
this.pl_category.Anchor = System.Windows.Forms.AnchorStyles.Top; this.pl_category.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pl_category.AutoScroll = true; this.pl_category.AutoScroll = true;
this.pl_category.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.pl_category.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pl_category.Location = new System.Drawing.Point(547, 176); this.pl_category.Location = new System.Drawing.Point(547, 219);
this.pl_category.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2); this.pl_category.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2);
this.pl_category.Name = "pl_category"; this.pl_category.Name = "pl_category";
this.pl_category.Padding = new System.Windows.Forms.Padding(2); this.pl_category.Padding = new System.Windows.Forms.Padding(2);
...@@ -1027,10 +1036,10 @@ private void InitializeComponent() ...@@ -1027,10 +1036,10 @@ private void InitializeComponent()
this.lb_scripttext.FormattingEnabled = true; this.lb_scripttext.FormattingEnabled = true;
this.lb_scripttext.IntegralHeight = false; this.lb_scripttext.IntegralHeight = false;
this.lb_scripttext.ItemHeight = 12; this.lb_scripttext.ItemHeight = 12;
this.lb_scripttext.Location = new System.Drawing.Point(547, 364); this.lb_scripttext.Location = new System.Drawing.Point(547, 409);
this.lb_scripttext.Name = "lb_scripttext"; this.lb_scripttext.Name = "lb_scripttext";
this.lb_scripttext.ScrollAlwaysVisible = true; this.lb_scripttext.ScrollAlwaysVisible = true;
this.lb_scripttext.Size = new System.Drawing.Size(310, 154); this.lb_scripttext.Size = new System.Drawing.Size(310, 109);
this.lb_scripttext.TabIndex = 6; this.lb_scripttext.TabIndex = 6;
this.lb_scripttext.SelectedIndexChanged += new System.EventHandler(this.Lb_scripttextSelectedIndexChanged); this.lb_scripttext.SelectedIndexChanged += new System.EventHandler(this.Lb_scripttextSelectedIndexChanged);
// //
...@@ -1066,17 +1075,37 @@ private void InitializeComponent() ...@@ -1066,17 +1075,37 @@ private void InitializeComponent()
this.ch_cardname.Text = "Card Name"; this.ch_cardname.Text = "Card Name";
this.ch_cardname.Width = 140; this.ch_cardname.Width = 140;
// //
// menuitem_autoreturn // lb_markers
// //
this.menuitem_autoreturn.Name = "menuitem_autoreturn"; this.lb_markers.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.menuitem_autoreturn.Size = new System.Drawing.Size(212, 22); this.lb_markers.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.menuitem_autoreturn.Text = "*Auto return"; this.lb_markers.Location = new System.Drawing.Point(547, 155);
this.menuitem_autoreturn.Click += new System.EventHandler(this.Menuitem_autoreturnClick); this.lb_markers.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.lb_markers.Name = "lb_markers";
this.lb_markers.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
this.lb_markers.Size = new System.Drawing.Size(310, 20);
this.lb_markers.TabIndex = 19;
this.lb_markers.Text = "Link Markers";
this.lb_markers.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pl_markers
//
this.pl_markers.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pl_markers.AutoScroll = true;
this.pl_markers.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pl_markers.Location = new System.Drawing.Point(547, 175);
this.pl_markers.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2);
this.pl_markers.Name = "pl_markers";
this.pl_markers.Padding = new System.Windows.Forms.Padding(2);
this.pl_markers.Size = new System.Drawing.Size(310, 23);
this.pl_markers.TabIndex = 20;
// //
// DataEditForm // DataEditForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(859, 572); this.ClientSize = new System.Drawing.Size(859, 572);
this.Controls.Add(this.pl_markers);
this.Controls.Add(this.lb_markers);
this.Controls.Add(this.tb_setcode4); this.Controls.Add(this.tb_setcode4);
this.Controls.Add(this.tb_setcode3); this.Controls.Add(this.tb_setcode3);
this.Controls.Add(this.tb_setcode2); this.Controls.Add(this.tb_setcode2);
...@@ -1238,5 +1267,7 @@ private void InitializeComponent() ...@@ -1238,5 +1267,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_export_select_sql; private System.Windows.Forms.ToolStripMenuItem menuitem_export_select_sql;
private System.Windows.Forms.ToolStripMenuItem menuitem_export_all_sql; private System.Windows.Forms.ToolStripMenuItem menuitem_export_all_sql;
private System.Windows.Forms.ToolStripMenuItem menuitem_autoreturn; private System.Windows.Forms.ToolStripMenuItem menuitem_autoreturn;
private System.Windows.Forms.Label lb_markers;
private DFlowLayoutPanel pl_markers;
} }
} }
...@@ -266,6 +266,9 @@ public void InitControl(DataConfig datacfg) ...@@ -266,6 +266,9 @@ public void InitControl(DataConfig datacfg)
InitComboBox(cb_cardlevel, datacfg.dicCardLevels); InitComboBox(cb_cardlevel, datacfg.dicCardLevels);
//卡片类型 //卡片类型
InitCheckPanel(pl_cardtype, datacfg.dicCardTypes); InitCheckPanel(pl_cardtype, datacfg.dicCardTypes);
//连接标记
InitCheckPanel(pl_markers, datacfg.dicLinkMarkers);
SetEnabled(pl_markers, false);
//效果类型 //效果类型
InitCheckPanel(pl_category, datacfg.dicCardcategorys); InitCheckPanel(pl_category, datacfg.dicCardcategorys);
//系列名 //系列名
...@@ -290,12 +293,27 @@ void InitCheckPanel(FlowLayoutPanel fpanel, Dictionary<long, string> dic) ...@@ -290,12 +293,27 @@ void InitCheckPanel(FlowLayoutPanel fpanel, Dictionary<long, string> dic)
_cbox.Text = dic[key]; _cbox.Text = dic[key];
_cbox.AutoSize = true; _cbox.AutoSize = true;
_cbox.Margin = fpanel.Margin; _cbox.Margin = fpanel.Margin;
_cbox.CheckedChanged += _cbox_CheckedChanged;
//_cbox.Click += PanelOnCheckClick; //_cbox.Click += PanelOnCheckClick;
fpanel.Controls.Add(_cbox); fpanel.Controls.Add(_cbox);
} }
fpanel.ResumeLayout(false); fpanel.ResumeLayout(false);
fpanel.PerformLayout(); fpanel.PerformLayout();
} }
private void _cbox_CheckedChanged(object sender, EventArgs e)
{
CheckBox cbox = (CheckBox)sender;
if(cbox.Parent== pl_cardtype)
{
if ((long)cbox.Tag == (long)Core.Info.CardType.TYPE_LINK)
{
SetEnabled(pl_markers, cbox.Checked);
tb_def.ReadOnly = cbox.Checked;
}
}
}
//初始化ComboBox //初始化ComboBox
void InitComboBox(ComboBox cb, Dictionary<long, string> tempdic) void InitComboBox(ComboBox cb, Dictionary<long, string> tempdic)
{ {
...@@ -357,6 +375,14 @@ void SetCheck(FlowLayoutPanel fpl, long number) ...@@ -357,6 +375,14 @@ void SetCheck(FlowLayoutPanel fpl, long number)
} }
//return strType; //return strType;
} }
void SetEnabled(FlowLayoutPanel fpl, bool set)
{
foreach (Control c in fpl.Controls)
{
CheckBox cbox=(CheckBox)c;
cbox.Enabled = set;
}
}
//设置combobox //设置combobox
void SetSelect(ComboBox cb, long k) void SetSelect(ComboBox cb, long k)
{ {
...@@ -482,12 +508,19 @@ public void SetCard(Card c) ...@@ -482,12 +508,19 @@ public void SetCard(Card c)
tb_setcode4.Text = setcodes[3].ToString("x"); tb_setcode4.Text = setcodes[3].ToString("x");
//type,category //type,category
SetCheck(pl_cardtype, c.type); SetCheck(pl_cardtype, c.type);
if (c.IsType(Core.Info.CardType.TYPE_LINK))
SetCheck(pl_markers, c.def);
else
SetCheck(pl_markers, 0);
SetCheck(pl_category, c.category); SetCheck(pl_category, c.category);
//Pendulum //Pendulum
tb_pleft.Text = ((c.level >> 0x18) & 0xff).ToString(); tb_pleft.Text = ((c.level >> 24) & 0xff).ToString();
tb_pright.Text = ((c.level >> 0x10) & 0xff).ToString(); tb_pright.Text = ((c.level >> 16) & 0xff).ToString();
//atk,def //atk,def
tb_atk.Text = (c.atk < 0) ? "?" : c.atk.ToString(); tb_atk.Text = (c.atk < 0) ? "?" : c.atk.ToString();
if (c.IsType(Core.Info.CardType.TYPE_LINK))
tb_def.Text = "0";
else
tb_def.Text = (c.def < 0) ? "?" : c.def.ToString(); tb_def.Text = (c.def < 0) ? "?" : c.def.ToString();
tb_cardcode.Text = c.id.ToString(); tb_cardcode.Text = c.id.ToString();
tb_cardalias.Text = c.alias.ToString(); tb_cardalias.Text = c.alias.ToString();
...@@ -520,21 +553,28 @@ public Card GetCard() ...@@ -520,21 +553,28 @@ public Card GetCard()
c.category = GetCheck(pl_category); c.category = GetCheck(pl_category);
int.TryParse(tb_pleft.Text, out temp); int.TryParse(tb_pleft.Text, out temp);
c.level += (temp << 0x18); c.level += (temp << 24);
int.TryParse(tb_pright.Text, out temp); int.TryParse(tb_pright.Text, out temp);
c.level += (temp << 0x10); c.level += (temp << 16);
if (tb_atk.Text == "?" || tb_atk.Text == "?") if (tb_atk.Text == "?" || tb_atk.Text == "?")
c.atk = -2; c.atk = -2;
else if (tb_atk.Text == ".") else if (tb_atk.Text == ".")
c.atk = -1; c.atk = -1;
else else
int.TryParse(tb_atk.Text, out c.atk); int.TryParse(tb_atk.Text, out c.atk);
if (c.IsType(Core.Info.CardType.TYPE_LINK))
{
c.def = (int)GetCheck(pl_markers);
}
else
{
if (tb_def.Text == "?" || tb_def.Text == "?") if (tb_def.Text == "?" || tb_def.Text == "?")
c.def = -2; c.def = -2;
else if (tb_def.Text == ".") else if (tb_def.Text == ".")
c.def = -1; c.def = -1;
else else
int.TryParse(tb_def.Text, out c.def); int.TryParse(tb_def.Text, out c.def);
}
long.TryParse(tb_cardcode.Text, out c.id); long.TryParse(tb_cardcode.Text, out c.id);
long.TryParse(tb_cardalias.Text, out c.alias); long.TryParse(tb_cardalias.Text, out c.alias);
...@@ -633,16 +673,12 @@ public bool Open(string file) ...@@ -633,16 +673,12 @@ public bool Open(string file)
return true; return true;
} }
//setcode, 灵摆刻度的搜索 //setcode的搜索
public bool CardFilter(Card c, Card sc) public bool CardFilter(Card c, Card sc)
{ {
bool res = true; bool res = true;
if (sc.setcode != 0) if (sc.setcode != 0)
res &= c.IsSetCode(sc.setcode & 0xffff); res &= c.IsSetCode(sc.setcode & 0xffff);
if (sc.GetLeftScale() != 0 )
res &= (c.GetLeftScale() == sc.GetLeftScale());
if (sc.GetRightScale() != 0 )
res &= (c.GetRightScale() == sc.GetRightScale());
return res; return res;
} }
//设置卡片列表的结果 //设置卡片列表的结果
...@@ -678,7 +714,7 @@ public void SetCards(Card[] cards, bool isfresh) ...@@ -678,7 +714,7 @@ public void SetCards(Card[] cards, bool isfresh)
tb_pagenum.Text = pageNum.ToString(); tb_pagenum.Text = pageNum.ToString();
cardlist.Clear(); cardlist.Clear();
lv_cardlist.Items.Clear(); lv_cardlist.Items.Clear();
SetCard(new Card(0)); //SetCard(new Card(0));
} }
} }
//搜索卡片 //搜索卡片
......
...@@ -29,6 +29,15 @@ ...@@ -29,6 +29,15 @@
0xb 11★ 0xb 11★
0xc 12★ 0xc 12★
0xd 13★ 0xd 13★
##link marker
0x1 ↙
0x2 ↓
0x4 ↘
0x8 ←
0x20 →
0x40 ↖
0x80 ↑
0x100 ↗
##category ##category
0x1 魔陷破坏 0x1 魔陷破坏
0x2 怪兽破坏 0x2 怪兽破坏
...@@ -116,6 +125,7 @@ ...@@ -116,6 +125,7 @@
0x800000 超量 0x800000 超量
0x1000000 灵摆 0x1000000 灵摆
0x2000000 特殊召唤 0x2000000 特殊召唤
0x4000000 连接
##setname ##setname
-1 自定义 -1 自定义
0x0 系列 0x0 系列
......
...@@ -29,6 +29,15 @@ ...@@ -29,6 +29,15 @@
0xb 11★ 0xb 11★
0xc 12★ 0xc 12★
0xd 13★ 0xd 13★
##link marker
0x1 ↙
0x2 ↓
0x4 ↘
0x8 ←
0x20 →
0x40 ↖
0x80 ↑
0x100 ↗
##category ##category
0x1 S/T Destroy 0x1 S/T Destroy
0x2 Destroy Monster 0x2 Destroy Monster
...@@ -116,6 +125,7 @@ ...@@ -116,6 +125,7 @@
0x800000 Xyz 0x800000 Xyz
0x1000000 Pendulum 0x1000000 Pendulum
0x2000000 SPSummon 0x2000000 SPSummon
0x4000000 Link
##setname ##setname
-1 Custom -1 Custom
0x0 Archetype 0x0 Archetype
......
...@@ -15,6 +15,7 @@ CodeEditForm.mainMenu.menuitem_about 关于 ...@@ -15,6 +15,7 @@ CodeEditForm.mainMenu.menuitem_about 关于
# #
DataEditForm.btn_img 导入图片 DataEditForm.btn_img 导入图片
DataEditForm.lb_types 卡片类型 DataEditForm.lb_types 卡片类型
DataEditForm.lb_markers 连接标记
DataEditForm.lb_tiptexts 脚本提示文字 DataEditForm.lb_tiptexts 脚本提示文字
DataEditForm.lb_categorys 效果分类 DataEditForm.lb_categorys 效果分类
DataEditForm.lb_cardcode 卡片密码 DataEditForm.lb_cardcode 卡片密码
......
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