Commit f73f7cd1 authored by Momobako's avatar Momobako

Push by Appveyor

parent a6d12e9a
No preview for this file type
No preview for this file type
--食腐鼠 --食腐鼠
function c10113017.initial_effect(c) function c10113017.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10113017,0)) e1:SetDescription(aux.Stringid(10113017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,10113017) e1:SetCountLimit(1,10113017)
e1:SetCost(c10113017.cost) e1:SetCost(c10113017.cost)
e1:SetTarget(c10113017.target) e1:SetTarget(c10113017.target)
e1:SetOperation(c10113017.operation) e1:SetOperation(c10113017.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10113017,1)) e2:SetDescription(aux.Stringid(10113017,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCost(c10113017.drcost) e2:SetCost(c10113017.drcost)
e2:SetTarget(c10113017.drtg) e2:SetTarget(c10113017.drtg)
e2:SetOperation(c10113017.drop) e2:SetOperation(c10113017.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10113017.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c10113017.drop(e,tp,eg,ep,ev,re,r,rp) function c10113017.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c10113017.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10113017.dcfilter,tp,LOCATION_REMOVED,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c10113017.dcfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,c10113017.dcfilter,tp,LOCATION_REMOVED,0,2,2,nil) local rg=Duel.SelectMatchingCard(tp,c10113017.dcfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(rg,nil,2,REASON_COST) Duel.SendtoDeck(rg,nil,2,REASON_COST)
end end
function c10113017.dcfilter(c) function c10113017.dcfilter(c)
return c:IsCode(10113017) and c:IsAbleToDeckAsCost() and c:IsFaceup() return c:IsCode(10113017) and c:IsAbleToDeckAsCost() and c:IsFaceup()
end end
function c10113017.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
return true return true
end end
function c10113017.cfilter(c,e,tp) function c10113017.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c10113017.cfilter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c) return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c10113017.cfilter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c)
end end
function c10113017.cfilter2(c,e,tp,rc) function c10113017.cfilter2(c,e,tp,rc)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c10113017.filter,tp,0x13,0,1,c,e,tp,rc) return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c10113017.filter,tp,0x13,0,1,c,e,tp,rc)
end end
function c10113017.filter(c,e,sp,rc) function c10113017.filter(c,e,sp,rc)
return c:IsCode(10113017) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and c~=rc return c:IsCode(10113017) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and c~=rc
end end
function c10113017.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c10113017.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(c10113017.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
e:SetLabel(0) e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c10113017.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local rg=Duel.SelectMatchingCard(tp,c10113017.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local rg2=Duel.SelectMatchingCard(tp,c10113017.cfilter2,tp,LOCATION_GRAVE,0,1,1,rg:GetFirst(),e,tp,rg:GetFirst()) local rg2=Duel.SelectMatchingCard(tp,c10113017.cfilter2,tp,LOCATION_GRAVE,0,1,1,rg:GetFirst(),e,tp,rg:GetFirst())
rg:Merge(rg2) rg:Merge(rg2)
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end end
function c10113017.operation(e,tp,eg,ep,ev,re,r,rp) function c10113017.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10113017.filter),tp,0x13,0,1,1,nil,e,tp,nil) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10113017.filter),tp,0x13,0,1,1,nil,e,tp,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -61,15 +61,30 @@ function c10116004.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,15 +61,30 @@ function c10116004.activate(e,tp,eg,ep,ev,re,r,rp)
g=Duel.SelectMatchingCard(tp,c10116004.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) g=Duel.SelectMatchingCard(tp,c10116004.spfilter,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 and Duel.SelectYesNo(tp,aux.Stringid(10116004,3)) then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(10116004,3)) then
Duel.BreakEffect() Duel.BreakEffect()
local e1=Effect.CreateEffect(g:GetFirst()) local tc=g:GetFirst()
e1:SetType(EFFECT_TYPE_SINGLE) local fid=tc:GetFieldID()
e1:SetCode(EFFECT_CANNOT_TRIGGER) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetTarget(c10116004.actg)
e1:SetValue(c10116004.aclimit) e1:SetValue(c10116004.aclimit)
g:GetFirst():RegisterEffect(e1,true) Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(10116004,RESET_EVENT+0x1fe0000,0,1,fid)
end end
end end
end end
function c10116004.actg(e,c)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(10116004)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c10116004.aclimit(e,re,tp) function c10116004.aclimit(e,re,tp)
return re:GetCode()==EVENT_SPSUMMON_SUCCESS and not re:GetHandler():IsImmuneToEffect(e) return re:GetCode()==EVENT_SPSUMMON_SUCCESS and not re:GetHandler():IsImmuneToEffect(e)
end end
\ No newline at end of file
...@@ -66,16 +66,17 @@ end ...@@ -66,16 +66,17 @@ end
function c10173052.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10173052.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local mg1=Duel.GetMatchingGroup(c10173052.filter0,tp,LOCATION_GRAVE,0,c) local chkf=tp
local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local mg1=Duel.GetMatchingGroup(c10173052.filter0,tp,LOCATION_GRAVE,0,nil)
and Duel.IsExistingMatchingCard(c10173052.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c) local res=Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c10173052.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c10173052.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c) res=Duel.IsExistingMatchingCard(c10173052.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end end
end end
return res return res
...@@ -84,9 +85,10 @@ function c10173052.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,9 +85,10 @@ function c10173052.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c10173052.spop(e,tp,eg,ep,ev,re,r,rp) function c10173052.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c10173052.filter1,tp,LOCATION_GRAVE,0,c,e) local mg1=Duel.GetMatchingGroup(c10173052.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c10173052.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c) local sg1=Duel.GetMatchingGroup(c10173052.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -94,25 +96,25 @@ function c10173052.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,25 +96,25 @@ function c10173052.spop(e,tp,eg,ep,ev,re,r,rp)
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c10173052.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c) sg2=Duel.GetMatchingGroup(c10173052.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end end
if (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then if (Duel.GetLocationCountFromEx(tp)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
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()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
\ No newline at end of file
...@@ -58,7 +58,7 @@ function c10173053.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,7 +58,7 @@ function c10173053.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=eg:Filter(Card.IsControler,nil,tp) local g=eg:Filter(Card.IsControler,nil,tp)
if g:GetCount()==0 then return false end if g:GetCount()==0 then return false end
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=tp
local res=Duel.IsExistingMatchingCard(c10173053.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g,nil,chkf) local res=Duel.IsExistingMatchingCard(c10173053.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -78,7 +78,7 @@ function c10173053.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c10173053.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=eg:Filter(c10173053.cfilter,nil,tp,e) local g=eg:Filter(c10173053.cfilter,nil,tp,e)
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or g:GetCount()<=0 then return end if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or g:GetCount()<=0 then return end
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=tp
local sg1=Duel.GetMatchingGroup(c10173053.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,g,nil,chkf) local sg1=Duel.GetMatchingGroup(c10173053.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,g,nil,chkf)
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
......
--超能回弹士
function c10173055.initial_effect(c)
c:EnableReviveLimit()
--fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c10173055.fscon)
e1:SetOperation(c10173055.fsop)
c:RegisterEffect(e1)
--rjp
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_SEND_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c10173055.reptg)
e2:SetOperation(c10173055.repop)
c:RegisterEffect(e2)
--back
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_REMOVE)
e3:SetCondition(c10173055.tfcon)
e3:SetOperation(c10173055.tfop)
c:RegisterEffect(e3)
e3:SetLabelObject(e2)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetDescription(aux.Stringid(10173055,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetTarget(c10173055.tdtg)
e4:SetOperation(c10173055.tdop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_CUSTOM+10173055)
c:RegisterEffect(e5)
end
function c10173055.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c10173055.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c10173055.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c10173055.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g,re=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS,CHAININFO_TRIGGERING_EFFECT)
if chk==0 then return c:IsFaceup() and c:GetReasonPlayer()~=tp and (not re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not g:IsContains(c)) end
return true
end
function c10173055.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_REDIRECT+REASON_TEMPORARY+REASON_EFFECT)
end
function c10173055.tfcon(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetLabelObject()==re
end
function c10173055.tfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,10173055)
if Duel.ReturnToField(c,POS_FACEUP_DEFENSE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+10173055,e,0,tp,0,0)
end
end
function c10173055.ffilter(c,fc)
return not c:IsHasEffect(6205579) and c:IsCanBeFusionMaterial(fc)
end
function c10173055.ffilter2(c,mg)
return mg:IsExists(c10173055.ffilter3,1,c,c)
end
function c10173055.ffilter3(c,rc)
local att=0
local catt=1
for iatt=0,7 do
if c:IsFusionAttribute(catt) and rc:IsFusionAttribute(catt) then
return true
end
catt=catt*2
end
return false
end
function c10173055.fscon(e,g,gc,chkf)
if g==nil then return true end
local mg=g:Filter(c10173055.ffilter,nil,e:GetHandler())
if gc then
mg:AddCard(gc)
return c10173055.ffilter(gc,e:GetHandler()) and mg:IsExists(c10173055.ffilter2,1,nil,mg)
end
local fs=false
if mg:IsExists(aux.FConditionCheckF,1,nil,chkf) then fs=true end
return mg:IsExists(c10173055.ffilter2,1,nil,mg) and (fs or chkf==PLAYER_NONE)
end
function c10173055.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local sg=eg:Filter(c10173055.ffilter,gc,e:GetHandler())
if gc then
sg=sg:Filter(c10173055.ffilter3,gc,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=sg:Select(tp,1,1,nil)
Duel.SetFusionMaterial(g)
return
end
local tc=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if chkf~=PLAYER_NONE then tc=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf):GetFirst()
else tc=sg:Select(tp,1,1,nil):GetFirst()
end
sg=sg:Filter(c10173055.ffilter3,tc,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=sg:Select(tp,1,1,nil)
g:AddCard(tc)
Duel.SetFusionMaterial(g)
end
\ No newline at end of file
--恶作剧明星导演
function c10173057.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa332),aux.FilterBoolFunction(Card.IsLevelBelow,4),true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10173057,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10173057)
e1:SetCost(c10173057.tkcost)
e1:SetTarget(c10173057.tktg)
e1:SetOperation(c10173057.tkop)
c:RegisterEffect(e1)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10173057,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c10173057.adtg)
e1:SetOperation(c10173057.adop)
c:RegisterEffect(e1)
end
function c10173057.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c10173057.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
if tc:IsType(TYPE_TRAPMONSTER) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e4:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e4)
end
end
end
function c10173057.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c10173057.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c10173057.costfilter,1,nil) end
local tc=Duel.SelectReleaseGroup(tp,c10173057.costfilter,1,1,nil):GetFirst()
Duel.Release(tc,REASON_COST)
if tc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetTarget(c10173057.fustg)
e1:SetOperation(c10173057.fusop)
tc:RegisterEffect(e1)
end
end
function c10173057.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1
and Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c10173057.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,35268888,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,35268888)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
function c10173057.ffilter(c,fc)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc) and c:IsAbleToGrave()
end
function c10173057.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg1=Duel.GetMatchingGroup(c10173057.ffilter,tp,LOCATION_DECK,0,nil,c)
local res=c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(mg1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(mg2) and (not mf or mf(c))
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_GRAVE)
end
function c10173057.fusop(e,tp,eg,ep,ev,re,r,rp)
local ce,c,mg1,mg2=Duel.GetChainMaterial(tp),e:GetHandler(),Duel.GetMatchingGroup(c10173057.ffilter,tp,LOCATION_DECK,0,nil)
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local res=c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(mg1)
local res2=false
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res2=c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(mg2) and (not mf or mf(c))
end
if res or res2 then
if res and (not res2 or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,c,mg1)
c:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(c,SUMMON_TYPE_FUSION,tp,tp,false,true,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,c,mg2)
local fop=ce:GetOperation()
fop(ce,e,tp,c,mat2)
end
c:CompleteProcedure()
end
end
\ No newline at end of file
--融合大贤者
function c10173058.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(10173058,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,10173058)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCost(c10173058.cost)
e1:SetTarget(c10173058.target)
e1:SetOperation(c10173058.operation)
c:RegisterEffect(e1)
--spsummonself
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10173058,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,10173158)
e2:SetCondition(c10173058.spcon)
e2:SetTarget(c10173058.sptg)
e2:SetOperation(c10173058.spop)
c:RegisterEffect(e2)
end
function c10173058.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10173058.cfilter,1,nil)
end
function c10173058.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function c10173058.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 c10173058.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_HAND)
c:RegisterEffect(e1,true)
end
end
function c10173058.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10173058.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10173058.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c10173058.spfilter(c,tp)
return c:IsCode(24094653) and Duel.IsPlayerCanSpecialSummonMonster(tp,24094653,0x46,0x11,0,0,1,RACE_FIEND,ATTRIBUTE_DARK)
end
function c10173058.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10173058.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if not tc then return end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_FIEND)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetValue(0)
tc:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(0)
tc:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(1)
tc:RegisterEffect(e6,true)
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_HAND)
tc:RegisterEffect(e1,true)
end
end
--连接融合者
function c10173059.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10173059,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10173059)
e1:SetTarget(c10173059.target)
e1:SetOperation(c10173059.operation)
c:RegisterEffect(e1)
--Fusion
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetDescription(aux.Stringid(10173059,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c10173059.fustg)
e2:SetOperation(c10173059.fusop)
c:RegisterEffect(e2)
end
function c10173059.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c10173059.filter2(c,e,tp,m,f,chkf,zone)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEUP,tp,zone) and c:CheckFusionMaterial(m,nil,chkf)
end
function c10173059.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):RemoveCard(e:GetHandler())
local res=Duel.IsExistingMatchingCard(c10173059.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf,zone)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c10173059.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf,zone)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c10173059.fusop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone()
if zone==0 then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c10173059.filter1,e:GetHandler(),e)
local sg1=Duel.GetMatchingGroup(c10173059.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf,zone)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c10173059.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf,zone)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c10173059.filter(c,e,tp,zone)
return bit.band(c:GetReason(),0x40008)==0x40008 and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and zone~=0)))
end
function c10173059.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c10173059.filter(chkc,e,tp,e:GetHandler():GetLinkedZone()) end
if chk==0 then return Duel.IsExistingTarget(c10173059.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,e:GetHandler():GetLinkedZone()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10173059.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,e:GetHandler():GetLinkedZone())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c10173059.operation(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if zone>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and (not tc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(10173059,2))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--普通的少女 美树沙耶加
function c11200001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,11200001)
e1:SetCost(c11200001.thcost)
e1:SetTarget(c11200001.thtg)
e1:SetOperation(c11200001.thop)
c:RegisterEffect(e1)
--lpcost replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetDescription(aux.Stringid(11200001,0))
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_LPCOST_REPLACE)
e2:SetCondition(c11200001.lrcon)
e2:SetOperation(c11200001.lrop)
c:RegisterEffect(e2)
end
--
function c11200001.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c11200001.filter(c)
return c11200001.mfilter(c) and c:IsAbleToHand()
end
function c11200001.mfilter(c)
return c:IsSetCard(0x134) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_RITUAL)
end
function c11200001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11200001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200001.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c11200001.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
local lp=Duel.GetLP(ep)
if lp<=ev then return false end
if not re then return false end
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSetCard(0x134) and e:GetHandler():IsAbleToRemoveAsCost()
end
function c11200001.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--盲目的恋情 美树沙耶加
function c11200002.initial_effect(c)
--material
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200002)
e1:SetCost(c11200002.cost)
e1:SetOperation(c11200002.op)
c:RegisterEffect(e1)
--lpcost replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetDescription(aux.Stringid(11200002,0))
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_LPCOST_REPLACE)
e2:SetCondition(c11200002.lrcon)
e2:SetOperation(c11200002.lrop)
c:RegisterEffect(e2)
end
function c11200002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c11200002.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200002,RESET_PHASE+PHASE_END,0,1)
end
function c11200002.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
local lp=Duel.GetLP(ep)
if lp<=ev then return false end
if not re then return false end
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSetCard(0x134) and e:GetHandler():IsAbleToRemoveAsCost()
end
function c11200002.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--动摇的心境 美树沙耶加
function c11200003.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,11200003)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c11200003.tgcon)
e1:SetTarget(c11200003.tgtg)
e1:SetOperation(c11200003.tgop)
c:RegisterEffect(e1)
--lpcost replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetDescription(aux.Stringid(11200003,0))
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_LPCOST_REPLACE)
e2:SetCondition(c11200003.lrcon)
e2:SetOperation(c11200003.lrop)
c:RegisterEffect(e2)
end
--
function c11200003.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c11200003.tgfilter(c)
return c:IsSetCard(0x134) and c:IsAbleToGrave()
end
function c11200003.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200003.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c11200003.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11200003.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--
function c11200003.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
local lp=Duel.GetLP(ep)
if lp<=ev then return false end
if not re then return false end
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSetCard(0x134) and e:GetHandler():IsAbleToRemoveAsCost()
end
function c11200003.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--治愈的魔法使 美树沙耶加
function c11200004.initial_effect(c)
c:EnableReviveLimit()
--fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c11200004.fuscon)
e1:SetOperation(c11200004.fusop)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200004,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,11200004)
e2:SetCost(c11200004.cost)
e2:SetTarget(c11200004.tg)
e2:SetOperation(c11200004.op)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetDescription(aux.Stringid(11200004,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,11200004)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c11200004.con)
e3:SetCost(c11200004.cost2)
e3:SetTarget(c11200004.tdtg)
e3:SetOperation(c11200004.tdop)
c:RegisterEffect(e3)
--return
local e4=e3:Clone()
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e4:SetDescription(aux.Stringid(11200004,2))
e4:SetTarget(c11200004.retg)
e4:SetOperation(c11200004.reop)
c:RegisterEffect(e4)
end
function c11200004.ffilter(c,fc)
return c11200004.ffilter1(c,fc) or c11200004.ffilter2(c,fc)
end
function c11200004.ffilter1(c,fc)
return c:IsFusionSetCard(0x134) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200004.ffilter2(c,fc)
return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200004.spfilter1(c,tp,mg,fc)
return mg:IsExists(c11200004.spfilter2,1,c,tp,c,fc)
end
function c11200004.spfilter2(c,tp,mc,fc)
return ((c11200004.ffilter1(c,fc) and c11200004.ffilter2(mc,fc))
or (c11200004.ffilter2(c,fc) and c11200004.ffilter1(mc,fc)))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200004.fuscon(e,g,gc,chkf)
if g==nil then return true end
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local mg=g:Filter(c11200004.ffilter,nil,c)
local mg1=g:Filter(c11200004.ffilter1,nil,c)
local mg2=g:Filter(c11200004.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200004.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200004.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200004.ffilter2,tp,LOCATION_DECK,0,nil,c)
if gc then
if not mg1:IsContains(gc) and not mg2:IsContains(gc) then return false end
if Duel.GetFlagEffect(tp,11200002)~=0 then
return mg:IsExists(c11200004.spfilter2,1,gc,tp,gc,c) or tg:IsExists(c11200004.spfilter2,1,gc,tp,gc,c)
else
return mg:IsExists(c11200004.spfilter2,gc,tp,gc,c)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()==0 and
mg2:GetCount()~=0 then
return tg1:IsExists(c11200004.spfilter1,1,nil,tp,mg2,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and
mg1:GetCount()~=0 then
return tg2:IsExists(c11200004.spfilter1,1,nil,tp,mg1,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
return tg:IsExists(c11200004.spfilter1,1,nil,tp,mg,c)
else
return mg:IsExists(c11200004.spfilter1,1,nil,tp,mg,c)
end
end
function c11200004.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c11200004.ffilter,nil,c)
local mg1=eg:Filter(c11200004.ffilter1,nil,c)
local mg2=eg:Filter(c11200004.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200004.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200004.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200004.ffilter2,tp,LOCATION_DECK,0,nil,c)
local g=nil
local sg
if gc then
g=Group.FromCards(gc)
mg:RemoveCard(gc)
else
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()~=0 and
mg2:GetCount()~=0 and tg:GetCount()>0 and mg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and mg1:GetCount()~=0 and tg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg2:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg1,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()~=0 and mg1:GetCount()==0 and tg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg1:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg2,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg,c)
mg:Sub(g)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=tg:FilterSelect(tp,c11200004.spfilter2,1,1,nil,tp,g:GetFirst(),c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:FilterSelect(tp,c11200004.spfilter2,1,1,nil,tp,g:GetFirst(),c)
end
g:Merge(sg)
Duel.SetFusionMaterial(g)
end
function c11200004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200004.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c11200004.op(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.GetLP(p)<Duel.GetLP(1-p) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c11200004.con(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e)
end
function c11200004.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c11200004.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,e:GetHandler()) and e:GetHandler():IsAbleToDeck() end
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,3,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c11200004.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==tg:GetCount() and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(sg,REASON_EFFECT+REASON_RETURN)
end
end
function c11200004.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED+LOCATION_GRAVE ,LOCATION_REMOVED+LOCATION_GRAVE,1,e:GetHandler())
and e:GetHandler():IsAbleToRemove() end
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED+LOCATION_GRAVE ,LOCATION_REMOVED+LOCATION_GRAVE,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c11200004.reop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==tg:GetCount() and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
--正义的伙伴 美树沙耶加
function c11200005.initial_effect(c)
aux.AddXyzProcedure(c,nil,8,2,c11200005.ovfilter,aux.Stringid(11200005,0),2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200005,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e1:SetCondition(c11200005.atkcon)
e1:SetCost(c11200005.cost)
e1:SetTarget(c11200005.atktg)
e1:SetOperation(c11200005.atkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200005,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCost(c11200005.cost)
e2:SetTarget(c11200005.distg)
e2:SetOperation(c11200005.disop)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(11200005,3))
e3:SetRange(LOCATION_GRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCountLimit(1,11200005)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c11200005.descon)
e3:SetCost(c11200005.descost)
e3:SetTarget(c11200005.destg)
e3:SetOperation(c11200005.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetRange(LOCATION_GRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c11200005.flcon)
e4:SetOperation(c11200005.flop)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetCondition(c11200005.descon2)
c:RegisterEffect(e5)
end
function c11200005.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x134) and c:IsType(TYPE_FUSION)
end
function c11200005.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c11200005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c11200005.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c11200005.atkop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if tg:GetCount()<=0 then return end
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=tg:GetNext()
end
end
function c11200005.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c11200005.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200005.disfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c11200005.disfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c11200005.disop(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetMatchingGroup(c11200005.disfilter,tp,0,LOCATION_MZONE,nil)
if og:GetCount()==0 then return end
local mg,matk=og:GetMaxGroup(Card.GetAttack)
Duel.NegateRelatedChain(mg:GetFirst(),RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
mg:GetFirst():RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
mg:GetFirst():RegisterEffect(e2)
end
function c11200005.descon(e,tp,eg,ep,ev,re,r,rp)
return Dulel.GetFlagEffect(tp,11200005)>0
end
function c11200005.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c11200005.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c11200005.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x134) and c:IsType(TYPE_MONSTER)
end
function c11200005.flcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c11200005.desfilter,1,nil)
end
function c11200005.flop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200005,RESET_EVENT+0xfe0000+RESET_CHAIN,0,1)
end
function c11200005.descon2(e,tp,eg,ep,ev,re,r,rp)
if tp==Duel.GetTurnPlayer() then return false end
local tc=Duel.GetAttackTarget()
return tc and tc:IsFaceup() and tc:IsSetCard(0x134)
end
\ No newline at end of file
--魔法与奇迹的代价 美树沙耶加
function c11200006.initial_effect(c)
--fusion material
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_FUSION_MATERIAL)
e0:SetCondition(c11200006.fuscon)
e0:SetOperation(c11200006.fusop)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c11200006.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11200006.spcon)
e2:SetOperation(c11200006.spop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11200006,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1)
e3:SetCost(c11200006.cost)
e3:SetTarget(c11200006.tg)
e3:SetOperation(c11200006.op)
c:RegisterEffect(e3)
--sp
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SPSUMMON_PROC)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,11200006)
e4:SetCondition(c11200006.recon)
e4:SetOperation(c11200006.reop)
c:RegisterEffect(e4)
end
function c11200006.ffilter(c,fc)
return c11200006.ffilter1(c,fc) or c11200006.ffilter2(c,fc)
end
function c11200006.ffilter1(c,fc)
return c:IsFusionSetCard(0x134) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200006.ffilter2(c,fc)
return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200006.spfilter1(c,tp,mg,fc)
return mg:IsExists(c11200006.spfilter2,1,c,tp,c,fc)
end
function c11200006.spfilter2(c,tp,mc,fc)
return ((c11200006.ffilter1(c,fc) and c11200006.ffilter2(mc,fc))
or (c11200006.ffilter2(c,fc) and c11200006.ffilter1(mc,fc)))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200006.fuscon(e,g,gc,chkf)
if g==nil then return true end
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local mg=g:Filter(c11200006.ffilter,nil,c)
local mg1=g:Filter(c11200006.ffilter1,nil,c)
local mg2=g:Filter(c11200006.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200006.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200006.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200006.ffilter2,tp,LOCATION_DECK,0,nil,c)
if gc then
if not mg:IsContains(gc) then return false end
if Duel.GetFlagEffect(tp,11200002)~=0 then
return mg:IsExists(c11200006.spfilter2,1,gc,tp,gc,c) or tg:IsExists(c11200006.spfilter2,1,gc,tp,gc,c)
else
return mg:IsExists(c11200006.spfilter2,gc,tp,gc,c)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()==0 and
mg2:GetCount()~=0 then
return tg1:IsExists(c11200006.spfilter1,1,nil,tp,mg2,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and
mg1:GetCount()~=0 then
return tg2:IsExists(c11200006.spfilter1,1,nil,tp,mg1,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
return tg:IsExists(c11200006.spfilter1,1,nil,tp,mg,c)
else
return mg:IsExists(c11200006.spfilter1,1,nil,tp,mg,c)
end
end
function c11200006.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c11200006.ffilter,nil,c)
local mg1=eg:Filter(c11200006.ffilter1,nil,c)
local mg2=eg:Filter(c11200006.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200006.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200006.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200006.ffilter2,tp,LOCATION_DECK,0,nil,c)
local g=nil
local sg
if gc then
g=Group.FromCards(gc)
mg:RemoveCard(gc)
else
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()~=0 and
mg2:GetCount()~=0 and tg:GetCount()>0 and mg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and mg1:GetCount()~=0 and tg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg2:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg1,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()~=0 and mg1:GetCount()==0 and tg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg1:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg2,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg,c)
mg:Sub(g)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=tg:FilterSelect(tp,c11200006.spfilter2,1,1,nil,tp,g:GetFirst(),c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:FilterSelect(tp,c11200006.spfilter2,1,1,nil,tp,g:GetFirst(),c)
end
g:Merge(sg)
Duel.SetFusionMaterial(g)
end
function c11200006.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c11200006.rfilter(c,fc)
return (c:IsFusionSetCard(0x134) or c:IsRace(RACE_SPELLCASTER)) and c:IsCanBeFusionMaterial(fc)
end
function c11200006.rfilter1(c,tp,g)
return g:IsExists(c11200006.spfilter2,1,c,tp,c)
end
function c11200006.rfilter2(c,tp,mc)
return ((c:IsFusionSetCard(0x134) and mc:IsRace(RACE_SPELLCASTER)) or
(mc:IsFusionSetCard(0x134) and c:IsRace(RACE_SPELLCASTER))) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200006.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(c11200006.rfilter,nil,c)
return rg:IsExists(c11200006.rfilter1,1,nil,tp,rg)
end
function c11200006.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c11200006.rfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=rg:FilterSelect(tp,c11200006.rfilter1,1,1,nil,tp,rg)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:FilterSelect(tp,c11200006.rfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c11200006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200006.tgfilter(c)
return c:IsSetCard(0x134) and c:IsAbleToGrave()
end
function c11200006.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200006.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c11200006.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11200006.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-2000)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-2000)
end
end
function c11200006.refilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsReleasable()
end
function c11200006.refilter2(c)
return c:IsSetCard(0x134) and c:IsReleasable()
end
function c11200006.recon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c11200006.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and g:GetCount()>1 and g:IsExists(c11200006.refilter2,1,nil)
end
function c11200006.reop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c11200006.refilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c11200006.refilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
\ No newline at end of file
--污浊的外装 泣哭的人鱼
function c11200007.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,1,11200007)
--spsummon con
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c11200007.splimit)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c11200007.cost)
e2:SetTarget(c11200007.target)
e2:SetOperation(c11200007.operation)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetTarget(c11200007.tgtg)
e3:SetOperation(c11200007.tgop)
c:RegisterEffect(e3)
end
function c11200007.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x134)
end
function c11200007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200007.lovefilter(c)
if not (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()) then return false end
return c:IsCode(11200011) and c:IsSSetable()
end
function c11200007.betrayfilter(c)
return c:IsCode(11200012) and ((c:IsLocation(LOCATION_DECK) and c:IsAbleToGrave()) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
end
function c11200007.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c11200007.lovefilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c11200007.betrayfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil)
if chk==0 then return b1 or b2 end
local opt=0
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(11200007,0),aux.Stringid(11200007,1),aux.Stringid(11200007,2))
elseif b1 then
opt=Duel.SelectOption(tp,aux.Stringid(11200007,0))
else
opt=Duel.SelectOption(tp,aux.Stringid(11200007,1))+1
end
e:SetLabel(opt)
if opt==1 then
e:SetCategory(0)
end
end
function c11200007.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=e:GetLabel()
if opt==0 or opt==2 then
local ssg=Duel.GetMatchingGroup(c11200007.lovefilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if ssg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local seg=ssg:Select(tp,1,1,nil)
Duel.SSet(tp,seg)
Duel.ConfirmCards(1-tp,seg)
local ssgt=seg:GetFirst()
ssgt:SetStatus(STATUS_SET_TURN,false)
end
end
if opt==1 or opt==2 then
local stg=Duel.GetMatchingGroup(c11200007.betrayfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if stg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=stg:Select(tp,1,1,nil)
if sg:GetFirst():IsLocation(LOCATION_DECK) then
Duel.SendtoGrave(sg,REASON_EFFECT)
else
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
end
end
function c11200007.spfilter(c,e,tp)
return c:IsSetCard(0x134) and not c:IsType(TYPE_RITUAL)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c11200007.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11200007.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c11200007.tgop(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,c11200007.spfilter,tp,LOCATION_GRAVE+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
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--鸟笼的提包人 美树沙耶加
function c11200009.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c11200009.overcon)
e1:SetOperation(c11200009.overop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200009,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11200009)
e2:SetCost(c11200009.cost)
e2:SetOperation(c11200009.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,11200009)
e3:SetTarget(c11200009.sptg)
e3:SetOperation(c11200009.spop)
c:RegisterEffect(e3)
end
function c11200009.ovfilter(c,g,tp)
return c:IsSetCard(0x134) and c:IsFaceup() and c:IsCanBeXyzMaterial(g) and Duel.IsExistingMatchingCard(c11200009.ovfilter2,tp,LOCATION_MZONE,0,1,c,g)
end
function c11200009.ovfilter2(c,g)
return c:IsType(TYPE_RITUAL) and c:IsFaceup() and c:IsCanBeXyzMaterial(g)
end
function c11200009.overcon(e,c)
if Duel.IsExistingMatchingCard(c11200009.ovfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,e:GetHandler(),e:GetHandlerPlayer()) then return true
else return false end
end
function c11200009.overop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g1=Duel.SelectMatchingCard(tp,c11200009.ovfilter,tp,LOCATION_MZONE,0,1,1,nil,e:GetHandler(),tp)
local g2=Duel.SelectMatchingCard(tp,c11200009.ovfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),e:GetHandler())
g1:Merge(g2)
if g1:GetCount()==2 then
Duel.Overlay(c,g1)
end
end
function c11200009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200009.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c11200009.effectfilter)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e2,tp)
end
function c11200009.effectfilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
local tc=te:GetHandler()
return p==tp
end
function c11200009.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c11200009.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c11200009.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x134) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c11200009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c11200009.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c11200009.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200009.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11200009.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c11200009.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c11200009.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200009.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if (Duel.GetLocationCountFromEx(tp)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--我真是个笨蛋……
function c11200010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(11200010,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200010)
e1:SetTarget(c11200010.target)
e1:SetOperation(c11200010.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(11200010,1))
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetCountLimit(1,11200010+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c11200010.thcost)
e2:SetTarget(c11200010.thtg)
e2:SetOperation(c11200010.thop)
c:RegisterEffect(e2)
end
function c11200010.rmfilter(c,fc)
return c:IsCanBeRitualMaterial(fc) or (c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove())
end
function c11200010.filter(c,e,tp,m1,m2,ft)
if not (c:IsCode(11200007) and bit.band(c:GetType(),0x81)==0x81
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) then return false end
m1:Merge(m2)
local mg=m1:Filter(c11200010.rmfilter,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,9,c)
else
return ft>-1 and mg:IsExists(c11200010.mfilterf,1,nil,tp,mg,c)
end
end
function c11200010.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,9,rc)
else return false end
end
function c11200010.mfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x134) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c11200010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local mg2=Duel.GetMatchingGroup(c11200010.mfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
return Duel.IsExistingMatchingCard(c11200010.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg1,mg2,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c11200010.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c11200010.mfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c11200010.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg1,mg2,ft)
local tc=tg:GetFirst()
if tc then
mg1:Merge(mg2)
local mg=mg1:Filter(c11200010.rmfilter,tc,tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,9,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c11200010.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,9,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
function c11200010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200010.thfilter(c)
return c:IsCode(11200007) and c:IsAbleToHand()
end
function c11200010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c11200010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--恋慕的乐章
function c11200011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200011,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c11200011.mertg)
e1:SetOperation(c11200011.merop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200011,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,11200011)
e2:SetCondition(c11200011.spcon)
e2:SetCost(c11200011.spcost)
e2:SetTarget(c11200011.sptg)
e2:SetOperation(c11200011.spop)
c:RegisterEffect(e2)
end
function c11200011.merfilter(c)
return c:IsSetCard(0x134) and c:IsFaceup()
end
function c11200011.mertg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11200011.merfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200011.merfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c11200011.merfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c11200011.filter(c)
return c:IsSetCard(11200007) and c:IsFaceup()
end
function c11200011.merop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c11200011.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(c11200011.filter,tp,LOCATION_MZONE,0,1,nil) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_TO_HAND)
Duel.RegisterEffect(e2,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_REMOVE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetValue(1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
end
function c11200011.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c11200011.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_HAND) or aux.exccon(e)
end
function c11200011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200011.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c11200011.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_SPELLCASTER) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg=Duel.GetMatchingGroup(c11200011.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c11200011.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200011.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11200011.exmfilter(c,fc,m,chkf)
return fc:CheckFusionMaterial(m,c,chkf)
end
function c11200011.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11200011.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c11200011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--背叛的奏曲
function c11200012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,11200008)
e1:SetTarget(c11200012.target)
e1:SetOperation(c11200012.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200012)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCost(c11200012.atkcost)
e2:SetTarget(c11200012.atktg)
e2:SetOperation(c11200012.atkop)
c:RegisterEffect(e2)
end
function c11200012.filter(c)
return c:IsSetCard(0x134) and c:IsAbleToGrave()
end
function c11200012.filter2(c)
return c:IsSetCard(0x134) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c11200012.filter3(c)
return c:IsCode(11200007) and c:IsFaceup()
end
function c11200012.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetMatchingGroup(c11200012.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
local b2=Duel.GetMatchingGroup(c11200012.filter2,tp,LOCATION_EXTRA,0,nil)
local b3=Duel.GetMatchingGroup(c11200012.filter3,tp,LOCATION_ONFIELD,0,nil)
local draw=1
if b3:GetCount()>0 then draw=2 end
if chk==0 then
return b1:GetCount()>0 and b2:GetCount()>0 and Duel.IsPlayerCanDraw(tp,draw)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,draw)
end
function c11200012.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetMatchingGroup(c11200012.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
local b2=Duel.GetMatchingGroup(c11200012.filter2,tp,LOCATION_EXTRA,0,nil)
if b1==nil or b2==nil then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c11200012.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c11200012.filter2,tp,LOCATION_EXTRA,0,1,1,nil)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11200012.filter3,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c11200012.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200012.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x134) and c:GetAttack()>0
end
function c11200012.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11200012.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200012.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
local g1=Duel.SelectTarget(tp,c11200012.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local opt=Duel.SelectOption(tp,aux.Stringid(11200012,0),aux.Stringid(11200012,1))
e:SetLabel(opt)
end
function c11200012.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
local tg=g:GetFirst()
local atkp=tg:GetAttack()
if atkp==0 then return end
local opt=e:GetLabel()
if opt==0 then
if Duel.Recover(tp,atkp,REASON_EFFECT)>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tg:RegisterEffect(e1)
end
else
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-atkp)
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(tg:GetAttack()*2)
tg:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--奇迹糕点 旋转餐厅
function c12000001.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c12000001.target)
e1:SetOperation(c12000001.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_TOKEN))
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c12000001.spcon)
e3:SetTarget(c12000001.sptg)
e3:SetOperation(c12000001.spop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c12000001.thtg)
e4:SetOperation(c12000001.thop)
c:RegisterEffect(e4)
end
function c12000001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000001.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP_DEFENSE,tp) then
local token=Duel.CreateToken(tp,12000011)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c12000001.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c12000001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if chk==0 then return (ft1+ft2)>0 and not ((ft1+ft2)>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft1+ft2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft1+ft2,0,0)
end
function c12000001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if (ft1+ft2)>0 and not ((ft1+ft2)>1 and Duel.IsPlayerAffectedByEffect(tp,59822133))
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) then
local fid=c:GetFieldID()
for i=1,ft1 do
local token=Duel.CreateToken(tp,12000011)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
for i=1,ft2 do
local token=Duel.CreateToken(tp,12000011)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
function c12000001.thfilter(c,lv,race)
return c:IsType(TYPE_MONSTER) and c:GetLevel()==lv and c:GetRace()==race and c:IsAbleToHand() and c:IsLevelAbove(5)
end
function c12000001.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xfbe) and Duel.IsExistingMatchingCard(c12000001.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel(),c:GetRace())
end
function c12000001.chkfilter(c,lv,race)
return c:IsFaceup() and c:GetLevel()==lv
end
function c12000001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c42000001.chkfilter(chkc,e:GetLabel()) end
if chk==0 then return Duel.IsExistingTarget(c12000001.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c12000001.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:SetLabel(g:GetFirst():GetAttribute())
end
function c12000001.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local lv=tc:GetLevel()
local race=tc:GetRace()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c12000001.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv,race)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--奇迹糕点 糕点突进
function c12000002.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000002+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12000002.target)
e1:SetOperation(c12000002.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c12000002.spcon)
e2:SetTarget(c12000002.sptg)
e2:SetOperation(c12000002.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c12000002.descon)
e3:SetCost(c12000002.descost)
e3:SetTarget(c12000002.destg)
e3:SetOperation(c12000002.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c12000002.actg)
e4:SetOperation(c12000002.acop)
c:RegisterEffect(e4)
end
function c12000002.tgfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToGrave()
end
function c12000002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000002.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c12000002.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12000002.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c12000002.cfilter(c,tp)
return c:IsType(TYPE_TOKEN)
and c:IsLocation(LOCATION_MZONE) and c:GetSummonPlayer()==tp and c:GetCode()~=12000013
end
function c12000002.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12000002.cfilter,1,nil,tp)
end
function c12000002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000013,0xfbe,0x5011,0,0,1,RACE_FAIRY,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000002.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000013,0xfbe,0x5011,0,0,1,RACE_FAIRY,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,12000013)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c12000002.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0xfbe) and c:IsType(TYPE_TOKEN)
end
function c12000002.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12000002.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c12000002.cfilter2(c)
return c:IsType(TYPE_TOKEN)
end
function c12000002.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c12000002.cfilter2,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c12000002.cfilter2,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c12000002.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c12000002.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c12000002.acfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOKEN)
end
function c12000002.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000002.acfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c12000002.acop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12000002.acfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local ct=g:GetCount()
local tc=g:GetFirst()
local fid=e:GetHandler():GetFieldID()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(12000002,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid)
--no battle damage
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c12000002.adcon)
e1:SetOperation(c12000002.adop)
Duel.RegisterEffect(e1,tp)
end
function c12000002.adfilter(c,fid)
return c:GetFlagEffectLabel(12000002)==fid
end
function c12000002.adcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c12000002.adfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c12000002.adop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c12000002.adfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Destroy(tg,REASON_EFFECT)
end
--奇迹糕点 糕点爆发
function c12000003.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c12000003.cost)
e1:SetCountLimit(1,12000003+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12000003.target)
e1:SetOperation(c12000003.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c12000003.spcon)
e2:SetTarget(c12000003.sptg)
e2:SetOperation(c12000003.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c12000003.descost)
e3:SetTarget(c12000003.destg)
e3:SetOperation(c12000003.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c12000003.thcost)
e4:SetTarget(c12000003.thtg)
e4:SetOperation(c12000003.thop)
c:RegisterEffect(e4)
end
function c12000003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c12000003.filter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToHand()
end
function c12000003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000003.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12000003.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000003.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12000003.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0xfbe) and c:IsType(TYPE_MONSTER)
end
function c12000003.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12000003.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c12000003.cfilter2(c)
return c:IsType(TYPE_TOKEN)
end
function c12000003.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c12000003.cfilter2,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c12000003.cfilter2,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c12000003.cfilter(c,tp)
return c:IsType(TYPE_TOKEN)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c12000003.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12000003.cfilter,1,nil,tp)
end
function c12000003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000012,0xfbe,0x4011,500,500,2,RACE_BEAST,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000003.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000012,0xfbe,0x4011,500,500,2,RACE_BEAST,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,12000012)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function c12000003.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c12000003.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c12000003.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c12000003.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c12000003.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c12000003.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12000003.thfilter(c,att,race)
return c:IsAttribute(att) and c:IsRace(race) and c:IsAbleToHand() and c:IsLevelAbove(5)
end
function c12000003.cfilter3(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_TOKEN) and Duel.IsExistingMatchingCard(c12000003.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute(),c:GetRace())
end
function c12000003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c12000003.cfilter3,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c12000003.cfilter3,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:SetLabelObject(g:GetFirst())
end
function c12000003.thop(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabelObject():GetAttribute()
local race=e:GetLabelObject():GetRace()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000003.thfilter,tp,LOCATION_DECK,0,1,1,nil,att,race)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--奇迹糕点 融合秘方
function c12000004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000004+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12000004.target)
e1:SetOperation(c12000004.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c12000004.spcon)
e2:SetTarget(c12000004.sptg)
e2:SetOperation(c12000004.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c12000004.spcon2)
e3:SetTarget(c12000004.sptg)
e3:SetOperation(c12000004.spop2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c12000004.fstg)
e4:SetOperation(c12000004.fsop)
c:RegisterEffect(e4)
end
function c12000004.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0xfbe)
end
function c12000004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000004.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c12000004.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c12000004.filter,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
e1:SetCondition(c12000004.thcon)
e1:SetOperation(c12000004.thop)
e1:SetLabel(0)
tg:RegisterEffect(e1)
end
function c12000004.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c12000004.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==0 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
end
function c12000004.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_HAND and re:GetHandlerPlayer()~=tp
end
function c12000004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,42000014,0xfbe,0x4011,800,800,3,RACE_PSYCHO,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000004.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000014,0xfbe,0x4011,800,800,3,RACE_PSYCHO,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,12000014)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
end
function c12000004.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()
end
function c12000004.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000014,0xfbe,0x4011,800,800,3,RACE_PSYCHO,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,12000014)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c12000004.spfilter1(c,e)
return c:IsType(TYPE_TOKEN) and not c:IsImmuneToEffect(e) and c:IsReleasable()
end
function c12000004.spfilter2(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) and c:CheckFusionMaterial(m,nil,chkf) and c:IsReleasable()
end
function c12000004.spfilter3(c)
return c:IsCanBeFusionMaterial() and c:IsType(TYPE_TOKEN)
end
function c12000004.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsType,nil,TYPE_TOKEN)
local res=Duel.IsExistingMatchingCard(c12000004.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp):Filter(c12000004.spfilter3,nil)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c12000004.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12000004.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c12000004.spfilter1,nil,e)
local sg1=Duel.GetMatchingGroup(c12000004.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp):Filter(c12000004.spfilter3,nil)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c12000004.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Release(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--奇迹糕点 糕点神龙
function c12000005.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,12000005)
e1:SetCondition(c12000005.descon)
e1:SetTarget(c12000005.destg)
e1:SetOperation(c12000005.desop)
c:RegisterEffect(e1)
--attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c12000005.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c12000005.thcost)
e4:SetTarget(c12000005.thtg)
e4:SetOperation(c12000005.thop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetRange(LOCATION_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,12000005)
e5:SetCondition(c12000005.rthcon)
e5:SetTarget(c12000005.rthtg)
e5:SetOperation(c12000005.rthop)
c:RegisterEffect(e5)
end
function c12000005.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfbe)
end
function c12000005.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12000005.cfilter,tp,LOCATION_SZONE,0,1,nil)
end
function c12000005.desfilter(c)
return c:IsType(TYPE_TOKEN)
end
function c12000005.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tk=Duel.GetMatchingGroup(c12000005.desfilter,tp,LOCATION_MZONE,0,nil)
local tkc=tk:GetCount()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if tkc>3 then tkc=3 end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsType(TYPE_TOKEN) end
if chk==0 then return ft>-tkc and Duel.IsExistingTarget(c12000005.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) end
local g=Group.CreateGroup()
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectTarget(tp,c12000005.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,3,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectTarget(tp,c12000005.desfilter,tp,LOCATION_MZONE,0,1,tkc,nil)
if g:GetCount()<3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectTarget(tp,c12000005.desfilter,tp,0,LOCATION_MZONE,1,3-g:GetCount(),nil)
g:Merge(sg)
end
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c12000005.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
if Duel.Destroy(tg,REASON_EFFECT)==3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c12000005.atkval(e,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
return g:GetCount()*500
end
function c12000005.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c12000005.thfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToHand()
end
function c12000005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000005.thfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c12000005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000005.thfilter,tp,LOCATION_REMOVED,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12000005.cfilter1(c,tp)
return c:IsSetCard(0xfbe) and c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsFaceup()
end
function c12000005.rthcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12000005.cfilter1,1,nil,tp)
end
function c12000005.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c12000005.rthop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
--奇迹糕点 樱桃双子
function c12000006.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c12000006.ffilter,2,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,12000006)
e1:SetCost(c12000006.spcost)
e1:SetTarget(c12000006.sptg)
e1:SetOperation(c12000006.spop)
c:RegisterEffect(e1)
--atk/lv up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000006,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,12000106)
e2:SetOperation(c12000006.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,12000206)
e3:SetTarget(c12000006.destg)
e3:SetOperation(c12000006.desop)
c:RegisterEffect(e3)
end
function c12000006.ffilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_MONSTER)
end
function c12000006.cfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c12000006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000006.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c12000006.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c12000006.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000006.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
local sp=Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
if sp~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsPlayerCanSpecialSummonMonster(tp,12000016,0xfbe,0x4011,300,300,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.SelectYesNo(tp,aux.Stringid(12000006,1)) then
Duel.BreakEffect()
if Duel.Destroy(c,REASON_EFFECT)==0 then return end
local token=Duel.CreateToken(tp,12000016)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetAbsoluteRange(tp,1,0)
e2:SetTarget(c12000006.splimit)
e2:SetReset(RESET_EVENT+0x1fe0000)
Duel.RegisterEffect(e2,tp)
end
end
end
function c12000006.splimit(e,c)
return not c:IsSetCard(0xfbe)
end
function c12000006.operation(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:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e2:SetValue(2)
c:RegisterEffect(e2)
end
end
function c12000006.desfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_NORMAL)
end
function c12000006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c12000006.desfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c12000006.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000006.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--奇迹糕点 双子樱桃
function c12000007.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,12000007)
e1:SetCost(c12000007.spcost)
e1:SetTarget(c12000007.sptg)
e1:SetOperation(c12000007.spop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,12000107)
e3:SetTarget(c12000007.destg)
e3:SetOperation(c12000007.desop)
c:RegisterEffect(e3)
end
function c12000007.cfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c12000007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000007.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c12000007.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c12000007.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000007.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
local sp=Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
if sp~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsPlayerCanSpecialSummonMonster(tp,12000016,0xfbe,0x4011,300,300,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.SelectYesNo(tp,aux.Stringid(12000007,0)) then
Duel.BreakEffect()
if Duel.Destroy(c,REASON_EFFECT)==0 then return end
local token=Duel.CreateToken(tp,12000016)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetAbsoluteRange(tp,1,0)
e2:SetTarget(c12000007.splimit)
e2:SetReset(RESET_EVENT+0x1fe0000)
Duel.RegisterEffect(e2,tp)
end
end
end
function c12000007.splimit(e,c)
return not c:IsSetCard(0xfbe)
end
function c12000007.desfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_NORMAL)
end
function c12000007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c12000007.desfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c12000007.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000007.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--奇迹糕点 前点心
function c12000008.initial_effect(c)
--deck search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000008)
e1:SetTarget(c12000008.target)
e1:SetOperation(c12000008.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12000108)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000008.target)
e2:SetOperation(c12000008.activate)
c:RegisterEffect(e2)
end
function c12000008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return false end
local g=Duel.GetDecktopGroup(tp,5)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result
end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c12000008.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0xfbe)
end
function c12000008.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,5) then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
if g:IsExists(c12000008.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(12000008,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c12000008.filter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
g:Sub(sg)
end
end
end
function c12000008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000014,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000008.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000014,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) then
local token=Duel.CreateToken(tp,12000014)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--奇迹糕点 后点心
function c12000009.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000009)
e1:SetCost(c12000009.cost)
e1:SetTarget(c12000009.target)
e1:SetOperation(c12000009.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,12000109)
e2:SetCost(c12000009.thcost)
e2:SetTarget(c12000009.thtg)
e2:SetOperation(c12000009.thop)
c:RegisterEffect(e2)
end
function c12000009.cfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToGraveAsCost()
end
function c12000009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000009.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12000009.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,POS_FACEUP,REASON_COST)
end
function c12000009.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup()
end
function c12000009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c12000009.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c12000009.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c12000009.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c12000009.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c12000009.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c12000009.thfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToHand()
end
function c12000009.cfilter3(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_TOKEN) and Duel.IsExistingMatchingCard(c12000009.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute(),c:GetRace())
end
function c12000009.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c12000009.cfilter3,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c12000009.cfilter3,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e:SetLabelObject(g:GetFirst())
end
function c12000009.thop(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabelObject():GetAttribute()
local race=e:GetLabelObject():GetRace()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000009.thfilter,tp,LOCATION_DECK,0,1,1,nil,att,race)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--奇迹糕点 日点心
function c12000010.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000010)
e1:SetTarget(c12000010.target1)
e1:SetOperation(c12000010.activate1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000010,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12000110)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000010.thtg)
e2:SetOperation(c12000010.thop)
c:RegisterEffect(e2)
end
function c12000010.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xfbe)
end
function c12000010.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c12000010.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000010.filter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.SelectTarget(tp,c12000010.filter1,tp,LOCATION_REMOVED,0,1,1,nil)
end
function c12000010.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function c12000010.thfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c12000010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000010.thfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12000010.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12000010.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--奇迹糕点 水果布丁
function c12000030.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c12000030.ffilter,2,false)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000030,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCountLimit(1,12000030)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,12000030+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12000030.target)
e1:SetOperation(c12000030.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000030,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,12000130)
e2:SetCondition(c12000030.tgcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000030.tgtg)
e2:SetOperation(c12000030.tgop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12000030,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1)
e3:SetCondition(c12000030.thcon)
e3:SetTarget(c12000030.thtg)
e3:SetOperation(c12000030.thop)
c:RegisterEffect(e3)
end
function c12000030.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_DECK) and c:IsPreviousPosition(POS_FACEUP)
end
function c12000030.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL) and c:IsSetCard(0xfbe) and c:IsSSetable()
end
function c12000030.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c12000030.thfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c12000030.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
local g=Duel.SelectTarget(tp,c12000030.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
end
function c12000030.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
function c12000030.ffilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_MONSTER)
end
function c12000030.filter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c12000030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000030.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c12000030.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000030.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12000030.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE))
end
function c12000030.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function c12000030.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12000030.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end
function c12000030.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_RISE_TO_FULL_HEIGHT)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetLabel(tc:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ONLY_BE_ATTACKED)
e2:SetReset(RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
end
end
--奇迹糕点 糕点神龙
function c12000031.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfbe),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,12000031)
e1:SetCondition(c12000031.opcon)
e1:SetTarget(c12000031.optg)
e1:SetOperation(c12000031.opop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000031,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,12000131)
e2:SetCondition(c12000031.spcon)
e2:SetTarget(c12000031.sptg)
e2:SetOperation(c12000031.spop)
c:RegisterEffect(e2)
end
function c12000031.opcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c12000031.opfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsLevelAbove(7)
end
function c12000031.optg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000031.opfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function c12000031.opop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12000031.opfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoDeck(g,nil,1,REASON_EFFECT)>0 then
Duel.BreakEffect()
local tc=g:GetFirst()
local code=tc:GetOriginalCode()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000,1)
end
end
end
end
function c12000031.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c12000031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return (ft1)>0 and not ((ft1)>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft1,0,0)
end
function c12000031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
if (ft1)>0 and not ((ft1)>1 and Duel.IsPlayerAffectedByEffect(tp,59822133))
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) then
local fid=c:GetFieldID()
for i=1,ft1 do
local token=Duel.CreateToken(tp,12000011)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--奇迹糕点 魔式神龙
function c12000032.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000032,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,12000032)
e2:SetTarget(c12000032.target)
e2:SetOperation(c12000032.operation)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12000032,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PREDRAW)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,12000131)
e3:SetCondition(c12000032.thcon)
e3:SetTarget(c12000032.thtg)
e3:SetOperation(c12000032.thop)
c:RegisterEffect(e3)
end
function c12000032.coco(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c12000032.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c12000032.cofilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function c12000032.cotg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c12000032.cofilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000032.cofilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c12000032.cofilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c12000032.coop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c12000032.filter(c)
return c:IsType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c12000032.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000032.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(c12000032.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
Duel.SetChainLimit(c12000032.chlimit)
end
function c12000032.chlimit(e,ep,tp)
return tp==ep
end
function c12000032.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c12000032.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
function c12000032.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
function c12000032.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4
and Duel.GetDrawCount(tp)>0
end
function c12000032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetDecktopGroup(tp,5)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result
end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
_replace_count=0
_replace_max=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c12000032.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
_replace_count=_replace_count+1
if _replace_count<=_replace_max then
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local checkm=g:FilterCount(Card.IsType,nil,TYPE_MONSTER)
local checks=g:FilterCount(Card.IsSetCard,nil,0xfbe)
if g:GetCount()>0 and checkm==0 and checks>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,2,2,nil)
if sg:FilterCount(Card.IsAbleToHand,nil)==2 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.ShuffleDeck(tp)
else
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--奇迹糕点魔式厨房
function c12000033.initial_effect(c)
aux.AddRitualProcGreaterCode(c,12000032)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(aux.exccon)
e1:SetCost(aux.bfgcost)
e1:SetCountLimit(1,12000033)
e1:SetTarget(c12000033.thtg)
e1:SetOperation(c12000033.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000033,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,12000133)
e2:SetCondition(c12000033.descon)
e2:SetTarget(c12000033.destg)
e2:SetOperation(c12000033.desop)
c:RegisterEffect(e2)
end
function c12000033.thfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToHand()
end
function c12000033.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000033.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12000033.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000033.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 c12000033.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_DECK)
end
function c12000033.desfilter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c12000033.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000033.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c12000033.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg=g:GetMinGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function c12000033.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12000033.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMinGroup(Card.GetAttack)
if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
local atk=tc:IsFaceup() and tc:GetAttack() or 0
if Duel.Destroy(sg,REASON_EFFECT)==1 and atk~=0
then Duel.Recover(tp,atk,REASON_EFFECT)
end
else
local tc=tg:GetFirst()
local atk=tc:IsFaceup() and tc:GetAttack() or 0
if Duel.Destroy(tg,REASON_EFFECT)==1 and atk~=0
then Duel.Recover(tp,atk,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--奇迹糕点 提拉米苏
function c12000034.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfbe),4,2)
c:EnableReviveLimit()
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000034,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,12000034)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c12000034.cost)
e1:SetTarget(c12000034.target)
e1:SetOperation(c12000034.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000034,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,12000134)
e2:SetCondition(c12000034.discon)
e2:SetTarget(c12000034.distg)
e2:SetOperation(c12000034.disop)
c:RegisterEffect(e2)
end
function c12000034.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c12000034.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=5 or Duel.GetFieldGroupCount(1-tp,0,LOCATION_GRAVE)>0
end
end
function c12000034.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(1-tp,5)
local g=Duel.GetDecktopGroup(1-tp,5)
local slv=Duel.GetFieldGroupCount(1-tp,0,LOCATION_GRAVE)
local checkm=g:FilterCount(Card.IsType,nil,TYPE_MONSTER)
g:Remove(Card.IsLevelAbove,nil,slv+1)
if g:GetCount()>0 and checkm>0 and slv>0 then
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=g:Select(tp,1,1,nil):GetFirst()
g:RemoveCard(tc)
slv=slv-tc:GetLevel()
Duel.Overlay(e:GetHandler(),Group.FromCards(tc))
g:Remove(Card.IsLevelAbove,nil,slv+1)
until g:GetCount()==0 or slv<=0 or not Duel.SelectYesNo(tp,aux.Stringid(12000034,2))
end
end
function c12000034.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c12000034.filter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToDeck()
end
function c12000034.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c12000034.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000034.filter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c12000034.filter,tp,LOCATION_REMOVED,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c12000034.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA)
local dg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if ct>0 and dg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=dg:Select(tp,1,ct,nil)
Duel.HintSelection(rg)
Duel.SendtoDeck(rg,nil,2,REASON_EFFECT)
end
end
--奇迹糕点 巧克力布丁拼盘
function c12000035.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,c12000035.ovfilter,aux.Stringid(12000035,1),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetOperation(c12000035.activate)
c:RegisterEffect(e1)
if c12000035.counter==nil then
c12000035.counter=true
c12000035[0]=0
c12000035[1]=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c12000035.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_RELEASE)
e3:SetOperation(c12000035.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_DISCARD)
e4:SetOperation(c12000035.addcount)
Duel.RegisterEffect(e4,0)
end
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetCondition(c12000035.immcon)
e5:SetValue(c12000035.efilter)
c:RegisterEffect(e5)
end
function c12000035.immcon(e)
return e:GetHandler()
end
function c12000035.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) or te:IsType(TYPE_TOKEN) then return true
else return aux.qlifilter(e,te) end
end
function c12000035.resetcount(e,tp,eg,ep,ev,re,r,rp)
c12000035[0]=0
c12000035[1]=0
end
function c12000035.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local pl=tc:GetPreviousLocation()
if pl==LOCATION_MZONE and tc:IsSetCard(0xfbe) then
local p=tc:GetReasonPlayer()
c12000035[p]=c12000035[p]+1
elseif pl==LOCATION_HAND and tc:IsSetCard(0xfbe) then
local p=tc:GetPreviousControler()
c12000035[p]=c12000035[p]+1
end
tc=eg:GetNext()
end
end
function c12000035.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c12000035.droperation)
Duel.RegisterEffect(e1,tp)
end
function c12000035.droperation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,12000035)
Duel.Draw(tp,c12000035[tp],REASON_EFFECT)
end
function c12000035.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfbe) and c:GetCode()~=12000035 and c:IsType(TYPE_XYZ)
end
\ No newline at end of file
--奇迹糕点 水果拼盘
function c12000037.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1)
e1:SetCost(c12000037.spcost)
e1:SetTarget(c12000037.sptg)
e1:SetOperation(c12000037.spop)
c:RegisterEffect(e1)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c12000037.descon)
c:RegisterEffect(e7)
end
function c12000037.filter(c)
return c:IsSetCard(0xfbe)
end
function c12000037.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000037.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c12000037.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Destroy(g,REASON_COST)
end
function c12000037.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000037.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
local sp=Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
end
end
function c12000037.cfilter(c)
return c:IsFaceup() and not c:IsSetCard(0xfbe) and not c:IsType(TYPE_TOKEN)
end
function c12000037.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12000037.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
--奇迹糕点 幻想糕点
function c12000038.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfbe),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000038,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,12000038)
e1:SetCondition(c12000038.spcon)
e1:SetTarget(c12000038.sptg)
e1:SetOperation(c12000038.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000038,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,12000138)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000038.tgtg)
e2:SetOperation(c12000038.tgop)
c:RegisterEffect(e2)
end
function c12000038.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c12000038.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsLevelAbove(7)
end
function c12000038.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c12000038.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c12000038.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c12000038.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c12000038.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c12000038.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c12000038.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function c12000038.filter2(c,e,tp,mc)
return c:IsSetCard(0xfbe) and mc:IsCanBeXyzMaterial(c) and c:IsType(TYPE_XYZ)
end
function c12000038.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c12000038.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c12000038.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c12000038.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12000038.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12000038.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--奇迹糕点 水果兔
function c12000039.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(c12000039.tfilter),1)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000039,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetCountLimit(1,12000039)
e1:SetTarget(c12000039.thtg)
e1:SetOperation(c12000039.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000039,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1e0)
e2:SetCountLimit(1,12000039)
e2:SetCost(c12000039.stcost)
e2:SetTarget(c12000039.sttg)
e2:SetOperation(c12000039.stop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetTarget(c12000039.sptg)
e3:SetOperation(c12000039.spop)
c:RegisterEffect(e3)
end
function c12000039.tfilter(c)
return c:IsAbleToHand()
end
function c12000039.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(c12000039.tfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c12000039.tfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12000039.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c12000039.costfilter(c,ft,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsAbleToDeckAsCost() and (ft>0 or (c:IsControler(tp) and c:IsLocation(LOCATION_SZONE)))
end
function c12000039.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(c12000039.costfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,ft,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c12000039.costfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,ft,tp)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c12000039.stfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c12000039.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000039.stfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c12000039.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c12000039.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c12000039.filter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(12000039)
end
function c12000039.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12000039.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000039.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c12000039.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c12000039.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc and tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)==1 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
end
--奇迹糕点 暴走皇后
function c12000040.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfbe),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000040,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c12000040.descon)
e1:SetTarget(c12000040.destg)
e1:SetOperation(c12000040.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e2)
end
function c12000040.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c12000040.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetChainLimit(c12000040.chlimit)
end
function c12000040.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c12000040.chlimit(e,ep,tp)
return tp==ep
end
function c12000040.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
\ No newline at end of file
--奇迹糕点 甜甜圈小姐
function c12000041.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000041,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,12000041)
e1:SetCondition(c12000041.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000041,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,22000041)
e2:SetCost(c12000041.cost)
e2:SetTarget(c12000041.target)
e2:SetOperation(c12000041.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12000041,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetTarget(c12000041.thtg)
e3:SetOperation(c12000041.thop)
c:RegisterEffect(e3)
end
function c12000041.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xfbe)
end
function c12000041.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c12000041.filter,c:GetControler(),LOCATION_ONFIELD,0,1,c)
end
function c12000041.cfilter(c)
return c:IsSetCard(0xfbe) and not c:IsPublic()
end
function c12000041.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsDiscardable() and Duel.IsExistingMatchingCard(c12000041.cfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c12000041.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
Duel.ShuffleHand(tp)
end
function c12000041.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
end
function c12000041.operation(e,tp,eg,ep,ev,re,r,rp)
--indestructable
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x47e0000+EVENT_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c12000041.thfilter(c)
return c:IsLevelAbove(7) and c:IsFaceup()
end
function c12000041.stfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c12000041.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c12000041.thfilter(chkc)
end
if chk==0 then return Duel.IsExistingTarget(c12000041.thfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) and Duel.IsExistingMatchingCard(c12000041.stfilter,tp,LOCATION_DECK,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c12000041.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12000041.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc and tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)==1 and c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) and Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c12000041.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
end
end
--奇迹糕点 水果冻糕
function c12000042.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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,12000042)
e1:SetCost(c12000042.spcost)
e1:SetTarget(c12000042.sptg)
e1:SetOperation(c12000042.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000042,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12000142)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000042.thtg)
e2:SetOperation(c12000042.thop)
c:RegisterEffect(e2)
end
function c12000042.tgfilter(c)
local atk=c:GetAttack()
local def=c:GetDefense()
local lv=c:GetLevel()
local race=c:GetRace()
local att=c:GetAttribute()
return c:IsSetCard(0xfbe) and c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanSpecialSummonMonster(tp,12000019,0xfbe,0x5011,atk,def,lv,race,att) and c:IsAbleToGrave()
end
function c12000042.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000042.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c12000042.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c12000042.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000042.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local atk=tc:GetAttack()
local def=tc:GetDefense()
local lv=tc:GetLevel()
local race=tc:GetRace()
local att=tc:GetAttribute()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,12000019,0xfbe,0x5011,atk,def,lv,race,att) then
local token=Duel.CreateToken(tp,12000019)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(def)
e2:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(lv)
e3:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetValue(race)
e4:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e5:SetValue(att)
e5:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e5)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e8:SetValue(1)
e8:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e8,true)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Equip(tp,c,token)
c:CancelToGrave()
--Equip limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(c12000042.eqlimit)
e6:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e6)
end
end
end
function c12000042.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer()
end
function c12000042.thfilter(c)
return c:IsType(TYPE_RITUAL) and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsSetCard(0xfbe))
end
function c12000042.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000042.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12000042.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000042.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 c12000046.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000046,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c12000046.target)
e1:SetOperation(c12000046.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000046,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000046.tdtg)
e2:SetOperation(c12000046.tdop)
c:RegisterEffect(e2)
end
function c12000046.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c12000046.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xfbe) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c12000046.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c12000046.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c12000046.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c12000046.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c12000046.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c12000046.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c12000046.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c12000046.tdfilter(c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsSetCard(0xfbe) and c:IsAbleToExtra()
end
function c12000046.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12000046.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000046.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c12000046.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12000046.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--奇迹糕点 糕点导书
function c12000047.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,12000047+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c12000047.target)
e1:SetOperation(c12000047.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12000047,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,12000047)
e3:SetCondition(c12000047.tgcon)
e3:SetCost(c12000047.tgcost)
e3:SetTarget(c12000047.tgtg)
e3:SetOperation(c12000047.tgop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(12000047,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,12000147)
e4:SetCondition(c12000047.thcon)
e4:SetTarget(c12000047.thtg)
e4:SetOperation(c12000047.thop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,12000247)
e5:SetTarget(c12000047.eqtg)
e5:SetOperation(c12000047.operation)
c:RegisterEffect(e5)
end
function c12000047.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c12000047.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c12000047.tgcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetEquipTarget():IsSetCard(0xfbe)
end
function c12000047.tgfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToRemoveAsCost()
end
function c12000047.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000047.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c12000047.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c12000047.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if chk==0 then return c:IsAbleToHand() and ec:IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,ec,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c12000047.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec and c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
Duel.SendtoGrave(ec,REASON_EFFECT)
end
end
function c12000047.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget():IsSetCard(0xfbe)
end
function c12000047.thfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToHand() and c:IsFaceup()
end
function c12000047.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c12000047.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000047.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c12000047.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12000047.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c12000047.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
--奇迹糕点 樱花饼
function c12000048.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000048)
e1:SetCost(c12000048.cost)
e1:SetTarget(c12000048.target)
e1:SetOperation(c12000048.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000048.thtg)
e2:SetOperation(c12000048.thop)
c:RegisterEffect(e2)
end
function c12000048.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler())
if chk==0 then return Duel.GetFlagEffect(tp,12000048)==0
and g:GetCount()>1 and g:GetCount()==g:FilterCount(Card.IsAbleToGraveAsCost,nil) end
Duel.SendtoGrave(g,REASON_DISCARD)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c12000048.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0xfbe)
end
function c12000048.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000048.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetChainLimit(c12000048.chlimit)
end
function c12000048.chlimit(e,ep,tp)
return tp==ep
end
function c12000048.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000048.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c12000048.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
function c12000048.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c12000048.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12000011,0,0x4011,800,800,3,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP,tp) then
local token=Duel.CreateToken(tp,12000011)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--奇迹糕点 草莓蛋糕
function c12000050.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:SetCountLimit(1,12000050)
e1:SetTarget(c12000050.sptg)
e1:SetOperation(c12000050.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,12000150)
e2:SetTarget(c12000050.damtg)
e2:SetOperation(c12000050.damop)
c:RegisterEffect(e2)
end
function c12000050.filter(c,e,tp)
return c:IsSetCard(0xfbe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c12000050.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12000050.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c12000050.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,c12000050.filter,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
function c12000050.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function c12000050.damop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c12000050.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c12000050.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0
else return val end
end
\ No newline at end of file
--奇迹糕点 掉包作战
function c12000051.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000051)
e1:SetTarget(c12000051.target1)
e1:SetTarget(c12000051.target2)
e1:SetOperation(c12000051.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12000151)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000051.thtg)
e2:SetOperation(c12000051.thop)
c:RegisterEffect(e2)
end
function c12000051.tgfilter1(c)
return c:IsSetCard(0xfbe) and c:IsAbleToGrave()
end
function c12000051.tgfilter2(c)
return c:IsSetCard(0xfbe) and c:IsAbleToDeck()
end
function c12000051.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000051.tgfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c12000051.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000051.tgfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function c12000051.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12000051.tgfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,c12000051.tgfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
function c12000051.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xfbe)
end
function c12000051.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c12000051.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c12000051.filter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.SelectTarget(tp,c12000051.filter1,tp,LOCATION_REMOVED,0,1,1,nil)
end
function c12000051.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
\ No newline at end of file
--奇迹糕点 誓言皇后
function c12000052.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,12000052)
e1:SetCost(c12000052.spcost)
e1:SetTarget(c12000052.sptg)
e1:SetOperation(c12000052.spop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,12000152)
e3:SetTarget(c12000052.destg)
e3:SetOperation(c12000052.desop)
c:RegisterEffect(e3)
end
function c12000052.cfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c12000052.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000052.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c12000052.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c12000052.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000052.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
local sp=Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
if sp~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsPlayerCanSpecialSummonMonster(tp,12000016,0xfbe,0x4011,300,300,1,RACE_PSYCHO,ATTRIBUTE_DARK) and Duel.SelectYesNo(tp,aux.Stringid(12000052,0)) then
Duel.BreakEffect()
if Duel.Destroy(c,REASON_EFFECT)==0 then return end
local token=Duel.CreateToken(tp,12000016)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetAbsoluteRange(tp,1,0)
e2:SetTarget(c12000052.splimit)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function c12000052.splimit(e,c)
return not c:IsSetCard(0xfbe)
end
function c12000052.desfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_NORMAL)
end
function c12000052.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c12000052.desfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c12000052.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c12000052.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--奇迹糕点 沾糖小姐
function c12000053.initial_effect(c)
--special summon
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12000053,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c12000053.ntcon)
e1:SetValue(1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12000053,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,12000053+EFFECT_COUNT_CODE_DUEL)
e3:SetCost(c12000053.cost)
e3:SetTarget(c12000053.target)
e3:SetOperation(c12000053.operation)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000053,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c12000053.thgt)
e2:SetOperation(c12000053.thop)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c12000053.tgfilter(c)
return c:IsSetCard(0xfbe) and c:IsAbleToGrave()
end
function c12000053.thgt(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000053.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c12000053.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c12000053.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c12000053.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfbe)
end
function c12000053.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12000053.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c12000053.costfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0xfbe)
end
function c12000053.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
if ft<0 then return false end
if ft==0 then
return Duel.IsExistingMatchingCard(c12000053.costfilter,tp,LOCATION_MZONE,0,1,nil)
else
return Duel.IsExistingMatchingCard(c12000053.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
if ft==0 then
local g=Duel.SelectMatchingCard(tp,c12000053.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
else
local g=Duel.SelectMatchingCard(tp,c12000053.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
end
function c12000053.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,700)
end
function c12000053.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Damage(tp,700,REASON_EFFECT)
end
end
\ No newline at end of file
--奇迹糕点 糕点回转
function c12000055.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special Draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000055,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c12000055.spcost)
e2:SetTarget(c12000055.sptg)
e2:SetOperation(c12000055.spop)
c:RegisterEffect(e2)
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:SetCost(aux.bfgcost)
e3:SetCondition(c12000055.sumcon)
e3:SetTarget(c12000055.target)
e3:SetOperation(c12000055.activate)
c:RegisterEffect(e3)
end
function c12000055.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c12000055.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12000055.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12000055.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsSetCard(0xfbe) and tc:IsType(TYPE_MONSTER) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(c12000055.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(12000055,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
Duel.ShuffleHand(tp)
end
function c12000055.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetActivityCount(Duel.GetTurnPlayer(),ACTIVITY_SPSUMMON)>=2
end
function c12000055.filter(c,e,tp)
return c:IsSetCard(0xfbe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c12000055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12000055.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c12000055.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,c12000055.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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