Commit 42b72fdb authored by Nemo Ma's avatar Nemo Ma

wd upd 240811

parent 9e258e3c
This diff is collapsed.
No preview for this file type
...@@ -30,7 +30,7 @@ function cm.initial_effect(c) ...@@ -30,7 +30,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -220,7 +220,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -220,7 +220,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PUBLIC) e1:SetCode(EFFECT_PUBLIC)
e1:SetTargetRange(0,LOCATION_HAND) e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
...@@ -346,15 +346,15 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -346,15 +346,15 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
function cm.thfilter2(c) function cm.thfilter2(c)
return c:IsSetCard(0x5977) and c:IsAbleToHand() return c:IsSetCard(0x5977) and c:IsAbleToHand() and c:IsFaceup()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -193,8 +193,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -193,8 +193,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
e2:SetOperation(cm.tdop) e2:SetOperation(cm.tdop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,0,LOCATION_GRAVE,nil,e,tp) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,LOCATION_GRAVE,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,1-tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,PLAYER_ALL,LOCATION_GRAVE+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,PLAYER_ALL,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,PLAYER_ALL,LOCATION_ONFIELD)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
...@@ -210,7 +210,7 @@ end ...@@ -210,7 +210,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND,LOCATION_GRAVE,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e)) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
......
...@@ -217,14 +217,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -217,14 +217,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.rsop111(e,tp,eg,ep,ev,re,r,rp) function cm.rsop111(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(e:GetHandler():IsAbleToHand())
e:GetHandler():SetStatus(STATUS_LEAVE_CONFIRMED,false) e:GetHandler():SetStatus(STATUS_LEAVE_CONFIRMED,false)
e:Reset() e:Reset()
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,2,nil) local tg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
local g=tg:SelectSubGroup(tp,aux.dncheck,false,1,2)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -172,10 +172,10 @@ function cm.spfilter(c,e,tp) ...@@ -172,10 +172,10 @@ function cm.spfilter(c,e,tp)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and c:GetFlagEffect(m)==0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)==0 end
local fid=c:GetFieldID() local fid=c:GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2)) c:RegisterFlagEffect(m,RESET_EVENT+0xc7a0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,2))
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp) local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,PLAYER_ALL,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,PLAYER_ALL,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,PLAYER_ALL,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,PLAYER_ALL,LOCATION_MZONE)
...@@ -183,7 +183,7 @@ end ...@@ -183,7 +183,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then Duel.SendtoHand(tc,nil,REASON_EFFECT) end if tc then Duel.SendtoHand(tc,nil,REASON_EFFECT) end
local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp) local g2=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
......
...@@ -29,22 +29,25 @@ function cm.initial_effect(c) ...@@ -29,22 +29,25 @@ function cm.initial_effect(c)
e3:SetTarget(cm.sumtg) e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop) e3:SetOperation(cm.sumop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local g=Group.CreateGroup() if not cm.global_check then
g:KeepAlive() cm.global_check=true
local ge1=Effect.CreateEffect(c) local g=Group.CreateGroup()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) g:KeepAlive()
ge1:SetCode(EVENT_TO_HAND) local ge1=Effect.CreateEffect(c)
ge1:SetLabel(m) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetLabelObject(g) ge1:SetCode(EVENT_TO_HAND)
ge1:SetOperation(cm.MergedDelayEventCheck1) ge1:SetLabel(m)
Duel.RegisterEffect(ge1,0) ge1:SetLabelObject(g)
local ge2=ge1:Clone() ge1:SetOperation(cm.MergedDelayEventCheck1)
ge2:SetCode(EVENT_CHAIN_SOLVED) Duel.RegisterEffect(ge1,0)
ge2:SetOperation(cm.MergedDelayEventCheck2) local ge2=ge1:Clone()
Duel.RegisterEffect(ge2,0) ge2:SetCode(EVENT_CHAIN_SOLVED)
local ge3=ge2:Clone() ge2:SetOperation(cm.MergedDelayEventCheck2)
ge3:SetCode(EVENT_CHAIN_NEGATED) Duel.RegisterEffect(ge2,0)
Duel.RegisterEffect(ge3,0) local ge3=ge2:Clone()
ge3:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(ge3,0)
end
end end
function cm.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp) function cm.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount()<=0 or not eg then return end if Duel.GetTurnCount()<=0 or not eg then return end
...@@ -104,6 +107,13 @@ end ...@@ -104,6 +107,13 @@ end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 end if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
local tc=eg:GetFirst()
while tc do
local code,code2=tc:GetCode()
Duel.Hint(HINT_CARD,0,code)
if code2 then Duel.Hint(HINT_CARD,0,code2) end
tc=eg:GetNext()
end
end end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp) function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -112,7 +122,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,7 +122,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
while tc do while tc do
local code,code2=tc:GetCode() local code,code2=tc:GetCode()
tab[code]=true tab[code]=true
Duel.Hint(HINT_CARD,0,code) --Duel.Hint(HINT_CARD,0,code)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -143,7 +153,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +153,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local op=re:GetOperation() or aux.TRUE local op=re:GetOperation() or aux.TRUE
if re:GetHandler():IsCode(e:GetLabel()) and Duel.IsChainDisablable(ev) and #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(m,1)) then if re:GetHandler():IsCode(e:GetLabel()) and Duel.IsChainDisablable(ev) and #g>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(m,1)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
g=g:Select(tp,1,1,nil) g=g:Select(tp,1,1,nil)
......
...@@ -86,7 +86,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local dg=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:IsAbleToHand() end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local dg=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:IsAbleToHand() end,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if #g>0 and #dg>0 and ((c:IsLocation(LOCATION_HAND) and loc==LOCATION_HAND and Duel.SelectYesNo(tp,aux.Stringid(m,0))) or (c:IsOnField() and loc&LOCATION_ONFIELD>0 and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,0)))) then if #g>0 and #dg>0 and ((c:IsLocation(LOCATION_HAND) and loc==LOCATION_HAND and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(m,0))) or (c:IsOnField() and loc&LOCATION_ONFIELD>0 and Duel.SelectEffectYesNo(tp,re:GetHandler(),aux.Stringid(m,0)))) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
if c:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,c) end if c:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
......
...@@ -42,6 +42,12 @@ function cm.initial_effect(c) ...@@ -42,6 +42,12 @@ function cm.initial_effect(c)
e5:SetTarget(cm.sumtg) e5:SetTarget(cm.sumtg)
e5:SetOperation(cm.sumop) e5:SetOperation(cm.sumop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetDescription(aux.Stringid(m,4))
c:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetDescription(aux.Stringid(m,4))
c:RegisterEffect(e7)
end end
function cm.filter(c) function cm.filter(c)
return c:IsType(TYPE_FLIP) and c:IsAbleToHand() return c:IsType(TYPE_FLIP) and c:IsAbleToHand()
......
...@@ -80,6 +80,93 @@ function c119150521.desfilter(c,tp) ...@@ -80,6 +80,93 @@ function c119150521.desfilter(c,tp)
if c:IsFacedown() or not c:IsAbleToHand() then return false end if c:IsFacedown() or not c:IsAbleToHand() then return false end
return c:IsSetCard(0xfb) and (c:IsLocation(LOCATION_MZONE) or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) return c:IsSetCard(0xfb) and (c:IsLocation(LOCATION_MZONE) or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end end
function c119150521.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and c119150521.desfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c119150521.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c119150521.desfilter,tp,LOfunction c119150521.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,119150520+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c119150521.spcon)
e1:SetCost(c119150521.spcost)
e1:SetOperation(c119150521.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,119150521)
e2:SetTarget(c119150521.target2)
e2:SetOperation(c119150521.operation2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c119150521.target3)
e3:SetOperation(c119150521.operation3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(c119150521.regop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c119150521.damcon)
e5:SetOperation(c119150521.damop)
c:RegisterEffect(e5)
end
function c119150521.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
function c119150521.costfilter(c)
return c:IsSetCard(0xfb) and not c:IsPublic() and c:IsDiscardable()
end
function c119150521.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() and not c:IsPublic() and Duel.IsExistingMatchingCard(c119150521.costfilter,tp,LOCATION_HAND,0,2,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c119150521.costfilter,tp,LOCATION_HAND,0,2,2,c)
g:AddCard(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tg=g:Select(tp,2,2,nil)
Duel.SendtoGrave(tg,REASON_COST+REASON_DISCARD)
end
function c119150521.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SKIP_BP)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
Duel.RegisterEffect(e2,tp)
end
function c119150521.desfilter(c,tp)
if c:IsFacedown() or not c:IsAbleToHand() then return false end
return c:IsSetCard(0xfb) and (c:IsLocation(LOCATION_MZONE) or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end
function c119150521.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c119150521.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and c119150521.desfilter(chkc,tp) end if chkc then return chkc:IsOnField() and c119150521.desfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c119150521.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.IsExistingTarget(c119150521.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
...@@ -123,3 +210,42 @@ function c119150521.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,3 +210,42 @@ function c119150521.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,119150521) Duel.Hint(HINT_CARD,0,119150521)
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,200,REASON_EFFECT)
end end
CATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c119150521.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)==1 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c119150521.filter(c)
return c:IsSetCard(0xfb) and not c:IsCode(119150521) and c:IsSummonable(true,nil)
end
function c119150521.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c119150521.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c119150521.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c119150521.filter,tp,LOCATION_HAND,0,1,1,nil)
if not g or g:GetCount()==0 then return end
Duel.Summon(tp,g:GetFirst(),true,nil)
end
function c119150521.regop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsSetCard(0xfb) and not rc:IsType(TYPE_LINK) then
e:GetHandler():RegisterFlagEffect(119150521,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1)
end
end
function c119150521.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return c:GetFlagEffect(119150521)~=0 and rc:IsSetCard(0xfb) and not rc:IsType(TYPE_LINK)
end
function c119150521.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,119150521)
Duel.Damage(1-tp,200,REASON_EFFECT)
end
--圣殿英雄 帝皇之钺
function c16362007.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,16362007)
e1:SetCondition(c16362007.spcon)
e1:SetTarget(c16362007.sptg)
e1:SetOperation(c16362007.spop)
c:RegisterEffect(e1)
--synchro level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SYNCHRO_LEVEL)
e2:SetValue(c16362007.slevel)
c:RegisterEffect(e2)
end
function c16362007.filter(c,tp)
return c:IsPreviousLocation(LOCATION_EXTRA) and c:IsControler(tp) and c:IsSetCard(0xdc0)
end
function c16362007.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362007.filter,1,nil,tp)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c16362007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c16362007.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362007.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362007.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362007.slevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0xdc0) then
return (4<<16)+lv
else
return c:GetLevel()
end
end
\ No newline at end of file
--圣殿英雄 帝皇之御
function c16362008.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,16362008)
e1:SetCondition(c16362008.spcon)
e1:SetTarget(c16362008.sptg)
e1:SetOperation(c16362008.spop)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362008,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362108)
e2:SetCondition(c16362008.sccon)
e2:SetTarget(c16362008.sctg)
e2:SetOperation(c16362008.scop)
c:RegisterEffect(e2)
--release
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16362008,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCountLimit(1,16362208+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(c16362008.recon)
e3:SetCost(c16362008.recost)
e3:SetOperation(c16362008.reop)
c:RegisterEffect(e3)
--release
local e32=Effect.CreateEffect(c)
e32:SetDescription(aux.Stringid(16362008,2))
e32:SetType(EFFECT_TYPE_QUICK_O)
e32:SetCode(EVENT_FREE_CHAIN)
e32:SetRange(LOCATION_HAND+LOCATION_MZONE)
e32:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e32:SetCountLimit(1,16362208+EFFECT_COUNT_CODE_DUEL)
e32:SetCondition(c16362008.damcon)
e32:SetCost(c16362008.recost)
e32:SetTarget(c16362008.damtg)
e32:SetOperation(c16362008.damop)
c:RegisterEffect(e32)
end
function c16362008.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xdc0)
end
function c16362008.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(c16362008.cfilter,1,nil,tp) and re:GetHandler():IsLocation(LOCATION_ONFIELD)
and Duel.GetTurnPlayer()==1-tp
end
function c16362008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=re:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and tc:IsCanBeEffectTarget() and not tc:IsDisabled() end
Duel.HintSelection(Group.FromCards(tc))
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c16362008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
function c16362008.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c16362008.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362008.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function c16362008.recon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c16362008.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c16362008.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TRUE)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16362008.damcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c16362008.damfilter(c)
return c:IsFaceup() and c:IsSetCard(0xdc0)
end
function c16362008.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c16362008.damfilter,tp,LOCATION_MZONE,0,1,c) end
end
function c16362008.damop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c16362008.damfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c16362008.ftarget)
e1:SetLabel(tc:GetFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(c16362008.damcon)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
end
end
function c16362008.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
\ No newline at end of file
--圣殿英雄 永恒圣拳
function c16362009.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,16362009)
e1:SetCondition(c16362009.spcon)
e1:SetTarget(c16362009.sptg)
e1:SetOperation(c16362009.spop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c16362009.val)
c:RegisterEffect(e2)
--synchro level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SYNCHRO_LEVEL)
e3:SetValue(c16362009.slevel)
c:RegisterEffect(e3)
end
function c16362009.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local rc=re:GetHandler()
return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and re:IsActiveType(TYPE_MONSTER)
and rc:IsLocation(LOCATION_MZONE) and rc:IsControler(tp) and rc:IsSetCard(0xdc0)
end
function c16362009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c16362009.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362009.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362009.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362009.val(e,c)
local tp=e:GetHandlerPlayer()
local lp=Duel.GetLP(tp)
if lp>3000 and Duel.GetLP(1-tp)>lp then
return lp-3000
else
return 0
end
end
function c16362009.slevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0xdc0) then
return (4<<16)+lv
else
return c:GetLevel()
end
end
\ No newline at end of file
--圣殿英雄 天启星魂
function c16362010.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16362010)
e1:SetTarget(c16362010.sptg)
e1:SetOperation(c16362010.spop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,16362110)
e2:SetCondition(c16362010.spcon2)
e2:SetTarget(c16362010.sptg2)
e2:SetOperation(c16362010.spop2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362010.immcon)
e3:SetOperation(c16362010.immop)
c:RegisterEffect(e3)
end
function c16362010.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c16362010.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c16362010.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16362010.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16362010.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xdc0)
end
function c16362010.spcon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and eg:IsExists(c16362010.cfilter,1,nil,tp) and re:GetHandler():IsLocation(LOCATION_ONFIELD)
and Duel.GetTurnPlayer()==tp
end
function c16362010.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=re:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and tc:IsCanBeEffectTarget() and not tc:IsDisabled() end
Duel.HintSelection(Group.FromCards(tc))
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c16362010.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
function c16362010.immcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c16362010.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362010,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c16362010.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c16362010.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
\ No newline at end of file
--圣殿英雄 凌波清芙
function c16362011.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16362011)
e1:SetCondition(c16362011.spcon)
e1:SetTarget(c16362011.sptg)
e1:SetOperation(c16362011.spop)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362011,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362111)
e2:SetCondition(c16362011.sccon)
e2:SetTarget(c16362011.sctg)
e2:SetOperation(c16362011.scop)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,16362211)
e3:SetCondition(c16362011.effcon)
e3:SetOperation(c16362011.effop)
c:RegisterEffect(e3)
end
function c16362011.cfilter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362011.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c16362011.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c16362011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16362011.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362011.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362011.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362011.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c16362011.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362011.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function c16362011.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_SYNCHRO)~=0
end
function c16362011.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362011,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetCost(c16362011.thcost)
e1:SetTarget(c16362011.thtg)
e1:SetOperation(c16362011.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(16362011,2))
end
function c16362011.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c16362011.thfilter(c)
return c:IsSetCard(0xdc0) and c:IsAbleToHand()
end
function c16362011.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16362011.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16362011.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16362011.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--圣殿英雄 缥缈幽芙
function c16362012.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,16362012)
e1:SetCondition(c16362012.spcon)
e1:SetTarget(c16362012.sptg)
e1:SetOperation(c16362012.spop)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362012,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362111)
e2:SetCondition(c16362012.sccon)
e2:SetTarget(c16362012.sctg)
e2:SetOperation(c16362012.scop)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362012.effcon)
e3:SetOperation(c16362012.effop)
c:RegisterEffect(e3)
end
function c16362012.cfilter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362012.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c16362012.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c16362012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c16362012.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362012.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362012.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362012.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c16362012.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362012.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function c16362012.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_SYNCHRO)~=0
end
function c16362012.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362012,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c16362012.spcon2)
e1:SetCost(c16362012.spcost2)
e1:SetTarget(c16362012.sptg2)
e1:SetOperation(c16362012.spop2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(16362012,2))
end
function c16362012.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c16362012.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c16362012.mgfilter(c,e,tp,sync)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==sync
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362012.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if chk==0 then return c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and ct>0 and ct<=Duel.GetMZoneCount(tp,c)
and mg:FilterCount(c16362012.mgfilter,nil,e,tp,c)==ct end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_GRAVE)
end
function c16362012.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and ct>0 and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE)
and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or ct==1)
and mg:FilterCount(aux.NecroValleyFilter(c16362012.mgfilter),nil,e,tp,c)==ct then
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--圣殿英雄 圣光灵王
function c16362013.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16362013)
e1:SetTarget(c16362013.thtg)
e1:SetOperation(c16362013.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,16362113)
e3:SetCost(c16362013.cost)
e3:SetTarget(c16362013.target)
e3:SetOperation(c16362013.operation)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCondition(c16362013.indcon)
e4:SetOperation(c16362013.indop)
c:RegisterEffect(e4)
end
function c16362013.filter(c)
return c:IsSetCard(0xdc0) and c:IsAbleToHand()
end
function c16362013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16362013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16362013.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16362013.tgfilter(c,e,tp,lv)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_TUNER) and c:GetLevel()>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c16362013.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()+lv)
end
function c16362013.spfilter(c,e,tp,lv)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true)
end
function c16362013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local c=e:GetHandler()
local lv=c:GetLevel()
local g=Duel.GetMatchingGroup(c16362013.tgfilter,tp,LOCATION_HAND,0,c,e,tp,lv)
if chk==0 then
return g:GetCount()>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(c,nil,REASON_COST)
Duel.SendtoGrave(sg,nil,REASON_COST)
e:SetLabel(sg:GetFirst():GetLevel()+c:GetLevel())
end
function c16362013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362013.operation(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c16362013.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
function c16362013.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c16362013.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362013,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetValue(c16362013.valcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c16362013.valcon(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
\ No newline at end of file
--圣殿英雄 圣光灵皇
function c16362014.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xdc0),aux.NonTuner(nil),1)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16362014)
e1:SetCondition(c16362014.thcon)
e1:SetTarget(c16362014.thtg)
e1:SetOperation(c16362014.thop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362114)
e2:SetCost(c16362014.cost)
e2:SetTarget(c16362014.target)
e2:SetOperation(c16362014.operation)
c:RegisterEffect(e2)
--treat as tuner for synchro summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_TUNER)
e3:SetValue(c16362014.tunerval)
c:RegisterEffect(e3)
--synchro level
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SYNCHRO_LEVEL)
e4:SetValue(c16362014.slevel)
c:RegisterEffect(e4)
end
function c16362014.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c16362014.filter(c)
return c:IsSetCard(0xdc0) and c:IsAbleToHand()
end
function c16362014.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16362014.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16362014.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16362014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c16362014.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0xdc0)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c16362014.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16362014.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function c16362014.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16362014.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
function c16362014.tunerval(e,sc)
return sc:IsControler(e:GetHandlerPlayer()) and sc:IsSetCard(0xdc0)
end
function c16362014.slevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0xdc0) then
return (4<<16)+lv
else
return c:GetLevel()
end
end
\ No newline at end of file
--圣殿英雄 圣光灵神
function c16362015.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xdc0),aux.NonTuner(nil),2)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c16362015.imop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,16362015)
e2:SetCondition(c16362015.spcon)
e2:SetTarget(c16362015.sptg)
e2:SetOperation(c16362015.spop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16362015,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetCountLimit(1,16362115)
e3:SetCondition(c16362015.damcon)
e3:SetTarget(c16362015.damtg)
e3:SetOperation(c16362015.damop)
c:RegisterEffect(e3)
--Activate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,16362215+EFFECT_COUNT_CODE_DUEL)
e4:SetCost(c16362015.cost)
e4:SetTarget(c16362015.target)
e4:SetOperation(c16362015.operation)
c:RegisterEffect(e4)
end
function c16362015.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c16362015.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c16362015.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function c16362015.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and rp==1-tp and c:IsPreviousControler(tp)
end
function c16362015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_GRAVE)
end
function c16362015.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e2)
end
end
end
function c16362015.damcon(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc and bc:IsControler(1-tp)
end
function c16362015.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetHandler():GetBattleTarget():GetAttack())
end
function c16362015.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetBattleTarget()
if tc and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.AdjustInstantly(tc)
local atk=tc:GetBaseAttack()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
function c16362015.rmfilter(c)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0 and c:IsAbleToRemoveAsCost()
end
function c16362015.fselect(g)
return aux.gffcheck(g,Card.IsType,TYPE_TUNER,aux.NOT(Card.IsType),TYPE_TUNER) and g:GetSum(Card.GetLevel)==12
end
function c16362015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local g=Duel.GetMatchingGroup(c16362015.rmfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then
return g:CheckSubGroup(c16362015.fselect,2,2,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,c16362015.fselect,false,2,2,e,tp)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c16362015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return true
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16362015.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--圣殿英雄 重生之翼
function c16362016.initial_effect(c)
c:EnableCounterPermit(0xdc0)
c:SetCounterLimit(0xdc0,6)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xdc0),aux.NonTuner(nil),1)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c16362016.acop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c16362016.atkval)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e33)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,16362016)
e4:SetCondition(c16362016.spcon)
e4:SetTarget(c16362016.sptg)
e4:SetOperation(c16362016.spop)
c:RegisterEffect(e4)
--2
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(16362016,0))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c16362016.con2)
e5:SetCost(c16362016.cost2)
e5:SetOperation(c16362016.op2)
c:RegisterEffect(e5)
--4
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(16362016,1))
e6:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e6:SetCountLimit(1)
e6:SetCondition(c16362016.con4)
e6:SetCost(c16362016.cost4)
e6:SetTarget(c16362016.tg4)
e6:SetOperation(c16362016.op4)
c:RegisterEffect(e6)
--remove
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(16362016,2))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE)
e7:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e7:SetCountLimit(1)
e7:SetCondition(c16362016.con6)
e7:SetCost(c16362016.cost6)
e7:SetTarget(c16362016.tg6)
e7:SetOperation(c16362016.op6)
c:RegisterEffect(e7)
end
function c16362016.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_MONSTER) and re:GetHandler()~=e:GetHandler()
and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING)>0 then
e:GetHandler():AddCounter(0xdc0,1)
end
end
function c16362016.atkval(e,c)
return c:GetCounter(0xdc0)*500
end
function c16362016.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c16362016.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(16362016)
end
function c16362016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362016.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16362016.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16362016.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c16362016.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0xdc0)>=2
end
function c16362016.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xdc0,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xdc0,2,REASON_COST)
end
function c16362016.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetCondition(c16362016.actcon)
c:RegisterEffect(e1)
end
end
function c16362016.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function c16362016.con4(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsContains(e:GetHandler()) and e:GetHandler():GetCounter(0xdc0)>=4
end
function c16362016.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xdc0,4,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xdc0,4,REASON_COST)
end
function c16362016.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c16362016.op4(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c16362016.con6(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0xdc0)==6
end
function c16362016.cost6(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xdc0,6,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xdc0,6,REASON_COST)
end
function c16362016.tg6(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c16362016.op6(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--圣殿英雄 瀚宇星皇
function c16362017.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xdc0),aux.NonTuner(nil),1)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c16362017.imop)
c:RegisterEffect(e1)
--extra attack
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetOperation(c16362017.exaop)
c:RegisterEffect(e11)
--atk/def down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c16362017.adcon)
e3:SetTarget(c16362017.adtg)
e3:SetValue(c16362017.atkval)
c:RegisterEffect(e3)
local e31=e3:Clone()
e31:SetCode(EFFECT_SET_DEFENSE_FINAL)
e31:SetValue(c16362017.defval)
c:RegisterEffect(e31)
--damage
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetCountLimit(1,16362017)
e4:SetCondition(c16362017.condition)
e4:SetTarget(c16362017.target)
e4:SetOperation(c16362017.operation)
c:RegisterEffect(e4)
--equip
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,16362117)
e5:SetCost(c16362017.eqcost)
e5:SetTarget(c16362017.eqtg)
e5:SetOperation(c16362017.eqop)
c:RegisterEffect(e5)
end
function c16362017.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c16362017.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c16362017.exaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c16362017.efilter(e,te)
return not te:GetOwner():IsSetCard(0xdc0)
end
function c16362017.adcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget()
end
function c16362017.adtg(e,c)
return c==e:GetHandler():GetBattleTarget()
end
function c16362017.atkval(e,c)
return c:GetBaseAttack()
end
function c16362017.defval(e,c)
return c:GetBaseDefense()
end
function c16362017.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c16362017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(math.ceil(ev/2))
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,math.ceil(ev/2))
end
function c16362017.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c16362017.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c16362017.eqfilter(c,ec)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec)
end
function c16362017.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16362017.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c16362017.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16362017.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
Duel.Equip(tp,tc,c)
end
end
\ No newline at end of file
--圣殿英雄 天启帝君
function c16362018.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c16362018.mfilter,aux.NonTuner(Card.IsSetCard,0xdc0),2)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xdc0))
e1:SetValue(c16362018.efilter)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DECKDES+CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,16362018)
e2:SetCondition(c16362018.drcon)
e2:SetTarget(c16362018.drtg)
e2:SetOperation(c16362018.drop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,16362118)
e3:SetTarget(c16362018.distg)
e3:SetOperation(c16362018.disop)
c:RegisterEffect(e3)
end
function c16362018.mfilter(c)
return c:IsSetCard(0xdc0) and c:IsSynchroType(TYPE_SYNCHRO)
end
function c16362018.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
and te:GetHandler():IsLocation(LOCATION_MZONE) and not te:GetHandler():IsType(TYPE_SYNCHRO)
end
function c16362018.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c16362018.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,5,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,0,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,0,1)
end
function c16362018.drop(e,tp,eg,ep,ev,re,r,rp)
local a1=Duel.IsPlayerCanDiscardDeck(tp,3)
local a2=Duel.IsPlayerCanDiscardDeck(1-tp,3)
local b1=Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,nil)
local b2=Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
if a1 and (b1<5 or Duel.SelectYesNo(tp,aux.Stringid(16362018,0))) then
Duel.DiscardDeck(tp,5,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,5,5,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
if a2 and (b2<5 or Duel.SelectYesNo(1-tp,aux.Stringid(16362018,0))) then
Duel.DiscardDeck(1-tp,5,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_GRAVE,0,5,5,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end
end
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
function c16362018.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetChainLimit(c16362018.chlimit)
end
function c16362018.chlimit(e,ep,tp)
return tp==ep
end
function c16362018.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362018.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
local g=Duel.GetMatchingGroup(c16362018.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(16362018,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--圣殿英雄 混元天尊·荒神赋形
function c16362019.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xdc0),aux.NonTuner(nil),1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16362019)
e1:SetTarget(c16362019.thtg)
e1:SetOperation(c16362019.thop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_LEAVE_FIELD)
e11:SetCondition(c16362019.thcon)
c:RegisterEffect(e11)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,16362119)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c16362019.sptg)
e2:SetOperation(c16362019.spop)
c:RegisterEffect(e2)
end
function c16362019.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c16362019.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c16362019.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c16362019.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_DARK) and c:GetAttack()==3000
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c16362019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16362019.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362019.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c16362019.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
--圣殿英雄 混元天尊·荒神融合
function c16362020.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xdc0),aux.NonTuner(nil),1)
--avoid damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(c16362020.damval)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e11)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_REVERSE_UPDATE)
e12:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e12:SetRange(LOCATION_MZONE)
e12:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
c:RegisterEffect(e12)
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362020)
e2:SetCondition(c16362020.atcon)
e2:SetTarget(c16362020.attg)
e2:SetOperation(c16362020.atop)
c:RegisterEffect(e2)
--target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,16362120)
e3:SetCondition(c16362020.tgcon)
e3:SetTarget(c16362020.tgtg)
e3:SetOperation(c16362020.tgop)
c:RegisterEffect(e3)
end
function c16362020.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0 end
return val
end
function c16362020.atcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttackTarget()
return tc and tc:IsControler(tp) and tc:IsOnField() and tc:IsSetCard(0xdc0)
and e:GetHandler():IsCanChangePosition()
end
function c16362020.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c16362020.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then
Duel.NegateAttack()
end
end
function c16362020.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c16362020.filter(c)
return c:IsFaceup() and c:IsSetCard(0xdc0)
end
function c16362020.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16362020.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362020.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c16362020.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
end
function c16362020.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
\ No newline at end of file
--暴虐帝皇 瀚宇星皇
function c16362021.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c16362021.mfilter,aux.NonTuner(Card.IsSetCard,0xdc0),2)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c16362021.efilter)
c:RegisterEffect(e1)
--attack twice
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c16362021.eqcon)
e3:SetCost(c16362021.eqcost)
e3:SetTarget(c16362021.eqtg)
e3:SetOperation(c16362021.eqop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,16362021)
e4:SetCondition(c16362021.discon)
e4:SetCost(c16362021.discost)
e4:SetTarget(c16362021.distg)
e4:SetOperation(c16362021.disop)
c:RegisterEffect(e4)
--[[con
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,16362021)
e3:SetCondition(c16362021.condition)
e3:SetTarget(c16362021.target)
e3:SetOperation(c16362021.operation)
c:RegisterEffect(e3)]]
end
function c16362021.mfilter(c)
return c:IsSetCard(0xdc0) and c:IsSynchroType(TYPE_SYNCHRO)
end
function c16362021.efilter(e,te)
return not te:GetOwner():IsSetCard(0xdc0)
end
function c16362021.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c16362021.eqfilter(c,ec,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end
function c16362021.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16362021.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,c,tp)
local sct=Duel.GetLocationCount(tp,LOCATION_SZONE)
local ct=math.min(g:GetClassCount(Card.GetCode),sct)
local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,ct,REASON_COST+REASON_DISCARD)
e:SetLabel(ct)
end
function c16362021.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16362021.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler(),tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16362021.eqop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local c=e:GetHandler()
local ct=e:GetLabel()
if ft<ct or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16362021.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ct,ct)
if not sg then return end
local tc=sg:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
tc=sg:GetNext()
end
Duel.EquipComplete()
end
function c16362021.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function c16362021.cfilter(c,tp)
return c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and c:IsControler(tp) and c:IsAbleToGraveAsCost()
end
function c16362021.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local cg=c:GetEquipGroup()
if chk==0 then return cg:IsExists(c16362021.cfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:FilterSelect(tp,c16362021.cfilter,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c16362021.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(16362021,3))
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c16362021.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--[[function c16362021.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and bit.band(re:GetActivateLocation(),LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE)~=0
end
function c16362021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,16362021)==0 end
end
function c16362021.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetLabel(re:GetActivateLocation())
e1:SetValue(c16362021.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,16362021,RESET_PHASE+PHASE_END,0,0)
end
function c16362021.aclimit(e,re,tp)
local loc=e:GetLabel()
if loc==LOCATION_SZONE or loc==LOCATION_MZONE then loc=LOCATION_ONFIELD end
return bit.band(re:GetActivateLocation(),loc)==0
end]]
\ No newline at end of file
--圣殿英雄 圣灵之魂
function c16362022.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,16362022)
e1:SetCondition(c16362022.damcon)
e1:SetTarget(c16362022.damtg)
e1:SetOperation(c16362022.damop)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362022,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,16362122)
e2:SetCondition(c16362022.discon)
e2:SetTarget(c16362022.distg)
e2:SetOperation(c16362022.disop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16362022,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,16362222)
e3:SetCondition(c16362022.atkcon)
e3:SetTarget(c16362022.atktg)
e3:SetOperation(c16362022.atkop)
c:RegisterEffect(e3)
end
function c16362022.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if tc:IsControler(1-tp) then
bc,tc=tc,bc
end
e:SetLabelObject(bc)
return tc:IsFaceup() and tc:IsSetCard(0xdc0)
end
function c16362022.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,math.ceil(tc:GetAttack()/2))
end
function c16362022.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToBattle() then
local atk=tc:GetAttack()
Duel.Damage(1-tp,math.ceil(tc:GetAttack()/2),REASON_EFFECT)
end
end
function c16362022.cfilter(c,tp)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362022.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362022.cfilter,1,nil,tp)
end
function c16362022.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c16362022.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e3)
end
end
end
function c16362022.cfilter2(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0xdc0) and c:IsFaceup() and c:IsPreviousLocation(LOCATION_GRAVE)
end
function c16362022.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362022.cfilter2,1,nil,tp)
end
function c16362022.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c16362022.cfilter2,nil,tp)
if chk==0 then return #g>0 end
end
function c16362022.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c16362022.cfilter2,nil,tp)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetAttack()*2)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
\ No newline at end of file
--圣殿英雄 飞升之魂
function c16362023.initial_effect(c)
c:EnableCounterPermit(0xdc0)
c:SetCounterLimit(0xdc0,6)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c16362023.ctop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362023,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,16362023)
e2:SetCost(c16362023.imcost)
e2:SetTarget(c16362023.imtg)
e2:SetOperation(c16362023.imop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16362023,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,16362123)
e3:SetCost(c16362023.spcost)
e3:SetTarget(c16362023.sptg)
e3:SetOperation(c16362023.spop)
c:RegisterEffect(e3)
end
function c16362023.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0xdc0)
end
function c16362023.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xdc0,1)
end
function c16362023.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xdc0,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xdc0,2,REASON_COST)
end
function c16362023.imfilter(c)
return c:IsFaceup() and c:IsSetCard(0xdc0)
end
function c16362023.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16362023.imfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362023.imfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16362023.imfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16362023.imop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c16362023.op3v)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
end
function c16362023.op3v(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c16362023.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0xdc0,6,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0xdc0,6,REASON_COST)
end
function c16362023.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c16362023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c16362023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c16362023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c16362023.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--圣殿英雄 帝皇之魂
function c16362024.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362024,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,16362024)
e1:SetCost(c16362024.thcost)
e1:SetTarget(c16362024.thtg)
e1:SetOperation(c16362024.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362024,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,16362024)
e2:SetCondition(c16362024.condition)
e2:SetTarget(c16362024.target)
e2:SetOperation(c16362024.operation)
c:RegisterEffect(e2)
--cannot disable summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetTarget(c16362024.sfilter)
c:RegisterEffect(e3)
end
function c16362024.costfilter(c)
return c:IsSetCard(0xdc0) and c:IsDiscardable()
end
function c16362024.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16362024.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c16362024.costfilter,1,1,REASON_DISCARD+REASON_COST)
end
function c16362024.thfilter(c)
return c:IsSetCard(0xdc0) and c:IsAbleToHand()
end
function c16362024.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16362024.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16362024.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16362024.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362024.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362024.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362024.cfilter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup() and c:IsLevelAbove(8)
end
function c16362024.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c16362024.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c16362024.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362024.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362024.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c16362024.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16362024.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362024.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362024.sfilter(e,c)
return c:IsSetCard(0xdc0) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
\ No newline at end of file
--圣殿英雄 轮回之魂
function c16362025.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,16362025)
e1:SetTarget(c16362025.target)
e1:SetOperation(c16362025.operation)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,16362025)
e2:SetCost(c16362025.cost2)
e2:SetTarget(c16362025.target2)
e2:SetOperation(c16362025.operation2)
c:RegisterEffect(e2)
end
function c16362025.filter(c)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c16362025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c16362025.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c16362025.filter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c16362025.filter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c16362025.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362025.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362025.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362025.tdfilter(c)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0
and c:IsAbleToDeckOrExtraAsCost()
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c16362025.fselect(g,e,tp)
return aux.gffcheck(g,Card.IsType,TYPE_TUNER,aux.NOT(Card.IsType),TYPE_TUNER)
and g:GetSum(Card.GetLevel)==8
and Duel.IsExistingMatchingCard(c16362025.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
function c16362025.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(8)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function c16362025.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local g=Duel.GetMatchingGroup(c16362025.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then
return g:CheckSubGroup(c16362025.fselect,2,2,e,tp) and e:GetHandler():IsAbleToRemoveAsCost()
end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,c16362025.fselect,false,2,2,e,tp)
e:SetLabel(sg:GetSum(Card.GetLevel))
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c16362025.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362025.operation2(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c16362025.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362025.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--圣殿英雄 堕世之魂
function c16362026.initial_effect(c)
c:EnableCounterPermit(0xdc1)
c:SetCounterLimit(0xdc1,3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c16362026.counter)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,16362026)
e3:SetCondition(c16362026.damcon)
e3:SetCost(c16362026.damcost)
e3:SetTarget(c16362026.damtg)
e3:SetOperation(c16362026.damop)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,16362126)
e4:SetTarget(c16362026.reptg)
e4:SetValue(c16362026.repval)
e4:SetOperation(c16362026.repop)
c:RegisterEffect(e4)
end
function c16362026.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c16362026.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c16362026.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0xdc1,ct,true)
end
end
function c16362026.damcon(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
return ep~=tp and rc:IsControler(tp) and rc:IsSetCard(0xdc0)
end
function c16362026.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xdc1,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xdc1,1,REASON_COST)
end
function c16362026.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev)
end
function c16362026.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c16362026.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xdc0) and c:IsControler(tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c16362026.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c16362026.repfilter,1,nil,tp)
and Duel.IsCanRemoveCounter(tp,1,0,0xdc1,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c16362026.repval(e,c)
return c16362026.repfilter(c,e:GetHandlerPlayer())
end
function c16362026.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.RemoveCounter(tp,1,0,0xdc1,1,REASON_EFFECT)
end
\ No newline at end of file
--英雄刻印 圣灵之章
function c16362027.initial_effect(c)
c:SetUniqueOnField(1,0,16362027)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c16362027.target)
e1:SetOperation(c16362027.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c16362027.eqlimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16362027,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,16362027)
e3:SetCondition(c16362027.thcon)
e3:SetTarget(c16362027.thtg)
e3:SetOperation(c16362027.thop)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16362027,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,16362027)
e4:SetCondition(c16362027.spcon)
e4:SetTarget(c16362027.sptg)
e4:SetOperation(c16362027.spop)
c:RegisterEffect(e4)
end
function c16362027.filter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16362027.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362027.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c16362027.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c16362027.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c16362027.eqlimit(e,c)
return c:IsSetCard(0xdc0)
end
function c16362027.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xdc0) and c:IsSummonPlayer(tp)
end
function c16362027.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362027.cfilter,1,nil,tp)
end
function c16362027.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c16362027.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
function c16362027.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
return ec and c:IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_GRAVE)
end
function c16362027.spfilter(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362027.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362027.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c16362027.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16362027.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--英雄刻印 飞升之翎
function c16362028.initial_effect(c)
c:SetUniqueOnField(1,0,16362028)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c16362028.target)
e1:SetOperation(c16362028.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c16362028.eqlimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,16362028)
e3:SetCondition(c16362028.thcon)
e3:SetTarget(c16362028.thtg)
e3:SetOperation(c16362028.thop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,16362028)
e4:SetTarget(c16362028.sptg)
e4:SetOperation(c16362028.spop)
c:RegisterEffect(e4)
end
function c16362028.filter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16362028.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362028.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c16362028.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c16362028.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c16362028.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xdc0) and c:IsSummonPlayer(tp)
end
function c16362028.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362028.cfilter,1,nil,tp)
end
function c16362028.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c16362028.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
function c16362028.eqlimit(e,c)
return c:IsSetCard(0xdc0)
end
function c16362028.spfilter(c,e,tp,lv)
return c:IsSetCard(0xdc0) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362028.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
local loc=LOCATION_HAND+LOCATION_GRAVE
if ec:IsType(TYPE_SYNCHRO) then
loc=loc+LOCATION_DECK
end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c16362028.spfilter,tp,loc,0,1,nil,e,tp,ec:GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function c16362028.spop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local loc=LOCATION_HAND+LOCATION_GRAVE
if ec:IsType(TYPE_SYNCHRO) then
loc=loc+LOCATION_DECK
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16362028.spfilter),tp,loc,0,1,1,nil,e,tp,ec:GetLevel())
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362028.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362028.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--英雄刻印 皇权之印
function c16362029.initial_effect(c)
c:SetUniqueOnField(1,0,16362029)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c16362029.target)
e1:SetOperation(c16362029.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c16362029.eqlimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,16362029)
e3:SetCondition(c16362029.thcon)
e3:SetTarget(c16362029.thtg)
e3:SetOperation(c16362029.thop)
c:RegisterEffect(e3)
--battle
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,16362029)
e4:SetCondition(c16362029.btcon)
e4:SetOperation(c16362029.btop)
c:RegisterEffect(e4)
end
function c16362029.filter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362029.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16362029.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362029.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c16362029.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c16362029.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c16362029.eqlimit(e,c)
return c:IsSetCard(0xdc0)
end
function c16362029.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xdc0) and c:IsSummonPlayer(tp)
end
function c16362029.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362029.cfilter,1,nil,tp)
end
function c16362029.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c16362029.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
function c16362029.btcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c16362029.btop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.ceil(ec:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
ec:RegisterEffect(e2)
end
end
\ No newline at end of file
--英雄刻印 轮回之镜
function c16362030.initial_effect(c)
c:SetUniqueOnField(1,0,16362030)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c16362030.target)
e1:SetOperation(c16362030.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c16362030.eqlimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,16362030)
e3:SetCondition(c16362030.thcon)
e3:SetTarget(c16362030.thtg)
e3:SetOperation(c16362030.thop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,16362030)
e4:SetTarget(c16362030.sptg)
e4:SetOperation(c16362030.spop)
c:RegisterEffect(e4)
end
function c16362030.filter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16362030.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362030.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c16362030.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c16362030.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c16362030.eqlimit(e,c)
return c:IsSetCard(0xdc0)
end
function c16362030.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xdc0) and c:IsSummonPlayer(tp)
end
function c16362030.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362030.cfilter,1,nil,tp)
end
function c16362030.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c16362030.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
function c16362030.spfilter(c,e,tp,lv)
return c:IsSetCard(0xdc0) and c:IsLevelAbove(0) and c:GetLevel()<lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362030.desfilter(c,lv)
return c:IsFaceup() and c:IsLevelAbove(0) and c:GetLevel()<lv
end
function c16362030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
local op1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362030.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ec:GetLevel())
local op2=Duel.IsExistingMatchingCard(c16362030.desfilter,tp,0,LOCATION_MZONE,1,nil,ec:GetLevel())
if chk==0 then return op1 or op2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE)
end
function c16362030.spop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local op1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362030.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ec:GetLevel())
local op2=Duel.IsExistingMatchingCard(c16362030.desfilter,tp,0,LOCATION_MZONE,1,nil,ec:GetLevel())
if op1 and (not op2 or Duel.SelectYesNo(tp,aux.Stringid(16362030,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16362030.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ec:GetLevel())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
elseif op2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c16362030.desfilter,tp,0,LOCATION_MZONE,1,1,nil,ec:GetLevel())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--英雄刻印 堕世之翼
function c16362031.initial_effect(c)
c:SetUniqueOnField(1,0,16362031)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c16362031.target)
e1:SetOperation(c16362031.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c16362031.eqlimit)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,16362031)
e3:SetCondition(c16362031.thcon)
e3:SetTarget(c16362031.thtg)
e3:SetOperation(c16362031.thop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,16362031)
e4:SetTarget(c16362031.sptg)
e4:SetOperation(c16362031.spop)
c:RegisterEffect(e4)
end
function c16362031.filter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362031.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16362031.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16362031.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c16362031.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c16362031.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c16362031.eqlimit(e,c)
return c:IsSetCard(0xdc0)
end
function c16362031.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xdc0) and c:IsSummonPlayer(tp)
end
function c16362031.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362031.cfilter,1,nil,tp)
end
function c16362031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c16362031.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
function c16362031.spfilter(c,e,tp,ec)
local lv=ec:GetLevel()
local attr=ec:GetAttribute()
local code=ec:GetCode()
return c:IsSetCard(0xdc0) and c:IsLevel(lv) and c:IsAttribute(attr) and not c:IsCode(code)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,ec,c)
end
function c16362031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
local loc=LOCATION_DECK
if ec:IsType(TYPE_SYNCHRO) then loc=LOCATION_EXTRA end
if chk==0 then return Duel.IsExistingMatchingCard(c16362031.spfilter,tp,loc,0,1,nil,e,tp,ec) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function c16362031.spop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local loc=LOCATION_DECK
if ec:IsType(TYPE_SYNCHRO) then loc=LOCATION_EXTRA end
if Duel.SendtoDeck(ec,nil,0,REASON_EFFECT)~=0 and ec:IsLocation(loc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c16362031.spfilter,tp,loc,0,1,1,nil,e,tp,ec):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP)
end
end
end
\ No newline at end of file
--超星审判 圣光灵神
function c16362050.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,c16362050.matfilter1,c16362050.matfilter2,2,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--splimit
local e00=Effect.CreateEffect(c)
e00:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e00:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e00:SetCode(EVENT_SPSUMMON_SUCCESS)
e00:SetCondition(c16362050.regcon)
e00:SetOperation(c16362050.regop)
c:RegisterEffect(e00)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16362050)
e1:SetCondition(c16362050.descon)
e1:SetTarget(c16362050.destg)
e1:SetOperation(c16362050.desop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c16362050.imtg)
e2:SetValue(c16362050.efilter)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,16362150)
e3:SetCondition(c16362050.tgcon)
e3:SetTarget(c16362050.tgtg)
e3:SetOperation(c16362050.tgop)
c:RegisterEffect(e3)
end
function c16362050.matfilter1(c)
return c:IsFusionSetCard(0xdc0) and c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO)
end
function c16362050.matfilter2(c)
return c:IsFusionSetCard(0xdc0)
end
function c16362050.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c16362050.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c16362050.splimit1)
Duel.RegisterEffect(e1,tp)
end
function c16362050.splimit1(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(16362050) and bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c16362050.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c16362050.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0xdc0)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c16362050.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16362050.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16362050.cpfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362050.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16362050.pfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local ct=Duel.GetMatchingGroupCount(c16362050.cpfilter,tp,LOCATION_SZONE,0,nil)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if ct>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(16362050,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
end
function c16362050.cpfilter2(c,e)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0xdc0) and c:IsFaceup()
and c:IsControler(e:GetHandlerPlayer())
end
function c16362050.imtg(e,c)
return c:IsSetCard(0xdc0) and c:IsLevelAbove(8) and c:GetColumnGroup():IsExists(c16362050.cpfilter2,1,nil,e)
end
function c16362050.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c16362050.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0xdc0)
end
function c16362050.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362050.cfilter,1,nil,tp)
end
function c16362050.pfilter2(c,tp,cg)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0xdc0)
and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not cg:IsContains(c)
end
function c16362050.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=eg:Filter(c16362050.cfilter,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(c16362050.pfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp,cg) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16362050.tgop(e,tp,eg,ep,ev,re,r,rp)
local cg=eg:Filter(c16362050.cfilter,nil)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16362050.pfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp,cg):GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--神经矩阵 重生之翼
function c16362051.initial_effect(c)
c:EnableCounterPermit(0xdc0)
c:SetCounterLimit(0xdc0,6)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xdc0),3,true)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c16362051.acop)
c:RegisterEffect(e2)
--atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c16362051.atkval)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e33)
--pos
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SET_POSITION)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetTarget(c16362051.postg)
e4:SetValue(POS_FACEUP_DEFENSE)
c:RegisterEffect(e4)
--disable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c16362051.discon)
e5:SetOperation(c16362051.disop)
c:RegisterEffect(e5)
--pierce
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_PIERCE)
e6:SetCondition(c16362051.con2)
c:RegisterEffect(e6)
--fusion summon
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(16362051,0))
e7:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCondition(c16362051.con4)
e7:SetTarget(c16362051.fustg)
e7:SetOperation(c16362051.fusop)
c:RegisterEffect(e7)
--SpecialSummon
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(16362051,1))
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_MZONE)
e8:SetCountLimit(1)
e8:SetCost(c16362051.cost6)
e8:SetTarget(c16362051.sptg)
e8:SetOperation(c16362051.spop)
c:RegisterEffect(e8)
end
function c16362051.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING)>0 then
e:GetHandler():AddCounter(0xdc0,1)
end
end
function c16362051.atkval(e,c)
return e:GetHandler():GetCounter(0xdc0)*-500
end
function c16362051.postg(e,c)
return c:IsFaceup() and (c:IsAttack(0) or c:IsDefense(0))
end
function c16362051.discon(e,tp,eg,ep,ev,re,r,rp)
local loc,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and bit.band(pos,POS_DEFENSE)~=0
and not re:GetHandler():IsControler(tp)
end
function c16362051.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c16362051.con2(e)
return e:GetHandler():GetCounter(0xdc0)>=2
end
function c16362051.con4(e)
return e:GetHandler():GetCounter(0xdc0)>=4
end
function c16362051.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c16362051.filter2(c,e,tp,m,f,chkf)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c16362051.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c16362051.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16362051.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362051.fusop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c16362051.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c16362051.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c16362051.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c16362051.cost6(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0xdc0,6,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xdc0,6,REASON_COST)
end
function c16362051.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE)
end
function c16362051.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,1,nil,e,0,tp,false,false)
if #g>0 then
Duel.HintSelection(g)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--疾行浪客 瀚宇星皇
function c16362052.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,c16362052.matfilter1,c16362052.matfilter2,2,true)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c16362052.imop)
c:RegisterEffect(e1)
--extra attack
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetOperation(c16362052.exaop)
c:RegisterEffect(e11)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c16362052.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetTarget(c16362052.atktg2)
c:RegisterEffect(e22)
--equip
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,16362052)
e3:SetTarget(c16362052.tg2)
e3:SetOperation(c16362052.op2)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,16362152)
e4:SetCondition(c16362052.eqcon)
e4:SetTarget(c16362052.eqtg)
e4:SetOperation(c16362052.eqop)
c:RegisterEffect(e4)
end
function c16362052.matfilter1(c)
return c:IsFusionSetCard(0xdc0) and c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO)
end
function c16362052.matfilter2(c)
return c:IsFusionSetCard(0xdc0)
end
function c16362052.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c16362052.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c16362052.exaop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c16362052.efilter(e,te)
return not te:GetOwner():IsSetCard(0xdc0)
end
function c16362052.atktg(e,c)
return c:IsSetCard(0xdc0)
end
function c16362052.atktg2(e,c)
return c:IsSetCard(0xdc0) and c:GetEquipCount()>0
end
function c16362052.tg2f(c,tp)
return c:CheckUniqueOnField(tp)
end
function c16362052.equfilter(c)
return c:IsSetCard(0xdc0) and c:IsFaceup()
end
function c16362052.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16362052.tg2f,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_ONFIELD)
end
function c16362052.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c16362052.tg2f,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),tp)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c16362052.equfilter,tp,LOCATION_MZONE,0,1,1,tc)
local ec=sg:GetFirst()
if tc and ec then
if not Duel.Equip(tp,tc,ec) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16362052.op2val)
e1:SetLabelObject(ec)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c16362052.op2val(e,c)
local ec=e:GetLabelObject()
return e:GetOwner()==ec
end
function c16362052.lefilter(c)
return c:IsType(TYPE_SPELL) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c16362052.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362052.lefilter,1,nil)
end
function c16362052.eqfilter(c,tp)
return c:IsSetCard(0xdc0) and c:IsType(TYPE_EQUIP) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
and Duel.IsExistingMatchingCard(c16362052.eqtgfilter,tp,LOCATION_MZONE,0,1,nil,c)
end
function c16362052.eqtgfilter(c,eqc)
return c:IsFaceup() and c:IsSetCard(0xdc0) and eqc:CheckEquipTarget(c)
end
function c16362052.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16362052.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c16362052.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ec=Duel.SelectMatchingCard(tp,c16362052.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if ec then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,c16362052.eqtgfilter,tp,LOCATION_MZONE,0,1,1,nil,ec):GetFirst()
Duel.Equip(tp,ec,tc)
end
end
end
\ No newline at end of file
--脉冲爆破 天启帝君
function c16362053.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16362053.matfilter,2,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--splimit
local e00=Effect.CreateEffect(c)
e00:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e00:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e00:SetCode(EVENT_SPSUMMON_SUCCESS)
e00:SetCondition(c16362053.regcon)
e00:SetOperation(c16362053.regop)
c:RegisterEffect(e00)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(c16362053.evalue)
c:RegisterEffect(e1)
--immune
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_IMMUNE_EFFECT)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetRange(LOCATION_MZONE)
e11:SetValue(c16362053.efilter)
c:RegisterEffect(e11)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCountLimit(1,16362053)
e2:SetTarget(c16362053.destg)
e2:SetOperation(c16362053.desop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,16362153)
e3:SetTarget(c16362053.destg2)
e3:SetOperation(c16362053.desop2)
c:RegisterEffect(e3)
end
function c16362053.matfilter(c)
return c:IsFusionSetCard(0xdc0) and c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO)
end
function c16362053.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c16362053.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c16362053.splimit1)
Duel.RegisterEffect(e1,tp)
end
function c16362053.splimit1(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(16362053) and bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c16362053.evalue(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and (rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP)
end
function c16362053.efilter(e,te)
local rc=te:GetHandler()
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and (rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP)
end
function c16362053.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c16362053.desfilter(c,s)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1
end
function c16362053.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
local seq=tc:GetSequence()
local dg=Group.CreateGroup()
if seq<5 then dg=Duel.GetMatchingGroup(c16362053.desfilter,tp,0,LOCATION_MZONE,nil,seq) end
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c16362053.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
local g=tc:GetColumnGroup()
g:AddCard(tc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c16362053.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local col=tc:GetColumnZone(LOCATION_ONFIELD,0)+aux.SequenceToGlobal(tc:GetControler(),tc:GetLocation(),tc:GetSequence())
local g=tc:GetColumnGroup()
g:AddCard(tc)
if tc:IsRelateToEffect(e) and Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED)~=0 then
--disable field
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_DISABLE_FIELD)
e4:SetValue(c16362053.disval)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetLabel(col)
c:RegisterEffect(e4)
end
end
function c16362053.disval(e)
return e:GetLabel()
end
\ No newline at end of file
--时空怪盗 混元天尊·荒神赋形
function c16362054.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xdc0),c16362054.matfilter,2,true)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,16362054)
e1:SetTarget(c16362054.tgcon)
e1:SetTarget(c16362054.tgtg)
e1:SetOperation(c16362054.tgop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362154)
e2:SetCondition(c16362054.discon)
e2:SetTarget(c16362054.distg)
e2:SetOperation(c16362054.disop)
c:RegisterEffect(e2)
end
function c16362054.matfilter(c)
return not c:IsFusionAttribute(ATTRIBUTE_LIGHT)
end
function c16362054.atkfilter(c)
return c:IsFaceup() and c:IsAttackAbove(2000)
end
function c16362054.tgcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362054.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c16362054.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local mc=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if chk==0 then return Duel.IsExistingMatchingCard(c16362054.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end
function c16362054.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttackBelow(2000)
end
function c16362054.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16362054.atkfilter,1-tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
if Duel.SendtoGrave(sg,REASON_RULE,1-tp)~=0 then
local g=Duel.GetMatchingGroup(c16362054.spfilter,1-tp,LOCATION_GRAVE,0,nil,e,1-tp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(16362054,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg=g:Select(1-tp,1,1,nil)
Duel.SpecialSummon(sg,0,1-tp,1-tp,false,false,POS_FACEUP)
end
end
end
end
function c16362054.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c16362054.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c16362054.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
\ No newline at end of file
--时空怪盗 混元天尊·荒神融合
function c16362055.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c16362055.matfilter1,c16362055.matfilter2,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,16362055)
e1:SetTarget(c16362055.atktg)
e1:SetOperation(c16362055.atkop)
c:RegisterEffect(e1)
--loses ATK
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1,16362155)
e2:SetCondition(c16362055.atkcon2)
e2:SetOperation(c16362055.atkop2)
c:RegisterEffect(e2)
--synchro effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,16362255)
e3:SetCondition(c16362055.atkcon3)
e3:SetTarget(c16362055.atktg3)
e3:SetOperation(c16362055.atkop3)
c:RegisterEffect(e3)
end
function c16362055.matfilter1(c)
return c:IsFusionSetCard(0xdc0) and c:IsFusionType(TYPE_FUSION+TYPE_SYNCHRO)
end
function c16362055.matfilter2(c)
return not c:IsFusionAttribute(ATTRIBUTE_LIGHT)
end
function c16362055.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function c16362055.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=2 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local ct=g:FilterCount(Card.IsSetCard,nil,0xdc0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(ct*500)
c:RegisterEffect(e1)
end
function c16362055.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and aux.nzatk(Duel.GetAttacker())
end
function c16362055.atkop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsFaceup() then
local val=math.ceil(tc:GetAttack()/2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.Recover(tp,val,REASON_EFFECT)
end
end
function c16362055.atkfilter(c)
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function c16362055.atkcon3(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c16362055.atktg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c16362055.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c16362055.atkop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16362055.atkfilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local atk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
\ No newline at end of file
--圣殿AI 圣光NoNo
function c16362060.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16362060)
e1:SetTarget(c16362060.target)
e1:SetOperation(c16362060.operation)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16362160)
e2:SetTarget(c16362060.sptg)
e2:SetOperation(c16362060.spop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362060.fcon)
e3:SetOperation(c16362060.fop)
c:RegisterEffect(e3)
end
function c16362060.filter1(c,e)
return c:IsLocation(LOCATION_HAND) and not c:IsImmuneToEffect(e)
end
function c16362060.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xdc0) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,gc,chkf)
and ((Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA))
or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_GRAVE)))
end
function c16362060.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
local res=Duel.IsExistingMatchingCard(c16362060.filter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16362060.filter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c16362060.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c16362060.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16362060.filter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16362060.filter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,true,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362060.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362060.splimit(e,c)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362060.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsSetCard(0xdc0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362060.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c16362060.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16362060.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362060.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362060.fcon(e,tp,eg,ep,ev,re,r,rp)
return r&(REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():GetReasonCard():IsSetCard(0xdc0)
end
function c16362060.fop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362060,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
\ No newline at end of file
--圣殿AI 飞升NoNo
function c16362061.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,16362061)
e1:SetTarget(c16362061.target)
e1:SetOperation(c16362061.operation)
c:RegisterEffect(e1)
--Special Summon (from hand itself)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16362161)
e2:SetCondition(c16362061.spcon)
e2:SetTarget(c16362061.sptg)
e2:SetOperation(c16362061.spop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362061.fcon)
e3:SetOperation(c16362061.fop)
c:RegisterEffect(e3)
end
function c16362061.filter1(c,e)
return c:IsLocation(LOCATION_HAND+LOCATION_ONFIELD) and not c:IsImmuneToEffect(e)
end
function c16362061.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xdc0) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c16362061.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c16362061.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16362061.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362061.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c16362061.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c16362061.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c16362061.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362061.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362061.splimit(e,c)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362061.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0xdc0)
end
function c16362061.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362061.cfilter,1,nil,tp)
end
function c16362061.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c16362061.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362061.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362061.fcon(e,tp,eg,ep,ev,re,r,rp)
return r&(REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():GetReasonCard():IsSetCard(0xdc0)
end
function c16362061.fop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362061,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
rc:RegisterEffect(e2,true)
end
\ No newline at end of file
--圣殿AI 帝皇NoNo
function c16362062.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,16362062)
e1:SetCondition(c16362062.condition)
e1:SetTarget(c16362062.target)
e1:SetOperation(c16362062.operation)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,16362162+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c16362062.spcon)
c:RegisterEffect(e2)
--gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362062.fcon)
e3:SetOperation(c16362062.fop)
c:RegisterEffect(e3)
end
function c16362062.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c16362062.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function c16362062.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xdc0) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c16362062.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_ONFIELD)
local res=Duel.IsExistingMatchingCard(c16362062.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16362062.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c16362062.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c16362062.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c16362062.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c16362062.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362062.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362062.splimit(e,c)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362062.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c16362062.fcon(e,tp,eg,ep,ev,re,r,rp)
return r&(REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():GetReasonCard():IsSetCard(0xdc0)
end
function c16362062.fop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362062,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
\ No newline at end of file
--圣殿AI 天启NoNo
function c16362064.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362064,1))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCountLimit(1,16362064)
e1:SetTarget(c16362064.target)
e1:SetOperation(c16362064.operation)
c:RegisterEffect(e1)
--spsummon from deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16362064,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16362164)
e2:SetCost(c16362064.spcost)
e2:SetTarget(c16362064.tg1)
e2:SetOperation(c16362064.op1)
c:RegisterEffect(e2)
--gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362064.fcon)
e3:SetOperation(c16362064.fop)
c:RegisterEffect(e3)
end
function c16362064.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c16362064.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c16362064.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xdc0) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c16362064.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c16362064.filter0,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c16362064.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16362064.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c16362064.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c16362064.filter1,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c16362064.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c16362064.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362064.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362064.cfilter(c)
return c:IsSetCard(0xdc0) and c:IsDiscardable()
end
function c16362064.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16362064.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c16362064.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c16362064.tg1f(c,e,tp)
return c:IsSetCard(0xdc0) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16362064.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16362064.tg1f,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c16362064.splimit(e,c)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362064.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16362064.tg1f,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362064.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362064.fcon(e,tp,eg,ep,ev,re,r,rp)
return r&(REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():GetReasonCard():IsSetCard(0xdc0)
end
function c16362064.fop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362064,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c16362064.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c16362064.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
\ No newline at end of file
--圣殿AI 堕世NoNo
function c16362065.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,16362065)
e1:SetTarget(c16362065.target)
e1:SetOperation(c16362065.operation)
c:RegisterEffect(e1)
--Special Summon (from hand itself)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16362165)
e2:SetCondition(c16362065.spcon)
e2:SetTarget(c16362065.sptg)
e2:SetOperation(c16362065.spop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c16362065.fcon)
e3:SetOperation(c16362065.fop)
c:RegisterEffect(e3)
end
function c16362065.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c16362065.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function c16362065.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xdc0) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,gc,chkf)
and ((Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA))
or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_GRAVE)))
end
function c16362065.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c16362065.filter0,tp,LOCATION_GRAVE,0,nil)
local gm1=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
local gm2=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
local mgg=Duel.GetMatchingGroup(c16362065.filter0,tp,0,LOCATION_GRAVE,nil)
if gm1<gm2 then
mg1:Merge(mgg)
end
local res=Duel.IsExistingMatchingCard(c16362065.filter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16362065.filter2,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_GRAVE)
end
function c16362065.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c16362065.filter1,tp,LOCATION_GRAVE,0,nil,e)
local gm1=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
local gm2=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
local mgg=Duel.GetMatchingGroup(c16362065.filter1,tp,0,LOCATION_GRAVE,nil,e)
if gm1<gm2 then
mg1:Merge(mgg)
end
local sg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16362065.filter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16362065.filter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp,mg2,mf,c,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoDeck(mat1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,true,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362065.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362065.splimit(e,c)
return not c:IsSetCard(0xdc0) and c:IsLocation(LOCATION_EXTRA)
end
function c16362065.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0xdc0)
end
function c16362065.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16362065.cfilter,1,nil,tp)
end
function c16362065.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,LOCATION_GRAVE)
end
function c16362065.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16362065.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16362065.fcon(e,tp,eg,ep,ev,re,r,rp)
return r&(REASON_FUSION+REASON_SYNCHRO)~=0 and e:GetHandler():GetReasonCard():IsSetCard(0xdc0)
end
function c16362065.fop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16362065,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c16362065.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c16362065.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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