Commit a66ba2da authored by xiaoye's avatar xiaoye

判定接口

c.trigger_atk_up:判出时上升的攻击力(前列就是所有卡的攻击力)
c.trigger_star_up:判出时上升的暴击值
c.trigger_draw:判出时抽卡数量
c.trigger_recover:判出时的回复量
parent d04cb2a6
...@@ -341,27 +341,27 @@ function VgD.CardTriggerOperation(chkop) ...@@ -341,27 +341,27 @@ function VgD.CardTriggerOperation(chkop)
local c = e:GetHandler() local c = e:GetHandler()
if c:IsRace(TRIGGER_CRITICAL_STRIKE) then if c:IsRace(TRIGGER_CRITICAL_STRIKE) then
local g1 = VgF.SelectMatchingCard(HINTMSG_CRITICAL_STRIKE, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g1 = VgF.SelectMatchingCard(HINTMSG_CRITICAL_STRIKE, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.StarUp(c, g1, 1, nil) VgF.StarUp(c, g1, c.trigger_star_up or 1, nil)
local g2 = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g2 = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.AtkUp(c, g2, 10000, nil) VgF.AtkUp(c, g2, c.trigger_atk_up or 10000, nil)
elseif c:IsRace(TRIGGER_DRAW) then elseif c:IsRace(TRIGGER_DRAW) then
local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.AtkUp(c, g, 10000, nil) VgF.AtkUp(c, g, c.trigger_atk_up or 10000, nil)
Duel.Draw(tp, 1, REASON_TRIGGER) Duel.Draw(tp, c.trigger_draw or 1, REASON_TRIGGER)
elseif c:IsRace(TRIGGER_HEAL) then elseif c:IsRace(TRIGGER_HEAL) then
local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.AtkUp(c, g, 10000, nil) VgF.AtkUp(c, g, c.trigger_atk_up or 10000, nil)
if Duel.GetMatchingGroupCount(nil, tp, LOCATION_DAMAGE, 0, nil) >= Duel.GetMatchingGroupCount(nil, tp, 0, LOCATION_DAMAGE, nil) then if Duel.GetMatchingGroupCount(nil, tp, LOCATION_DAMAGE, 0, nil) >= Duel.GetMatchingGroupCount(nil, tp, 0, LOCATION_DAMAGE, nil) then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODROP) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODROP)
local tc = Duel.SelectMatchingCard(tp, nil, tp, LOCATION_DAMAGE, 0, 1, 1, nil):GetFirst() local sg = Duel.SelectMatchingCard(tp, nil, tp, LOCATION_DAMAGE, 0, c.trigger_recover or 1, c.trigger_recover or 1, nil)
if tc then if sg:GetCount() > 0 then
VgF.Sendto(LOCATION_DROP, tc, REASON_TRIGGER) VgF.Sendto(LOCATION_DROP, sg, REASON_TRIGGER)
Duel.Recover(tp, 1, REASON_RULE) Duel.Recover(tp, sg:GetCount(), REASON_RULE)
end end
end end
elseif c:IsRace(TRIGGER_ADVANCE) then elseif c:IsRace(TRIGGER_ADVANCE) then
local g = Duel.GetMatchingGroup(VgF.IsSequence, tp, LOCATION_MZONE, 0, nil, 0, 4, 5) local g = Duel.GetMatchingGroup(VgF.IsSequence, tp, LOCATION_MZONE, 0, nil, 0, 4, 5)
VgF.AtkUp(c, g, 10000, nil) VgF.AtkUp(c, g, c.trigger_atk_up or 10000, nil)
end end
if chkop == 'Damage' then if chkop == 'Damage' then
if c:IsRace(TRIGGER_SUPER) then if c:IsRace(TRIGGER_SUPER) then
...@@ -376,14 +376,14 @@ function VgD.CardTriggerOperation(chkop) ...@@ -376,14 +376,14 @@ function VgD.CardTriggerOperation(chkop)
if true then if true then
table.insert(ops, VgF.Stringid(VgID + 5, 4)) table.insert(ops, VgF.Stringid(VgID + 5, 4))
table.insert(sel, function () table.insert(sel, function ()
Duel.Draw(tp, 1, REASON_TRIGGER) Duel.Draw(tp, c.trigger_draw or 1, REASON_TRIGGER)
end) end)
end end
if VgF.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) then if VgF.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) then
table.insert(ops, VgF.Stringid(VgID + 5, 5)) table.insert(ops, VgF.Stringid(VgID + 5, 5))
table.insert(sel, function () table.insert(sel, function ()
local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.AtkUp(c, g, 100000000, nil) VgF.AtkUp(c, g, c.trigger_atk_up or 100000000, nil)
end) end)
end end
if VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, 0) then if VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, 0) then
...@@ -430,14 +430,14 @@ function VgD.CardTriggerOperation(chkop) ...@@ -430,14 +430,14 @@ function VgD.CardTriggerOperation(chkop)
if true then if true then
table.insert(ops, VgF.Stringid(VgID + 5, 4)) table.insert(ops, VgF.Stringid(VgID + 5, 4))
table.insert(sel, function () table.insert(sel, function ()
Duel.Draw(tp, 1, REASON_TRIGGER) Duel.Draw(tp, c.trigger_draw or 1, REASON_TRIGGER)
end) end)
end end
if VgF.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) then if VgF.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) then
table.insert(ops, VgF.Stringid(VgID + 5, 5)) table.insert(ops, VgF.Stringid(VgID + 5, 5))
table.insert(sel, function () table.insert(sel, function ()
local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.AtkUp(c, g, 100000000, nil) VgF.AtkUp(c, g, c.trigger_atk_up or 100000000, nil)
end) end)
end end
if VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, 0) then if VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, 0) then
...@@ -480,14 +480,14 @@ function VgD.CardTriggerOperation(chkop) ...@@ -480,14 +480,14 @@ function VgD.CardTriggerOperation(chkop)
if true then if true then
table.insert(ops, VgF.Stringid(VgID + 5, 4)) table.insert(ops, VgF.Stringid(VgID + 5, 4))
table.insert(sel, function () table.insert(sel, function ()
Duel.Draw(tp, 1, REASON_TRIGGER) Duel.Draw(tp, c.trigger_draw or 1, REASON_TRIGGER)
end) end)
end end
if VgF.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) then if VgF.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) then
table.insert(ops, VgF.Stringid(VgID + 5, 5)) table.insert(ops, VgF.Stringid(VgID + 5, 5))
table.insert(sel, function () table.insert(sel, function ()
local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil) local g = VgF.SelectMatchingCard(HINTMSG_ATKUP, e, tp, nil, tp, LOCATION_MZONE, 0, 1, 1, nil)
VgF.AtkUp(c, g, 100000000, nil) VgF.AtkUp(c, g, c.trigger_atk_up or 100000000, nil)
end) end)
end end
if VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, 0) then if VgD.OperationWhenCardTrigger(e, tp, eg, ep, ev, re, r, rp, c, 0) then
......
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