Commit 08d3c8ba authored by DailyShana's avatar DailyShana

update EFFECT_INDESTRUCTABLE_COUNT

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