Commit 7f1660d5 authored by xiaoye's avatar xiaoye

fix

parent b1793450
...@@ -45,9 +45,9 @@ cm.initial_effect = function (c) ...@@ -45,9 +45,9 @@ cm.initial_effect = function (c)
end end
end end
cm.xyz = { cm.xyz = {
card = {nil, nil}, card = {false, false},
filter = function (c, e, tp) filter = function (c, e, tp)
return c:IsFaceup() and aux.GetValueType(cm.xyz.card[tp]) == 'Group' and cm.xyz.card[tp]:IsContains(c) return c:IsFaceup() and c:GetFlagEffect(m) > 0
end end
} }
...@@ -57,7 +57,10 @@ cm.gloabl = { ...@@ -57,7 +57,10 @@ cm.gloabl = {
return #eg > 0 and not cm.xyz.card[rp] return #eg > 0 and not cm.xyz.card[rp]
end, end,
op = function (e, tp, eg, ep, ev, re, r, rp) op = function (e, tp, eg, ep, ev, re, r, rp)
cm.xyz.card[rp] = eg cm.xyz.card[rp] = true
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(m, RESET_EVENT + RESETS_STANDARD, 0, 1)
end
end end
} }
...@@ -85,15 +88,14 @@ cm.e1 = { ...@@ -85,15 +88,14 @@ cm.e1 = {
local tc = c:GetMaterial():GetFirst() local tc = c:GetMaterial():GetFirst()
if not tc:IsType(TYPE_TRAPMONSTER) then if not tc:IsType(TYPE_TRAPMONSTER) then
c:CopyEffect(tc:GetOriginalCodeRule(), RESET_EVENT + RESETS_STANDARD, 1) c:CopyEffect(tc:GetOriginalCodeRule(), RESET_EVENT + RESETS_STANDARD, 1)
local filter = function (_e) local t = table.pack(c:GetCardRegistered(nil, GETEFFECT_COPY))
return _e:IsHasType(EFFECT_TYPE_IGNITION)
end
local t = table.pack(c:GetCardRegistered(filter, GETEFFECT_COPY))
for i, v in ipairs(t) do for i, v in ipairs(t) do
local e1 = v:Clone() local e1 = v:Clone()
e1:SetType(EFFECT_TYPE_QUICK_O) if v:IsHasType(EFFECT_TYPE_IGNITION) then
e1:SetCode(EVENT_FREE_CHAIN) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetCode(EVENT_FREE_CHAIN)
end
e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
local cost = v:GetCost() or aux.TRUE local cost = v:GetCost() or aux.TRUE
e1:SetCost(function (_e, _tp, _eg, _ep, _ev, _re, _r, _rp, _chk) e1:SetCost(function (_e, _tp, _eg, _ep, _ev, _re, _r, _rp, _chk)
if _chk == 0 then if _chk == 0 then
...@@ -103,6 +105,7 @@ cm.e1 = { ...@@ -103,6 +105,7 @@ cm.e1 = {
_e:GetHandler():RemoveOverlayCard(tp, 1, 1, REASON_COST) _e:GetHandler():RemoveOverlayCard(tp, 1, 1, REASON_COST)
cost(_e, _tp, _eg, _ep, _ev, _re, _r, _rp, _chk) cost(_e, _tp, _eg, _ep, _ev, _re, _r, _rp, _chk)
end) end)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
v:Reset() v:Reset()
end end
......
...@@ -34,7 +34,7 @@ cm.e1 = { ...@@ -34,7 +34,7 @@ cm.e1 = {
op = function (e, tp, eg, ep, ev, re, r, rp) op = function (e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local tc = c:GetBattleTarget() local tc = c:GetBattleTarget()
if not (tc and tc:IsRelateToBattle()) then return end if not (tc and tc:IsRelateToBattle()) or tc:IsImmuneToEffect(e) then return end
local og = tc:GetOverlayGroup() local og = tc:GetOverlayGroup()
if og:GetCount() > 0 then if og:GetCount() > 0 then
Duel.SendtoGrave(og, REASON_RULE) Duel.SendtoGrave(og, REASON_RULE)
...@@ -109,11 +109,13 @@ cm.e2 = { ...@@ -109,11 +109,13 @@ cm.e2 = {
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP) 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()) local sg = Duel.SelectMatchingCard(tp, cm.e2.gain.atkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, e:GetHandler(), g:GetFirst():GetAttack())
local tc = sg:GetFirst() local tc = sg:GetFirst()
local og = tc:GetOverlayGroup() if tc:IsImmuneToEffect(e) then
if og:GetCount() > 0 then local og = tc:GetOverlayGroup()
Duel.SendtoGrave(og, REASON_RULE) if og:GetCount() > 0 then
Duel.SendtoGrave(og, REASON_RULE)
end
Duel.Overlay(e:GetHandler(), Group.FromCards(tc))
end end
Duel.Overlay(e:GetHandler(), Group.FromCards(tc))
end end
end end
} }
......
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