Commit 7f1660d5 authored by xiaoye's avatar xiaoye

fix

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