Commit 3de1c6f4 authored by Huangnan's avatar Huangnan

add Extra data & orther data

parent 23218f39
--幽玄龙象※乾御埃天 --幽玄龙象※乾御埃天
--21.07.25 --21.07.25
local m=11451611 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,m) e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.sumop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.hand_effect=e1 cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
--limit --limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCondition(cm.cacon) e2:SetCondition(cm.cacon)
e2:SetTarget(cm.catg) e2:SetTarget(cm.catg)
e2:SetOperation(cm.caop) e2:SetOperation(cm.caop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) return eg:IsExists(Card.IsControler,1,nil,tp)
return #g>0 and #g==g:FilterCount(Card.IsFacedown,nil)
end end
function cm.spfilter(c,e,tp) function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsSetCard(0x3978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.smfilter(c,ec)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if not c:IsSetCard(0x3978) and c~=ec then return false end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) local e1,e2=Effect.CreateEffect(ec),Effect.CreateEffect(ec)
local mi,ma=c:GetTributeRequirement()
--summon
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
if mi>0 then e1:SetValue(SUMMON_TYPE_ADVANCE) end
c:RegisterEffect(e1,true)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_PROC)
e2:SetCondition(cm.ttcon)
c:RegisterEffect(e2,true)
local res1,res2=c:IsSummonable(true,nil),c:IsMSetable(true,nil)
e1:Reset()
e2:Reset()
return (res1 or res2),res1,res2
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.cpfilter(c)
local c=e:GetHandler() return c:GetOriginalType()&TYPE_LINK==0
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) then return end function cm.fselect(g,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local dg=g:Filter(Card.IsFacedown,nil)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) return g:GetClassCount(Card.GetPosition)==2 and (#dg==0 or not (g-dg):IsExists(function(c) return c:IsFaceup() and not c:IsCanTurnSet() end,1,nil))
if #g==0 then return end end
local tc=g:GetFirst() function cm.ttcon(e,c,minc)
g:AddCard(c) if c==nil then return true end
Duel.ConfirmCards(1-tp,g) local tp=c:GetControler()
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then local mi,ma=c:GetTributeRequirement()
Duel.ShuffleSetCard(g) local g=Duel.GetMatchingGroup(cm.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end return ma>0 and Duel.GetMZoneCount(tp)>0 and g:CheckSubGroup(cm.fselect,2,2,tp)
end
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
--Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetLabelObject(e1)
--Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.adjustop)
e3:SetLabelObject(e2)
e3:SetOwnerPlayer(tp)
--Duel.RegisterEffect(e3,tp)
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
return sumpos&POS_FACEUP>0 local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.cpfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,tp)
local tc=sg:GetFirst()
local tc2=sg:GetNext()
local pos=tc:GetPosition()
Duel.ChangePosition(tc,tc2:GetPosition())
Duel.ChangePosition(tc2,pos)
c:SetMaterial(nil)
end end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then local c=e:GetHandler()
local te=e:GetLabelObject() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
if te~=nil and aux.GetValueType(te)=="Effect" then local g=Duel.SelectMatchingCard(tp,cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,c)
local te2=te:GetLabelObject() local tc=g:GetFirst()
if te2~=nil and aux.GetValueType(te2)=="Effect" then te2:Reset() end if tc then
te:Reset() local _,s1,s2=cm.smfilter(tc,c)
if tc:IsLocation(LOCATION_HAND) then
local mi,ma=c:GetTributeRequirement()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,4))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
e1:SetOperation(cm.ttop)
if mi>0 then e1:SetValue(SUMMON_TYPE_ADVANCE) end
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
tc:RegisterEffect(e2,true)
end
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
end end
e:Reset()
end end
end end
function cm.cacon(e,tp,eg,ep,ev,re,r,rp) function cm.cacon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousPosition(POS_FACEDOWN) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) --and aux.bpcon()
end end
function cm.catg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.catg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local p,ph=Duel.GetTurnPlayer(),Duel.GetCurrentPhase() Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
e:SetLabel(p,ph) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local seq=e:GetHandler():GetPreviousSequence()
if e:GetHandler():GetPreviousControler()==1-tp then seq=4-seq end
e:SetLabel(seq)
local fd=1<<seq
Duel.Hint(HINT_ZONE,tp,fd)
Duel.Hint(HINT_ZONE,1-tp,fd<<16)
end
function cm.clfilter(c,tp,seq)
return aux.GetColumn(c,tp)==seq
end end
function cm.caop(e,tp,eg,ep,ev,re,r,rp) function cm.caop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -104,18 +141,23 @@ function cm.caop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,18 +141,23 @@ function cm.caop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(cm.atklimit) e1:SetValue(cm.atklimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local p,ph=e:GetLabel() local seq=e:GetLabel()
if p~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) then if Duel.GetMatchingGroupCount(cm.clfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,seq)>0 then
local e2=e1:Clone() Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,2))
e2:SetCode(EFFECT_CANNOT_TRIGGER) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,2))
e2:SetValue(0) local e2=Effect.CreateEffect(c)
e2:SetTarget(cm.aclimit) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetOperation(cm.drop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
if not re:IsActiveType(TYPE_MONSTER) or p==tp or loc&LOCATION_MZONE==0 or re:GetHandler():GetAttackedCount()>0 then return end
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.atklimit(e,c) function cm.atklimit(e,c)
return c:IsFacedown() return c:IsFacedown()
end
function cm.aclimit(e,c)
return c:GetAttackedCount()==0
end end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
--幽玄龙象※震辟洊雷 --幽玄龙象※震辟洊雷
--21.09.21 --21.09.21
local m=11451614 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,m) e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.sumop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.hand_effect=e1 cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
--position --position
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCondition(cm.ptcon) e2:SetCondition(cm.ptcon)
e2:SetTarget(cm.pttg) e2:SetTarget(cm.pttg)
e2:SetOperation(cm.ptop) e2:SetOperation(cm.ptop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) local p,loc,seq=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return #g>0 and #g==g:FilterCount(Card.IsFacedown,nil) if not loc then return false end
if loc==LOCATION_MZONE then if seq==5 then seq=1 elseif seq==6 then seq=3 end end
return loc&LOCATION_ONFIELD>0 and seq<5 and not Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,re:GetHandler(),p,seq)
end end
function cm.spfilter(c,e,tp) function cm.actfilter(c,p,seq)
return c:IsSetCard(0x3978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return aux.GetColumn(c,p)==seq
end end
function cm.sptg(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.smfilter(c,ec)
return (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) and (c:IsSetCard(0x3978) or c==ec)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) then return end local g=Duel.SelectMatchingCard(tp,cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g==0 then return end
local tc=g:GetFirst() local tc=g:GetFirst()
g:AddCard(c) if tc then
Duel.ConfirmCards(1-tp,g) local s1=tc:IsSummonable(true,nil)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then local s2=tc:IsMSetable(true,nil)
Duel.ShuffleSetCard(g) if tc:IsSummonable(true,nil,1) or tc:IsMSetable(true,nil,1) then
if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end --tribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.valcheck)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SUMMON_COST)
e3:SetOperation(cm.facechk)
e3:SetLabelObject(e2)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_MSET_COST)
tc:RegisterEffect(e4)
end
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
end
end end
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
--Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetLabelObject(e1)
--Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.adjustop)
e3:SetLabelObject(e2)
e3:SetOwnerPlayer(tp)
--Duel.RegisterEffect(e3,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumpos&POS_FACEUP>0
end end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.valcheck(e,c)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then local g=c:GetMaterial():Filter(Card.IsLocation,nil,LOCATION_MZONE)
local te=e:GetLabelObject() local tc=g:GetFirst()
if te~=nil and aux.GetValueType(te)=="Effect" then if e:GetLabel()==1 then
local te2=te:GetLabelObject() e:SetLabel(0)
if te2~=nil and aux.GetValueType(te2)=="Effect" then te2:Reset() end while tc do
te:Reset() local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetValue(LOCATION_HAND)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
elseif e:GetLabel()==2 then
e:SetLabel(0)
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetValue(LOCATION_DECK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end end
e:Reset()
end end
e:Reset()
end
function cm.facechk(e,tp,eg,ep,ev,re,r,rp)
--if Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))==0 then
e:GetLabelObject():SetLabel(1)
--else
--e:GetLabelObject():SetLabel(2)
--end
e:Reset()
end end
function cm.ptcon(e,tp,eg,ep,ev,re,r,rp) function cm.ptcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEDOWN) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousPosition(POS_FACEDOWN) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
local _IsCanChangePosition=Card.IsCanChangePosition
function Card.IsCanChangePosition(c)
return _IsCanChangePosition(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.pttg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.pttg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,nil) local cg=Duel.GetMatchingGroup(function(c) return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() end,tp,LOCATION_MZONE,0,nil)
if chk==0 then return #cg>0 end if chk==0 then return #cg>0 end
local p,ph=Duel.GetTurnPlayer(),Duel.GetCurrentPhase() Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
e:SetLabel(p,ph) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if p~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) then local seq=e:GetHandler():GetPreviousSequence()
if e:GetHandler():GetPreviousControler()==1-tp then seq=4-seq end
e:SetLabel(seq)
local fd=1<<seq
Duel.Hint(HINT_ZONE,tp,fd)
Duel.Hint(HINT_ZONE,1-tp,fd<<16)
if Duel.GetMatchingGroupCount(cm.clfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,seq)==0 then
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
e:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY) e:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
end end
function cm.clfilter(c,tp,seq)
return aux.GetColumn(c,tp)==seq
end
function cm.ptop(e,tp,eg,ep,ev,re,r,rp) function cm.ptop(e,tp,eg,ep,ev,re,r,rp)
local cg=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,LOCATION_MZONE,0,nil) local cg=Duel.GetMatchingGroup(function(c) return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() end,tp,LOCATION_MZONE,0,nil)
local p,ph=e:GetLabel() local seq=e:GetLabel()
local ct=Duel.ChangePosition(cg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) local ct=Duel.ChangePosition(cg,POS_FACEUP_ATTACK)
if ct>0 and p~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if ct>0 and Duel.GetMatchingGroupCount(cm.clfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,seq)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
--幽玄龙象※巽随霄岚 --幽玄龙象※巽随霄岚
--21.07.25 --21.07.25
local m=11451615 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,m) e1:SetCode(EVENT_CHANGE_POS)
e1:SetCondition(cm.spcon) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
--e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.hand_effect=e1 cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and #g==g:FilterCount(Card.IsFacedown,nil) return #g==g:FilterCount(Card.IsFacedown,nil)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.filter(c,tp)
return (c:IsPosition(POS_FACEDOWN_DEFENSE) or (c:IsCanTurnSet() and not c:IsStatus(STATUS_BATTLE_DESTROYED))) and (c:GetSequence()<=4 or Duel.GetLocationCount(tp,LOCATION_MZONE)>1)
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.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil,tp)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) then return end local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil,tp)
if b1 then g:Merge(g1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
g=g:Select(tp,1,1,nil)
if #g==0 then return end if #g==0 then return end
local tc=g:GetFirst() local tc=g:GetFirst()
g:AddCard(c) if not tc:IsOnField() then
Duel.ConfirmCards(1-tp,g) g:AddCard(c)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then Duel.ConfirmCards(1-tp,g)
Duel.ShuffleSetCard(g) if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end Duel.ShuffleSetCard(g)
end if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then return end end
local e1=Effect.CreateEffect(c) elseif tc:GetSequence()<=4 then
e1:SetType(EFFECT_TYPE_FIELD) if tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end
e1:SetCode(EFFECT_CANNOT_SUMMON) if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) Duel.ConfirmCards(1-tp,c)
e1:SetTargetRange(1,0) g:AddCard(c)
e1:SetTarget(cm.splimit) Duel.ShuffleSetCard(g)
--Duel.RegisterEffect(e1,tp) if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end
local e2=e1:Clone() end
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) else
e2:SetLabelObject(e1) if tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end
--Duel.RegisterEffect(e2,tp) if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
local e3=Effect.CreateEffect(c) Duel.ConfirmCards(1-tp,c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) g:AddCard(c)
e3:SetCode(EVENT_ADJUST) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
e3:SetOperation(cm.adjustop) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
e3:SetLabelObject(e2) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
e3:SetOwnerPlayer(tp) local nseq=math.log(s,2)
--Duel.RegisterEffect(e3,tp) Duel.MoveSequence(tc,nseq)
end Duel.ShuffleSetCard(g)
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end
return sumpos&POS_FACEUP>0
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then
local te=e:GetLabelObject()
if te~=nil and aux.GetValueType(te)=="Effect" then
local te2=te:GetLabelObject()
if te2~=nil and aux.GetValueType(te2)=="Effect" then te2:Reset() end
te:Reset()
end end
e:Reset()
end end
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil) local g1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g1>0 and #g2>0 end if chk==0 then return #g1>0 and #g2>0 end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end end
...@@ -105,6 +109,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,6 +109,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 then if c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,2))
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,2))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
...@@ -118,6 +124,8 @@ function cm.ceop(e,tp,eg,ep,ev,re,r,rp) ...@@ -118,6 +124,8 @@ function cm.ceop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) local g2=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if ep~=tp and #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if ep~=tp and #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.reop) Duel.ChangeChainOperation(ev,cm.reop)
e:Reset() e:Reset()
end end
......
--幽玄龙象※坎寄沧波 --幽玄龙象※坎寄沧波
--21.09.21 --21.09.21
local m=11451616 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(m,3))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,m) e1:SetCode(EVENT_MSET)
e1:SetCondition(cm.spcon) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.hand_effect=e1 local e3=e1:Clone()
e3:SetCode(EVENT_CHANGE_POS)
e3:SetCondition(cm.spcon2)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.spcon2)
c:RegisterEffect(e4)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451416,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetTarget(cm.fstg) e2:SetTarget(cm.fstg)
e2:SetOperation(cm.fsop) e2:SetOperation(cm.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.filter11(c)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) return c:IsFacedown() and c:IsLocation(LOCATION_MZONE)
return #g>0 and #g==g:FilterCount(Card.IsFacedown,nil)
end end
function cm.spfilter(c,e,tp) function cm.thfilter(c,sc,ec,tp)
return c:IsSetCard(0x3978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsRace(RACE_WYRM) and c:IsAbleToHand() and ((c:IsLevel(sc:GetLevel()+ec:GetLevel(),math.abs(sc:GetLevel()-ec:GetLevel())) and sc:IsLevelAbove(1)) or sc:GetControler()~=tp)
end
function cm.setfilter(c,ec,tp)
return c:IsAbleToHand() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c,ec,tp)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsFacedown,1,nil)
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.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) local g=eg:Filter(cm.filter11,nil)
if chk==0 then return c:IsAbleToDeck() and g:IsExists(cm.setfilter,1,nil,c,tp) end
g=g:Filter(cm.setfilter,nil,c,tp)
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_ALL,LOCATION_DECK+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_HAND)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or not g or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local sg=g:FilterSelect(tp,cm.setfilter,1,1,nil,c,tp)
if #g==0 then return end --Duel.HintSelection(sg)
local tc=g:GetFirst() if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_HAND) then
g:AddCard(c) Duel.ConfirmCards(tp,sg)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,sg)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then local e1=Effect.CreateEffect(e:GetHandler())
Duel.ShuffleSetCard(g) e1:SetDescription(aux.Stringid(m,4))
if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end e1:SetType(EFFECT_TYPE_SINGLE)
end e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_IGNORE_IMMUNE)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then return end e1:SetCode(EFFECT_PUBLIC)
local e1=Effect.CreateEffect(c) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetType(EFFECT_TYPE_FIELD) sg:GetFirst():RegisterEffect(e1,true)
e1:SetCode(EFFECT_CANNOT_SUMMON) if not c:IsAbleToDeck() then return end
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
e1:SetTargetRange(1,0) local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,sg:GetFirst(),c)
e1:SetTarget(cm.splimit) if #tg>0 and Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 then
--Duel.RegisterEffect(e1,tp) Duel.ConfirmCards(1-tp,tg)
local e2=e1:Clone() Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.ShuffleHand(tp)
e2:SetLabelObject(e1)
--Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.adjustop)
e3:SetLabelObject(e2)
e3:SetOwnerPlayer(tp)
--Duel.RegisterEffect(e3,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumpos&POS_FACEUP>0
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then
local te=e:GetLabelObject()
if te~=nil and aux.GetValueType(te)=="Effect" then
local te2=te:GetLabelObject()
if te2~=nil and aux.GetValueType(te2)=="Effect" then te2:Reset() end
te:Reset()
end end
e:Reset()
end end
end end
function cm.filter0(c) function cm.filter0(c)
...@@ -90,7 +90,7 @@ function cm.filter1(c) ...@@ -90,7 +90,7 @@ function cm.filter1(c)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial()
end end
function cm.filter2(c,e,tp,m,f,chkf) function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf) return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf)
end end
function cm.filter3(c,e) function cm.filter3(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
...@@ -99,7 +99,7 @@ function cm.filter4(c,e) ...@@ -99,7 +99,7 @@ function cm.filter4(c,e)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function cm.filter5(c,e,tp,m,f,chkf) function cm.filter5(c,e,tp,m,f,chkf)
return (c:IsType(TYPE_FUSION) or _G["c"..c:GetOriginalCode()].IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf) return (c:IsType(TYPE_FUSION) or c.IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
end end
function cm.filter6(c) function cm.filter6(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
...@@ -126,6 +126,9 @@ function cm.fstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -126,6 +126,9 @@ function cm.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
return res return res
end end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end end
function cm.fsop(e,tp,eg,ep,ev,re,r,rp) function cm.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
...@@ -158,7 +161,7 @@ function cm.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -158,7 +161,7 @@ function cm.fsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
if tc:IsType(TYPE_MONSTER) then if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
......
--幽玄龙象※艮依行止 --幽玄龙象※艮依行止
--21.09.21 --21.09.21
local m=11451617 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
--e1:SetCountLimit(1,m) e1:SetCost(cm.thcost)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.hand_effect=e1 cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION+CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetTarget(cm.drtg) e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop) e2:SetOperation(cm.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) local c=e:GetHandler()
return #g>0 and #g==g:FilterCount(Card.IsFacedown,nil) if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) return c:IsSetCard(0x3978) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
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.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return false end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetDecktopGroup(tp,ct)
local c=e:GetHandler() return g:FilterCount(Card.IsAbleToHand,nil)>0
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g==0 then return end
local tc=g:GetFirst()
g:AddCard(c)
Duel.ConfirmCards(1-tp,g)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ShuffleSetCard(g)
if Duel.SelectYesNo(tp,aux.Stringid(11451619,0)) then Duel.SwapSequence(c,tc) end
end end
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then return end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
--Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetLabelObject(e1)
--Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.adjustop)
e3:SetLabelObject(e2)
e3:SetOwnerPlayer(tp)
--Duel.RegisterEffect(e3,tp)
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
return sumpos&POS_FACEUP>0 local dc=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
end if Duel.IsPlayerCanDiscardDeck(tp,1) and dc>0 then
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then if dc>ct then dc=ct end
local te=e:GetLabelObject() Duel.ConfirmDecktop(tp,dc)
if te~=nil and aux.GetValueType(te)=="Effect" then local g=Duel.GetDecktopGroup(tp,dc)
local te2=te:GetLabelObject() if #g>0 then
if te2~=nil and aux.GetValueType(te2)=="Effect" then te2:Reset() end Duel.DisableShuffleCheck()
te:Reset() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
g:Sub(sg)
end
Duel.SendtoGrave(g,REASON_EFFECT)
end end
e:Reset()
end end
end end
local _IsCanTurnSet=Card.IsCanTurnSet
function Card.IsCanTurnSet(c)
return (c:IsSSetable(true) and c:IsLocation(LOCATION_SZONE)) or ((_IsCanTurnSet(c) and not c:IsLocation(LOCATION_SZONE) and not c:IsStatus(STATUS_BATTLE_DESTROYED)))
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,nil) local cg=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
if chk==0 then return #cg>0 end if chk==0 then return #cg>0 end
if e:GetHandler():GetColumnGroupCount()==0 then
e:SetCategory(CATEGORY_POSITION+CATEGORY_TOGRAVE+CATEGORY_DRAW)
end
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local cg=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,nil) local cg=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
local ct=Duel.ChangePosition(cg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) local ct=Duel.ChangePosition(cg,POS_FACEDOWN_DEFENSE)
if ct>0 and c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 and Duel.IsPlayerCanDraw(tp,ct) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if ct>0 and c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 and Duel.IsPlayerCanDraw(tp,ct) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local ct2=Duel.Draw(tp,ct,REASON_EFFECT) local ct2=Duel.Draw(tp,ct,REASON_EFFECT)
if ct2>0 then if ct2>0 then
......
--幽玄龙象※坤载厚宇 --幽玄龙象※坤载厚宇
--21.09.21 --21.09.21
local m=11451618 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -13,13 +12,14 @@ function cm.initial_effect(c) ...@@ -13,13 +12,14 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.hand_effect=e1 cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost) e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
...@@ -39,7 +39,7 @@ end ...@@ -39,7 +39,7 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g==0 then return end if #g==0 then return end
...@@ -59,7 +59,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
--Duel.RegisterEffect(e1,tp) --Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
--Duel.RegisterEffect(e2,tp) --Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -74,7 +74,7 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -74,7 +74,7 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumpos&POS_FACEUP>0 return sumpos&POS_FACEUP>0
end end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_ONFIELD,0,1,nil) then if not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) then
local te=e:GetLabelObject() local te=e:GetLabelObject()
if te~=nil and aux.GetValueType(te)=="Effect" then if te~=nil and aux.GetValueType(te)=="Effect" then
local te2=te:GetLabelObject() local te2=te:GetLabelObject()
...@@ -103,8 +103,9 @@ function cm.efffilter(c,tp,eg,ep,ev,re,r,rp) ...@@ -103,8 +103,9 @@ function cm.efffilter(c,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x3978) and c:IsType(TYPE_MONSTER)) then return false end if not (c:IsSetCard(0x3978) and c:IsType(TYPE_MONSTER)) then return false end
local te=c.hand_effect local te=c.hand_effect
if not te then return false end if not te then return false end
te=c.hand_effect[c]
local tg=te:GetTarget() local tg=te:GetTarget()
return not tg or tg and tg(te,tp,eg,ep,ev,re,r,rp,0) return not tg or (tg and tg(te,tp,eg,ep,ev,re,r,rp,0,100))
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -118,14 +119,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -118,14 +119,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 and #hg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 and #hg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local tc=hg:Select(tp,1,1,nil):GetFirst() local tc=hg:Select(tp,1,1,nil):GetFirst()
local te=tc.hand_effect local te=tc.hand_effect[tc]
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_CARD,0,tc:GetOriginalCode())
local op=te:GetOperation() local op=te:GetOperation()
if op then if op then
tc:CreateEffectRelation(te) tc:CreateEffectRelation(te)
local _GetHandler=Effect.GetHandler
Effect.GetHandler=function() return tc end
op(te,tp,eg,ep,ev,re,r,rp) op(te,tp,eg,ep,ev,re,r,rp)
Effect.GetHandler=_GetHandler
end end
end end
end end
\ No newline at end of file
...@@ -62,7 +62,7 @@ function cm.hfilter(c,lv) ...@@ -62,7 +62,7 @@ function cm.hfilter(c,lv)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv
end end
function cm.fselect(g,lv) function cm.fselect(g,lv)
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1 return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<=1
end end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -75,22 +75,30 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,22 +75,30 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5)) Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5))
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end end
--if (e:IsHasType(EFFECT_TYPE_TRIGGER_O) and c:IsFaceup()) or (e:IsHasType(EFFECT_TYPE_QUICK_O) and c:IsFacedown()) then return false end
if Duel.GetCurrentChain()<1 then return false end if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end if c:GetFlagEffect(m+1)>0 then return false end
local loc=0 local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>-1 then loc=loc+LOCATION_EXTRA end
if loc==0 or not c:IsLocation(loc) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) then return false end if loc==0 or not c:IsLocation(loc) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) then return false end
local lock1=(c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)==0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)==0)
local lock2=false
if rpz==nil and lpz==nil then if rpz==nil and lpz==nil then
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0)
local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4) local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4)
if not z1 or not z2 then return false end if not z1 or not z2 then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM) --if not z1 and not z2 then return false end
if Duel.GetCurrentChain()>0 then if not z1 or not z2 then
g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM) lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,0)
if not z2 then lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,4) end
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end end
local res=g:CheckSubGroup(cm.fselect,2,2,lv) local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
if Duel.GetCurrentChain()>0 then
g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM)
elseif lock1 or lock2 then return false end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE))
local res=g:CheckSubGroup(cm.fselect,2,2,lv,lock1,lock2,c)
--if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end --if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end
return res return res
elseif rpz==nil or lpz==nil then elseif rpz==nil or lpz==nil then
...@@ -98,16 +106,21 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,16 +106,21 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
if lpz then seq=4 end if lpz then seq=4 end
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq)
if not z1 then return false end if not z1 then return false end
if not z1 then
lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,seq)
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end
local pz=lpz or rpz local pz=lpz or rpz
local scale=pz:GetLeftScale() local scale=pz:GetLeftScale()
local ds=lv<scale local ds=lv<scale
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM) local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
local fil=cm.dfilter local fil=cm.dfilter
if lv>scale then fil=cm.hfilter end if lv>scale then fil=cm.hfilter end
if Duel.GetCurrentChain()>0 then if Duel.GetCurrentChain()>0 then
g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM) g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM)
end elseif lock1 or lock2 then return false end
local res=g:IsExists(fil,1,nil,lv) g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE))
local res=g:IsExists(cm.ffilter,1,nil,lv,lock1,lock2,fil,c)
--if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end --if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end
return res return res
else else
...@@ -120,39 +133,51 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -120,39 +133,51 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local lock1=(c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)==0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)==0)
local lock2=false
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if rpz==nil and lpz==nil then if rpz==nil and lpz==nil then
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0)
local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4) local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4)
if not z1 or not z2 then return false end if not z1 and not z2 then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM) if not z1 or not z2 then
if Duel.GetCurrentChain()>1 then lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,0)
g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM) if not z2 then lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,4) end
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end end
local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
if Duel.GetCurrentChain()>1 then
g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM)
elseif lock1 or lock2 then return false end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,lv) sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,lv,lock1,lock2,c)
elseif rpz==nil or lpz==nil then elseif rpz==nil or lpz==nil then
local seq=0 local seq=0
if lpz then seq=4 end if lpz then seq=4 end
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq)
if not z1 then return false end if not z1 then
lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,seq)
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end
local pz=lpz or rpz local pz=lpz or rpz
local scale=pz:GetLeftScale() local scale=pz:GetLeftScale()
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM) local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
local fil=cm.dfilter local fil=cm.dfilter
if lv>scale then fil=cm.hfilter end if lv>scale then fil=cm.hfilter end
if Duel.GetCurrentChain()>1 then if Duel.GetCurrentChain()>1 then
g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM) g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM)
end elseif lock1 or lock2 then return false end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
sg=g:FilterSelect(tp,fil,1,1,nil,lv) sg=g:FilterSelect(tp,cm.ffilter,1,1,nil,lv,lock1,lock2,fil,c)
end end
for sc in aux.Next(sg) do for sc in aux.Next(sg) do
if not sc:IsLocation(LOCATION_HAND) then if not sc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) e1:SetReset(RESET_EVENT+0x4760000)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
...@@ -212,7 +237,7 @@ end ...@@ -212,7 +237,7 @@ end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0xc3e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,0)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,0))
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)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
......
...@@ -5,7 +5,6 @@ function cm.initial_effect(c) ...@@ -5,7 +5,6 @@ function cm.initial_effect(c)
--trigger --trigger
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3)) e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -83,8 +82,20 @@ function cm.initial_effect(c) ...@@ -83,8 +82,20 @@ function cm.initial_effect(c)
local tp=tc:GetControler() local tp=tc:GetControler()
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,cm[1],tp,tc) local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,tc,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _Merge(sg,tg) end if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
cm[1]=nil
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _Merge(sg,tg)
end
end end
cm[1]=nil cm[1]=nil
return _Merge(sg,obj) return _Merge(sg,obj)
...@@ -95,8 +106,22 @@ function cm.initial_effect(c) ...@@ -95,8 +106,22 @@ function cm.initial_effect(c)
local tp=tc:GetControler() local tp=tc:GetControler()
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,nil,tp,tc) local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,tc,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc2=tg:GetFirst()
tc2.pendulum_rule[tc2]:SetLabel(1)
if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM)
end
end end
_SpecialSummonRule(tp,tc,sumtype) _SpecialSummonRule(tp,tc,sumtype)
end end
...@@ -147,7 +172,7 @@ end ...@@ -147,7 +172,7 @@ end
function cm.thfilter(c,...) function cm.thfilter(c,...)
local tab={...} local tab={...}
for _,code in ipairs(tab) do for _,code in ipairs(tab) do
if c:GetOriginalCode()==code and c:IsAbleToHand() then return true end if c:GetOriginalCode()==code and c:IsType(TYPE_PENDULUM) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) then return true end
end end
return false return false
end end
...@@ -159,10 +184,9 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -159,10 +184,9 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
if c:GetFlagEffect(code)>0 then tab[#tab+1]=code end if c:GetFlagEffect(code)>0 then tab[#tab+1]=code end
end end
if chk==0 then if chk==0 then
return #tab>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,table.unpack(tab)) return #tab>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,nil,e,tp,table.unpack(tab))
end end
e:SetLabel(table.unpack(tab)) e:SetLabel(table.unpack(tab))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function cm.psptg2(code) function cm.psptg2(code)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -175,12 +199,12 @@ function cm.psptg2(code) ...@@ -175,12 +199,12 @@ function cm.psptg2(code)
end end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp) function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
local tab={e:GetLabel()} local tab={e:GetLabel()}
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,table.unpack(tab)) local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil,table.unpack(tab))
if #g==0 then return end if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:Select(tp,1,1,nil) --SelectSubGroup(tp,aux.dncheck,false,1,g:GetClassCount(Card.GetOriginalCode)) local sg=g:Select(tp,1,1,nil) --SelectSubGroup(tp,aux.dncheck,false,1,g:GetClassCount(Card.GetOriginalCode))
if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then if #sg>0 then
Duel.ConfirmCards(1-tp,sg) Duel.SendtoExtraP(sg,nil,REASON_EFFECT)
end end
end end
function cm.spfilter(c) function cm.spfilter(c)
...@@ -195,6 +219,7 @@ end ...@@ -195,6 +219,7 @@ 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)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
if Duel.GetCurrentChain()>1 then if Duel.GetCurrentChain()>1 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+0x200) e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+0x200)
else e:SetProperty(EFFECT_FLAG_DELAY) end else e:SetProperty(EFFECT_FLAG_DELAY) end
...@@ -258,7 +283,7 @@ function cm.returntofield(tc) ...@@ -258,7 +283,7 @@ function cm.returntofield(tc)
Duel.SendtoGrave(gc,REASON_RULE) Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) Duel.MoveToField(tc,p,p,LOCATION_FZONE,POS_FACEUP,true)
return return
end end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
......
...@@ -62,7 +62,7 @@ function cm.hfilter(c,lv) ...@@ -62,7 +62,7 @@ function cm.hfilter(c,lv)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>lv
end end
function cm.fselect(g,lv) function cm.fselect(g,lv)
return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) and g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 and g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1 return g:IsExists(cm.dfilter,1,nil,lv) and g:IsExists(cm.hfilter,1,nil,lv) --and g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE+LOCATION_EXTRA)<=2
end end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -211,7 +211,7 @@ end ...@@ -211,7 +211,7 @@ end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0xc3e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,0)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,0))
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)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
......
...@@ -83,8 +83,20 @@ function cm.initial_effect(c) ...@@ -83,8 +83,20 @@ function cm.initial_effect(c)
local tp=tc:GetControler() local tp=tc:GetControler()
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,cm[1],tp,tc) local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,tc,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _Merge(sg,tg) end if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
cm[1]=nil
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _Merge(sg,tg)
end
end end
cm[1]=nil cm[1]=nil
return _Merge(sg,obj) return _Merge(sg,obj)
...@@ -95,8 +107,22 @@ function cm.initial_effect(c) ...@@ -95,8 +107,22 @@ function cm.initial_effect(c)
local tp=tc:GetControler() local tp=tc:GetControler()
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,nil,tp,tc) local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,tc,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc2=tg:GetFirst()
tc2.pendulum_rule[tc2]:SetLabel(1)
if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM)
end
end end
_SpecialSummonRule(tp,tc,sumtype) _SpecialSummonRule(tp,tc,sumtype)
end end
...@@ -217,6 +243,7 @@ end ...@@ -217,6 +243,7 @@ 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)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
if Duel.GetCurrentChain()>1 then if Duel.GetCurrentChain()>1 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+0x200) e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+0x200)
else e:SetProperty(EFFECT_FLAG_DELAY) end else e:SetProperty(EFFECT_FLAG_DELAY) end
......
...@@ -14,6 +14,10 @@ function cm.initial_effect(c) ...@@ -14,6 +14,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.psptg) e1:SetTarget(cm.psptg)
e1:SetOperation(cm.pspop) e1:SetOperation(cm.pspop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e6=e1:Clone()
e6:SetCode(EVENT_CUSTOM+m+1)
e6:SetCondition(aux.TRUE)
c:RegisterEffect(e6)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCost(cm.pspcost) e3:SetCost(cm.pspcost)
...@@ -38,6 +42,19 @@ function cm.initial_effect(c) ...@@ -38,6 +42,19 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local _Overlay=Duel.Overlay
function Duel.Overlay(xc,v,...)
local t=Auxiliary.GetValueType(v)
local g=Group.CreateGroup()
if t=="Card" then g:AddCard(v) else g=v end
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.RaiseEvent(g:Filter(Card.IsLocation,nil,LOCATION_DECK),EVENT_CUSTOM+m+1,e,0,0,0,0)
end
return _Overlay(xc,v,...)
end
end
end end
function cm.spfilter0(c,loc) function cm.spfilter0(c,loc)
return c:IsPreviousLocation(loc) and not (c:IsLocation(loc) and c:IsControler(c:GetPreviousControler())) return c:IsPreviousLocation(loc) and not (c:IsLocation(loc) and c:IsControler(c:GetPreviousControler()))
...@@ -98,30 +115,22 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,30 +115,22 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5)) Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5))
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end end
--if (e:IsHasType(EFFECT_TYPE_TRIGGER_O) and c:IsFaceup()) or (e:IsHasType(EFFECT_TYPE_QUICK_O) and c:IsFacedown()) then return false end
if Duel.GetCurrentChain()<1 then return false end if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end if c:GetFlagEffect(m+1)>0 then return false end
local loc=0 local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>-1 then loc=loc+LOCATION_EXTRA end if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 or not c:IsLocation(loc) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) then return false end if loc==0 or not c:IsLocation(loc) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) then return false end
local lock1=(c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)==0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)==0)
local lock2=false
if rpz==nil and lpz==nil then if rpz==nil and lpz==nil then
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0)
local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4) local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4)
if not z1 or not z2 then return false end if not z1 or not z2 then return false end
--if not z1 and not z2 then return false end local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
if not z1 or not z2 then
lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,0)
if not z2 then lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,4) end
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end
local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
if Duel.GetCurrentChain()>0 then if Duel.GetCurrentChain()>0 then
g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM) g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM)
elseif lock1 or lock2 then return false end end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE)) local res=g:CheckSubGroup(cm.fselect,2,2,lv)
local res=g:CheckSubGroup(cm.fselect,2,2,lv,lock1,lock2,c)
--if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end --if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end
return res return res
elseif rpz==nil or lpz==nil then elseif rpz==nil or lpz==nil then
...@@ -129,21 +138,16 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -129,21 +138,16 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
if lpz then seq=4 end if lpz then seq=4 end
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq)
if not z1 then return false end if not z1 then return false end
if not z1 then
lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,seq)
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end
local pz=lpz or rpz local pz=lpz or rpz
local scale=pz:GetLeftScale() local scale=pz:GetLeftScale()
local ds=lv<scale local ds=lv<scale
local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
local fil=cm.dfilter local fil=cm.dfilter
if lv>scale then fil=cm.hfilter end if lv>scale then fil=cm.hfilter end
if Duel.GetCurrentChain()>0 then if Duel.GetCurrentChain()>0 then
g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM) g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM)
elseif lock1 or lock2 then return false end end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE)) local res=g:IsExists(fil,1,nil,lv)
local res=g:IsExists(cm.ffilter,1,nil,lv,lock1,lock2,fil,c)
--if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end --if res then c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) end
return res return res
else else
...@@ -156,44 +160,32 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -156,44 +160,32 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local lock1=(c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)==0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)==0)
local lock2=false
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
if rpz==nil and lpz==nil then if rpz==nil and lpz==nil then
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,0)
local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4) local z2=Duel.CheckLocation(tp,LOCATION_SZONE,4)
if not z1 and not z2 then return false end if not z1 or not z2 then return false end
if not z1 or not z2 then local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,0)
if not z2 then lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,4) end
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end
local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
if Duel.GetCurrentChain()>1 then if Duel.GetCurrentChain()>1 then
g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM) g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM)
elseif lock1 or lock2 then return false end end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,lv,lock1,lock2,c) sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,lv)
elseif rpz==nil or lpz==nil then elseif rpz==nil or lpz==nil then
local seq=0 local seq=0
if lpz then seq=4 end if lpz then seq=4 end
local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq) local z1=Duel.CheckLocation(tp,LOCATION_SZONE,seq)
if not z1 then if not z1 then return false end
lock2=Duel.GetFieldCard(tp,LOCATION_SZONE,seq)
if aux.GetValueType(lock2)~="Card" or lock2:GetOriginalType()&TYPE_PENDULUM==0 then return false end
end
local pz=lpz or rpz local pz=lpz or rpz
local scale=pz:GetLeftScale() local scale=pz:GetLeftScale()
local g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,c,TYPE_PENDULUM)
local fil=cm.dfilter local fil=cm.dfilter
if lv>scale then fil=cm.hfilter end if lv>scale then fil=cm.hfilter end
if Duel.GetCurrentChain()>1 then if Duel.GetCurrentChain()>1 then
g=Duel.GetMatchingGroup(cm.IsOriginalType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,c,TYPE_PENDULUM) g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,c,TYPE_PENDULUM)
elseif lock1 or lock2 then return false end end
g:Sub(g:Filter(Card.IsLocation,nil,LOCATION_PZONE))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
sg=g:FilterSelect(tp,cm.ffilter,1,1,nil,lv,lock1,lock2,fil,c) sg=g:FilterSelect(tp,fil,1,1,nil,lv)
end end
for sc in aux.Next(sg) do for sc in aux.Next(sg) do
if not sc:IsLocation(LOCATION_HAND) then if not sc:IsLocation(LOCATION_HAND) then
...@@ -260,7 +252,7 @@ end ...@@ -260,7 +252,7 @@ end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local fid=c:GetFieldID() local fid=c:GetFieldID()
local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0xc3e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,0)) local e1=Card.RegisterFlagEffect(c,m,RESET_EVENT+0x53e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(m,0))
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)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
......
...@@ -5,6 +5,7 @@ function cm.initial_effect(c) ...@@ -5,6 +5,7 @@ function cm.initial_effect(c)
--trigger --trigger
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3)) e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -82,8 +83,20 @@ function cm.initial_effect(c) ...@@ -82,8 +83,20 @@ function cm.initial_effect(c)
local tp=tc:GetControler() local tp=tc:GetControler()
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,cm[1],tp,tc) local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,tc,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) cm[1]=nil Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _Merge(sg,tg) end if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
cm[1]=nil
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _Merge(sg,tg)
end
end end
cm[1]=nil cm[1]=nil
return _Merge(sg,obj) return _Merge(sg,obj)
...@@ -94,8 +107,22 @@ function cm.initial_effect(c) ...@@ -94,8 +107,22 @@ function cm.initial_effect(c)
local tp=tc:GetControler() local tp=tc:GetControler()
if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then if 1==1 then --and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451912,0))
local tg=Duel.SelectMatchingCard(tp,cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,0,1,nil,nil,tp,tc) local tg=Duel.GetMatchingGroup(cm.tspfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,tc,nil,tp,tc):CancelableSelect(tp,1,1,nil)
if #tg>0 then Duel.RegisterFlagEffect(tp,tg:GetFirst():GetOriginalCode(),RESET_PHASE+PHASE_END,0,1) local tc2=tg:GetFirst() tc2.pendulum_rule[tc2]:SetLabel(1) if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6)) return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM) end if tg and #tg>0 then
local e1=Effect.CreateEffect(tg:GetFirst())
e1:SetDescription(aux.Stringid(tg:GetFirst():GetOriginalCode(),7))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_FLAG_EFFECT+tg:GetFirst():GetOriginalCode())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc2=tg:GetFirst()
tc2.pendulum_rule[tc2]:SetLabel(1)
if tc.pendulum_rule and tc.pendulum_rule[tc] then tc.pendulum_rule[tc]:SetLabel(0) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(11451912,6))
return _SpecialSummonRule(tp,tc2,SUMMON_TYPE_PENDULUM)
end
end end
_SpecialSummonRule(tp,tc,sumtype) _SpecialSummonRule(tp,tc,sumtype)
end end
...@@ -146,7 +173,7 @@ end ...@@ -146,7 +173,7 @@ end
function cm.thfilter(c,...) function cm.thfilter(c,...)
local tab={...} local tab={...}
for _,code in ipairs(tab) do for _,code in ipairs(tab) do
if c:GetOriginalCode()==code and c:IsType(TYPE_PENDULUM) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) then return true end if c:GetOriginalCode()==code and c:IsAbleToHand() then return true end
end end
return false return false
end end
...@@ -158,9 +185,10 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -158,9 +185,10 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
if c:GetFlagEffect(code)>0 then tab[#tab+1]=code end if c:GetFlagEffect(code)>0 then tab[#tab+1]=code end
end end
if chk==0 then if chk==0 then
return #tab>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,nil,e,tp,table.unpack(tab)) return #tab>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,table.unpack(tab))
end end
e:SetLabel(table.unpack(tab)) e:SetLabel(table.unpack(tab))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function cm.psptg2(code) function cm.psptg2(code)
return function(e,tp,eg,ep,ev,re,r,rp,chk) return function(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -173,12 +201,12 @@ function cm.psptg2(code) ...@@ -173,12 +201,12 @@ function cm.psptg2(code)
end end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp) function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
local tab={e:GetLabel()} local tab={e:GetLabel()}
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil,table.unpack(tab)) local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,table.unpack(tab))
if #g==0 then return end if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) --SelectSubGroup(tp,aux.dncheck,false,1,g:GetClassCount(Card.GetOriginalCode)) local sg=g:Select(tp,1,1,nil) --SelectSubGroup(tp,aux.dncheck,false,1,g:GetClassCount(Card.GetOriginalCode))
if #sg>0 then if #sg>0 and Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
Duel.SendtoExtraP(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg)
end end
end end
function cm.spfilter(c) function cm.spfilter(c)
...@@ -194,6 +222,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -194,6 +222,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and #g>0 end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and #g>0 end
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
if Duel.GetCurrentChain()>1 then if Duel.GetCurrentChain()>1 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+0x200) e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+0x200)
else e:SetProperty(EFFECT_FLAG_DELAY) end else e:SetProperty(EFFECT_FLAG_DELAY) end
......
...@@ -3,33 +3,16 @@ local m=12400018 ...@@ -3,33 +3,16 @@ local m=12400018
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon --spsummon
local e7=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e7:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_SPSUMMON_SUCCESS) e0:SetCode(EVENT_SUMMON_SUCCESS)
e7:SetCondition(cm.spcon2) e0:SetOperation(cm.spop2)
e7:SetOperation(cm.spop2) c:RegisterEffect(e0)
c:RegisterEffect(e7) local e1=e0:Clone()
--splimit e1:SetCode(EVENT_SPSUMMON_SUCCESS)
local e2=Effect.CreateEffect(c) c:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
c:RegisterEffect(e2)
--atk --atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
...@@ -55,47 +38,18 @@ function cm.initial_effect(c) ...@@ -55,47 +38,18 @@ function cm.initial_effect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY) e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE) e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(cm.con) e5:SetCondition(cm.con)
e5:SetOperation(cm.op) e5:SetOperation(cm.op)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function cm.costfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function cm.costfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,0,3,e:GetHandler())
or Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,3,e:GetHandler()))
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local s1=Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,0,3,e:GetHandler())
local s2=Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,3,e:GetHandler())
if (not s2) or (s1 and Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
Duel.DiscardHand(tp,cm.costfilter1,3,3,REASON_COST+REASON_DISCARD,e:GetHandler())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,12400019,0,TYPES_TOKEN_MONSTER,1000,1000,1,RACE_FIEND,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,12400019,0,TYPES_TOKEN_MONSTER,1000,1000,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,12400019) local token=Duel.CreateToken(tp,12400019)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
token:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) token:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -104,20 +58,11 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,20 +58,11 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
token:RegisterEffect(e1) token:RegisterEffect(e1)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e4) token:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
token:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e7)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
...@@ -132,9 +77,10 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -132,9 +77,10 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then if tc:GetFlagEffect(m)~=0 and Duel.GetTurnPlayer()==tp then
return true return true
else end
if tc:GetFlagEffect(m)==0 then
e:Reset() e:Reset()
return false return false
end end
...@@ -144,12 +90,9 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -144,12 +90,9 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_FIEND)
end
function cm.atktg(e,c) function cm.atktg(e,c)
return c:IsRace(RACE_FIEND) and not c:IsCode(m) return c:IsRace(RACE_ZOMBIE) and not c:IsCode(m)
end end
function cm.filter(c) function cm.filter(c)
...@@ -160,32 +103,23 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -160,32 +103,23 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12400020,0,TYPES_TOKEN_MONSTER,3000,3000,1,RACE_FIEND,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,12400020,0,TYPES_TOKEN_MONSTER,2000,2000,1,RACE_ZOMBIE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,12400020,0,TYPES_TOKEN_MONSTER,3000,3000,1,RACE_FIEND,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,12400020,0,TYPES_TOKEN_MONSTER,2000,2000,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,12400020) local token=Duel.CreateToken(tp,12400020)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e4) token:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
token:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e7)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
...@@ -206,7 +140,7 @@ end ...@@ -206,7 +140,7 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) return c:IsPreviousPosition(POS_FACEUP)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -234,7 +168,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -234,7 +168,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.spcon3(e,tp) function cm.spcon3(e,tp)
local c=e:GetLabelObject() local c=e:GetLabelObject()
return Duel.GetTurnPlayer()==tp and c:IsLocation(LOCATION_GRAVE) and Duel.GetTurnCount()~=e:GetValue() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetValue() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function cm.spop3(e,tp) function cm.spop3(e,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
--剪枝的罪人·玛伽崎耶
local s,id=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
--summon success
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.spcon1)
e1:SetCountLimit(1,id+10000)
e1:SetTarget(s.tg)
e1:SetOperation(s.regop)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.condition)
e2:SetTarget(s.tg2)
e2:SetOperation(s.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+20000)
e3:SetCondition(s.condition)
e3:SetTarget(s.tg3)
e3:SetOperation(s.op3)
c:RegisterEffect(e3)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x32a1)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
--
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.filter(c)
return c:IsSetCard(0x32a1) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function s.thfilter(c)
return c:IsSetCard(0x32a1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil)
if tg:GetCount()>0 and Duel.Overlay(c,tg)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
end
--
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_MAIN1 and ph<=PHASE_MAIN2
end
function s.w(c,e,tp)
return c:IsSetCard(0x32a1) and c:IsType(TYPE_MONSTER) and c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetOverlayGroup():Filter(s.w,nil,e,tp)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_OVERLAY)
end
function s.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabelObject(c)
local g=c:GetOverlayGroup():Filter(s.w,nil,e,tp)
if g:GetCount()>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
end
function s.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x32a1))
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(800)
Duel.RegisterEffect(e1,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DIRECT_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.detg)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function s.detg(e,c)
return c:IsFaceup() and c:IsSetCard(0x32a1)
end
--出航的罪人·巴巴洛斯
local s,id=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
c:EnableReviveLimit()
--Search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.thcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--control
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id+10000)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.exccon)
e1:SetCost(s.spcost)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.lcheck(g)
return g:IsExists(s.mfilter,1,nil)
end
function s.mfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
--
function s.rmfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(1-tp,1200,REASON_EFFECT)
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(400)
c:RegisterEffect(e1)
end
--
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtraAsCost() end
Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST)
end
function s.filter(c)
return c:IsControlerCanBeChanged()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and tc:IsControlerCanBeChanged() then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--结盟的罪人·艾尔拉德
local s,id=GetID()
function s.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.atkcost1)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop1)
c:RegisterEffect(e1)
--summon with s/t
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e11:SetTargetRange(0,LOCATION_MZONE)
e11:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e11)
--spsm
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(s.op)
c:RegisterEffect(e2)
end
function s.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x32a1)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
if Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function s.atkop1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
if Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetOperation(s.thop)
Duel.RegisterEffect(e2,tp)
end
function s.thfilter(c)
return c:IsFaceup() and ((c:IsType(TYPE_MONSTER) and c:IsLevelAbove(6)) or c:IsSetCard(0x32a1) )
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.Recover(tp,2000,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--叶脉舍弟头
local s,id=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.stcon)
e2:SetTarget(s.sttg)
e2:SetOperation(s.stop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.e3tg)
e3:SetOperation(s.e3op)
c:RegisterEffect(e3)
local e31=e3:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function s.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function s.stcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler()
end
function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
--
function s.e1tgfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x32a1) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingTarget(s.e1tgfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp)
end
function s.e1tgfilter2(c,code,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCode(code)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.e1tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.e1tgfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.e1tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.e1op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc0=Duel.GetFirstTarget()
local code=tc0:GetCode()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.e1tgfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,code,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc2=sg:GetFirst()
Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)
local g3=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil)
if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g3:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
\ No newline at end of file
--新芽组员
local s,id=GetID()
function s.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.effcon)
e1:SetTarget(s.efftg)
e1:SetOperation(s.effop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+10000)
e2:SetCondition(s.stcon)
e2:SetTarget(s.sttg)
e2:SetOperation(s.stop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+20000)
e3:SetCondition(s.condition)
e3:SetTarget(s.tg2)
e3:SetOperation(s.op2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x32a1) and c:IsRace(RACE_PLANT)
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.efftg(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 s.effop(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
end
--
function s.stcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler()
end
function s.thfilter(c)
return c:IsSetCard(0x32a1,0x52a1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
--
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_MAIN1 and ph<=PHASE_MAIN2
end
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsLevelBelow(2) and c:IsSetCard(0x32a1) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.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 s.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local g3=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil)
if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g3:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
\ No newline at end of file
--根际潜伏者
local s,id=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.stcon)
e2:SetTarget(s.sttg)
e2:SetOperation(s.stop)
c:RegisterEffect(e2)
--summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+10000)
e3:SetCondition(s.effcon)
e3:SetTarget(s.efftg)
e3:SetOperation(s.effop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function s.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function s.stcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler()
end
function s.sttg(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 s.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
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
end
--
function s.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x32a1) or (c:IsRace(RACE_PLANT) and c:IsType(TYPE_MONSTER)))
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.efftg(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 s.effop(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
end
\ No newline at end of file
...@@ -4,22 +4,12 @@ function s.initial_effect(c) ...@@ -4,22 +4,12 @@ function s.initial_effect(c)
c:EnableCounterPermit(0x2a1) c:EnableCounterPermit(0x2a1)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),3) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),3,99,s.lcheck)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetLabel(c:GetAttack())
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
--immune --immune
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
...@@ -33,6 +23,7 @@ function s.initial_effect(c) ...@@ -33,6 +23,7 @@ function s.initial_effect(c)
e5:SetCategory(CATEGORY_COUNTER+CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_COUNTER+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCountLimit(1,id)
e5:SetCondition(s.ctcon1) e5:SetCondition(s.ctcon1)
e5:SetTarget(s.cttg) e5:SetTarget(s.cttg)
e5:SetOperation(s.ctop) e5:SetOperation(s.ctop)
...@@ -42,13 +33,10 @@ function s.initial_effect(c) ...@@ -42,13 +33,10 @@ function s.initial_effect(c)
e6:SetCategory(CATEGORY_COUNTER) e6:SetCategory(CATEGORY_COUNTER)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_SUMMON_SUCCESS) e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e6:SetOperation(s.counter) e6:SetOperation(s.counter)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
--Destroy --Destroy
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(id,1)) e8:SetDescription(aux.Stringid(id,1))
...@@ -72,21 +60,22 @@ function s.initial_effect(c) ...@@ -72,21 +60,22 @@ function s.initial_effect(c)
e9:SetOperation(s.spop) e9:SetOperation(s.spop)
c:RegisterEffect(e9) c:RegisterEffect(e9)
end end
function s.efilter(e,te) function s.lcheck(g)
local ec=te:GetOwner() return g:IsExists(s.mfilter,1,nil)
return ec:GetAttack()<e:GetLabel() or ec:GetDefense()<e:GetLabel()
end end
function s.mfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
--
function s.efilter2(e,te) function s.efilter2(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner():IsRace(RACE_MACHINE) return not (te:IsActiveType(TYPE_MONSTER) and te:GetOwner():IsRace(RACE_MACHINE))
end end
--
function s.ctcon1(e,tp,eg,ep,ev,re,r,rp) function s.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function s.filter(c,e,tp,tc) function s.filter(c,e,tp,tc)
local lv=tc:GetMaterialCount() return c:IsLevelBelow(3) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevelBelow(lv) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -106,7 +95,17 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +95,17 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x2a1,e:GetHandler():GetMaterialCount()) e:GetHandler():AddCounter(0x2a1,e:GetHandler():GetMaterialCount())
end end
end end
--
function s.confil(c)
return c:GetSummonLocation()==LOCATION_EXTRA and c:IsRace(RACE_MACHINE)
end
function s.counter(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=eg:Filter(s.confil,nil):GetCount()
e:GetHandler():AddCounter(0x2a1,ct)
end
--
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x2a1,2,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x2a1,2,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
...@@ -178,14 +177,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -178,14 +177,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(800) e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(800) e2:SetValue(200)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
--忍·龙 五蕴盛苦
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.filter,2,true)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(s.con)
e0:SetOperation(s.op)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCost(s.rmcost)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
--add illusionist
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,id+10000)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.drcon1)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(s.drcon2)
c:RegisterEffect(e4)
end
function s.filter(c)
return c:IsFusionSetCard(0x3529) and c:IsType(TYPE_MONSTER)
end
--
function s.w(c)
return c:IsFusionSetCard(0x3529) and c:IsType(TYPE_MONSTER) and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
end
function s.con(e,c)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(s.w,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetControler()
local g=Duel.GetMatchingGroup(s.w,p,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local fg=g:Select(p,2,2,nil)
Duel.SendtoDeck(fg,nil,2,REASON_COST)
end
end
--
function s.cfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x3529) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(Card.IsAbleToRemove,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) end
end
--
function s.drcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.drcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and rc:IsSetCard(0x3529)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,LOCATION_DECK)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
if tc:IsLocation(LOCATION_EXTRA) and tc:GetControler()==tp then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--武装千金的大参谋
local s,id=GetID()
function s.initial_effect(c)
--extra summon
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetOperation(s.sumop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.target1)
e1:SetOperation(s.operation1)
c:RegisterEffect(e1)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.con4)
e4:SetOperation(s.op4)
c:RegisterEffect(e4)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.IsPlayerCanSummon(tp) or Duel.IsPlayerCanAdditionalSummon(tp)) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(s.estg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.estg(e,c)
return c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER+RACE_BEAST+RACE_BEASTWARRIOR)
end
--
function s.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then
return chkc:IsLocation(LOCATION_GRAVE) and s.filter1(chkc)
else
return true
end
end
local b1= Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 then
op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2),aux.Stringid(id,3))
else
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
end
function s.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
Duel.Recover(tp,800,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
if tc then
--extra attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
if e:GetLabel()==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
if tc then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(s.atkcon)
e3:SetOperation(s.atkop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
end
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsRelateToBattle()
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local dmg=c:GetAttack()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local atk=tc:GetAttack()
local def=tc:GetDefense()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-dmg)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-dmg)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if (tc:GetAttack()==0 and atk~=0) or (tc:GetDefense()==0 and def~=0) then
Duel.Destroy(tc,REASON_EFFECT)
end
tc=g:GetNext()
end
end
end
--
function s.con4(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsType(TYPE_SPELL) and rp==tp
end
function s.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetFlagEffect(id)
if ct%3==0 then
Duel.Recover(tp,400,REASON_EFFECT)
end
if ct%3==1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if ct%3==2 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(400)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end
end
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
end
\ No newline at end of file
--缘由之鬼 忍·鬼 铀
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x3529),aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),true)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(s.con)
e0:SetOperation(s.op)
c:RegisterEffect(e0)
--I came, this turn
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(s.regop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.rtcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--atk & def
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,id+10000)
e5:SetCondition(s.atkcon)
e5:SetTarget(s.atktg)
e5:SetOperation(s.atkop)
c:RegisterEffect(e5)
--add illusionist
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,id+20000)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.drcon1)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(s.drcon2)
c:RegisterEffect(e4)
end
function s.w(c,tp)
return c:IsSetCard(0x3529) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.w2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end
function s.w2(c)
return c:IsType(TYPE_EFFECT) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function s.con(e,c)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(s.w,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp)
end
function s.w3(c,g)
return c:IsSetCard(0x3529) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and g:IsExists(s.w4,1,c)
end
function s.w4(c)
return c:IsType(TYPE_EFFECT) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function s.check(g)
return g:IsExists(s.w3,1,nil,g)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetControler()
local g=Duel.GetMatchingGroup(s.w,p,LOCATION_HAND+LOCATION_MZONE,0,nil,tp)
local g2=Duel.GetMatchingGroup(s.w2,p,LOCATION_HAND+LOCATION_MZONE,0,nil)
g:Merge(g2)
if Duel.IsExistingMatchingCard(s.w,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:SelectSubGroup(tp,s.check,false,2,2)
Duel.SendtoGrave(g1,REASON_COST)
end
end
--
function s.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--
function s.rtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3529) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.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,s.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
end
--
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c==Duel.GetAttacker() or c==Duel.GetAttackTarget()
end
function s.filter3(c,e,tp)
return c:IsSetCard(0x3529) and c:IsType(TYPE_MONSTER) and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or c:IsAbleToGrave())
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.filter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local b2=c:IsAbleToGrave()
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==0) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
if c:IsRelateToBattle() and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
--
function s.drcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.drcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and rc:IsSetCard(0x3529)
end
function s.spfilter2(c,e,tp)
return c:IsSetCard(0x3529) and c:IsType(TYPE_MONSTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.drop(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,s.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--巨臂的裁决
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.ckfilter(c,code)
return c:IsType(TYPE_MONSTER) and c:IsOriginalCodeRule(code) and c:GetFlagEffect(id)==0
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsControler(tp) then
local tg=Duel.GetMatchingGroup(s.ckfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,nil,tc:GetCode())
local tc2=tg:GetFirst()
while tc2 do
tc2:RegisterFlagEffect(id,nil,0,0)
tc2=tg:GetNext()
end
end
tc=eg:GetNext()
end
end
--
function s.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.thfilter(c,tp)
return c:GetFlagEffect(id)>0 and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function s.thfilter2(c,code)
return c:IsCode(code) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.gck(c,tc)
return c:IsCode(tc:GetCode())
end
function s.activate(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,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local thg1=tg:RandomSelect(tp,1)
local tc1=thg1:GetFirst()
tg:Remove(s.gck,nil,tc1)
if tg:GetCount()>0 then
local thg2=tg:RandomSelect(tp,1)
thg1:Merge(thg2)
end
Duel.SendtoHand(thg1,nil,REASON_EFFECT)
end
end
end
--破灭之魂
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--spsummon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(s.spcon)
c:RegisterEffect(e2)
--
--remove
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCondition(s.effcon)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+10000)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(s.rmcon)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetTarget(s.rmtg)
e4:SetOperation(s.rmop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCountLimit(1,id+20000)
e5:SetCost(s.spcost)
e5:SetTarget(s.sptg)
e5:SetOperation(s.spop)
c:RegisterEffect(e5)
if not s.global_check_spsummoncount then
s.global_check_spsummoncount=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
--
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsPreviousLocation(LOCATION_GRAVE) and tc:IsControler(tp) then
Duel.RegisterFlagEffect(tp,id,0,0,0)
end
tc=eg:GetNext()
end
end
--
function s.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
return Duel.GetFlagEffect(tp,id)>=6
end
--
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)~=0
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--
function s.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,c,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,c)
local e2_4=Effect.CreateEffect(c)
e2_4:SetType(EFFECT_TYPE_SINGLE)
e2_4:SetCode(EFFECT_PUBLIC)
e2_4:SetReset(RESET_EVENT+RESETS_STANDARD)
sg:GetFirst():RegisterEffect(e2_4)
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,4,nil)
if not tc then return end
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.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
end
end
--世界是蓝色的研究室
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--atk&destory
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,4))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.atkcon1)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCondition(s.atkcon2)
c:RegisterEffect(e3)
end
function s.filter(c)
return aux.IsCodeListed(c,12400119) and c:IsAbleToHand()
end
function s.filter1(c,e,tp)
local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsSetCard(0x32a2)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_GRAVE,0,1,nil,tp,lv)
end
function s.filter2(c,tp,lv)
local rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_GRAVE,0,c)
return rlv>0 and c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,63)
end
function s.filter3(c)
return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
end
function s.filter4(c,e,tp)
local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsSetCard(0x32a2)
and Duel.IsExistingMatchingCard(s.filter5,tp,LOCATION_HAND,0,1,nil,tp,lv)
end
function s.filter5(c,tp,lv)
local rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(s.filter6,tp,LOCATION_HAND,0,c)
return rlv>0 and c:IsType(TYPE_TUNER) and c:IsAbleToGrave()
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,63)
end
function s.filter6(c)
return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
local b1=g:GetCount()>0
local b2=aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
local b3=aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.IsExistingMatchingCard(s.filter4,tp,LOCATION_EXTRA,0,1,nil,e,tp)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(id,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(id,2)
opval[off-1]=3
off=off+1
end
ops[off]=aux.Stringid(id,3)
opval[off-1]=4
off=off+1
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=g:Select(tp,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
elseif opval[op]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local lv=g1:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_GRAVE,0,1,1,nil,tp,lv)
local rlv=lv-g2:GetFirst():GetLevel()
local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_GRAVE,0,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,63)
g2:Merge(g3)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
g1:GetFirst():SetMaterial(nil)
Duel.SpecialSummon(g1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
g1:GetFirst():CompleteProcedure()
elseif opval[op]==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,s.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local lv=g1:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,s.filter5,tp,LOCATION_HAND,0,1,1,nil,tp,lv)
local rlv=lv-g2:GetFirst():GetLevel()
local rg=Duel.GetMatchingGroup(s.filter6,tp,LOCATION_HAND,0,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,63)
g2:Merge(g3)
Duel.SendtoGrave(g2,REASON_EFFECT)
g1:GetFirst():SetMaterial(nil)
Duel.SpecialSummon(g1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
g1:GetFirst():CompleteProcedure()
end
end
function s.cfilter(c,tp,sumt)
return c:IsFaceup() and c:IsSetCard(0x32a2) and c:GetSummonPlayer()==tp
end
function s.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp,SUMMON_TYPE_SPECIAL)
end
function s.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and aux.IsCodeListed(rc,12400119) and (re:GetActiveType(TYPE_SPELL) or re:GetActiveType(TYPE_TRAP))
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.efilter)
e1:SetValue(500)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function s.efilter(e,c)
return c:IsSetCard(0x32a2) and c:IsFaceup()
end
\ No newline at end of file
--使乐园陷落的好奇心 艾娃
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),nil,s.mfilter,0,99)
c:EnableReviveLimit()
--change name
aux.EnableChangeCode(c,12400114,LOCATION_MZONE+LOCATION_GRAVE)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(1131)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.discon)
e2:SetCountLimit(1,id+30000)
e2:SetCost(s.discost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
end
function s.mfilter(c,syncard)
return c:IsTuner(syncard) or (c:IsNotTuner(syncard) and c:IsType(TYPE_SYNCHRO))
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x62a2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
end
function s.cfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_SZONE,0)
if g:GetCount()<2 or g:GetClassCount(Card.GetOriginalCodeRule)<2 then
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
else
return ep~=tp and Duel.IsChainDisablable(ev)
end
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--受囚的过去
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCondition(s.cpcon)
e2:SetTarget(s.cptg)
e2:SetOperation(s.cpop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.thfilter(c)
if not (aux.IsCodeListed(c,12400119) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,0))
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
end
end
function s.cfilter(c,tp,sumt)
return c:IsFaceup() and c:IsSetCard(0x32a2) and c:GetSummonPlayer()==tp
end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp,SUMMON_TYPE_SPECIAL)
end
function s.cpfilter(c)
if not (aux.IsCodeListed(c,12400119) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function s.cpfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.IsCodeListed(c,12400119)
and c:CheckActivateEffect(true,true,false)~=nil and c:IsFaceup()
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cpfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,0))
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.cpfilter),tp,LOCATION_GRAVE,0,1,1,c)
local tc=g:GetFirst()
local x=0
if tc then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
if Duel.IsExistingMatchingCard(s.cpfilter2,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) and c:IsAbleToRemove() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,s.cpfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=sg:GetFirst():CheckActivateEffect(false,true,true)
if not te then return false end
local tg=te:GetTarget()
if tg and not tg(e,tp,ceg,cep,cev,cre,cr,crp,0) then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--MOB·审查怪兽 伊米古拉
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--sp
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(1118)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(s.sptg2)
e2:SetCountLimit(1,id+30000)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,id+50000)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(s.thcon)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsPublic() and aux.IsCodeListed(c,12400119)
end
function s.confilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,12400119)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_SZONE,0,1,nil)
if chk==0 then return b1 or b2 end
if b1 then
if b2 and not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
function s.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 s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.spfilter(c,e,tp)
return aux.IsCodeListed(c,12400119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(e:GetHandler(),1) or c:IsLocation(LOCATION_DECK))
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop2(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,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsPreviousLocation(LOCATION_HAND)
and tc:IsLocation(LOCATION_MZONE) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function s.thfilter(c)
if not (aux.IsCodeListed(c,12400119) and c:IsType(TYPE_SPELL+TYPE_TRAP)) then return false end
return c:IsAbleToHand() or c:IsSSetable()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,0))
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
local te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) and te then
local tg=te:GetTarget()
if tg and not tg(e,tp,ceg,cep,cev,cre,cr,crp,0) then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
end
end
\ No newline at end of file
--拒绝飞鹰
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(1108)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,id+30000)
e4:SetCondition(s.condition)
e4:SetTarget(s.target)
e4:SetOperation(s.operation)
c:RegisterEffect(e4)
--copy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,id+50000)
e5:SetCondition(s.cpcon1)
e5:SetTarget(s.cptg)
e5:SetOperation(s.cpop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCondition(s.cpcon2)
c:RegisterEffect(e6)
end
function s.spfilter(c,e,tp)
return aux.IsCodeListed(c,12400119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
end
function s.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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,g)
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.spcfilter(c)
return c:IsSetCard(0x32a2) and c:IsFaceup()
end
function s.cpcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.cpcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.cpfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.IsCodeListed(c,12400119)
and c:CheckActivateEffect(true,true,false)~=nil and c:IsFaceup()
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_SZONE,0,1,nil)
and c:IsAbleToRemove() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_SZONE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
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 s.cpop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local te=e:GetLabelObject()
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED) then
if tc and tc:IsRelateToEffect(e) and te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
end
end
\ No newline at end of file
--猛黑炎之大剑 奥布斯克迪特
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1190)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetDescription(1118)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetCountLimit(1,id+30000)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+50000)
e3:SetCost(s.macost)
e3:SetTarget(s.matg)
e3:SetOperation(s.maop)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return aux.IsCodeListed(c,12400119) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
function s.cfilter(c)
return c:IsSetCard(0x32a2) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.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 s.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
end
function s.macfilter(c)
return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:IsType(TYPE_XYZ) and c:IsFaceup()
end
function s.cpfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.IsCodeListed(c,12400119)
and c:CheckActivateEffect(true,true,false)~=nil
end
function s.macost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function s.matg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.macfilter,tp,LOCATION_MZONE,0,1,1,nil) and c:IsCanOverlay() end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local sg=Duel.SelectMatchingCard(tp,s.macfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=sg:GetFirst()
Duel.SetTargetCard(tc)
tc:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.maop(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 not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
if tc:IsSetCard(0x62a2) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
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)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(tc:GetDefense()*2)
tc:RegisterEffect(e2)
end
end
end
\ No newline at end of file
--MOB·电波怪兽 维比洛斯
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--hand synchro
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetValue(s.matval)
c:RegisterEffect(e1)
--search&set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+30000)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--tohand&set
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,id+50000)
e5:SetCondition(s.con1)
e5:SetTarget(s.thtg2)
e5:SetOperation(s.thop2)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCondition(s.con2)
c:RegisterEffect(e6)
end
function s.matval(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x32a2)
end
function s.thfilter(c)
return c:IsAbleToHand() and aux.IsCodeListed(c,12400119) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.setfilter(c)
return c:IsSSetable() and aux.IsCodeListed(c,12400119) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local b1=#g>0
local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND,0,1,nil)
if chk==0 then return b1 or b2 end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local b1=#g>0
local b2=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND,0,1,nil)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(id,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=g:Select(tp,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
elseif opval[op]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=sg:GetFirst()
Duel.SSet(tp,tc,tp,false)
local te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(false,true,true)
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) and te and Duel.IsPlayerCanDraw(tp,1) then
local tg=te:GetTarget()
if tg and not tg(e,tp,ceg,cep,cev,cre,cr,crp,0) then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function s.spcfilter(c)
return c:IsSetCard(0x32a2) and c:IsFaceup()
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.thfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.IsCodeListed(c,12400119)
and (c:IsAbleToHand() or c:IsSSetable())
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil)
and c:IsAbleToRemove() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if tc:IsAbleToHand() and (not tc:IsSSetable() or Duel.SelectOption(tp,1190,1153)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
Duel.BreakEffect()
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--智慧之泉 艾娃
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),nil,s.mfilter,0,99)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--activate from hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.hfilter)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetCondition(s.condition)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(1118)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.spcon)
e4:SetCountLimit(1,id+30000)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.hfilter(e,c)
return aux.IsCodeListed(c,12400119)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function s.mfilter(c,syncard)
return c:IsTuner(syncard) or (c:IsNotTuner(syncard) and c:IsType(TYPE_SYNCHRO))
end
function s.target(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 s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) 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)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
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
Duel.AdjustInstantly()
if not tc:IsImmuneToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
function s.spcon(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 s.spfilter(c,e,tp)
return c:IsSetCard(0x62a2) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
--现在开始才是实验的成果
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12400119)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCost(s.cost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.filter1(c)
return c:IsSetCard(0x32a2) and c:IsFaceup()
end
function s.filter2(c)
return c:IsSetCard(0x62a2) and c:IsFaceup()
end
function s.ptfilter(e,c)
local tp=e:GetHandlerPlayer()
return c:IsSetCard(0x62a2) and c:IsFaceup() and c:GetControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local b1=true
local b2=(Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil) or
Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil)) and #g>0
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(id,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
opval[off-1]=2
off=off+1
end
ops[off]=aux.Stringid(id,2)
opval[off-1]=3
off=off+1
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(s.ptfilter)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.ptfilter)
e2:SetValue(aux.indoval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.ptfilter)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_RELEASE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,1)
e4:SetTarget(s.ptfilter)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(s.ptfilter)
e6:SetReset(RESET_PHASE+PHASE_END)
e6:SetValue(1)
Duel.RegisterEffect(e6,tp)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(s.ptfilter)
e7:SetReset(RESET_PHASE+PHASE_END)
e7:SetValue(1)
Duel.RegisterEffect(e7,tp)
elseif opval[op]==2 then
local b3=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil)
local b4=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil)
if (b3 and not b4) or (b4 and not b3) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)==0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
elseif b3 and b4 then
if Duel.Destroy(g,REASON_EFFECT)==0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
function s.cfilter(c,ec)
return c:IsAbleToGraveAsCost()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.thfilter(c)
return c:IsFaceupEx() and aux.IsCodeListed(c,12400119) and (c:IsAbleToHand() or c:IsAbleToDeck())
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=sg:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToDeck() or Duel.SelectYesNo(tp,aux.Stringid(id,5))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK)
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
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.
--奔流能量的研究
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.mtg)
e2:SetOperation(s.mop)
c:RegisterEffect(e2)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x52a2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.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,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.mfilter(c,tp)
return c:IsSetCard(0x52a2) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.mtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.mfilter(chkc,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(s.mfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.mfilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
function s.mop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if aux.NecroValleyFilter()(tc) and tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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