Commit 2289661e authored by xiaoye's avatar xiaoye

fix

parent ff3752e5
Pipeline #35726 failed with stage
in 17 seconds
......@@ -138,6 +138,7 @@ cm.e2 = {
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp, cm.e2.filter, tp, LOCATION_EXTRA, 0, 1, 1, nil, e, tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
end
end
......
......@@ -16,7 +16,7 @@ cm.initial_effect = function (c)
if cm.e2 then
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE + CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.e2.con)
......@@ -56,14 +56,14 @@ cm.e2 = {
tg = function (e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
if chk == 0 then
return c:IsAbleToRemove() and Duel.IsPlayerCanSpecialSummon(tp)
return true
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_REMOVED)
Duel.SetOperationInfo(0, CATEGORY_REMOVE, c, 1, 0, 0)
end,
op = function (e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if Duel.Remove(c, POS_FACEUP, REASON_EFFECT) > 0 and c:IsLocation(LOCATION_REMOVED) and c:IsFaceup() then
if Duel.Remove(c, POS_FACEUP, REASON_EFFECT) > 0 and c:IsLocation(LOCATION_REMOVED) and c:IsFaceup() and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
Duel.BreakEffect()
Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -102,12 +102,13 @@ cm.e2 = {
if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then return end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp, cm.e2.gain.filter, tp, LOCATION_HAND, 0, 1, 1, nil, e, tp)
if g:GetCount() > 0 and Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP) > 0
if g:GetCount() > 0 and not Duel.HintSelection(g) and Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP) > 0
and Duel.IsExistingMatchingCard(cm.e2.gain.atkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, e:GetHandler(), g:GetFirst():GetAttack())
then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
local sg = Duel.SelectMatchingCard(tp, cm.e2.gain.atkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, e:GetHandler(), g:GetFirst():GetAttack())
Duel.HintSelection(g)
local tc = sg:GetFirst()
if not tc:IsImmuneToEffect(e) then
local og = tc:GetOverlayGroup()
......
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