Commit fa99ad5f authored by Momobako's avatar Momobako

Push by Appveyor

parent 50b98663
No preview for this file type
...@@ -28,12 +28,12 @@ function c13241004.spfilter(c,e,tp) ...@@ -28,12 +28,12 @@ function c13241004.spfilter(c,e,tp)
return c:IsSetCard(0xa9) and not c:IsCode(13241004) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xa9) and not c:IsCode(13241004) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13241004.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13241004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13241004.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13241004.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c13241004.spop(e,tp,eg,ep,ev,re,r,rp) function c13241004.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13241004.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13241004.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -34,7 +34,7 @@ function c13250922.spfilter(c) ...@@ -34,7 +34,7 @@ function c13250922.spfilter(c)
end end
function c13250922.spcon(e,c) function c13250922.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetMZoneCount(c:GetControler())>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13250922.spfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil) and Duel.IsExistingMatchingCard(c13250922.spfilter,c:GetControler(),LOCATION_ONFIELD,0,2,nil)
end end
function c13250922.spop(e,tp,eg,ep,ev,re,r,rp,c) function c13250922.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -23,7 +23,6 @@ function c13254031.initial_effect(c) ...@@ -23,7 +23,6 @@ function c13254031.initial_effect(c)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_HAND) e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,13254031) e3:SetCountLimit(1,13254031)
e3:SetCondition(c13254031.condition)
e3:SetCost(c13254031.cost) e3:SetCost(c13254031.cost)
e3:SetTarget(c13254031.netg) e3:SetTarget(c13254031.netg)
e3:SetOperation(c13254031.neop) e3:SetOperation(c13254031.neop)
...@@ -46,9 +45,6 @@ function c13254031.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,9 +45,6 @@ function c13254031.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function c13254031.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev)
end
function c13254031.cfilter(c) function c13254031.cfilter(c)
return c:IsSetCard(0x356) and c:IsDiscardable() return c:IsSetCard(0x356) and c:IsDiscardable()
end end
......
...@@ -90,14 +90,14 @@ function c13254032.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,14 +90,14 @@ function c13254032.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c13254032.spfilter,1,nil,1-tp) return eg:IsExists(c13254032.spfilter,1,nil,1-tp)
end end
function c13254032.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254032.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c13254032.spop(e,tp,eg,ep,ev,re,r,rp) function c13254032.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==0 and Duel.GetMZoneCount(tp)<=0 if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
end end
......
...@@ -41,7 +41,7 @@ function c13254033.filter(c,e,tp) ...@@ -41,7 +41,7 @@ function c13254033.filter(c,e,tp)
end end
function c13254033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c13254033.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c13254033.filter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254033.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingTarget(c13254033.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13254033.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c13254033.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
......
...@@ -31,7 +31,7 @@ function c13254034.filter(c,e,tp) ...@@ -31,7 +31,7 @@ function c13254034.filter(c,e,tp)
end end
function c13254034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13254034.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13254034.filter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254034.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c13254034.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13254034.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c13254034.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -34,13 +34,13 @@ function c13254037.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,13 +34,13 @@ function c13254037.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c13254037.spfilter,1,nil,tp) return eg:IsExists(c13254037.spfilter,1,nil,tp)
end end
function c13254037.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254037.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c13254037.spop(e,tp,eg,ep,ev,re,r,rp) function c13254037.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
--cannot release --cannot release
...@@ -84,12 +84,12 @@ function c13254037.filter(c,e,tp) ...@@ -84,12 +84,12 @@ function c13254037.filter(c,e,tp)
return (c:IsCode(13254039) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) or (c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) return (c:IsCode(13254039) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) or (c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function c13254037.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254037.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254037.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254037.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254037.operation(e,tp,eg,ep,ev,re,r,rp) function c13254037.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13254037.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254037.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -7,7 +7,7 @@ function c13254038.initial_effect(c) ...@@ -7,7 +7,7 @@ function c13254038.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254038,0)) e2:SetDescription(aux.Stringid(13254038,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
...@@ -29,7 +29,7 @@ function c13254038.initial_effect(c) ...@@ -29,7 +29,7 @@ function c13254038.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon skull-maru --spsummon skull-maru
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13254038,2)) e4:SetDescription(aux.Stringid(13254038,0))
e4:SetType(CATEGORY_SPECIAL_SUMMON) e4:SetType(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
...@@ -43,7 +43,7 @@ function c13254038.spfilter(c,e,tp) ...@@ -43,7 +43,7 @@ function c13254038.spfilter(c,e,tp)
end end
function c13254038.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254038.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c13254038.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c13254038.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254038.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c13254038.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13254038.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c13254038.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -69,12 +69,12 @@ function c13254038.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -69,12 +69,12 @@ function c13254038.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c13254038.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c13254038.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>-2 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c13254038.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254038.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254038.spop1(e,tp,eg,ep,ev,re,r,rp) function c13254038.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13254038.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254038.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
...@@ -88,12 +88,12 @@ function c13254038.spfilter2(c,e,tp) ...@@ -88,12 +88,12 @@ function c13254038.spfilter2(c,e,tp)
return c:IsCode(13254037) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(13254037) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254038.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c13254038.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254038.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254038.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254038.spop2(e,tp,eg,ep,ev,re,r,rp) function c13254038.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254038.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254038.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -72,7 +72,7 @@ function c13254039.rfilter(c) ...@@ -72,7 +72,7 @@ function c13254039.rfilter(c)
end end
function c13254039.spcon(e,c) function c13254039.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetMZoneCount(c:GetControler())>-2 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c13254039.rfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) and Duel.IsExistingMatchingCard(c13254039.rfilter,c:GetControler(),LOCATION_MZONE,0,2,nil)
end end
function c13254039.spop(e,tp,eg,ep,ev,re,r,rp,c) function c13254039.spop(e,tp,eg,ep,ev,re,r,rp,c)
...@@ -96,7 +96,7 @@ function c13254039.filter(c,e,tp) ...@@ -96,7 +96,7 @@ function c13254039.filter(c,e,tp)
end end
function c13254039.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254039.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_DECK) and c13254039.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_DECK) and c13254039.filter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254039.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingTarget(c13254039.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13254039.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c13254039.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -32,13 +32,13 @@ function c13254041.sfilter(c) ...@@ -32,13 +32,13 @@ function c13254041.sfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end end
function c13254041.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254041.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,13254083,0x356,0x4011,300,200,1,RACE_FAIRY,ATTRIBUTE_EARTH) and Duel.GetMZoneCount(tp)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,13254083,0x356,0x4011,300,200,1,RACE_FAIRY,ATTRIBUTE_EARTH) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c13254041.tkop(e,tp,eg,ep,ev,re,r,rp) function c13254041.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ft=Duel.GetMZoneCount(tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if ft>ct then ft=ct end if ft>ct then ft=ct end
if ft<=0 then return end if ft<=0 then return end
......
--元始·飞球之球风 --元始·飞球之球风
function c13254042.initial_effect(c) function c13254042.initial_effect(c)
c:EnableCounterPermit(0x356) c:EnableCounterPermit(0x356)
c:SetCounterLimit(0x356,4)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13254042,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c13254042.cost)
e1:SetTarget(c13254042.addct)
e1:SetOperation(c13254042.addc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254042,1)) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCode(EVENT_TO_GRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCost(c13254042.descost) e2:SetOperation(c13254042.operation)
e2:SetTarget(c13254042.destg)
e2:SetOperation(c13254042.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetDescription(aux.Stringid(13254042,1))
e3:SetCode(EVENT_TO_GRAVE) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCondition(c13254042.regcon) e3:SetCategory(CATEGORY_DESTROY)
e3:SetOperation(c13254042.regop) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c13254042.cost)
e3:SetTarget(c13254042.netg)
e3:SetOperation(c13254042.neop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13254042,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCondition(c13254042.descon)
e4:SetTarget(c13254042.destg)
e4:SetOperation(c13254042.desop)
c:RegisterEffect(e4)
end end
function c13254042.cfilter(c) function c13254042.filter(c,tp)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and c:IsDiscardable() return c:IsType(TYPE_MONSTER) and c:GetControler()==tp
end end
function c13254042.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c13254042.operation(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.IsExistingMatchingCard(c13254042.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end local ct=eg:FilterCount(c13254042.filter,nil,tp)
Duel.DiscardHand(tp,c13254042.cfilter,1,1,REASON_COST+REASON_DISCARD) if ct>0 then
end e:GetHandler():AddCounter(0x356,ct,true)
function c13254042.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,4,0,0x356)
end
function c13254042.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x356,4)
end end
end end
function c13254042.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c13254042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x356,1,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x356,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x356,1,REASON_COST) e:GetHandler():RemoveCounter(tp,0x356,2,REASON_COST)
end end
function c13254042.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254042.netg(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 if chk==0 then return re:GetHandler():IsDestructable() end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c13254042.desop(e,tp,eg,ep,ev,re,r,rp) function c13254042.neop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() if re:GetHandler():IsRelateToEffect(re) and e:GetHandler():IsRelateToEffect(e) then
if not c:IsRelateToEffect(e) then return end Duel.Destroy(eg,REASON_EFFECT)
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
if c:GetCounter(0x356)==0 and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c13254042.cost2(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 end
function c13254042.filter(c) function c13254042.descon(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and c:IsDestructable() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetCounter(0x356)==4
end end
function c13254042.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254042.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254042.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(c13254042.filter,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c13254042.activate(e,tp,eg,ep,ev,re,r,rp) function c13254042.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c13254042.filter,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
function c13254042.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c13254042.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13254042,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c13254042.cost2)
e1:SetTarget(c13254042.target)
e1:SetOperation(c13254042.activate)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
...@@ -29,6 +29,13 @@ function c13254044.initial_effect(c) ...@@ -29,6 +29,13 @@ function c13254044.initial_effect(c)
e3:SetTarget(c13254044.target) e3:SetTarget(c13254044.target)
e3:SetOperation(c13254044.operation) e3:SetOperation(c13254044.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--change damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c13254044.regcon)
e4:SetOperation(c13254044.regop)
c:RegisterEffect(e4)
end end
function c13254044.ffilter(c) function c13254044.ffilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
...@@ -111,5 +118,20 @@ function c13254044.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,5 +118,20 @@ function c13254044.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)
end end
end end
function c13254044.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA)
end
function c13254044.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
end
...@@ -26,7 +26,7 @@ function c13254045.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -26,7 +26,7 @@ function c13254045.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if Duel.IsExistingTarget(c13254045.filter1,tp,0,LOCATION_MZONE,1,nil) then if Duel.IsExistingTarget(c13254045.filter1,tp,0,LOCATION_MZONE,1,nil) then
selA=1 selA=1
end end
if Duel.IsExistingMatchingCard(c13254045.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingTarget(c13254045.filter2,tp,0,LOCATION_MZONE,1,nil) and Duel.GetMZoneCount(tp)>0 then if Duel.IsExistingMatchingCard(c13254045.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingTarget(c13254045.filter2,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
selB=1 selB=1
end end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
...@@ -68,7 +68,7 @@ function c13254045.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function c13254045.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
elseif e:GetLabel()==1 and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then elseif e:GetLabel()==1 and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254045.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254045.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -62,12 +62,12 @@ function c13254046.filter2(c,e,tp) ...@@ -62,12 +62,12 @@ function c13254046.filter2(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254046.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254046.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>-2 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c13254046.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254046.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254046.spop2(e,tp,eg,ep,ev,re,r,rp,chk) function c13254046.spop2(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254046.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254046.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -2,19 +2,15 @@ ...@@ -2,19 +2,15 @@
function c13254047.initial_effect(c) function c13254047.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c13254047.cost1) e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c13254047.target1) e1:SetCost(c13254047.cost)
e1:SetOperation(c13254047.activate1) e1:SetTarget(c13254047.target)
e1:SetOperation(c13254047.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--to grave --to grave
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
...@@ -22,73 +18,73 @@ function c13254047.initial_effect(c) ...@@ -22,73 +18,73 @@ function c13254047.initial_effect(c)
e4:SetOperation(c13254047.regop) e4:SetOperation(c13254047.regop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c13254047.costfilter(c) function c13254047.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end end
function c13254047.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c13254047.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254047.costfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end if chk==0 then return Duel.CheckReleaseGroup(tp,c13254047.cfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectReleaseGroup(tp,c13254047.cfilter,1,1,nil)
local cg=Duel.SelectMatchingCard(tp,c13254047.costfilter,tp,LOCATION_HAND,0,2,2,nil) Duel.Release(g,REASON_COST)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
end end
function c13254047.filter(c,tp) function c13254047.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return c:GetSummonPlayer()~=tp and c:IsDestructable() if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c13254047.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c13254047.activate(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return eg:IsExists(c13254047.filter,1,nil,tp) end local tc=Duel.GetFirstTarget()
local g=eg:Filter(c13254047.filter,nil,tp) if tc:IsRelateToEffect(e) then
Duel.SetTargetCard(g) if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.BreakEffect()
end local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
function c13254047.activate1(e,tp,eg,ep,ev,re,r,rp) local tc=tg:GetFirst()
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do while tc do
if tc:IsFaceup() and not tc:IsDisabled() then local e1=Effect.CreateEffect(e:GetHandler())
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() tc=tg:GetNext()
e2:SetCode(EFFECT_DISABLE_EFFECT) end
e2:SetValue(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end end
tc=g:GetNext()
end end
Duel.Destroy(g,REASON_EFFECT)
end end
function c13254047.regop(e,tp,eg,ep,ev,re,r,rp) function c13254047.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_GRAVE) e5:SetRange(LOCATION_GRAVE)
e5:SetCode(EVENT_SUMMON_SUCCESS) e5:SetCost(c13254047.spcost)
e5:SetCost(c13254047.cost2) e5:SetTarget(c13254047.sptg)
e5:SetTarget(c13254047.target1) e5:SetOperation(c13254047.spop)
e5:SetOperation(c13254047.activate1)
e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
end end
function c13254047.costfilter1(c) function c13254047.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3356) return c:IsSetCard(0x356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254047.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c13254047.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c13254047.costfilter1,tp,LOCATION_HAND,0,3,e:GetHandler()) end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local cg=Duel.SelectMatchingCard(tp,c13254047.costfilter1,tp,LOCATION_HAND,0,3,3,nil) end
Duel.ConfirmCards(1-tp,cg) function c13254047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.ShuffleHand(tp) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c13254047.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254047.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13254047.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c13254047.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 end
...@@ -73,7 +73,7 @@ function c13254049.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -73,7 +73,7 @@ function c13254049.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
function c13254049.filter(c) function c13254049.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsSetCard(0x356) return c:IsAbleToDeck() and c:IsSetCard(0x356)
end end
function c13254049.sfilter(c,tp) function c13254049.sfilter(c,tp)
return c:IsLocation(LOCATION_DECK) and c:IsControler(tp) return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
......
...@@ -85,7 +85,7 @@ function c13254053.filter2(c) ...@@ -85,7 +85,7 @@ function c13254053.filter2(c)
end end
function c13254053.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254053.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13254053.filter1(chkc) and c13254053.filter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13254053.filter1(chkc) and c13254053.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13254053.filter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(c13254053.filter2,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.IsExistingTarget(c13254053.filter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(c13254053.filter2,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c13254053.filter1,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c13254053.filter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
...@@ -115,7 +115,7 @@ function c13254055.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,7 +115,7 @@ function c13254055.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(13254055,3)) then and Duel.IsExistingMatchingCard(c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(13254055,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -31,6 +31,14 @@ function c13254057.initial_effect(c) ...@@ -31,6 +31,14 @@ function c13254057.initial_effect(c)
e3:SetTarget(c13254057.destg) e3:SetTarget(c13254057.destg)
e3:SetOperation(c13254057.desop) e3:SetOperation(c13254057.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_REFLECT_DAMAGE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetValue(c13254057.refcon)
c:RegisterEffect(e4)
end end
function c13254057.ffilter(c) function c13254057.ffilter(c)
...@@ -105,3 +113,6 @@ function c13254057.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,3 +113,6 @@ function c13254057.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tg,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
end end
end end
function c13254057.refcon(e,re,val,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0 and rp~=e:GetHandler():GetControler()
end
...@@ -88,7 +88,7 @@ function c13254058.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -88,7 +88,7 @@ function c13254058.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
function c13254058.dfilter(c,tp) function c13254058.dfilter(c,tp)
return c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and not c:IsCode(13254058) return c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end end
function c13254058.repfilter(c) function c13254058.repfilter(c)
return (c:IsCode(13254032) or c:IsCode(13254035)) and c:IsAbleToDeck() return (c:IsCode(13254032) or c:IsCode(13254035)) and c:IsAbleToDeck()
......
--元始飞球 --元始飞球
function c13254059.initial_effect(c) function c13254059.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_FLIP_SUMMON) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetCode(EFFECT_SPSUMMON_CONDITION) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(aux.FALSE) e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c13254059.sprcon)
e2:SetOperation(c13254059.sprop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_EXTRA) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,13254059) e3:SetCountLimit(1,13254059)
e3:SetCost(c13254059.cost) e3:SetTarget(c13254059.smtg)
e3:SetOperation(c13254059.smop) e3:SetOperation(c13254059.smop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -28,6 +32,13 @@ function c13254059.initial_effect(c) ...@@ -28,6 +32,13 @@ function c13254059.initial_effect(c)
e4:SetTarget(c13254059.reptg) e4:SetTarget(c13254059.reptg)
e4:SetValue(c13254059.repval) e4:SetValue(c13254059.repval)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_REMOVE_BRAINWASHING)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e5)
local e10=Effect.CreateEffect(c) local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE) e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
...@@ -37,28 +48,56 @@ function c13254059.initial_effect(c) ...@@ -37,28 +48,56 @@ function c13254059.initial_effect(c)
c:RegisterEffect(e10) c:RegisterEffect(e10)
end end
function c13254059.cfilter(c) function c13254059.spfilter(c)
return c:IsSetCard(0x3356) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() return c:IsSetCard(0x3356) and c:IsCanBeFusionMaterial() and c:IsAbleToGraveAsCost() and not c:IsCode(13254059) and c:IsType(TYPE_MONSTER)
end
function c13254059.fselect(c,tp,mg,sg)
sg:AddCard(c)
local res=false
if sg:GetCount()<1 then
res=mg:IsExists(c13254059.fselect,1,sg,tp,mg,sg)
else
res=Duel.GetLocationCountFromEx(tp,tp,sg)>0
end
sg:RemoveCard(c)
return res
end
function c13254059.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c13254059.spfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c13254059.fselect,1,nil,tp,mg,sg)
end end
function c13254059.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c13254059.sprop(e,tp,eg,ep,ev,re,r,rp,c)
if chk==0 then return Duel.IsExistingMatchingCard(c13254059.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end local mg=Duel.GetMatchingGroup(c13254059.spfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.DiscardHand(tp,c13254059.cfilter,1,1,REASON_COST+REASON_DISCARD) local sg=Group.CreateGroup()
while sg:GetCount()<1 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c13254059.fselect,1,1,sg,tp,mg,sg)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoGrave(sg,REASON_COST)
end end
function c13254059.smfilter(c) function c13254059.smfilter(c)
return c:IsSetCard(0x3356) and c:IsType(TYPE_MONSTER) and c:IsSummonable(true,nil) return c:IsSetCard(0x3356) and c:IsSummonable(true,nil)
end
function c13254059.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254059.smfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end end
function c13254059.smop(e,tp,eg,ep,ev,re,r,rp) function c13254059.smop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then local g=Duel.SelectMatchingCard(tp,c13254059.smfilter,tp,LOCATION_HAND,0,1,1,nil)
sg=Duel.GetMatchingGroup(c13254059.smfilter,tp,LOCATION_HAND,0,nil)
if Duel.GetMZoneCount(tp)>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(13254059,0)) then
local g=sg:Select(tp,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.Summon(tp,tc,true,nil) Duel.Summon(tp,tc,true,nil)
end end
end
end
end end
function c13254059.repfilter(c,tp) function c13254059.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3356) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:GetDestination()==LOCATION_DECK and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3356)
......
...@@ -73,5 +73,5 @@ function c13254060.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,5 +73,5 @@ function c13254060.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c13254060.hspcon(e,c) function c13254060.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetMZoneCount(c:GetControler())>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
...@@ -53,12 +53,12 @@ function c13254061.spfilter(c,e,tp) ...@@ -53,12 +53,12 @@ function c13254061.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254061.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254061.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254061.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254061.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254061.spop(e,tp,eg,ep,ev,re,r,rp) function c13254061.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254061.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254061.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -198,7 +198,7 @@ function c13254064.target3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -198,7 +198,7 @@ function c13254064.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.GetMZoneCount(tp)>-1 return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
...@@ -26,13 +26,13 @@ function c13254068.filter(c,e,tp) ...@@ -26,13 +26,13 @@ function c13254068.filter(c,e,tp)
return c:IsSetCard(0x356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254068.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254068.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254068.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254068.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254068.activate(e,tp,eg,ep,ev,re,r,rp) function c13254068.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254068.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254068.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c13254071.initial_effect(c) function c13254071.initial_effect(c)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......
...@@ -3,11 +3,10 @@ function c13254072.initial_effect(c) ...@@ -3,11 +3,10 @@ function c13254072.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13254072,0)) e1:SetDescription(aux.Stringid(13254072,0))
e1:SetCategory(CATEGORY_NEGATE) e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,13254072+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,13254072+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c13254072.cost1)
e1:SetCondition(c13254072.condition) e1:SetCondition(c13254072.condition)
e1:SetTarget(c13254072.target) e1:SetTarget(c13254072.target)
e1:SetOperation(c13254072.activate) e1:SetOperation(c13254072.activate)
...@@ -15,69 +14,118 @@ function c13254072.initial_effect(c) ...@@ -15,69 +14,118 @@ function c13254072.initial_effect(c)
--Activate --Activate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254072,1)) e2:SetDescription(aux.Stringid(13254072,1))
e2:SetCategory(CATEGORY_NEGATE) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetCost(c13254072.cost1)
e2:SetCountLimit(1,13254072+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,13254072+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c13254072.condition1) e2:SetCondition(c13254072.condition1)
e2:SetTarget(c13254072.target1) e2:SetTarget(c13254072.target1)
e2:SetOperation(c13254072.activate1) e2:SetOperation(c13254072.activate1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--act in hand --Activate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetDescription(aux.Stringid(13254072,2))
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND) e3:SetCategory(CATEGORY_POSITION)
e3:SetCondition(c13254072.handcon) e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,13254072+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c13254072.condition2)
e3:SetTarget(c13254072.target2)
e3:SetOperation(c13254072.activate2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e5:SetTarget(c13254072.target2f)
c:RegisterEffect(e5)
--Activate
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(13254072,3))
e6:SetCategory(CATEGORY_HANDES)
e6:SetType(EFFECT_TYPE_ACTIVATE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCountLimit(1,13254072+EFFECT_COUNT_CODE_OATH)
e6:SetCondition(c13254072.condition3)
e6:SetTarget(c13254072.target3)
e6:SetOperation(c13254072.activate3)
c:RegisterEffect(e6)
end end
function c13254072.costfilter(c) function c13254072.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3356)
end
function c13254072.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254072.costfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c13254072.costfilter,tp,LOCATION_HAND,0,2,2,nil)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
end end
function c13254072.condition(e,tp,eg,ep,ev,re,r,rp) function c13254072.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) local at=Duel.GetAttacker()
return Duel.GetMatchingGroup(c13254072.cfilter,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)>=2 and at:GetControler()~=tp
end end
function c13254072.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254072.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end end
function c13254072.activate(e,tp,eg,ep,ev,re,r,rp) function c13254072.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() Duel.NegateAttack()
if Duel.NegateActivation(ev) and rc:IsCanTurnSet() and rc:IsRelateToEffect(re) then Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_DISCARD+REASON_EFFECT)
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
rc:SetStatus(STATUS_SET_TURN,false)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e1:SetValue(1)
rc:RegisterEffect(e1)
end
end end
function c13254072.condition1(e,tp,eg,ep,ev,re,r,rp) function c13254072.condition1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return Duel.GetMatchingGroup(c13254072.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)>=4 and ep~=tp and Duel.IsChainNegatable(ev)
return (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and Duel.IsChainNegatable(ev)
end end
function c13254072.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c13254072.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end end
function c13254072.activate1(e,tp,eg,ep,ev,re,r,rp) function c13254072.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end end
function c13254072.handcon(e) function c13254072.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c13254072.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) return Duel.GetMatchingGroup(c13254072.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)>=6
end end
function c13254072.cfilter(c) function c13254072.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x356) return c:IsFaceup() and c:GetSummonPlayer()~=tp and c:IsCanTurnSet()
end
function c13254072.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c13254072.filter,1,nil,tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
local g=eg:Filter(c13254072.filter,nil,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c13254072.target2f(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
if chk==0 then return rp==1-tp and tc:IsFaceup() and tc:IsCanTurnSet() and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c13254072.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g1:GetCount()>0 then
Duel.ConfirmCards(tp,g1)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local sg=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
function c13254072.condition3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(c13254072.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)==7
end
function c13254072.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>1 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2)
end
function c13254072.activate3(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
if g:GetCount()>1 then
Duel.DiscardHand(1-tp,aux.TRUE,2,2,REASON_DISCARD+REASON_EFFECT)
end
end end
...@@ -36,12 +36,12 @@ function c13254075.spfilter(c,e,tp) ...@@ -36,12 +36,12 @@ function c13254075.spfilter(c,e,tp)
return ((c:IsRace(RACE_PLANT) and c:IsLevelBelow(1)) or c:IsSetCard(0x356)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return ((c:IsRace(RACE_PLANT) and c:IsLevelBelow(1)) or c:IsSetCard(0x356)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254075.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254075.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c13254075.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254075.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c13254075.operation(e,tp,eg,ep,ev,re,r,rp) function c13254075.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254075.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254075.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -43,7 +43,8 @@ function c13254076.drcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,8 @@ function c13254076.drcon1(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION return r==REASON_FUSION
end end
function c13254076.drcon2(e,tp,eg,ep,ev,re,r,rp) function c13254076.drcon2(e,tp,eg,ep,ev,re,r,rp)
return true local c=e:GetHandler()
return not (c:IsReason(REASON_SYNCHRO) or c:IsReason(REASON_FUSION))
end end
function c13254076.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254076.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--禁忌飞球·地狱火 --禁忌飞球·地狱火
function c13254079.initial_effect(c) function c13254079.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,13254079+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,13254079+EFFECT_COUNT_CODE_OATH)
...@@ -14,28 +14,50 @@ function c13254079.initial_effect(c) ...@@ -14,28 +14,50 @@ function c13254079.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,23254079)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c13254079.descon)
e2:SetTarget(c13254079.destg) e2:SetTarget(c13254079.destg)
e2:SetOperation(c13254079.desop) e2:SetOperation(c13254079.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13254079,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,23254079)
e3:SetCondition(c13254079.descon)
e3:SetTarget(c13254079.destg)
e3:SetOperation(c13254079.desop1)
c:RegisterEffect(e3)
end end
function c13254079.filter(c) function c13254079.tgfilter(c)
return c:IsSetCard(0x5356) and c:IsAbleToHand() return c:IsCode(13254034) and c:IsAbleToGrave()
end end
function c13254079.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254079.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254079.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13254079.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function c13254079.activate(e,tp,eg,ep,ev,re,r,rp) function c13254079.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) e:GetHandler():RegisterFlagEffect(13254079,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
local g=Duel.SelectMatchingCard(tp,c13254079.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.GetMatchingGroup(c13254079.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then if g:GetCount()>=1 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.ConfirmCards(1-tp,g) local sg=g:Select(tp,1,99,nil)
local ct=Duel.SendtoGrave(sg,REASON_EFFECT)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end end
end end
function c13254079.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(13254079)==0
end
function c13254079.filter1(c) function c13254079.filter1(c)
return c:IsCode(13254034) and c:IsAbleToDeck() return c:IsCode(13254034) and c:IsAbleToDeck()
end end
...@@ -61,3 +83,19 @@ function c13254079.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,3 +83,19 @@ function c13254079.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c13254079.desop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=1 then return end
Duel.BreakEffect()
local g1=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
sg1=g1:Select(tp,1,1,nil)
local atk=sg1:GetFirst():GetAttack() or 0
if Duel.Destroy(sg1,REASON_EFFECT)==1 and atk~=0
then Duel.Recover(tp,atk,REASON_EFFECT)
end
end
end
...@@ -35,13 +35,13 @@ function c13254080.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,13 +35,13 @@ function c13254080.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c13254080.spfilter,1,nil,tp) return eg:IsExists(c13254080.spfilter,1,nil,tp)
end end
function c13254080.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254080.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c13254080.spop(e,tp,eg,ep,ev,re,r,rp) function c13254080.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=1 then return end if Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=1 then return end
--cannot release --cannot release
......
...@@ -95,7 +95,7 @@ function c13254081.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -95,7 +95,7 @@ function c13254081.sprop(e,tp,eg,ep,ev,re,r,rp,c)
end end
function c13254081.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254081.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return (c:IsLocation(LOCATION_GRAVE) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (c:IsLocation(LOCATION_MZONE) and c:IsAbleToGrave()) end if chk==0 then return (c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (c:IsLocation(LOCATION_MZONE) and c:IsAbleToGrave()) end
end end
function c13254081.spop(e,tp,eg,ep,ev,re,r,rp) function c13254081.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -19,17 +19,25 @@ function c13254082.initial_effect(c) ...@@ -19,17 +19,25 @@ function c13254082.initial_effect(c)
e2:SetCondition(c13254082.sprcon) e2:SetCondition(c13254082.sprcon)
e2:SetOperation(c13254082.sprop) e2:SetOperation(c13254082.sprop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(13254082,2))
--e3:SetCategory(CATEGORY_DRAW)
--e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET)
--e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
--e3:SetCode(EVENT_TO_DECK)
--e3:SetRange(LOCATION_MZONE)
--e3:SetCountLimit(1,13254082)
--e3:SetCondition(c13254082.drcon)
--e3:SetTarget(c13254082.drtg)
--e3:SetOperation(c13254082.drop)
--c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13254082,2)) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCategory(CATEGORY_DRAW) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,13254082) e3:SetTargetRange(1,1)
e3:SetCondition(c13254082.drcon) e3:SetValue(c13254082.aclimit)
e3:SetTarget(c13254082.drtg)
e3:SetOperation(c13254082.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13254082,3)) e3:SetDescription(aux.Stringid(13254082,3))
...@@ -126,6 +134,10 @@ function c13254082.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,6 +134,10 @@ function c13254082.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 c13254082.aclimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_GRAVE and re:GetHandler():IsSetCard(0x356) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c13254082.tgfilter(c) function c13254082.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
...@@ -142,7 +154,7 @@ function c13254082.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -142,7 +154,7 @@ function c13254082.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g1=g:Select(1-tp,3,3,nil) local g1=g:Select(1-tp,3,3,nil)
local sg=Duel.GetMatchingGroup(c13254082.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp) local sg=Duel.GetMatchingGroup(c13254082.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
if Duel.SendtoGrave(g1,REASON_EFFECT)==3 and Duel.GetMZoneCount(tp)>0 and sg:GetCount()>0 then if Duel.SendtoGrave(g1,REASON_EFFECT)==3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg:GetCount()>0 then
if Duel.SelectYesNo(tp,aux.Stringid(13254082,4)) then if Duel.SelectYesNo(tp,aux.Stringid(13254082,4)) then
local tc=sg:Select(tp,1,1,nil) local tc=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -125,12 +125,12 @@ function c13254084.spfilter(c,e,tp) ...@@ -125,12 +125,12 @@ function c13254084.spfilter(c,e,tp)
return (c:IsCode(13254039) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) or (c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) return (c:IsCode(13254039) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) or (c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function c13254084.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254084.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254084.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254084.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13254084.operation(e,tp,eg,ep,ev,re,r,rp) function c13254084.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13254084.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254084.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -99,7 +99,7 @@ function c13254086.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -99,7 +99,7 @@ function c13254086.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
function c13254086.filter(c) function c13254086.filter(c)
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsSetCard(0x356) and c:IsAbleToRemove()
end end
function c13254086.phtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254086.phtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254086.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13254086.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
function c13254087.initial_effect(c) function c13254087.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,13254087) e1:SetCountLimit(1,13254087)
e1:SetTarget(c13254087.target) e1:SetTarget(c13254087.target)
e1:SetOperation(c13254087.operation) e1:SetOperation(c13254087.operation)
...@@ -14,69 +14,65 @@ function c13254087.initial_effect(c) ...@@ -14,69 +14,65 @@ function c13254087.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_POSITION) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,23254087) e3:SetCountLimit(1,23254087)
e3:SetCondition(c13254087.condition2)
e3:SetTarget(c13254087.target2) e3:SetTarget(c13254087.target2)
e3:SetOperation(c13254087.operation2) e3:SetOperation(c13254087.operation2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c13254087.desfilter(c) function c13254087.target(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsType(TYPE_SPELL+TYPE_TRAP) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c13254087.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c13254087.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c13254087.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c13254087.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c13254087.operation(e,tp,eg,ep,ev,re,r,rp) function c13254087.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)==1 and Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(13254087,0)) then
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if (tc:IsRace(RACE_PLANT) and tc:IsLevelBelow(1)) or (tc:IsSetCard(0x356)) then if (tc:IsRace(RACE_PLANT) and tc:IsLevelBelow(1)) or (tc:IsSetCard(0x356)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL) Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
Duel.AdjustInstantly(e:GetHandler())
--forbidden
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetCode(EFFECT_FORBIDDEN)
e5:SetTargetRange(0x7f,0x7f)
e5:SetTarget(c13254087.bantg)
e5:SetLabel(ac)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
else else
Duel.MoveSequence(tc,1) Duel.MoveSequence(tc,1)
end end
end
end
end end
function c13254087.condition2(e,tp,eg,ep,ev,re,r,rp) function c13254087.bantg(e,c)
local c=e:GetHandler() return c:IsCode(e:GetLabel())
return c:IsPreviousLocation(LOCATION_DECK)
end end
function c13254087.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254087.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c13254087.operation2(e,tp,eg,ep,ev,re,r,rp) function c13254087.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=Duel.GetFirstTarget() if g:GetCount()>0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) e1:SetValue(-1000)
local e2=Effect.CreateEffect(e:GetHandler()) sc:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_SINGLE) local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(0) sc:RegisterEffect(e2)
e2:SetReset(RESET_EVENT+0x1fe0000) sc=g:GetNext()
tc:RegisterEffect(e2) end
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end end
end end
...@@ -50,7 +50,7 @@ function c13254090.regcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function c13254090.regcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c13254090.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254090.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and tg:IsOnField() and tg:IsAbleToRemove() end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and tg:IsOnField() and tg:IsAbleToRemove() end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0)
...@@ -66,7 +66,7 @@ function c13254090.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c13254090.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
if Duel.GetMZoneCount(tp)<1 or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -81,7 +81,7 @@ function c13254091.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c13254091.posop(e,tp,eg,ep,ev,re,r,rp)
-- tc:RegisterEffect(e1) -- tc:RegisterEffect(e1)
-- tc=og:GetNext() -- tc=og:GetNext()
--end --end
if Duel.GetMZoneCount(tp)<1 or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -56,7 +56,7 @@ function c13254092.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c13254092.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c13254092.confilter,1,nil,1-tp) return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c13254092.confilter,1,nil,1-tp)
end end
function c13254092.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254092.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c13254092.rmfilter,1,nil) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return eg:IsExists(c13254092.rmfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetChainLimit(c13254092.limit(eg)) Duel.SetChainLimit(c13254092.limit(eg))
...@@ -72,7 +72,7 @@ function c13254092.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function c13254092.rmop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1) local sg=g:RandomSelect(tp,1)
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
if Duel.GetMZoneCount(tp)<1 or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -33,7 +33,7 @@ function c13254094.filter5(c,e) ...@@ -33,7 +33,7 @@ function c13254094.filter5(c,e)
end end
function c13254094.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254094.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c13254094.filter4,tp,0,LOCATION_MZONE,nil,e) local mg2=Duel.GetMatchingGroup(c13254094.filter4,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2) mg1:Merge(mg2)
...@@ -124,7 +124,7 @@ function c13254094.target1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -124,7 +124,7 @@ function c13254094.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c13254094.activate1(e,tp,eg,ep,ev,re,r,rp) function c13254094.activate1(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c13254094.filter1a,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c13254094.filter1a,nil,e)
local mg2=Duel.GetMatchingGroup(c13254094.filter3a,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(c13254094.filter3a,tp,LOCATION_GRAVE,0,nil)
local mg3=Duel.GetMatchingGroup(c13254094.filter4a,tp,0,LOCATION_MZONE,nil,e) local mg3=Duel.GetMatchingGroup(c13254094.filter4a,tp,0,LOCATION_MZONE,nil,e)
......
...@@ -32,7 +32,7 @@ function c13254095.filter2(c,e,tp,lv) ...@@ -32,7 +32,7 @@ function c13254095.filter2(c,e,tp,lv)
end end
function c13254095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13254095.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13254095.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c13254095.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c13254095.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c13254095.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c13254095.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
...@@ -40,7 +40,7 @@ function c13254095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,7 +40,7 @@ function c13254095.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c13254095.activate(e,tp,eg,ep,ev,re,r,rp) function c13254095.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
local lv=tc:GetOriginalLevel() local lv=tc:GetOriginalLevel()
......
...@@ -109,13 +109,13 @@ function c13254105.spfilter(c,e,tp) ...@@ -109,13 +109,13 @@ function c13254105.spfilter(c,e,tp)
end end
function c13254105.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254105.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=1-(Duel.GetTurnPlayer()) local p=1-(Duel.GetTurnPlayer())
if chk==0 then return Duel.GetMZoneCount(p)>0 and Duel.IsExistingMatchingCard(c13254105.spfilter,p,LOCATION_GRAVE,0,1,nil,e,p) end if chk==0 then return Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c13254105.spfilter,p,LOCATION_GRAVE,0,1,nil,e,p) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c13254105.spop(e,tp,eg,ep,ev,re,r,rp) function c13254105.spop(e,tp,eg,ep,ev,re,r,rp)
local p=1-(Duel.GetTurnPlayer()) local p=1-(Duel.GetTurnPlayer())
local sg=Duel.GetMatchingGroup(c13254105.spfilter,p,LOCATION_GRAVE,0,nil,e,p) local sg=Duel.GetMatchingGroup(c13254105.spfilter,p,LOCATION_GRAVE,0,nil,e,p)
if Duel.GetMZoneCount(p)>0 and sg:GetCount()>0 then if Duel.GetLocationCount(p,LOCATION_MZONE)>0 and sg:GetCount()>0 then
local tc=sg:Select(p,1,1,nil) local tc=sg:Select(p,1,1,nil)
Duel.SpecialSummon(tc,0,p,p,false,false,POS_FACEDOWN_DEFENSE) Duel.SpecialSummon(tc,0,p,p,false,false,POS_FACEDOWN_DEFENSE)
end end
......
...@@ -56,7 +56,7 @@ function c13254110.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c13254110.operation(e,tp,eg,ep,ev,re,r,rp)
local seq=0 local seq=0
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local des=1 local des=1
if Duel.GetMZoneCount(1-tp)>0 or Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then i=i+1 end if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then i=i+1 end
if Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)>0 then i=i+2 end if Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)>0 then i=i+2 end
if i~=0 and Duel.SelectYesNo(tp,aux.Stringid(13254110,0)) then if i~=0 and Duel.SelectYesNo(tp,aux.Stringid(13254110,0)) then
Duel.BreakEffect() Duel.BreakEffect()
...@@ -107,7 +107,7 @@ function c13254110.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,7 +107,7 @@ function c13254110.condition2(e,tp,eg,ep,ev,re,r,rp)
return tc return tc
end end
function c13254110.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c13254110.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(1-tp) or Duel.GetLocationCount(1-tp,LOCATION_SZONE) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE) or Duel.GetLocationCount(1-tp,LOCATION_SZONE) end
local seq=Duel.SelectDisableField(tp,1,0,LOCATION_ONFIELD,0) local seq=Duel.SelectDisableField(tp,1,0,LOCATION_ONFIELD,0)
e:SetLabel(seq) e:SetLabel(seq)
end end
......
...@@ -53,8 +53,8 @@ function c13254114.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -53,8 +53,8 @@ function c13254114.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cc1=Duel.GetMatchingGroupCount(c13254114.cfilter1,tp,LOCATION_HAND,0,c,e,tp) local cc1=Duel.GetMatchingGroupCount(c13254114.cfilter1,tp,LOCATION_HAND,0,c,e,tp)
local cg2=Duel.GetMatchingGroup(c13254114.cfilter2,tp,LOCATION_HAND,0,c,e,tp) local cg2=Duel.GetMatchingGroup(c13254114.cfilter2,tp,LOCATION_HAND,0,c,e,tp)
local cc2=cg2:GetCount() local cc2=cg2:GetCount()
ft=Duel.GetMZoneCount(tp) ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft=Duel.GetMZoneCount(tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c13254114.thfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c13254114.thfilter(chkc) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c13254114.thfilter,tp,0,LOCATION_ONFIELD,1,nil) and cc2>=2 and cc2-cc1>=1+2-ft end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c13254114.thfilter,tp,0,LOCATION_ONFIELD,1,nil) and cc2>=2 and cc2-cc1>=1+2-ft end
...@@ -105,7 +105,7 @@ function c13254114.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,7 +105,7 @@ function c13254114.thop(e,tp,eg,ep,ev,re,r,rp)
local sg=cg:Filter(c13254114.spfilter,nil,e,tp) local sg=cg:Filter(c13254114.spfilter,nil,e,tp)
if c:IsRelateToEffect(e) then cg:AddCard(c) end if c:IsRelateToEffect(e) then cg:AddCard(c) end
if c:IsCanBeSpecialSummoned(e,0,tp,false,false) then sg:AddCard(c) end if c:IsCanBeSpecialSummoned(e,0,tp,false,false) then sg:AddCard(c) end
if Duel.GetMZoneCount(tp)>=sg:GetCount() then if Duel.GetLocationCount(tp,LOCATION_MZONE)>=sg:GetCount() then
Duel.BreakEffect() Duel.BreakEffect()
cg:Sub(sg) cg:Sub(sg)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -72,8 +72,9 @@ function c13254116.eqlimit(e,c) ...@@ -72,8 +72,9 @@ function c13254116.eqlimit(e,c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end end
function c13254116.efilter(e,te) function c13254116.efilter(e,te)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and (not g or not g:IsContains(c))
end end
function c13254116.condition2(e,tp,eg,ep,ev,re,r,rp) function c13254116.condition2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
......
...@@ -36,7 +36,7 @@ function c13254118.filter5(c,e) ...@@ -36,7 +36,7 @@ function c13254118.filter5(c,e)
end end
function c13254118.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13254118.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c13254118.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c13254118.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c13254118.filter3,tp,0,LOCATION_MZONE,nil,e) local mg2=Duel.GetMatchingGroup(c13254118.filter3,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2) mg1:Merge(mg2)
......
...@@ -52,7 +52,7 @@ function c13254119.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function c13254119.activate(e,tp,eg,ep,ev,re,r,rp)
tc:SetMaterial(mat) tc:SetMaterial(mat)
if Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)~=0 then if Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,true) then if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,true) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
...@@ -75,7 +75,7 @@ function c13254119.filter5a(c) ...@@ -75,7 +75,7 @@ function c13254119.filter5a(c)
end end
function c13254119.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c13254119.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(c13254119.filter4a,tp,0,LOCATION_MZONE,nil) local mg2=Duel.GetMatchingGroup(c13254119.filter4a,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
......
...@@ -119,12 +119,12 @@ function c13254120.spfilter(c,e,tp) ...@@ -119,12 +119,12 @@ function c13254120.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13254120.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13254120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254120.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13254120.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end end
function c13254120.spop(e,tp,eg,ep,ev,re,r,rp) function c13254120.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13254120.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13254120.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--禁忌飞球·腐化灵气场
function c13254121.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c13254121.condition)
c:RegisterEffect(e1)
--deckdes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254121,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(c13254121.target)
e2:SetOperation(c13254121.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DECKDES+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c13254121.drcon)
e3:SetTarget(c13254121.drtg)
e3:SetOperation(c13254121.drop)
c:RegisterEffect(e3)
--cannot set/activate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(1,0)
e4:SetTarget(c13254121.setlimit)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(1,0)
e5:SetValue(c13254121.actlimit)
c:RegisterEffect(e5)
--warp
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_ADD_SETCODE)
e12:SetRange(LOCATION_FZONE)
e12:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE)
e12:SetValue(0x356)
c:RegisterEffect(e12)
end
function c13254121.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c13254121.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) and Duel.IsPlayerCanDiscardDeck(1-tp,5) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,5)
end
function c13254121.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.GetDecktopGroup(tp,5)
local g2=Duel.GetDecktopGroup(1-tp,5)
g1:Merge(g2)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g1,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c13254121.aclimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c13254121.aclimit1(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x356) and not rc:IsImmuneToEffect(e)
end
function c13254121.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5356) and not c:IsType(TYPE_PENDULUM)
end
function c13254121.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c13254121.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c13254121.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct)
end
function c13254121.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 or Duel.SelectYesNo(1-tp,aux.Stringid(13254121,2)) then
Duel.Draw(tp,2,REASON_EFFECT)
if Duel.IsChainDisablable(0) then
Duel.NegateEffect(0)
return
end
end
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local g=Duel.GetDecktopGroup(1-tp,ct)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c13254121.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function c13254121.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--天草飞球
function c13254122.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,13254087),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13254122,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c13254122.cost)
e1:SetTarget(c13254122.target)
e1:SetOperation(c13254122.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254122,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c13254122.sptg)
e2:SetOperation(c13254122.spop)
c:RegisterEffect(e2)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e10:SetCode(EFFECT_CHANGE_LEVEL)
e10:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e10:SetValue(1)
c:RegisterEffect(e10)
end
function c13254122.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
local rt=Duel.GetTargetCount(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
local lp=Duel.GetLP(tp)
local t={}
local m=math.floor(math.min(lp,rt*1000)/1000)
for i=1,m do
t[i]=i*1000
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:SetLabel(ac)
end
function c13254122.target(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,0,LOCATION_ONFIELD,1,nil) end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,ct,0,0)
end
function c13254122.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then
Duel.SendtoDeck(rg,nil,2,REASON_EFFECT)
end
end
function c13254122.spfilter(c,e,tp)
return c:IsCode(13254087) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13254122.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254122.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c13254122.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c13254122.spfilter),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
--飞球高等炼金术
function c13254123.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c13254123.cost)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254123,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,13254123)
e2:SetTarget(c13254123.thtg)
e2:SetOperation(c13254123.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13254123,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,23254123)
e3:SetCost(c13254123.thcost)
e3:SetTarget(c13254123.thtg)
e3:SetOperation(c13254123.thop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(1,0)
e4:SetCondition(c13073850.splimcon)
e4:SetTarget(c13254123.sumlimit)
c:RegisterEffect(e4)
--draw
--local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(13254123,0))
--e2:SetCategory(CATEGORY_DRAW)
--e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
--e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e2:SetCode(EVENT_SPSUMMON_SUCCESS)
--e2:SetRange(LOCATION_SZONE)
--e2:SetCountLimit(1,13254123)
--e2:SetCondition(c13254123.drcon)
--e2:SetTarget(c13254123.drtg)
--e2:SetOperation(c13254123.drop)
--c:RegisterEffect(e2)
--local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(13254123,0))
--e3:SetCategory(CATEGORY_DRAW)
--e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
--e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e3:SetCode(EVENT_TO_DECK)
--e3:SetRange(LOCATION_SZONE)
--e3:SetCountLimit(1,23254123)
--e3:SetCondition(c13254123.drcon1)
--e3:SetTarget(c13254123.drtg)
--e3:SetOperation(c13254123.drop)
--c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(13254123,ACTIVITY_SPSUMMON,c13254123.counterfilter)
end
function c13254123.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(13254123,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c13254123.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function c13254123.thcost(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 c13254123.thfilter(c)
return c:IsSetCard(0x356) and c:IsSetCard(0x46) and c:IsAbleToHand()
end
function c13254123.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254123.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c13254123.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c13254123.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 c13254123.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function c13254123.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x356)
end
function c13254123.gfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:GetSummonPlayer()==tp and (c:IsPreviousLocation(LOCATION_EXTRA) or c:IsSummonType(SUMMON_TYPE_FUSION))
end
function c13254123.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c13254123.gfilter,1,nil,tp)
end
function c13254123.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c13254123.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c13254123.tdfilter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER) and c:GetReasonCard():IsType(TYPE_FUSION) and c:GetPreviousControler()==tp
end
function c13254123.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c13254123.tdfilter,1,nil,tp)
end
--飞球融合·辉耀
function c13254124.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,13254124+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c13254124.condition)
e1:SetCost(c13254124.cost)
e1:SetTarget(c13254124.target)
e1:SetOperation(c13254124.activate)
c:RegisterEffect(e1)
end
function c13254124.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c13254124.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetLabelObject(e)
e2:SetTarget(c13254124.splimit)
Duel.RegisterEffect(e2,tp)
end
function c13254124.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se~=e:GetLabelObject()
end
function c13254124.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x356) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c13254124.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x356) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,true) and c:CheckFusionMaterial(m,nil,chkf)
end
function c13254124.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c13254124.filter0,tp,LOCATION_DECK,0,nil)
local res=Duel.IsExistingMatchingCard(c13254124.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(c13254124.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 c13254124.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetMatchingGroup(c13254124.filter0,tp,LOCATION_DECK,0,nil)
local sg1=Duel.GetMatchingGroup(c13254124.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c13254124.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,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,true,true,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c13254124.tdop)
Duel.RegisterEffect(e1,p)
end
end
function c13254124.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_MZONE,0)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
...@@ -62,12 +62,12 @@ function c13255200.spfilter(c,e,tp) ...@@ -62,12 +62,12 @@ function c13255200.spfilter(c,e,tp)
return c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13255200.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13255200.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c13255200.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13255200.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c13255200.spop(e,tp,eg,ep,ev,re,r,rp) function c13255200.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13255200.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13255200.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c13255201.spcon(e,c) function c13255201.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_EQUIP) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_EQUIP)
end end
function c13255201.filter(c) function c13255201.filter(c)
......
...@@ -35,7 +35,7 @@ function c13255203.initial_effect(c) ...@@ -35,7 +35,7 @@ function c13255203.initial_effect(c)
e6:SetType(EFFECT_TYPE_EQUIP) e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e6:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e6:SetValue(1) e6:SetValue(1)
e6:SetValue(c13255203.indcon) e6:SetCondition(c13255203.indcon)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=e6:Clone() local e7=e6:Clone()
e7:SetType(EFFECT_TYPE_SINGLE) e7:SetType(EFFECT_TYPE_SINGLE)
...@@ -103,14 +103,14 @@ function c13255203.spfilter(c,e,tp) ...@@ -103,14 +103,14 @@ function c13255203.spfilter(c,e,tp)
return c:IsCode(13255201) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(13255201) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13255203.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13255203.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c13255203.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13255203.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c13255203.spop(e,tp,eg,ep,ev,re,r,rp) function c13255203.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13255203.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13255203.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -105,14 +105,14 @@ function c13255208.spfilter(c,e,tp) ...@@ -105,14 +105,14 @@ function c13255208.spfilter(c,e,tp)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_BEASTWARRIOR) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13255208.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13255208.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c13255208.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13255208.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c13255208.spop(e,tp,eg,ep,ev,re,r,rp) function c13255208.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13255208.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13255208.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -43,7 +43,7 @@ function c13255212.spcon(e,c) ...@@ -43,7 +43,7 @@ function c13255212.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetMZoneCount(c:GetControler())>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c13255212.eqcon(e) function c13255212.eqcon(e)
local eg=e:GetHandler():GetEquipGroup() local eg=e:GetHandler():GetEquipGroup()
......
...@@ -102,7 +102,7 @@ function c13255213.tdfilter(c) ...@@ -102,7 +102,7 @@ function c13255213.tdfilter(c)
end end
function c13255213.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13255213.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13255213.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13255213.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13255213.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c13255213.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end and Duel.IsExistingTarget(c13255213.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c13255213.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13255213.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c13255213.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -112,7 +112,7 @@ end ...@@ -112,7 +112,7 @@ end
function c13255213.spop(e,tp,eg,ep,ev,re,r,rp) function c13255213.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local tg=Duel.GetMatchingGroup(c13255213.tdfilter,tp,LOCATION_GRAVE,0,nil) local tg=Duel.GetMatchingGroup(c13255213.tdfilter,tp,LOCATION_GRAVE,0,nil)
if tc:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 and tg:GetCount()>0 then if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tg:GetCount()>0 then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end end
......
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function c13255215.spcon(e,c) function c13255215.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13255215.spfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(c13255215.spfilter,tp,LOCATION_SZONE,0,1,nil)
end end
function c13255215.filter(c) function c13255215.filter(c)
......
...@@ -110,7 +110,7 @@ function c13255217.spfilter(c,e,tp) ...@@ -110,7 +110,7 @@ function c13255217.spfilter(c,e,tp)
return c:IsLevelBelow(1) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(1) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13255217.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13255217.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13255217.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13255217.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end end
......
...@@ -47,7 +47,7 @@ end ...@@ -47,7 +47,7 @@ end
function c13255220.spcon(e,c) function c13255220.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c)
end end
function c13255220.spop(e,tp,eg,ep,ev,re,r,rp,c) function c13255220.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
...@@ -118,7 +118,7 @@ function c13255221.cfilter(c,e,tp) ...@@ -118,7 +118,7 @@ function c13255221.cfilter(c,e,tp)
end end
function c13255221.destg2(e,tp,eg,ep,ev,re,r,rp,chk) function c13255221.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c13255221.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and tg:IsOnField() and tg:IsAbleToRemove() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c13255221.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and tg:IsOnField() and tg:IsAbleToRemove() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c13255221.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,c13255221.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
...@@ -135,7 +135,7 @@ function c13255221.desop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -135,7 +135,7 @@ function c13255221.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local sc=e:GetLabelObject() local sc=e:GetLabelObject()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.GetMZoneCount(tp)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsRelateToEffect(e) and sc:GetFlagEffect(13255221)~=0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsRelateToEffect(e) and sc:GetFlagEffect(13255221)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
Duel.Equip(tp,c,sc) Duel.Equip(tp,c,sc)
......
...@@ -60,12 +60,12 @@ function c13255222.splimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -60,12 +60,12 @@ function c13255222.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
end end
function c13255222.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13255222.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13255222.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13255222.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end end
function c13255222.spop(e,tp,eg,ep,ev,re,r,rp) function c13255222.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13255222.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13255222.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -97,12 +97,12 @@ function c13255222.spfilter1(c,e,tp) ...@@ -97,12 +97,12 @@ function c13255222.spfilter1(c,e,tp)
return c:IsLevelBelow(1) and c:IsFaceup() and not c:IsCode(13255222) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(1) and c:IsFaceup() and not c:IsCode(13255222) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13255222.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c13255222.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13255222.spfilter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c13255222.spfilter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end end
function c13255222.spop1(e,tp,eg,ep,ev,re,r,rp) function c13255222.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=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 g=Duel.SelectMatchingCard(tp,c13255222.spfilter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13255222.spfilter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -70,7 +70,7 @@ function c13255223.spfilter(c,e,tp) ...@@ -70,7 +70,7 @@ function c13255223.spfilter(c,e,tp)
end end
function c13255223.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13255223.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=eg:Filter(c13255223.spfilter,nil,e,tp) local sg=eg:Filter(c13255223.spfilter,nil,e,tp)
if chk==0 then return Duel.GetMZoneCount(tp)>=sg:GetCount() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=sg:GetCount()
and sg:GetCount()>0 end and sg:GetCount()>0 end
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
...@@ -78,7 +78,7 @@ end ...@@ -78,7 +78,7 @@ end
function c13255223.spop(e,tp,eg,ep,ev,re,r,rp) function c13255223.spop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c13255223.spfilter,nil,e,tp) local g=eg:Filter(c13255223.spfilter,nil,e,tp)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if Duel.GetMZoneCount(tp)<sg:GetCount() then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<sg:GetCount() then return end
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
......
...@@ -41,14 +41,6 @@ function c13257201.initial_effect(c) ...@@ -41,14 +41,6 @@ function c13257201.initial_effect(c)
e4:SetCost(c13257201.atkcost) e4:SetCost(c13257201.atkcost)
e4:SetOperation(c13257201.atkop) e4:SetOperation(c13257201.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257201.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257201.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257201.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -60,7 +52,7 @@ function c13257201.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +52,7 @@ function c13257201.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257201.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257201.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257201.atkcon(e,tp,eg,ep,ev,re,r,rp) function c13257201.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
...@@ -80,6 +72,3 @@ function c13257201.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,6 +72,3 @@ function c13257201.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c13257201.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257201,4))
end
...@@ -30,14 +30,6 @@ function c13257202.initial_effect(c) ...@@ -30,14 +30,6 @@ function c13257202.initial_effect(c)
e4:SetTarget(c13257202.postg) e4:SetTarget(c13257202.postg)
e4:SetOperation(c13257202.posop) e4:SetOperation(c13257202.posop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257202.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -49,10 +41,10 @@ function c13257202.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,10 +41,10 @@ function c13257202.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257202.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257202.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257202.thfilter(c) function c13257202.thfilter(c)
return c:IsSetCard(0x353) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x15) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c13257202.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257202.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c13257202.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c13257202.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -63,7 +55,7 @@ end ...@@ -63,7 +55,7 @@ end
function c13257202.posop(e,tp,eg,ep,ev,re,r,rp) function c13257202.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAttackPos,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)==0 then return end Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c13257202.thfilter,tp,LOCATION_DECK,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,c13257202.thfilter,tp,LOCATION_DECK,0,1,1,nil)
...@@ -73,6 +65,3 @@ function c13257202.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +65,3 @@ function c13257202.posop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c13257202.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257202,4))
end
...@@ -42,14 +42,6 @@ function c13257203.initial_effect(c) ...@@ -42,14 +42,6 @@ function c13257203.initial_effect(c)
e5:SetCost(c13257203.descost) e5:SetCost(c13257203.descost)
e5:SetOperation(c13257203.swop) e5:SetOperation(c13257203.swop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257203.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257203.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257203.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -61,7 +53,7 @@ function c13257203.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +53,7 @@ function c13257203.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257203.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257203.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257203.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c13257203.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end
...@@ -100,6 +92,3 @@ function c13257203.swop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,6 +92,3 @@ function c13257203.swop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
end end
function c13257203.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257203,4))
end
...@@ -29,14 +29,6 @@ function c13257204.initial_effect(c) ...@@ -29,14 +29,6 @@ function c13257204.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257204.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257204.otfilter(c,tp) function c13257204.otfilter(c,tp)
...@@ -83,8 +75,5 @@ function c13257204.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,8 +75,5 @@ function c13257204.desrepop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c13257204.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257204.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,1) e:GetHandler():AddCounter(0x1f,2)
end
function c13257204.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257204,4))
end end
--巨大战舰 巨核Mk-2(D) --巨大战舰 巨核Mk-2(D)
function c13257205.initial_effect(c) function c13257205.initial_effect(c)
c:EnableCounterPermit(0x1f) c:EnableCounterPermit(0x1f)
--summon with no tribute
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(13257205,1)) e11:SetDescription(aux.Stringid(13257205,1))
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e11:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e11:SetType(EFFECT_TYPE_SINGLE) e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_SUMMON_PROC) e11:SetCode(EFFECT_SUMMON_PROC)
e11:SetCondition(c13257205.otcon) e11:SetCondition(c13257205.ntcon)
e11:SetOperation(c13257205.otop)
e11:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--Destroy replace --Destroy replace
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -31,57 +30,20 @@ function c13257205.initial_effect(c) ...@@ -31,57 +30,20 @@ function c13257205.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atkup --atkup
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13257205,3)) e4:SetDescription(aux.Stringid(13257205,2))
e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCost(c13257205.atkcost) e4:SetCost(c13257205.atkcost)
e4:SetTarget(c13257205.atktg)
e4:SetOperation(c13257205.atkop) e4:SetOperation(c13257205.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257205.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257205.otfilter(c) function c13257205.ntcon(e,c,minc)
return c:IsSetCard(0x353) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c13257205.otfilter1(c)
return c:IsSetCard(0x353) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c13257205.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
local mg=Duel.GetMatchingGroup(c13257205.otfilter,tp,LOCATION_HAND,0,c) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
local mg1=Duel.GetMatchingGroup(c13257205.otfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and minc<=2
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=1
or Duel.CheckTribute(c,1,1,mg1))
or c:GetLevel()>4 and c:GetLevel()<=6 and minc<=1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=1
end
function c13257205.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c13257205.otfilter,tp,LOCATION_HAND,0,c)
local mg1=Duel.GetMatchingGroup(c13257205.otfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Group.CreateGroup()
if c:GetLevel()>6 then
if mg:GetCount()>0 and mg1:GetCount()==0 or (mg:GetCount()>0 and mg1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(13257205,2))) then
sg=mg:Select(tp,1,1,nil)
else
sg=Duel.SelectTribute(tp,c,1,1,mg1)
end
else
sg=mg:Select(tp,1,1,nil)
end
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end end
function c13257205.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257205.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE) if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE)
...@@ -92,16 +54,12 @@ function c13257205.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,16 +54,12 @@ function c13257205.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257205.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257205.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257205.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13257205.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_COST) e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_COST)
end end
function c13257205.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0
and e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK_MONSTER)==0 end
end
function c13257205.atkop(e,tp,eg,ep,ev,re,r,rp) function c13257205.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
...@@ -116,15 +74,5 @@ function c13257205.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,15 +74,5 @@ function c13257205.atkop(e,tp,eg,ep,ev,re,r,rp)
e6:SetCode(EFFECT_NO_BATTLE_DAMAGE) e6:SetCode(EFFECT_NO_BATTLE_DAMAGE)
e6:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e6:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e7:SetValue(1)
e7:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e7)
end end
end end
function c13257205.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257205,4))
end
--巨大战舰 巨核Mk-3(D) --巨大战舰 巨核Mk-3(D)
function c13257206.initial_effect(c) function c13257206.initial_effect(c)
c:EnableCounterPermit(0x1f) c:EnableCounterPermit(0x1f)
--special summon
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(13257206,1)) e11:SetType(EFFECT_TYPE_FIELD)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e11:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e11:SetType(EFFECT_TYPE_SINGLE) e11:SetCode(EFFECT_SPSUMMON_PROC)
e11:SetCode(EFFECT_SUMMON_PROC) e11:SetTargetRange(POS_FACEUP_DEFENSE,0)
e11:SetCondition(c13257206.otcon) e11:SetRange(LOCATION_HAND)
e11:SetOperation(c13257206.otop) e11:SetCondition(c13257206.sprcon)
e11:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--Destroy replace --Destroy replace
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -44,45 +44,23 @@ function c13257206.initial_effect(c) ...@@ -44,45 +44,23 @@ function c13257206.initial_effect(c)
e5:SetCondition(c13257206.damcon) e5:SetCondition(c13257206.damcon)
e5:SetOperation(c13257206.damop) e5:SetOperation(c13257206.damop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--damage --to deck
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e6:SetCategory(CATEGORY_TODECK)
e6:SetRange(LOCATION_MZONE) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetCode(EVENT_SUMMON_SUCCESS) e6:SetRange(LOCATION_GRAVE)
e6:SetCondition(c13257206.damcon1) e6:SetCost(c13257206.tdcost)
e6:SetOperation(c13257206.damop) e6:SetTarget(c13257206.tdtg)
e6:SetOperation(c13257206.tdop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=e6:Clone()
e6:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetCondition(c13257206.damcon2)
c:RegisterEffect(e8)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257206.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257206.otfilter(c) function c13257206.sprcon(e,c)
return c:IsSetCard(0x353) and c:IsType(TYPE_MONSTER) and (c:IsControler(tp) or c:IsFaceup())
end
function c13257206.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c13257206.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
function c13257206.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c13257206.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end end
function c13257206.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257206.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE) if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE)
...@@ -93,7 +71,7 @@ function c13257206.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +71,7 @@ function c13257206.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257206.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257206.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257206.regop(e,tp,eg,ep,ev,re,r,rp) function c13257206.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(13257206,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1) e:GetHandler():RegisterFlagEffect(13257206,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1)
...@@ -104,17 +82,21 @@ function c13257206.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,17 +82,21 @@ function c13257206.damcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c13257206.damop(e,tp,eg,ep,ev,re,r,rp) function c13257206.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,13257206) Duel.Hint(HINT_CARD,0,13257206)
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,500,REASON_EFFECT)
end end
function c13257206.cfilter(c,tp) function c13257206.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
return c:GetSummonPlayer()==tp if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c13257206.damcon1(e,tp,eg,ep,ev,re,r,rp) function c13257206.tdfilter(c)
return eg:IsExists(c13257206.cfilter,1,nil,1-tp) return c:IsSetCard(0x15) and c:IsAbleToDeck()
end end
function c13257206.damcon2(e,tp,eg,ep,ev,re,r,rp) function c13257206.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
return rp~=tp if chk==0 then return Duel.IsExistingMatchingCard(c13257206.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(c13257206.tdfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c13257206.bgmop(e,tp,eg,ep,ev,re,r,rp) function c13257206.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257206,4)) local g=Duel.GetMatchingGroup(c13257206.tdfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
...@@ -35,7 +35,7 @@ function c13257207.spcon(e,c) ...@@ -35,7 +35,7 @@ function c13257207.spcon(e,c)
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c13257207.spfilter(c,e,tp) function c13257207.spfilter(c,e,tp)
return c:IsCode(13257207) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(100000085) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13257207.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257207.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -51,7 +51,7 @@ function c13257207.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c13257207.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c13257207.thfilter(c) function c13257207.thfilter(c)
return c:IsSetCard(0x353) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(13257207) return c:IsSetCard(0x15) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(100000085)
end end
function c13257207.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257207.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13257207.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13257207.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -5,7 +5,6 @@ function c13257208.initial_effect(c) ...@@ -5,7 +5,6 @@ function c13257208.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c13257208.target)
e1:SetOperation(c13257208.activate) e1:SetOperation(c13257208.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk/def up --atk/def up
...@@ -14,22 +13,41 @@ function c13257208.initial_effect(c) ...@@ -14,22 +13,41 @@ function c13257208.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x353)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15))
e2:SetValue(500) e2:SetValue(500)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15))
e4:SetValue(c13257208.indval)
c:RegisterEffect(e4)
--cannot be target
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15))
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
--spsummon --spsummon
--local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
--e6:SetDescription(aux.Stringid(13257208,1)) e6:SetDescription(aux.Stringid(13257208,1))
--e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
--e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
--e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
--e6:SetCountLimit(1) e6:SetCountLimit(1)
--e6:SetTarget(c13257208.sptg) e6:SetTarget(c13257208.sptg)
--e6:SetOperation(c13257208.spop) e6:SetOperation(c13257208.spop)
--c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(13257208,2)) e7:SetDescription(aux.Stringid(13257208,2))
e7:SetCategory(CATEGORY_DRAW) e7:SetCategory(CATEGORY_DRAW)
...@@ -44,11 +62,7 @@ function c13257208.initial_effect(c) ...@@ -44,11 +62,7 @@ function c13257208.initial_effect(c)
end end
function c13257208.thfilter(c) function c13257208.thfilter(c)
return (c:IsCode(13257209) or c:IsCode(13257211)) and c:IsAbleToHand() return c:IsCode(511000019) and c:IsAbleToHand()
end
function c13257208.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(11,0,aux.Stringid(13257208,4))
end end
function c13257208.activate(e,tp,eg,ep,ev,re,r,rp) function c13257208.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
...@@ -64,7 +78,7 @@ function c13257208.indval(e,re,rp) ...@@ -64,7 +78,7 @@ function c13257208.indval(e,re,rp)
return rp~=e:GetHandlerPlayer() return rp~=e:GetHandlerPlayer()
end end
function c13257208.spfilter(c,e,tp) function c13257208.spfilter(c,e,tp)
return c:IsSetCard(0x353) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13257208.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257208.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -80,7 +94,7 @@ function c13257208.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +94,7 @@ function c13257208.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c13257208.cfilter(c,tp) function c13257208.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsSetCard(0x353) and (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT)) return c:GetPreviousControler()==tp and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function c13257208.drcon(e,tp,eg,ep,ev,re,r,rp) function c13257208.drcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,7 +6,7 @@ function c13257209.initial_effect(c) ...@@ -6,7 +6,7 @@ function c13257209.initial_effect(c)
e1:SetCategory(CATEGORY_COUNTER) e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c13257209.target) e1:SetTarget(c13257209.target)
e1:SetOperation(c13257209.operation) e1:SetOperation(c13257209.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -24,7 +24,7 @@ function c13257209.initial_effect(c) ...@@ -24,7 +24,7 @@ function c13257209.initial_effect(c)
end end
function c13257209.filter(c) function c13257209.filter(c)
return c:IsSetCard(0x353) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanAddCounter(0x1f,3) return c:IsSetCard(0x15) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanAddCounter(0x1f,3)
end end
function c13257209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13257209.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c13257209.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c13257209.filter(chkc) end
...@@ -48,7 +48,7 @@ end ...@@ -48,7 +48,7 @@ end
function c13257209.operation(e,tp,eg,ep,ev,re,r,rp) function c13257209.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x1f,1) tc:AddCounter(0x1f,3)
end end
end end
function c13257209.thcon(e,tp,eg,ep,ev,re,r,rp) function c13257209.thcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -41,14 +41,13 @@ function c13257210.initial_effect(c) ...@@ -41,14 +41,13 @@ function c13257210.initial_effect(c)
e4:SetTarget(c13257210.sptg) e4:SetTarget(c13257210.sptg)
e4:SetOperation(c13257210.spop) e4:SetOperation(c13257210.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--add code
local e12=Effect.CreateEffect(c) local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EVENT_SUMMON_SUCCESS) e12:SetCode(EFFECT_ADD_SETCODE)
e12:SetOperation(c13257210.bgmop) e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetValue(0x15)
c:RegisterEffect(e12) c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257210.ntcon(e,c,minc) function c13257210.ntcon(e,c,minc)
...@@ -79,13 +78,13 @@ function c13257210.desrepop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,13 +78,13 @@ function c13257210.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257210.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257210.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257210.spcon(e,tp,eg,ep,ev,re,r,rp) function c13257210.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler() return eg:GetFirst()==e:GetHandler()
end end
function c13257210.spfilter(c,e,tp) function c13257210.spfilter(c,e,tp)
return c:IsLevelBelow(6) and c:IsSetCard(0x353) and not c:IsCode(13257210) return c:IsLevelBelow(6) and c:IsSetCard(0x15) and not c:IsCode(12079734)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13257210.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13257210.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -102,6 +101,3 @@ function c13257210.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,6 +101,3 @@ function c13257210.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c13257210.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257210,4))
end
--BOSS来袭(D) --BOSS来袭(D)
function c13257211.initial_effect(c) function c13257211.initial_effect(c)
c:SetUniqueOnField(1,0,13257211)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -24,7 +23,7 @@ function c13257211.initial_effect(c) ...@@ -24,7 +23,7 @@ function c13257211.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_TO_GRAVE)
e4:SetOperation(c13257211.checkop) e4:SetOperation(c13257211.checkop)
c:RegisterEffect(e4,0) c:RegisterEffect(e4,0)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
...@@ -67,7 +66,7 @@ function c13257211.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +66,7 @@ function c13257211.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c13257211.chkfilter(c,tp) function c13257211.chkfilter(c,tp)
return c:IsSetCard(0x353) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:IsSetCard(0x15) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end end
function c13257211.checkop(e,tp,eg,ep,ev,re,r,rp) function c13257211.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c13257211.chkfilter,1,nil,tp) then if eg:IsExists(c13257211.chkfilter,1,nil,tp) then
...@@ -78,7 +77,7 @@ function c13257211.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +77,7 @@ function c13257211.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(13257211)~=0 return e:GetHandler():GetFlagEffect(13257211)~=0
end end
function c13257211.filter(c,e,tp) function c13257211.filter(c,e,tp)
return c:IsSetCard(0x353) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13257211.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257211.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -30,14 +30,6 @@ function c13257212.initial_effect(c) ...@@ -30,14 +30,6 @@ function c13257212.initial_effect(c)
e3:SetTarget(c13257212.thtg) e3:SetTarget(c13257212.thtg)
e3:SetOperation(c13257212.thop) e3:SetOperation(c13257212.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257212.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257212.spcon(e,c) function c13257212.spcon(e,c)
...@@ -84,7 +76,7 @@ function c13257212.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,7 +76,7 @@ function c13257212.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c13257212.thfilter(c) function c13257212.thfilter(c)
return c:IsSetCard(0x353) and c:IsAbleToHand() return c:IsSetCard(0x15) and c:IsAbleToHand()
end end
function c13257212.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257212.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13257212.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13257212.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -98,6 +90,3 @@ function c13257212.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,6 +90,3 @@ function c13257212.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c13257212.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257212,4))
end
...@@ -11,7 +11,8 @@ function c13257213.initial_effect(c) ...@@ -11,7 +11,8 @@ function c13257213.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate --Activate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
...@@ -23,7 +24,7 @@ function c13257213.initial_effect(c) ...@@ -23,7 +24,7 @@ function c13257213.initial_effect(c)
end end
function c13257213.filter(c,e,tp) function c13257213.filter(c,e,tp)
return c:IsSetCard(0x353) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13257213.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13257213.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -56,17 +57,24 @@ function c13257213.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,17 +57,24 @@ function c13257213.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c13257213.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13257213.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
and Duel.IsExistingMatchingCard(c13257213.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c13257213.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c13257213.activate2(e,tp,eg,ep,ev,re,r,rp) function c13257213.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local att=tc:GetAttribute()
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13257213.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c13257213.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -80,4 +88,5 @@ function c13257213.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,4 +88,5 @@ function c13257213.activate2(e,tp,eg,ep,ev,re,r,rp)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end
end end
...@@ -10,6 +10,14 @@ function c13257214.initial_effect(c) ...@@ -10,6 +10,14 @@ function c13257214.initial_effect(c)
e1:SetCondition(c13257214.spcon) e1:SetCondition(c13257214.spcon)
e1:SetOperation(c13257214.spop) e1:SetOperation(c13257214.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c13257214.retcon)
e2:SetOperation(c13257214.retop)
c:RegisterEffect(e2)
--spsummon cost --spsummon cost
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
...@@ -18,29 +26,8 @@ function c13257214.initial_effect(c) ...@@ -18,29 +26,8 @@ function c13257214.initial_effect(c)
e3:SetCost(c13257214.spcost) e3:SetCost(c13257214.spcost)
e3:SetOperation(c13257214.spcop) e3:SetOperation(c13257214.spcop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetValue(c13257214.indct)
c:RegisterEffect(e4)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257214.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
Duel.AddCustomActivityCounter(13257214,ACTIVITY_NORMALSUMMON,c13257214.counterfilter)
Duel.AddCustomActivityCounter(13257214,ACTIVITY_SPSUMMON,c13257214.counterfilter)
end end
function c13257214.counterfilter(c)
return c:IsSetCard(0x353)
end
function c13257214.spfilter(c,ft) function c13257214.spfilter(c,ft)
return c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) return c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5)
end end
...@@ -57,7 +44,7 @@ function c13257214.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -57,7 +44,7 @@ function c13257214.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c13257214.spcost(e,c,tp) function c13257214.spcost(e,c,tp)
return Duel.GetCustomActivityCount(13257214,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(13257214,tp,ACTIVITY_NORMALSUMMON)==0 return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end end
function c13257214.spcop(e,tp,eg,ep,ev,re,r,rp) function c13257214.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -77,13 +64,18 @@ function c13257214.spcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,13 +64,18 @@ function c13257214.spcop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function c13257214.splimit(e,c) function c13257214.splimit(e,c)
return not c:IsSetCard(0x353) return not c:IsSetCard(0x15)
end end
function c13257214.bgmop(e,tp,eg,ep,ev,re,r,rp) function c13257214.retcon(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257214,4)) return e:GetHandler():GetControler()~=e:GetHandler():GetOwner()
end end
function c13257214.indct(e,re,r,rp) function c13257214.retop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then local c=e:GetOwner()
return 1 c:ResetEffect(EFFECT_SET_CONTROL,RESET_CODE)
else return 0 end local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(c:GetOwner())
e1:SetReset(RESET_EVENT+0xec0000)
c:RegisterEffect(e1)
end end
...@@ -10,13 +10,6 @@ function c13257215.initial_effect(c) ...@@ -10,13 +10,6 @@ function c13257215.initial_effect(c)
e11:SetOperation(c13257215.otop) e11:SetOperation(c13257215.otop)
e11:SetValue(SUMMON_TYPE_ADVANCE) e11:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--cannot special summon
local e12=Effect.CreateEffect(c)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SPSUMMON_CONDITION)
e12:SetValue(aux.FALSE)
c:RegisterEffect(e12)
--Destroy replace --Destroy replace
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
...@@ -38,7 +31,7 @@ function c13257215.initial_effect(c) ...@@ -38,7 +31,7 @@ function c13257215.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--remove --remove
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13257215,2)) e4:SetDescription(aux.Stringid(13257203,1))
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
...@@ -58,14 +51,6 @@ function c13257215.initial_effect(c) ...@@ -58,14 +51,6 @@ function c13257215.initial_effect(c)
e5:SetTarget(c13257215.sptg) e5:SetTarget(c13257215.sptg)
e5:SetOperation(c13257215.spop) e5:SetOperation(c13257215.spop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e13:SetCode(EVENT_SUMMON_SUCCESS)
e13:SetOperation(c13257215.bgmop)
c:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e14)
end end
function c13257215.otfilter(c,tp) function c13257215.otfilter(c,tp)
...@@ -161,14 +146,14 @@ function c13257215.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -161,14 +146,14 @@ function c13257215.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c13257215.spcon(e,tp,eg,ep,ev,re,r,rp) function c13257215.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=s:GetHandler()
return c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp return c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
end end
function c13257215.spfilter(c,e,tp) function c13257215.spfilter(c,e,tp)
return c:IsLevelBelow(6) and c:IsSetCard(0x353) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(6) and c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13257215.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257215.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13257215.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(c13257215.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c13257215.spop(e,tp,eg,ep,ev,re,r,rp) function c13257215.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -179,6 +164,3 @@ function c13257215.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -179,6 +164,3 @@ function c13257215.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c13257215.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257215,4))
end
...@@ -36,14 +36,6 @@ function c13257216.initial_effect(c) ...@@ -36,14 +36,6 @@ function c13257216.initial_effect(c)
e4:SetTarget(c13257216.thtg) e4:SetTarget(c13257216.thtg)
e4:SetOperation(c13257216.thop) e4:SetOperation(c13257216.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257216.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
end end
function c13257216.cfilter(c,tp) function c13257216.cfilter(c,tp)
...@@ -87,7 +79,7 @@ function c13257216.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,7 +79,7 @@ function c13257216.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c13257216.thfilter(c) function c13257216.thfilter(c)
return c:IsSetCard(0x353) and c:IsAbleToHand() return c:IsSetCard(0x15) and c:IsAbleToHand()
end end
function c13257216.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257216.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13257216.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13257216.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -101,6 +93,3 @@ function c13257216.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,6 +93,3 @@ function c13257216.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c13257216.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257216,4))
end
...@@ -15,14 +15,14 @@ function c13257217.initial_effect(c) ...@@ -15,14 +15,14 @@ function c13257217.initial_effect(c)
e2:SetCategory(CATEGORY_COUNTER) e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c13257217.ctop) e2:SetOperation(c13257215.ctop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--remove --remove
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13257217,1)) e4:SetDescription(aux.Stringid(13257203,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_POSITION) e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
...@@ -31,31 +31,36 @@ function c13257217.initial_effect(c) ...@@ -31,31 +31,36 @@ function c13257217.initial_effect(c)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetHintTiming(0,0x1e0) e4:SetHintTiming(0,0x1e0)
e4:SetCondition(c13257217.poscon) e4:SetCondition(c13257217.poscon)
e4:SetCost(c13257217.poscost)
e4:SetTarget(c13257217.postg) e4:SetTarget(c13257217.postg)
e4:SetOperation(c13257217.posop) e4:SetOperation(c13257217.posop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c13257217.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257202.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE) if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE)
and e:GetHandler():GetCounter(0x1f)>0 end and e:GetHandler():GetCounter(0x1f)>0 end
return true return true
end end
function c13257217.desrepop(e,tp,eg,ep,ev,re,r,rp) function c13257202.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT) e:GetHandler():RemoveCounter(ep,0x1f,1,REASON_EFFECT)
end end
function c13257217.ctop(e,tp,eg,ep,ev,re,r,rp) function c13257202.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,2) e:GetHandler():AddCounter(0x1f,3)
end end
function c13257217.poscon(e,tp,eg,ep,ev,re,r,rp) function c13257202.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c13257217.postg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257202.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_COST)
end
function c13257202.postg(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 if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c13257217.posop(e,tp,eg,ep,ev,re,r,rp) function c13257202.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
...@@ -64,7 +69,7 @@ function c13257217.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +69,7 @@ function c13257217.posop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(-700) e1:SetValue(-700)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -74,6 +79,3 @@ function c13257217.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +79,3 @@ function c13257217.posop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c13257217.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257217,4))
end
...@@ -12,18 +12,10 @@ function c13257218.initial_effect(c) ...@@ -12,18 +12,10 @@ function c13257218.initial_effect(c)
e11:SetCode(EFFECT_SPSUMMON_PROC) e11:SetCode(EFFECT_SPSUMMON_PROC)
e11:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) e11:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e11:SetRange(LOCATION_HAND) e11:SetRange(LOCATION_HAND)
e11:SetTargetRange(POS_FACEUP_ATTACK,1) e11:SetTargetRange(POS_FACEUP,1)
e11:SetCondition(c13257218.spcon) e11:SetCondition(c13257218.spcon)
e11:SetOperation(c13257218.spop) e11:SetOperation(c13257218.spop)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--spsummon cost
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_SPSUMMON_COST)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e12:SetCost(c13257218.spcost)
e12:SetOperation(c13257218.spcop)
c:RegisterEffect(e12)
--Destroy replace --Destroy replace
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
...@@ -68,21 +60,8 @@ function c13257218.initial_effect(c) ...@@ -68,21 +60,8 @@ function c13257218.initial_effect(c)
e5:SetTarget(c13257218.distg) e5:SetTarget(c13257218.distg)
e5:SetOperation(c13257218.disop) e5:SetOperation(c13257218.disop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e13:SetCode(EVENT_SUMMON_SUCCESS)
e13:SetOperation(c13257218.bgmop)
c:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e14)
Duel.AddCustomActivityCounter(13257218,ACTIVITY_SPSUMMON,c13257218.counterfilter)
Duel.AddCustomActivityCounter(13257218,ACTIVITY_NORMALSUMMON,c13257218.counterfilter)
end end
function c13257218.counterfilter(c)
return not c:IsSetCard(0x353)
end
function c13257218.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13257218.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE) if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE)
and e:GetHandler():GetCounter(0x1f)>0 end and e:GetHandler():GetCounter(0x1f)>0 end
...@@ -165,7 +144,7 @@ function c13257218.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -165,7 +144,7 @@ function c13257218.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) return Duel.IsChainNegatable(ev)
end end
function c13257218.costfilter(c) function c13257218.costfilter(c)
return c:IsSetCard(0x353) and c:IsDiscardable() return c:IsSetCard(0x15) and c:IsDiscardable()
end end
function c13257218.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c13257218.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13257218.costfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13257218.costfilter,tp,LOCATION_HAND,0,1,nil) end
...@@ -184,28 +163,3 @@ function c13257218.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -184,28 +163,3 @@ function c13257218.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function c13257218.spcost(e,c,tp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
end
function c13257218.spcop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c13257218.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
end
function c13257218.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0x356)
end
function c13257218.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257218,4))
end
...@@ -31,27 +31,15 @@ function c13257219.initial_effect(c) ...@@ -31,27 +31,15 @@ function c13257219.initial_effect(c)
e3:SetTarget(c13257219.sptg) e3:SetTarget(c13257219.sptg)
e3:SetOperation(c13257219.spop) e3:SetOperation(c13257219.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_SUMMON_SUCCESS)
e12:SetOperation(c13257219.bgmop)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e13)
Duel.AddCustomActivityCounter(13257219,ACTIVITY_SPSUMMON,c13257219.counterfilter)
end end
function c13257219.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA
end
function c13257219.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c13257219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c13257219.filter(c) function c13257219.filter(c)
return c:IsCode(13257208) and c:IsAbleToHand() return c:IsCode(975299) and c:IsAbleToHand()
end end
function c13257219.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13257219.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c13257219.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13257219.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -65,7 +53,7 @@ function c13257219.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,7 +53,7 @@ function c13257219.operation(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c13257219.thcon(e,tp,eg,ep,ev,re,r,rp) function c13257219.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(13257208) return Duel.IsEnvironment(975299)
end end
function c13257219.cfilter(c) function c13257219.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
...@@ -78,7 +66,7 @@ function c13257219.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,7 +66,7 @@ function c13257219.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c13257219.thfilter(c) function c13257219.thfilter(c)
return c:IsSetCard(0x353) and c:IsAbleToHand() return c:IsSetCard(0x15) and c:IsAbleToHand()
end end
function c13257219.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13257219.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c13257219.thfilter(chkc) end if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c13257219.thfilter(chkc) end
...@@ -95,7 +83,7 @@ function c13257219.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +83,7 @@ function c13257219.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c13257219.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13257219.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.GetCustomActivityCount(13257219,tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -104,9 +92,6 @@ function c13257219.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -104,9 +92,6 @@ function c13257219.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c13257219.sumlimit) e1:SetTarget(c13257219.sumlimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local cg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD)
end end
function c13257219.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) function c13257219.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
...@@ -137,6 +122,3 @@ function c13257219.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,6 +122,3 @@ function c13257219.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c13257219.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(13257219,4))
end
--细雨的红伞-清明
function c60404.initial_effect(c)
--umb
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60404,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c60404.condition)
e1:SetCost(c60404.cost)
e1:SetTarget(c60404.target)
e1:SetOperation(c60404.operation)
c:RegisterEffect(e1)
--to grave
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetDescription(aux.Stringid(60404,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60404)
e2:SetCondition(aux.exccon)
e2:SetCost(c60404.drcost)
e2:SetTarget(c60404.drtg)
e2:SetOperation(c60404.drop)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
end
c60404.DescSetName = 0x229
function c60404.umbfilter(c)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
return mt and mt.DescSetName == 0x229 and c:IsAbleToGrave()
end
function c60404.condition(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 c60404.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c60404.filter(c)
return c:IsFaceup() and c:GetFlagEffect(60404)==0 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c60404.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c60404.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60404.filter,tp,0,LOCATION_MZONE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60404.filter,tp,0,LOCATION_MZONE,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,2,0,0)
end
function c60404.cfilter(c,e,tp)
return c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(1-tp)
end
function c60404.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(c60404.cfilter,nil,e,tp)
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_ATTACK)
tc:RegisterEffect(e5)
tc:RegisterFlagEffect(60404,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,0)
tc=tg:GetNext()
end
end
function c60404.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c60404.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60404.umbfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c60404.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60404.umbfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--梅雨的黄伞-芒种
function c60605.initial_effect(c)
--umb
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60605,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c60605.condition)
e1:SetCost(c60605.cost)
e1:SetTarget(c60605.target)
e1:SetOperation(c60605.operation)
c:RegisterEffect(e1)
--视频summon
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(60605,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,60605+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c60605.drcost)
e2:SetTarget(c60605.drtg)
e2:SetOperation(c60605.drop)
c:RegisterEffect(e2)
end
c60605.DescSetName = 0x229
function c60605.umbfilter(c,e,tp)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
return c:GetAttack()==400 and c:GetDefense()==1000 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetCode())
end
function c60605.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW)
end
function c60605.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c60605.cfilter,1,nil,1-tp)
end
function c60605.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c60605.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,eg,eg:GetCount(),1-tp,0)
end
function c60605.filter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c60605.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c60605.filter,nil,e,1-tp)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function c60605.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c60605.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60605.umbfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c60605.drop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c60605.umbfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
while g:GetCount()>0 and ft>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummonStep(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
end
Duel.SpecialSummonComplete()
end
--霏雪的黄伞-立冬
function c61107.initial_effect(c)
--umb
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61107,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c61107.condition)
e1:SetCost(c61107.cost)
e1:SetTarget(c61107.target)
e1:SetOperation(c61107.operation)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(61107,2))
e3:SetCode(EVENT_SSET)
c:RegisterEffect(e3)
--search
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(61107,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,61107+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(aux.exccon)
e2:SetCost(c61107.drcost)
e2:SetTarget(c61107.drtg)
e2:SetOperation(c61107.drop)
c:RegisterEffect(e2)
end
c61107.DescSetName = 0x229
function c61107.umbfilter(c)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
return mt and mt.DescSetName == 0x229 and c:IsAbleToHand()
end
function c61107.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_DECK)
end
function c61107.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c61107.cfilter,1,nil,1-tp)
end
function c61107.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c61107.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c61107.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c61107.cfilter,nil,1-tp)
if sg:GetCount()>0 then
local g=eg:Select(tp,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c61107.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c61107.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c61107.umbfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c61107.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c61107.umbfilter,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 c61122.initial_effect(c)
--umb
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61122,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c61122.cost)
e1:SetTarget(c61122.target)
e1:SetOperation(c61122.operation)
c:RegisterEffect(e1)
--to grave
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(61122,1))
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,61122)
e2:SetCost(c61122.drcost)
e2:SetTarget(c61122.drtg)
e2:SetOperation(c61122.drop)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
end
c61122.DescSetName = 0x229
function c61122.umbfilter(c)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
return mt and mt.DescSetName == 0x229 and c:IsDiscardable()
end
function c61122.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c61122.umbfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c61122.umbfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c61122.filter(c)
return aux.TRUE
end
function c61122.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c:IsControler(1-tp) and c61122.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c61122.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c61122.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c61122.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c61122.exfilter(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c61122.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c61122.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c61122.exfilter,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c61122.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c61122.exfilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
local c=e:GetHandler()
while tc do
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:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment