Commit c3fdfd1f authored by 花桃白音's avatar 花桃白音

add attr:picview aotuview autoleft,fix cdb open check

parent 43baa1be
No preview for this file type
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Name = "Form1"; this.Name = "Form1";
this.Text = "厨师签证中心"; this.Text = "厨师签证中心";
this.Move += new System.EventHandler(this.Form1_Move);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
......
...@@ -49,6 +49,7 @@ namespace cardvisa ...@@ -49,6 +49,7 @@ namespace cardvisa
} }
public SettingData settings; public SettingData settings;
public CDBTableHelper cdbh = new CDBTableHelper(); public CDBTableHelper cdbh = new CDBTableHelper();
public PicViewer picViewer = new PicViewer();
public List<string> zipcdblist { get; set; } = new List<string>(); public List<string> zipcdblist { get; set; } = new List<string>();
public int cardindex = 0; public int cardindex = 0;
public int cardcounts { get; set; } = 0; public int cardcounts { get; set; } = 0;
...@@ -142,6 +143,7 @@ namespace cardvisa ...@@ -142,6 +143,7 @@ namespace cardvisa
button4.Text = "导出卡表"; button4.Text = "导出卡表";
button5.Text = "MD5校验"; button5.Text = "MD5校验";
refreshlist(); refreshlist();
picViewer.Hide();
} }
else else
{ {
...@@ -168,6 +170,9 @@ namespace cardvisa ...@@ -168,6 +170,9 @@ namespace cardvisa
} }
} }
FillListBoxFromCDB((txtFilePath == "" ? Application.StartupPath + "\\checkout\\package.cdb" : txtFilePath)); FillListBoxFromCDB((txtFilePath == "" ? Application.StartupPath + "\\checkout\\package.cdb" : txtFilePath));
if (picViewer.IsDisposed) { picViewer = new PicViewer(); }
picViewer.Show();
picViewer.Location = new Point(Location.X + Size.Width, Location.Y);
} }
} }
private void button4_Click(object sender, EventArgs e) private void button4_Click(object sender, EventArgs e)
...@@ -244,8 +249,7 @@ namespace cardvisa ...@@ -244,8 +249,7 @@ namespace cardvisa
{ {
//richTextBox1.Text = CommonHandler.GetMD5(Application.StartupPath + "\\checkin\\c4270019.lua"); //richTextBox1.Text = CommonHandler.GetMD5(Application.StartupPath + "\\checkin\\c4270019.lua");
PicViewer pv = new PicViewer(); PicViewer pv = new PicViewer();
pv.Show();
pv.FillPic("");
} }
} }
private void button6_Click(object sender, EventArgs e) private void button6_Click(object sender, EventArgs e)
...@@ -365,11 +369,12 @@ namespace cardvisa ...@@ -365,11 +369,12 @@ namespace cardvisa
var code = cardd.id; var code = cardd.id;
var cti = new CardTypeInfo(cardd.type); var cti = new CardTypeInfo(cardd.type);
bool otbug = settings.packDIY ? (cardd.ot != 4) : false; bool otbug = settings.packDIY ? (cardd.ot != 4) : false;
if ((cardd.alias == 0 && cti.IsNeedScript())|| otbug)//非同名卡 bool lostcheck = (cardd.alias == 0 && cti.IsNeedScript());
if (lostcheck || otbug)//非同名卡
{ {
string parentpath = Path.GetDirectoryName(pathName); string parentpath = Path.GetDirectoryName(pathName);
bool lualost = !File.Exists(parentpath + "\\script\\c" + code + ".lua"); bool lualost = lostcheck && !File.Exists(parentpath + "\\script\\c" + code + ".lua");
bool piclost = !File.Exists(parentpath + "\\pics\\" + code + ".jpg"); bool piclost = lostcheck && !File.Exists(parentpath + "\\pics\\" + code + ".jpg");
if (lualost || piclost) { if (lualost || piclost) {
lostedFiles += "\r\n" lostedFiles += "\r\n"
+"【" + code.ToString() + "】" +"【" + code.ToString() + "】"
...@@ -935,6 +940,9 @@ namespace cardvisa ...@@ -935,6 +940,9 @@ namespace cardvisa
ctpinfo.CardTypeFormat("陷阱", "|", "type", "|") + ctpinfo.CardTypeFormat("陷阱", "|", "type", "|") +
"]" : "[卡种错误]"))) + "\r\n" + "]" : "[卡种错误]"))) + "\r\n" +
sqd.cmdt.desc; sqd.cmdt.desc;
string path = Path.GetDirectoryName(cdbh.openedfile);
string pathtemp = path + "\\pics\\" + sqd.code + ".jpg";
picViewer.FillPic(pathtemp);
} }
if (id > 20 || cardindex * 20 + id - 1 == cardcounts) if (id > 20 || cardindex * 20 + id - 1 == cardcounts)
{ {
...@@ -1078,6 +1086,10 @@ namespace cardvisa ...@@ -1078,6 +1086,10 @@ namespace cardvisa
} }
} }
} }
private void Form1_Move(object sender, EventArgs e)
{
picViewer.Location = new Point(Location.X + Size.Width, Location.Y);
}
} }
[Table(Name = "main.datas")] [Table(Name = "main.datas")]
public class datas public class datas
......
--D4C
function c111004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c111004.tg)
e1:SetCost(c111004.cost)
e1:SetOperation(c111004.op)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e2)
end
function c111004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetTurnPlayer()~=tp end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end
function c111004.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(1-tp,LOCATION_MZONE) end
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
e:SetLabelObject(g)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
function c111004.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local a=Duel.CreateToken(tp,111005)
Duel.SpecialSummonStep(a,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetBaseAttack())
a:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(tc:GetBaseDefense())
a:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetValue(tc:GetOriginalCode())
a:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(tc:GetOriginalAttribute())
a:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(tc:GetOriginalRace())
a:RegisterEffect(e5)
if tc:IsType(TYPE_XYZ) or tc:IsType(TYPE_LINK) then
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(1)
a:RegisterEffect(e6)
else
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(tc:GetOriginalLevel())
a:RegisterEffect(e6)
end
--Destroy
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_PHASE+PHASE_END)
e7:SetRange(LOCATION_ONFIELD)
e7:SetOperation(c111004.deop)
a:RegisterEffect(e7)
a:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD,1)
Duel.SpecialSummonComplete()
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetLabel(a:GetCode())
e2:SetLabelObject(a)
e2:SetTarget(c111004.datg)
e2:SetOperation(c111004.daop)
c:RegisterEffect(e2)
end
function c111004.deop(e,tp,eg,ep,ev,re,r,rp)
local x=e:GetHandler():GetCode()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetCode())
Duel.SendtoDeck(g,nil,2,REASON_EFFECT+REASON_RULE)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c111004.xfil(c,x)
return c:IsCode(x)
end
function c111004.datg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=e:GetLabel()
local x=e:GetLabelObject()
if chk==0 then return eg:IsContains(x) and Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_MZONE,1,nil,a) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,nil)
end
function c111004.daop(e,tp,eg,ep,ev,re,r,rp)
local a=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_MZONE,nil,a)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT+REASON_RULE)
local atk=g:GetSum(Card.GetAttack)
local def=g:GetSum(Card.GetDefense)
Duel.Damage(1-tp,atk+def,REASON_EFFECT)
end
--
local m=111006
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
c:EnableReviveLimit()
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(cm.dircon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.indcon)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
cm.material_type=TYPE_SYNCHRO
function cm.dircon(e)
return e:GetHandler():GetColumnGroup():Filter(Card.IsType,nil,TYPE_MONSTER)==0
end
function cm.indcon(e)
local c=e:GetHandler()
return c:GetSequence()>4
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetBaseAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(cm.damcon)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
e3:SetValue(DOUBLE_DAMAGE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
--attack limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(cm.atlimit)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(cm.eftg)
e5:SetLabelObject(e4)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e5)
end
function cm.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
function cm.atlimit(e,c)
return cm.IsLeft(e:GetHandler(),c)
end
function cm.eftg(e,c)
return cm.IsLeft(c,e:GetHandler())
end
function cm.IsLeft(c,mc)
local tp=mc:GetControler()
local Col=aux.GetColumn(mc,tp)
return cm.IsLeftCard(c,tp,Col)
end
function cm.IsLeftCard(c,tp,Col)
local Col_1=aux.GetColumn(c,tp)
if c:IsType(TYPE_FIELD) then return true end
return Col_1~=Col
end
\ No newline at end of file
--冬日滑雪·红帽
local m=111007
local cm=_G["c"..m]
function cm.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.cfilter2(c,tp)
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
return eg:IsExists(cm.cfilter2,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local hg=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if hg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=hg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
end
\ No newline at end of file
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