Commit 6e54b4a6 authored by POLYMER's avatar POLYMER

fix

parent 612a828d
--影依の廻転 --影依の廻転
function c111443942.initial_effect(c) function c111443942.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,111443942+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,111443942+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c111443942.target) e1:SetTarget(c111443942.target)
e1:SetOperation(c111443942.operation) e1:SetOperation(c111443942.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--plus effect --plus effect
if not c111443942.global_check then if not c111443942.global_check then
c111443942.global_check=true c111443942.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ADJUST) ge1:SetCode(EVENT_ADJUST)
ge1:SetOperation(c111443942.sdop) ge1:SetOperation(c111443942.sdop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c111443942.filter(c) function c111443942.filter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(111443942) return c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(111443942)
end end
function c111443942.target(e,tp,eg,ep,ev,re,r,rp,chk) function c111443942.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c111443942.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c111443942.filter,tp,LOCATION_DECK,0,1,nil) end
end end
function c111443942.operation(e,tp,eg,ep,ev,re,r,rp) function c111443942.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,111443942,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,111443942,RESET_PHASE+PHASE_END,0,1)
if Duel.IsExistingMatchingCard(c111443942.filter,tp,LOCATION_DECK,0,2,nil) then if Duel.IsExistingMatchingCard(c111443942.filter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c111443942.filter,tp,LOCATION_DECK,0,nil) local sg=Duel.GetMatchingGroup(c111443942.filter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg) Duel.ConfirmCards(tp,sg)
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c111443942.con) e1:SetCondition(c111443942.con)
e1:SetOperation(c111443942.op) e1:SetOperation(c111443942.op)
e1:SetLabelObject(e6) e1:SetLabelObject(e6)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EVENT_TO_HAND) e3:SetCode(EVENT_TO_HAND)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EVENT_TO_DECK) e4:SetCode(EVENT_TO_DECK)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
local e5=e1:Clone() local e5=e1:Clone()
e5:SetCode(EVENT_REMOVE) e5:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(e5,tp) Duel.RegisterEffect(e5,tp)
-- --
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVED) e6:SetCode(EVENT_CHAIN_SOLVED)
e6:SetOperation(c111443942.disop) e6:SetOperation(c111443942.disop)
e6:SetReset(RESET_PHASE+PHASE_END) e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp) Duel.RegisterEffect(e6,tp)
local e7=e6:Clone() local e7=e6:Clone()
e7:SetCode(EVENT_CHAINING) e7:SetCode(EVENT_CHAINING)
Duel.RegisterEffect(e7,tp) Duel.RegisterEffect(e7,tp)
end end
function c111443942.cfilter(c,tp) function c111443942.cfilter(c,tp)
return c:GetPreviousControler()==tp return c:GetPreviousControler()==tp
and (c:IsPreviousLocation(LOCATION_DECK) or c:GetSummonLocation()==LOCATION_DECK and (c:IsPreviousLocation(LOCATION_DECK) or c:GetSummonLocation()==LOCATION_DECK
or (c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)) or (c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK))
or c:IsLocation(LOCATION_DECK)) and not c:IsReason(REASON_DRAW) or c:IsLocation(LOCATION_DECK)) and not c:IsReason(REASON_DRAW)
end end
function c111443942.con(e,tp,eg,ep,ev,re,r,rp) function c111443942.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c111443942.cfilter,1,nil,tp) return eg:IsExists(c111443942.cfilter,1,nil,tp)
end end
function c111443942.op(e,tp,eg,ep,ev,re,r,rp) function c111443942.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<=1 then return end if g:GetCount()<=1 then return end
c:RegisterFlagEffect(111443942,RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(111443942,RESET_PHASE+PHASE_END,0,1)
end end
function c111443942.disop(e,tp,eg,ep,ev,re,r,rp) function c111443942.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<=1 then return end if g:GetCount()<=1 then return end
if c:GetFlagEffect(111443942)~=0 and Duel.IsExistingMatchingCard(c111443942.filter,tp,LOCATION_DECK,0,2,nil) then if c:GetFlagEffect(111443942)~=0 and Duel.IsExistingMatchingCard(c111443942.filter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c111443942.filter,tp,LOCATION_DECK,0,nil) local sg=Duel.GetMatchingGroup(c111443942.filter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg) Duel.ConfirmCards(tp,sg)
c:ResetFlagEffect(111443942) c:ResetFlagEffect(111443942)
end end
end end
function c111443942.sdfilter(c) function c111443942.sdfilter(c)
return not c:IsOriginalCodeRule(23912837) return not c:IsOriginalCodeRule(23912837)
end end
function c111443942.sdop(e,tp,eg,ep,ev,re,r,rp) function c111443942.sdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetOwner() local c=e:GetHandler():GetOwner()
local g=Duel.GetMatchingGroup(c111443942.filter,c,LOCATION_DECK,LOCATION_DECK,nil) local g=Duel.GetMatchingGroup(c111443942.filter,c,LOCATION_DECK,LOCATION_DECK,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if tc:GetFlagEffect(111443942)==0 then if tc:GetFlagEffect(111443942)==0 then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local ae=tc:GetActivateEffect() local ae=tc:GetActivateEffect()
local oath=0 local oath=0
if c111443942.sdfilter(tc) then oath=EFFECT_COUNT_CODE_OATH end if c111443942.sdfilter(tc) then oath=EFFECT_COUNT_CODE_OATH end
local e1=Effect.CreateEffect(tc) local e1=ae:Clone() --Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_ACTIVATE) --e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(ae:GetCode()) --e1:SetCode(ae:GetCode())
e1:SetCategory(ae:GetCategory()) --e1:SetCategory(ae:GetCategory())
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+ae:GetProperty()) --e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+ae:GetProperty())
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,code+oath) --e1:SetCountLimit(1,code+oath)
e1:SetCondition(c111443942.sfcon) --e1:SetCondition(c111443942.sfcon)
e1:SetTarget(c111443942.sftg) --e1:SetTarget(c111443942.sftg)
e1:SetOperation(c111443942.sfop) --e1:SetOperation(c111443942.sfop)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
--activate cost c111443942[e1]=true
local e2=Effect.CreateEffect(tc) --activate cost
e2:SetType(EFFECT_TYPE_FIELD) local e2=Effect.CreateEffect(tc)
e2:SetCode(EFFECT_ACTIVATE_COST) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_DECK) e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_DECK)
e2:SetTargetRange(LOCATION_DECK,0) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE)
e2:SetCost(c111443942.costchk) e2:SetTargetRange(LOCATION_DECK,0)
e2:SetTarget(c111443942.costtg) e2:SetCost(c111443942.costchk)
e2:SetOperation(c111443942.costop) e2:SetTarget(c111443942.costtg)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetOperation(c111443942.costop)
e2:SetLabel(111443942) e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2) e2:SetLabel(111443942)
tc:RegisterFlagEffect(111443942,RESET_EVENT+0x1fe0000,0,1) tc:RegisterEffect(e2)
end tc:RegisterFlagEffect(111443942,RESET_EVENT+0x1fe0000,0,1)
tc=g:GetNext() end
end tc=g:GetNext()
end
end end
--deck activate --deck activate
function c111443942.sfcon(e,tp,eg,ep,ev,re,r,rp) function c111443942.sfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,111443942)>0 and Duel.GetFlagEffect(tp,e:GetHandler():GetOriginalCode())==0 return Duel.GetFlagEffect(tp,111443942)>0 and Duel.GetFlagEffect(tp,e:GetHandler():GetOriginalCode())==0
end end
function c111443942.sftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c111443942.sftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ae=e:GetHandler():GetActivateEffect() local ae=e:GetHandler():GetActivateEffect()
local fcon=ae:GetCondition() local fcon=ae:GetCondition()
local fcos=ae:GetCost() local fcos=ae:GetCost()
local ftg=ae:GetTarget() local ftg=ae:GetTarget()
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
return (not fcon or fcon(e,tp,eg,ep,ev,re,r,rp)) return (not fcon or fcon(e,tp,eg,ep,ev,re,r,rp))
and (not fcos or fcos(e,tp,eg,ep,ev,re,r,rp,0)) and (not fcos or fcos(e,tp,eg,ep,ev,re,r,rp,0))
and (not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,0)) and (not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,0))
and c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
if fcos then if fcos then
fcos(e,tp,eg,ep,ev,re,r,rp,1) fcos(e,tp,eg,ep,ev,re,r,rp,1)
end end
if ftg then if ftg then
ftg(e,tp,eg,ep,ev,re,r,rp,1) ftg(e,tp,eg,ep,ev,re,r,rp,1)
end end
Duel.RegisterFlagEffect(tp,e:GetHandler():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,e:GetHandler():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1)
end end
function c111443942.sfop(e,tp,eg,ep,ev,re,r,rp) function c111443942.sfop(e,tp,eg,ep,ev,re,r,rp)
local ae=e:GetHandler():GetActivateEffect() local ae=e:GetHandler():GetActivateEffect()
local fop=ae:GetOperation() local fop=ae:GetOperation()
if fop then if fop then
fop(e,tp,eg,ep,ev,re,r,rp) fop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--activate field --activate field
function c111443942.costfilter(c) function c111443942.costfilter(c)
return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsSetCard(0x9d) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function c111443942.costchk(e,te_or_c,tp) function c111443942.costchk(e,te_or_c,tp)
local tp=e:GetHandler():GetControler() local c=e:GetHandler()
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local tp=e:GetHandler():GetControler()
and Duel.IsExistingMatchingCard(c111443942.costfilter,tp,LOCATION_GRAVE,0,1,nil) return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c111443942.costfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,111443942)>0 and Duel.GetFlagEffect(tp,e:GetHandler():GetOriginalCode())==0
and c:IsSetCard(0x9d) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c111443942.costtg(e,te,tp) function c111443942.costtg(e,te,tp)
e:SetLabelObject(te) e:SetLabelObject(te)
return te:GetHandler():IsLocation(LOCATION_DECK) and te:GetHandler()==e:GetHandler() return te:GetHandler():IsLocation(LOCATION_DECK) and te:GetHandler()==e:GetHandler() and c111443942[te]
end end
function c111443942.costop(e,tp,eg,ep,ev,re,r,rp) function c111443942.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.RegisterFlagEffect(tp,e:GetHandler():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1)
local g=Duel.SelectMatchingCard(tp,c111443942.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,c111443942.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local te=e:GetLabelObject() if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT) local te=e:GetLabelObject()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
c:CreateEffectRelation(te) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
local ev0=Duel.GetCurrentChain()+1 c:CreateEffectRelation(te)
local e1=Effect.CreateEffect(c) local ev0=Duel.GetCurrentChain()+1
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end) e1:SetCountLimit(1)
e1:SetOperation(c111443942.rsop) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetReset(RESET_CHAIN) e1:SetOperation(c111443942.rsop)
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_CHAIN)
local e2=e1:Clone() Duel.RegisterEffect(e1,tp)
e2:SetCode(EVENT_CHAIN_NEGATED) local e2=e1:Clone()
Duel.RegisterEffect(e2,tp) e2:SetCode(EVENT_CHAIN_NEGATED)
end Duel.RegisterEffect(e2,tp)
end
end end
function c111443942.rsop(e,tp,eg,ep,ev,re,r,rp) function c111443942.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true) rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true) rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end end
end end
local re=Card.RegisterEffect --[[local re=Card.RegisterEffect
Card.RegisterEffect=function(c,e) Card.RegisterEffect=function(c,e)
if c111443942.filter(c) and c:IsType(TYPE_CONTINUOUS+TYPE_EQUIP+TYPE_FIELD) and not e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=111443942 then if c111443942.filter(c) and c:IsType(TYPE_CONTINUOUS+TYPE_EQUIP+TYPE_FIELD) and not e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=111443942 then
local tg=e:GetTarget() local tg=e:GetTarget()
if not tg then tg=aux.TRUE end if not tg then tg=aux.TRUE end
e:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) and not c:IsStatus(STATUS_CHAINING) end tg(e,tp,eg,ep,ev,re,r,rp,1) end) e:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) and not c:IsStatus(STATUS_CHAINING) end tg(e,tp,eg,ep,ev,re,r,rp,1) end)
end end
re(c,e) re(c,e)
end end--]]
...@@ -41,6 +41,38 @@ function s.initial_effect(c) ...@@ -41,6 +41,38 @@ function s.initial_effect(c)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--replace
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e5:SetRange(LOCATION_HAND+LOCATION_DECK)
e5:SetOperation(s.rep)
c:RegisterEffect(e5)
end
function s.rep(e,tp,eg,ep,ev,re,r,rp)
local table={26118970}
for i,code in ipairs(table) do
local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetOriginalCode,code),0,0xff,0xff,nil)
local cn=_G["c"..code]
if type(cn)=="table" then
for tc in aux.Next(g) do
--special summon
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(26118970,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,26118970)
e1:SetCondition(cn.spcon)
e1:SetTarget(cn.sptg)
e1:SetOperation(cn.spop)
tc:RegisterEffect(e1)
end
end
end
end end
function s.drdiseff(c,e,tp,eg,ep,ev,re,r,rp) function s.drdiseff(c,e,tp,eg,ep,ev,re,r,rp)
if c.Dragon_Ruler_handes_effect then return c.Dragon_Ruler_handes_effect end if c.Dragon_Ruler_handes_effect then return c.Dragon_Ruler_handes_effect end
......
...@@ -326,16 +326,16 @@ function c4058.adop(e,tp,eg,ep,ev,re,r,rp) ...@@ -326,16 +326,16 @@ function c4058.adop(e,tp,eg,ep,ev,re,r,rp)
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local ae=tc:GetActivateEffect() local ae=tc:GetActivateEffect()
--deck activate --deck activate
local e1=Effect.CreateEffect(tc) local e1=ae:Clone() --Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_ACTIVATE) --e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(ae:GetCode()) --e1:SetCode(ae:GetCode())
e1:SetCategory(ae:GetCategory()) --e1:SetCategory(ae:GetCategory())
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+ae:GetProperty()) --e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+ae:GetProperty())
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,code+EFFECT_COUNT_CODE_OATH) --e1:SetCountLimit(1,code+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c4058.sfcon) --e1:SetCondition(c4058.sfcon)
e1:SetTarget(c4058.sftg) --e1:SetTarget(c4058.sftg)
e1:SetOperation(c4058.sfop) --e1:SetOperation(c4058.sfop)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
--activate cost --activate cost
...@@ -390,10 +390,13 @@ end ...@@ -390,10 +390,13 @@ end
function c4058.costchk(e,te_or_c,tp) function c4058.costchk(e,te_or_c,tp)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsPlayerAffectedByEffect(tp,4058) and Duel.GetFlagEffect(tp,e:GetHandler():GetOriginalCode())==0
and e:GetHandler():IsCode(16067089,93217231,80678380,1683982)
end end
function c4058.costop(e,tp,eg,ep,ev,re,r,rp) function c4058.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
local c=e:GetHandler() local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,e:GetHandler():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1)
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
c:CreateEffectRelation(te) c:CreateEffectRelation(te)
local ev0=Duel.GetCurrentChain()+1 local ev0=Duel.GetCurrentChain()+1
...@@ -432,7 +435,7 @@ function c4058.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -432,7 +435,7 @@ function c4058.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
local re=Card.RegisterEffect --[[local re=Card.RegisterEffect
Card.RegisterEffect=function(c,e) Card.RegisterEffect=function(c,e)
if c:IsType(TYPE_TRAP) and c:IsCode(16067089,93217231,80678380,1683982) and c:IsType(TYPE_CONTINUOUS+TYPE_EQUIP+TYPE_FIELD) and not e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=4058 then if c:IsType(TYPE_TRAP) and c:IsCode(16067089,93217231,80678380,1683982) and c:IsType(TYPE_CONTINUOUS+TYPE_EQUIP+TYPE_FIELD) and not e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=4058 then
local tg=e:GetTarget() local tg=e:GetTarget()
...@@ -440,4 +443,4 @@ Card.RegisterEffect=function(c,e) ...@@ -440,4 +443,4 @@ Card.RegisterEffect=function(c,e)
e:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) and not c:IsStatus(STATUS_CHAINING) end tg(e,tp,eg,ep,ev,re,r,rp,1) end) e:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) and not c:IsStatus(STATUS_CHAINING) end tg(e,tp,eg,ep,ev,re,r,rp,1) end)
end end
re(c,e) re(c,e)
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