Commit 742c6045 authored by 花桃白音's avatar 花桃白音

remove unused scripts

parent 30dd39fd
Pipeline #25188 failed with stages
in 15 minutes and 34 seconds
--猫巫女神乐舞
function c4270002.initial_effect(c)
xpcall(123)
aux.AddCodeList(c,4270008)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,4270003)
e1:SetCondition(c4270002.condition)
e1:SetCost(c4270002.cost)
e1:SetTarget(c4270002.target)
e1:SetOperation(c4270002.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,4270004)
e2:SetTarget(c4270002.target2)
e2:SetOperation(c4270002.operation2)
c:RegisterEffect(e2)
end
function c4270002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=Duel.GetDecktopGroup(tp,3)
if chk==0 then return #tg==3 and tg:FilterCount(Card.IsAbleToRemoveAsCost,nil)==3 end
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEUP,REASON_COST)
end
function c4270002.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and loc&(LOCATION_HAND)~=0
end
function c4270002.target(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,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4270002.thfilter1(c)
return c:IsCode(4270008) and c:IsFaceup()
end
function c4270002.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(c4270002.filter,tp,LOCATION_REMOVED,0,1,nil) then
if re:GetHandler():IsLocation(LOCATION_DECK+LOCATION_EXTRA) or (re:GetHandler():IsFacedown() and not re:GetHandler():IsLocation(LOCATION_HAND)) then return end
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
end
function c4270002.target2(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,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4270002.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa28))
e1:SetValue(c4270002.atkval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c4270002.atkfilter(c)
return c:IsSetCard(0xa28) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c4270002.atkval(e,c)
local tp=c:GetControler()
return Duel.GetMatchingGroupCount(c4270002.atkfilter,tp,LOCATION_REMOVED,0,nil)
end
\ No newline at end of file
--帕祖祖
local s,id=GetID()
function s.initial_effect(c)
--fusion substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_FUSION_SUBSTITUTE)
e2:SetCondition(s.subcon)
c:RegisterEffect(e2)
--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,45206713)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.subcon(e)
return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
end
function s.filter1(c,e)
return c:IsLocation(LOCATION_HAND) and not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) 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 s.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(s.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(s.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 s.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(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.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(s.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
end
\ No newline at end of file
--救援刺猬
function c12461492.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12461492,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,12461492)
e2:SetCost(c12461492.spcost)
e2:SetTarget(c12461492.sptg)
e2:SetOperation(c12461492.spop)
c:RegisterEffect(e2)
end
function c12461492.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12461492.filter1(c,e,tp)
return c:IsLevelBelow(3)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12461492.fselect(g)
return g:GetClassCount(Card.GetRace)==1
and g:GetClassCount(Card.GetLevel)==1
and g:GetClassCount(Card.GetAttribute)==1
and g:GetClassCount(Card.GetType)==2
end
function c12461492.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c12461492.filter1,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:CheckSubGroup(c12461492.fselect,2,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c12461492.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c12461492.filter1,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c12461492.fselect,false,2,2)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
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)
tc:RegisterFlagEffect(12461492,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
e1:SetCondition(c12461492.descon)
e1:SetOperation(c12461492.desop)
Duel.RegisterEffect(e1,tp)
end
function c12461492.desfilter(c,fid)
return c:GetFlagEffectLabel(12461492)==fid
end
function c12461492.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c12461492.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c12461492.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c12461492.desfilter,nil,e:GetLabel())
Duel.Destroy(tg,REASON_EFFECT)
end
--2D-踢墙跳
local m=24110020
local cm=_G["c"..m]
function cm.initial_effect(c)
end
--星幽仙灵的梦幻小道
function c24518364.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24518364)
e1:SetTarget(c24518364.tgtg)
e1:SetOperation(c24518364.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,24518364)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c24518364.sptg)
e2:SetOperation(c24518364.spop)
c:RegisterEffect(e2)
end
function c24518364.tgfilter(c)
return c:IsSetCard(0x396) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c24518364.exfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA)
end
function c24518364.refilter(c)
return c:IsSetCard(0x396) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c24518364.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24518364.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c24518364.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c24518364.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local g1=Duel.IsExistingMatchingCard(c24518364.exfilter,tp,0,LOCATION_MZONE,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
if g1 and g:IsLocation(LOCATION_GRAVE) then
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(24518364,0)) then
g2=Duel.SelectMatchingCard(tp,c24518364.refilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end
end
end
function c24518364.filter(c,e,tp)
return c:IsSetCard(0x396) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE+POS_FACEUP_ATTACK)
end
function c24518364.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24518364.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c24518364.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,aux.NecroValleyFilter(c24518364.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--灭绝机 霍拉格Ⅱ
local m=30005101
local cm=_G["c"..m]
function cm.initial_effect(c)
end
--天罚机 德拉格尼克Ⅱ
local m=30005103
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--special summon condition
local ea=Effect.CreateEffect(c)
ea:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_SPSUMMON_CONDITION)
ea:SetValue(aux.FALSE)
c:RegisterEffect(ea)
--punish
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_CUSTOM+m)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e0:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EVENT_REMOVE)
c:RegisterEffect(e1)
local e2=e0:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
c:RegisterEffect(e2)
local e3=e0:Clone()
e3:SetCode(EVENT_CHAIN_DISABLED)
c:RegisterEffect(e3)
local e9=e0:Clone()
e9:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e9)
----buff----
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_ATTACK_ALL)
e5:SetValue(1)
--e5:SetCondition(cm.aacon)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EXTRA_ATTACK)
e6:SetValue(cm.acval)
--e6:SetCondition(cm.aacon2)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_ATTACK)
e7:SetCondition(cm.cacon)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_UPDATE_ATTACK)
e8:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e8:SetRange(LOCATION_MZONE)
e8:SetValue(cm.atkval)
c:RegisterEffect(e8)
--duel sunmmon success code
if not cm.gf then
cm.gf=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
Duel.RegisterEffect(ge1,0)
ge1:SetOperation(cm.regop)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(ge3,0)
ge3:SetOperation(cm.regop2)
local ge4=ge3:Clone()
ge4:SetCode(EVENT_CHAIN_DISABLED)
Duel.RegisterEffect(ge4,0)
end
end
--duel sunmmon success code
function cm.cfilter(c,rp)
return c:GetPreviousControler()~=rp
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
for i=0,1 do
if rp==i and eg:IsExists(cm.cfilter,1,nil,rp) then
Duel.RegisterFlagEffect(1-rp,m,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(1-rp,m)>=2 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,1-rp,ev)
end
end
end
end
function cm.regop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,m,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(ep,m)>=2 then
Duel.RaiseEvent(re:GetHandler(),EVENT_CUSTOM+m,re,r,1-ep,ep,ev)
end
end
--punish
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.GetTurnPlayer()==tp
end
function cm.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.GetSelf(e)
if not e then e = Duel.GetChainInfo(0, CHAININFO_TRIGGERING_EFFECT) end
return aux.ExceptThisCard(e)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=cm.GetSelf(e)
if not c then return end
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
if c:IsOnField() and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
Duel.BreakEffect()
if c:IsOnField() and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
----buff----
function cm.aacon(e)
return e:GetHandler():GetFlagEffect(30000240)==0
end
function cm.acval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_REMOVED,LOCATION_REMOVED)-1
end
function cm.aacon2(e)
return e:GetHandler():GetFlagEffect(30000240)>0
end
function cm.cacon(e,tp)
return Duel.GetFieldGroupCount(0,LOCATION_REMOVED,LOCATION_REMOVED)==0 and cm.aacon2(e)
end
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_REMOVED,LOCATION_REMOVED)*700
end
end
\ No newline at end of file
--我无需其他卡展示属于我的实力!
local m=30650010
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--岩筮解卦
function c33911233.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33911232+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c33911233.condition)
e1:SetCost(c33911233.cost)
e1:SetTarget(c33911233.target)
e1:SetOperation(c33911233.activate)
c:RegisterEffect(e1)
end
c33911233.toss_dice=true
function c33911233.filter(c)
return c:IsSetCard(0x9d3) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c33911233.filter2(c,tp)
return c:IsSetCard(0x9d3) and c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanRelease(tp,c)
end
function c33911233.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c33911233.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c33911233.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33911233.filter2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c33911233.filter2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
if g:GetCount()>0 then Duel.Release(g,REASON_COST) end
end
--魔楔真述 希尔妲
function c33912103.initial_effect(c)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c33912103.indes)
c:RegisterEffect(e1)
--copy spell
local e2=Effect.CreateEffect(c)
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,33912103)
e2:SetCondition(c33912103.condition)
e2:SetCost(c33912103.cost)
e2:SetTarget(c33912103.target)
e2:SetOperation(c33912103.operation)
c:RegisterEffect(e2)
end
function c33912103.indes(e,c)
return c:IsSummonLocation(LOCATION_EXTRA)
end
function c33912103.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c33912103.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c33912103.filter(c)
return c:IsSetCard(0x9d2) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:CheckActivateEffect(false,true,false)~=nil
end
function c33912103.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c33912103.filter,tp,LOCATION_GRAVE,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33912103.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c33912103.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
\ No newline at end of file
--决斗者☆的激愤 暮雨
local m=35800521
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Cannot p
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_PZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(cm.splimit)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.atktg1)
e2:SetOperation(cm.atkop1)
c:RegisterEffect(e2)
local e6=e2:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
end
function cm.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xb83) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.cfilter(c,tp,rp)
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0xb83) and c:IsAbleToHand()
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp,rp)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return eg:IsExists(cm.cfilter,1,nil,tp,rp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=eg:FilterSelect(tp,cm.cfilter,1,1,nil,tp,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
function cm.filter(c)
return aux.IsCodeListed(c,35800521) and c:IsAbleToHand()
end
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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
\ No newline at end of file
--测试
function c64000031.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(c64000031.operation)
c:RegisterEffect(e1)
end
function c64000031.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,nil,LOCATION_EXTRA,LOCATION_EXTRA,1,1,nil)
Duel.SpecialSummon(g,e,tp,tp,true,true,POS_FACEUP)
end
\ No newline at end of file
--百鬼夜行
local cm,m,o=GetID()
Duel.LoadScript("c666Hyakkiyakou.lua")
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--pendulum summon
aux.EnablePendulumAttribute(c)
xiaoye.PendulumRepalce(c)
xiaoye.MonsterEffectAndGrant(c,m,0,EFFECT_TYPE_QUICK_O,EVENT_FREE_CHAIN,TIMINGS_CHECK_MONSTER,0,0,cm.tg,cm.op,EFFECT_FLAG_CARD_TARGET)
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--阴暗天使 糖歌
local m=81011088
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon1)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(cm.discon2)
c:RegisterEffect(e2)
end
function cm.discon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsCode(81011087)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.thcfilter(c)
return c:IsFacedown() or not (c:IsLevel(2) or c:IsRank(2))
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() 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+RESET_PHASE+PHASE_END)
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+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
if not Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--二重战队终结者 ZERO
function c88177015.initial_effect(c)
aux.EnableDualAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(aux.IsDualState)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88177015,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,88177015)
e3:SetCondition(c88177015.spcon)
e3:SetOperation(c88177015.desop)
end
function c88177015.spcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=1 then return false end
local lg=e:GetHandler(LOCATION_MZONE)
local a=Duel.GetAttacker()
local b=a:GetBattleTarget()
if not b then return false end
if a:IsControler(1-tp) then a,b=b,a end
return lg:IsContains(a)
end
function c88177015.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--弟龙集结
local m=88481153
local cm=_G["c"..m]
function c88481153.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c88481153.condition)
e1:SetTarget(c88481153.target)
e1:SetOperation(c88481153.activate)
c:RegisterEffect(e1)
end
function c88481153.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c88481153.spfilter(c,e,tp)
return c:IsSetCard(0xfdb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c88481153.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88481153.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c88481153.exfilter1(c)
return c:IsFacedown()
end
function c88481153.exfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c88481153.fselect(g,ft1,ft2,ect,ft)
return aux.dncheck(g) and #g<=ft and #g<=ect
and g:FilterCount(c88481153.exfilter1,nil)<=ft1
and g:FilterCount(c88481153.exfilter2,nil)<=ft2
end
function c88481153.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft1=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)
local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local ft=Duel.GetUsableMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if ft1>0 then ft1=1 end
if ft2>0 then ft2=1 end
if ft>0 then ft=1 end
end
local ect=(c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]) or ft
if ect>0 and (ft1>0 or ft2>0) then
local sg=Duel.GetMatchingGroup(c88481153.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=sg:SelectSubGroup(tp,c88481153.fselect,false,1,3,ft1,ft2,ect,ft)
if rg:GetCount()>0 then
local fid=c:GetFieldID()
local tc=rg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(88481153,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=rg:GetNext()
end
Duel.SpecialSummonComplete()
rg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(rg)
e1:SetCondition(c88481153.rmcon)
e1:SetOperation(c88481153.rmop)
Duel.RegisterEffect(e1,tp)
end
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetTargetRange(1,0)
e2:SetLabel(c88481153.getsummoncount(tp))
e2:SetTarget(c88481153.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetLabel(c88481153.getsummoncount(tp))
e6:SetValue(c88481153.countval)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
function c88481153.getsummoncount(tp)
return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
end
function c88481153.rmfilter(c,fid)
return c:GetFlagEffectLabel(88481153)==fid
end
function c88481153.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c88481153.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c88481153.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c88481153.rmfilter,nil,e:GetLabel())
Duel.Release(tg,POS_FACEUP,REASON_EFFECT)
end
function c88481153.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c88481153.getsummoncount(sump)>e:GetLabel()
end
function c88481153.countval(e,re,tp)
if c88481153.getsummoncount(tp)>e:GetLabel() then return 0 else return 1 end
end
function c88481153.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,6000) end
Duel.PayLPCost(tp,6000)
end
\ No newline at end of file
--归零界碑
function c9320000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c9320000.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--Atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTarget(c9320000.atk)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
e4:SetValue(0)
c:RegisterEffect(e4)
--set p
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c9320000.setcon)
e5:SetTarget(c9320000.settg)
e5:SetOperation(c9320000.setop)
c:RegisterEffect(e5)
end
function c9320000.disable(e,c)
return (c:IsType(TYPE_EFFECT+TYPE_SPELL+TYPE_TRAP) or c:GetOriginalType()&TYPE_EFFECT~=0)
and not c:IsOriginalCodeRule(9320000) and e:GetHandler():GetColumnGroup():IsContains(c)
end
function c9320000.atk(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
function c9320000.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c9320000.filter(c)
return c:GetLeftScale()==0 and not c:IsForbidden()
end
function c9320000.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c9320000.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end
end
function c9320000.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c9320000.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--封龙殿
function c96030212.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c96030212.efcon)
e2:SetTarget(c96030212.eftg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96030212,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,96030212)
e3:SetTarget(c96030212.thtg)
e3:SetOperation(c96030212.thop)
c:RegisterEffect(e3)
end
function c96030212.cfilter1(c,seq)
return c:IsFaceup() and c:IsSetCard(0x5285) and c:IsRace(RACE_SPELLCASTER) and seq==c:GetSequence()
end
function c96030212.efcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(c96030212.cfilter1,tp,LOCATION_MZONE,0,1,nil,seq)
end
function c96030212.eftg(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
function c96030212.thfilter1(c)
return c:IsSetCard(0x5285) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c96030212.thfilter2(c)
return c:IsRace(RACE_DRAGON) and c:IsLevelAbove(8) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c96030212.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96030212.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c96030212.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x5285) and c:IsRace(RACE_SPELLCASTER)
end
function c96030212.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c96030212.thfilter1,tp,LOCATION_DECK,0,1,nil) then
if Duel.IsExistingMatchingCard(c96030212.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c96030212.cfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(96030212,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96030212.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96030212.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
elseif Duel.IsExistingMatchingCard(c96030212.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c96030212.cfilter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96030212.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--封龙焚烬
function c96030213.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96030213,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,96030213)
e1:SetCost(c96030213.thcost)
e1:SetTarget(c96030213.thtg)
e1:SetOperation(c96030213.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c96030213.effilter)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96130213,1))
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,96130213)
e3:SetTarget(c96030213.rltg)
e3:SetOperation(c96030213.rlop)
c:RegisterEffect(e3)
end
function c96030213.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c96030213.filter1(c,e,tp)
return c:IsSetCard(0x5285) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c96030213.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c96030213.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
function c96030213.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if sg:GetCount()>0 and Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c96030213.filter1,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
end
function c96030213.effilter(e,c)
return c:IsSetCard(0x5285) or c:IsAttribute(ATTRIBUTE_FIRE)
end
function c96030213.rlfilter(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsReleasableByEffect()
end
function c96030213.filter2(c)
return c:IsSetCard(0x5285) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function c96030213.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsReleasableByEffect() end
if chk==0 then return Duel.IsExistingTarget(c96030213.rlfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c96030213.rlfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
end
function c96030213.rlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)>0 and tc:IsPreviousControler(tp) and Duel.IsExistingMatchingCard(c96030213.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(96030213,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c96030213.filter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--封龙山
function c96030214.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c96030214.efcon)
e2:SetTarget(c96030214.eftg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96030214,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,96030214)
e3:SetTarget(c96030214.mvtg)
e3:SetOperation(c96030214.mvop)
c:RegisterEffect(e3)
end
function c96030214.cfilter1(c,seq)
return c:IsFaceup() and c:IsSetCard(0x5285) and c:IsRace(RACE_SPELLCASTER) and seq==c:GetSequence()
end
function c96030214.efcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
return Duel.IsExistingMatchingCard(c96030214.cfilter1,tp,LOCATION_MZONE,0,1,nil,seq)
end
function c96030214.eftg(e,c)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
function c96030214.tdfilter(c)
return c:IsFaceup() and c:GetSequence()<5
end
function c96030214.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c96030214.tdfilter,tp,LOCATION_MZONE,0,2,nil) end
local g=Duel.SelectTarget(tp,c96030214.tdfilter,tp,LOCATION_MZONE,0,2,2,nil)
end
function c96030214.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function c96030214.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc1=tg:GetFirst()
local tc2=tg:GetNext()
Duel.SwapSequence(tc1,tc2)
if tc1:IsSetCard(0x5285) and tc1:IsRace(RACE_SPELLCASTER) and tc2:IsSetCard(0x5285) and tc2:IsRace(RACE_SPELLCASTER) and Duel.IsExistingMatchingCard(c96030214.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(96030214,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c96030214.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
--封龙舞姬 黯龙使
function c96030215.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,96030215)
e1:SetTarget(c96030215.tg)
e1:SetOperation(c96030215.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,96130215)
e2:SetCondition(c96030215.descon)
e2:SetTarget(c96030215.destg)
e2:SetOperation(c96030215.desop)
c:RegisterEffect(e2)
end
function c96030215.filter(c)
return c:IsAbleToDeck() and not c:IsPublic()
end
function c96030215.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c96030215.tffilter,tp,LOCATION_DECK,0,nil,tp)
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c96030215.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c96030215.filter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c96030215.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x5285)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c96030215.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
local g=Duel.GetMatchingGroup(c96030215.tffilter,tp,LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(96030215,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
end
end
end
end
function c96030215.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c96030215.thfilter(c)
return not c:IsCode(49131917) and c:IsSetCard(0x17d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c96030215.destg(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,600)
end
function c96030215.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5285) and c:IsType(TYPE_RITUAL)
end
function c96030215.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Damage(1-tp,600,REASON_EFFECT)
local seq=c:GetSequence()
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if g:GetCount()>0 and Duel.IsExistingMatchingCard(c96030215.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(96030215,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end
end
\ No newline at end of file
--封龙舞姬 苍龙使
function c96030216.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,96030216)
e1:SetTarget(c96030216.tg)
e1:SetOperation(c96030216.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,96130216)
e2:SetCondition(c96030216.retcon)
e2:SetTarget(c96030216.rettg)
e2:SetOperation(c96030216.retop)
c:RegisterEffect(e2)
end
function c96030216.filter(c)
return c:IsAbleToDeck() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c96030216.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c96030216.tffilter,tp,LOCATION_DECK,0,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsReleasableByEffect() end
if chk==0 then return g:GetCount()>0 and Duel.IsExistingTarget(c96030216.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c96030216.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c96030216.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x5285)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c96030216.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
local g=Duel.GetMatchingGroup(c96030216.tffilter,tp,LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(96030216,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
end
end
end
end
function c96030216.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_MZONE)
and (c:GetPreviousSequence()~=c:GetSequence() or c:GetPreviousControler()~=tp)
end
function c96030216.thfilter(c)
return not c:IsCode(49131917) and c:IsSetCard(0x17d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c96030216.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,600)
end
function c96030216.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5285) and c:IsType(TYPE_RITUAL)
end
function c96030216.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Recover(tp,600,REASON_EFFECT)
local seq=c:GetSequence()
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if g:GetCount()>0 and Duel.IsExistingMatchingCard(c96030216.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(96030216,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end
end
\ No newline at end of file
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