Commit 08d3c8ba authored by DailyShana's avatar DailyShana

update EFFECT_INDESTRUCTABLE_COUNT

parent 2c5e3b1d
...@@ -12,15 +12,12 @@ function c26268488.initial_effect(c) ...@@ -12,15 +12,12 @@ function c26268488.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c26268488.reptg) e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetValue(c26268488.repval) e2:SetValue(c26268488.indct)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
--disable --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26268488,0)) e3:SetDescription(aux.Stringid(26268488,0))
...@@ -45,25 +42,10 @@ function c26268488.initial_effect(c) ...@@ -45,25 +42,10 @@ 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,e,tp) function c26268488.indct(e,re,r,rp)
return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_BATTLE+REASON_EFFECT) if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
and c:GetFlagEffect(26268488)==0 and not c:IsImmuneToEffect(e) return 1
end else return 0 end
function c26268488.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c26268488.repfilter,1,nil,e,tp) end
local g=eg:Filter(c26268488.repfilter,nil,e,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(26268488,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(26268488,2))
tc=g:GetNext()
end
e:GetLabelObject():Clear()
e:GetLabelObject():Merge(g)
return true
end
function c26268488.repval(e,c)
local g=e:GetLabelObject()
return g:IsContains(c)
end end
function c26268488.discon(e,tp,eg,ep,ev,re,r,rp) function c26268488.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
......
...@@ -40,15 +40,12 @@ end ...@@ -40,15 +40,12 @@ end
function c51777272.operation(e,tp,eg,ep,ev,re,r,rp) function c51777272.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c51777272.indct)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c51777272.reptg)
e1:SetValue(c51777272.repval)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -58,25 +55,10 @@ function c51777272.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,25 +55,10 @@ 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,e,tp) function c51777272.indct(e,,re,r,rp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE) if bit.band(r,REASON_BATTLE)~=0 then
and c:IsReason(REASON_BATTLE) and c:GetFlagEffect(51777272)==0 and not c:IsImmuneToEffect(e) return 1
end else return 0 end
function c51777272.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c51777272.repfilter,1,nil,e,tp) end
local g=eg:Filter(c51777272.repfilter,nil,e,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(51777272,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext()
end
e:GetLabelObject():Clear()
e:GetLabelObject():Merge(g)
return true
end
function c51777272.repval(e,c)
local g=e:GetLabelObject()
return g:IsContains(c)
end end
function c51777272.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c51777272.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -16,37 +16,19 @@ function c79777187.initial_effect(c) ...@@ -16,37 +16,19 @@ function c79777187.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes --indes
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE) e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTarget(c79777187.reptg) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(c79777187.repval) e3:SetTarget(c79777187.target)
e3:SetValue(c79777187.indct)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local g=Group.CreateGroup()
g:KeepAlive()
e3:SetLabelObject(g)
end 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,e,tp) function c79777187.indct(e,re,r,rp,c)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
and (c:IsSetCard(0xc6) or c:IsSetCard(0x9f)) and c:IsReason(REASON_BATTLE+REASON_EFFECT) return 1
and c:GetFlagEffect(79777187)==0 and not c:IsImmuneToEffect(e) else return 0 end
end
function c79777187.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c79777187.repfilter,1,nil,e,tp) end
local g=eg:Filter(c79777187.repfilter,nil,e,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(79777187,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(79777187,0))
tc=g:GetNext()
end
e:GetLabelObject():Clear()
e:GetLabelObject():Merge(g)
return true
end
function c79777187.repval(e,c)
local g=e:GetLabelObject()
return g:IsContains(c)
end end
...@@ -49,15 +49,12 @@ end ...@@ -49,15 +49,12 @@ end
function c97165977.operation(e,tp,eg,ep,ev,re,r,rp) function c97165977.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c97165977.indct)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c97165977.reptg)
e1:SetValue(c97165977.repval)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -67,25 +64,10 @@ function c97165977.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,25 +64,10 @@ 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,e,tp) function c97165977.indct(e,,re,r,rp)
return c:IsFaceup() and c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE) if bit.band(r,REASON_BATTLE)~=0 then
and c:IsReason(REASON_BATTLE) and c:GetFlagEffect(97165977)==0 and not c:IsImmuneToEffect(e) return 1
end else return 0 end
function c97165977.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c97165977.repfilter,1,nil,e,tp) end
local g=eg:Filter(c97165977.repfilter,nil,e,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(97165977,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
tc=g:GetNext()
end
e:GetLabelObject():Clear()
e:GetLabelObject():Merge(g)
return true
end
function c97165977.repval(e,c)
local g=e:GetLabelObject()
return g:IsContains(c)
end end
function c97165977.atkop(e,tp,eg,ep,ev,re,r,rp) function c97165977.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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