Commit 6d65f5e9 authored by 花桃白音's avatar 花桃白音

p tag check

parent 4dba01be
No preview for this file type
......@@ -984,7 +984,12 @@ namespace cardvisa
if (cdbh.cmds.Count > 0)
{
var id = e.Index > 0 ? (e.Index < 20 ? e.Index : 20) : 1;
switch ((e.Index == 21 || e.Index == 0)? cdbh.cmds[GetCardFromListID(id)].LFState : LFStates.other)
var sqd = cdbh.cmds[GetCardFromListID(id)];
if (e.Index == 21 || e.Index == 0)
{
sqd.LFState = LFStates.other;
}
switch (sqd.LFState)
{
case LFStates.Forbidden:
myBrush = Brushes.Red;
......@@ -1011,7 +1016,6 @@ namespace cardvisa
{
if (button3.Text == "关闭库")
{
var id = listBox1.SelectedIndex;
if (id > 0 && id <= 20)
{
......@@ -1021,6 +1025,25 @@ namespace cardvisa
ctpinfo.cdinit(sqd.cmdd.race, "race");
ctpinfo.cdinit(sqd.cmdd.attribute, "attr");
var lv = ctpinfo.GetLevel(sqd.cmdd.level);
var pp = ctpinfo.GetPend(sqd.cmdd.level);
string ptext = "刻度:" + pp;
string reg = "(?<=←)\\s{0,3}(?<lp>\\d+)\\s{0,3}【.{2,6}】\\s{0,3}(?<rp>\\d+)\\s{0,3}(?=→)";
if (ctpinfo.IsCardType("灵摆"))
{
Match mt = Regex.Match(sqd.cmdt.desc, reg);
if (mt.Success)
{
//MessageBox.Show(mt.Groups["lp"].Value + "/" + mt.Groups["rp"].Value);
if(mt.Groups["lp"].Value != mt.Groups["rp"].Value || mt.Groups["rp"].Value != mt.Groups["rp"].Value)
{
ptext += "【左右刻度描述不一致】";
}
if(mt.Groups["lp"].Value != pp.ToString() || mt.Groups["rp"].Value != pp.ToString())
{
ptext += "【描述刻度与cdb不一致】";
}
}
}
richTextBox1.Text = "";
try
{
......@@ -1040,14 +1063,21 @@ namespace cardvisa
richTextBox1.Text += exc.ToString();
}
richTextBox1.Text =
//第一行内容
//卡名[编号]
sqd.cmdt.name + "[" + sqd.cmdd.id + "]" + "\r\n" +
//第二行
//[卡片种类|种族|属性]
(ctpinfo.IsCardType("怪兽") ? "[怪兽|" +
ctpinfo.CardTypeFormat("怪兽") +
"] " + ctpinfo.CardTypeFormat("", "|", "race") + "/" + ctpinfo.CardTypeFormat("", "|", "attr")
+ "\r\n"
//第三行
//[星星]攻击/守备力 灵摆刻度
+ "[" + (ctpinfo.IsCardType("超量") ? "☆" : (ctpinfo.IsCardType("连接") ? "LINK-" : "★")) + lv + "] "
+ "攻击力:" + sqd.cmdd.atk +
(ctpinfo.IsCardType("连接") ? "" : " / 守备力:" + sqd.cmdd.def) :
(ctpinfo.IsCardType("连接") ? "": (ctpinfo.IsCardType("灵摆") ? ptext : " / 守备力:" + sqd.cmdd.def)):
//第二行,非怪兽的分支
(ctpinfo.IsCardType("魔法") ? "[魔法" +
ctpinfo.CardTypeFormat("魔法", "|", "type", "|") +
"]" :
......@@ -1055,6 +1085,7 @@ namespace cardvisa
ctpinfo.CardTypeFormat("陷阱", "|", "type", "|") +
"]" : "[卡种错误]"))) + "\r\n" +
sqd.cmdt.desc;
string path = Path.GetDirectoryName(cdbh.openedfile);
string pathtemp = path + "\\pics\\" + sqd.code + ".jpg";
picViewer.FillPic(pathtemp);
......@@ -1779,11 +1810,11 @@ namespace cardvisa
rt = rt.Length >= 2 ? rt.Substring(rt.Length - 1, 1) : rt;
return Convert.ToInt32(rt, 16);
}
public int GetRank(long lv)
public int GetPend(long lv)
{
string rt = Convert.ToString(lv, 16);
rt = rt.Length >= 4 ? rt.Substring(rt.Length - 2, 1) : rt;
return Convert.ToInt32(rt);
rt = rt.Length >= 4 ? rt.Substring(rt.Length - 5, 1) : "0";
return Convert.ToInt32(rt, 16);
}
public bool IsCardType(string typeName)
{
......
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