Commit 3575b995 authored by salix5's avatar salix5

Merge pull request #271 from mercury233/patch-indes-immune

fix: Lunalight Cat Dancer 's indestruct effect shouldn't work on uneffected cards
parents 4dbd4d88 b8bd4810
...@@ -45,12 +45,13 @@ function c26268488.initial_effect(c) ...@@ -45,12 +45,13 @@ function c26268488.initial_effect(c)
e4:SetOperation(c26268488.spop) e4:SetOperation(c26268488.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c26268488.repfilter(c,tp) function c26268488.repfilter(c,e,tp)
return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(26268488)==0 return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetFlagEffect(26268488)==0 and not c:IsImmuneToEffect(e)
end end
function c26268488.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c26268488.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c26268488.repfilter,1,nil,tp) end if chk==0 then return eg:IsExists(c26268488.repfilter,1,nil,e,tp) end
local g=eg:Filter(c26268488.repfilter,nil,tp) local g=eg:Filter(c26268488.repfilter,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(26268488,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(26268488,2)) tc:RegisterFlagEffect(26268488,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(26268488,2))
......
...@@ -58,13 +58,13 @@ function c51777272.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,13 +58,13 @@ function c51777272.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c51777272.repfilter(c,tp) function c51777272.repfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE)
and c:IsReason(REASON_BATTLE) and c:GetFlagEffect(51777272)==0 and c:IsReason(REASON_BATTLE) and c:GetFlagEffect(51777272)==0 and not c:IsImmuneToEffect(e)
end end
function c51777272.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c51777272.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c51777272.repfilter,1,nil,tp) end if chk==0 then return eg:IsExists(c51777272.repfilter,1,nil,e,tp) end
local g=eg:Filter(c51777272.repfilter,nil,tp) local g=eg:Filter(c51777272.repfilter,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(51777272,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(51777272,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
......
...@@ -29,13 +29,14 @@ end ...@@ -29,13 +29,14 @@ end
function c79777187.target(e,c) function c79777187.target(e,c)
return c:IsSetCard(0xc6) or c:IsSetCard(0x9f) return c:IsSetCard(0xc6) or c:IsSetCard(0x9f)
end end
function c79777187.repfilter(c,tp) function c79777187.repfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and (c:IsSetCard(0xc6) or c:IsSetCard(0x9f)) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetFlagEffect(79777187)==0 and (c:IsSetCard(0xc6) or c:IsSetCard(0x9f)) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetFlagEffect(79777187)==0 and not c:IsImmuneToEffect(e)
end end
function c79777187.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c79777187.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c79777187.repfilter,1,nil,tp) end if chk==0 then return eg:IsExists(c79777187.repfilter,1,nil,e,tp) end
local g=eg:Filter(c79777187.repfilter,nil,tp) local g=eg:Filter(c79777187.repfilter,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(79777187,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79777187,0)) tc:RegisterFlagEffect(79777187,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79777187,0))
......
...@@ -67,13 +67,13 @@ function c97165977.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,13 +67,13 @@ function c97165977.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c97165977.repfilter(c,tp) function c97165977.repfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE)
and c:IsReason(REASON_BATTLE) and c:GetFlagEffect(97165977)==0 and c:IsReason(REASON_BATTLE) and c:GetFlagEffect(97165977)==0 and not c:IsImmuneToEffect(e)
end end
function c97165977.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c97165977.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c97165977.repfilter,1,nil,tp) end if chk==0 then return eg:IsExists(c97165977.repfilter,1,nil,e,tp) end
local g=eg:Filter(c97165977.repfilter,nil,tp) local g=eg:Filter(c97165977.repfilter,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:RegisterFlagEffect(97165977,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(97165977,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
......
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