Commit 6b33cafe authored by Nemo Ma's avatar Nemo Ma

wd 250615

parent e0624a33
...@@ -41,10 +41,6 @@ ...@@ -41,10 +41,6 @@
130002004 0 130002004 0
130002005 0 130002005 0
#WILD, I say WILD, WAHAHA #WILD, I say WILD, WAHAHA
91010018 0
91010017 0
91010019 0
98941001 0
4058 0 4058 0
575513 0 575513 0
700021 0 700021 0
...@@ -71,6 +67,56 @@ ...@@ -71,6 +67,56 @@
4865037 0 4865037 0
4865039 0 4865039 0
4865040 0 4865040 0
5012601 0
5012602 0
5012603 0
5012604 0
5012605 0
5012606 0
5012607 0
5012608 0
5012609 0
5012610 0
5012611 0
5012612 0
5012613 0
5012614 0
5012615 0
5012616 0
5012617 0
5012618 0
5012619 0
5012620 0
5012621 0
5012622 0
5012623 0
5012624 0
5012625 0
5012626 0
5012627 0
5012628 0
5012629 0
5012630 0
5012631 0
5012632 0
5012634 0
5012635 0
5012636 0
5012637 0
5012638 0
5012639 0
5012681 0
5012682 0
5012683 0
5012684 0
5012685 0
5013115 0
5013116 0
5013300 0
5013355 0
5013400 0
5013411 0
5013507 0
7210001 0 7210001 0
7210002 0 7210002 0
7210003 0 7210003 0
...@@ -114,6 +160,22 @@ ...@@ -114,6 +160,22 @@
10173077 0 10173077 0
10199990 0 10199990 0
10736541 0 10736541 0
10955013 0
10955014 0
10955016 0
10955017 0
10955018 0
10955019 0
10955020 0
10955021 0
10955022 0
10955023 0
10955025 0
10955026 0
10955027 0
10955029 0
10955030 0
10955031 0
11163044 0 11163044 0
11450000 0 11450000 0
11450001 0 11450001 0
...@@ -174,6 +236,26 @@ ...@@ -174,6 +236,26 @@
11560323 0 11560323 0
11591111 0 11591111 0
11591112 0 11591112 0
11605001 0
11605003 0
11605005 0
11605007 0
11605009 0
11605011 0
11605013 0
11605015 0
11605017 0
11605030 0
11605033 0
11605036 0
11605039 0
11605043 0
11605046 0
11605049 0
11605052 0
11605055 0
11605058 0
11605061 0
11662004 0 11662004 0
11845760 0 11845760 0
11845762 0 11845762 0
...@@ -197,6 +279,14 @@ ...@@ -197,6 +279,14 @@
12071005 0 12071005 0
12071006 0 12071006 0
12678871 0 12678871 0
12801805 0
12801810 0
12801815 0
12801820 0
12801825 0
12801830 0
12801835 0
12801840 0
12847411 0 12847411 0
12847413 0 12847413 0
12847415 0 12847415 0
...@@ -358,6 +448,13 @@ ...@@ -358,6 +448,13 @@
21113900 0 21113900 0
21113905 0 21113905 0
21113910 0 21113910 0
21113915 0
21113920 0
21113925 0
21113930 0
21113935 0
21113940 0
21113945 0
21185800 0 21185800 0
21185805 0 21185805 0
21185857 0 21185857 0
...@@ -373,20 +470,6 @@ ...@@ -373,20 +470,6 @@
21419996 0 21419996 0
22348028 0 22348028 0
22348134 0 22348134 0
22510002 0
22510003 0
22510004 0
22510005 0
22510006 0
22510007 0
22510008 0
22510009 0
22510010 0
22510011 0
22510012 0
22510013 0
22510014 0
22510015 0
24501001 0 24501001 0
24501003 0 24501003 0
24501006 0 24501006 0
...@@ -474,6 +557,16 @@ ...@@ -474,6 +557,16 @@
30001005 0 30001005 0
30001007 0 30001007 0
30001012 0 30001012 0
30001200 0
30001205 0
30001210 0
30001215 0
30001220 0
30001225 0
30001230 0
30001235 0
30001240 0
30001245 0
30002050 0 30002050 0
30002055 0 30002055 0
30002060 0 30002060 0
...@@ -925,6 +1018,8 @@ ...@@ -925,6 +1018,8 @@
67200827 0 67200827 0
67200829 0 67200829 0
67200832 0 67200832 0
67200833 0
67200835 0
70000900 0 70000900 0
70000902 0 70000902 0
70000904 0 70000904 0
...@@ -1206,6 +1301,18 @@ ...@@ -1206,6 +1301,18 @@
75646419 0 75646419 0
75646421 0 75646421 0
75646423 0 75646423 0
75739001 0
75739002 0
75739003 0
75739004 0
75739005 0
75739006 0
75739007 0
75739008 0
75739009 0
75739011 0
75739012 0
75739013 0
76372772 0 76372772 0
77000501 0 77000501 0
77000502 0 77000502 0
...@@ -1482,6 +1589,7 @@ ...@@ -1482,6 +1589,7 @@
88881044 0 88881044 0
88881045 0 88881045 0
88881086 0 88881086 0
88881170 0
88897048 0 88897048 0
88897050 0 88897050 0
88897051 0 88897051 0
...@@ -1516,6 +1624,7 @@ ...@@ -1516,6 +1624,7 @@
89390013 0 89390013 0
89410001 0 89410001 0
89412001 0 89412001 0
90150000 0
90351999 0 90351999 0
90700001 0 90700001 0
90700002 0 90700002 0
...@@ -1617,6 +1726,9 @@ ...@@ -1617,6 +1726,9 @@
90720630 0 90720630 0
90720631 0 90720631 0
91000101 0 91000101 0
91010017 0
91010018 0
91010019 0
91010080 0 91010080 0
91011010 0 91011010 0
91011012 0 91011012 0
...@@ -1627,6 +1739,9 @@ ...@@ -1627,6 +1739,9 @@
91060013 0 91060013 0
91060015 0 91060015 0
91060017 0 91060017 0
91300100 0
91300101 0
91300102 0
92781608 0 92781608 0
94380880 0 94380880 0
95703000 0 95703000 0
...@@ -1689,31 +1804,6 @@ ...@@ -1689,31 +1804,6 @@
96071074 0 96071074 0
96071075 0 96071075 0
98452220 0 98452220 0
98730001 0
98730004 0
98730007 0
98730010 0
98730013 0
98730015 0
98730017 0
98730019 0
98730113 0
98730115 0
98730117 0
98730119 0
98730213 0
98730215 0
98730217 0
98730219 0
98730313 0
98730315 0
98730317 0
98730319 0
98730413 0
98730415 0
98730417 0
98730419 0
98731001 0
98920005 0 98920005 0
98920032 0 98920032 0
98920042 0 98920042 0
...@@ -1838,6 +1928,7 @@ ...@@ -1838,6 +1928,7 @@
98940046 0 98940046 0
98940047 0 98940047 0
98941000 0 98941000 0
98941001 0
98941043 0 98941043 0
98941044 0 98941044 0
98941045 0 98941045 0
......
No preview for this file type
--撒野 绽华
local s,id,o=GetID()
function s.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
s.saya_code_1={[0]={}, [1]={}}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(s.resetop)
Duel.RegisterEffect(ge1,0)
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
s.saya_code_1[p]={}
end
end
function s.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x19d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local ch=Duel.GetCurrentChain()
if ch>1 then
local p=Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)
if p==1-tp and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
local lvl=1
sel=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
e1:SetValue(lvl)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function s.thfilter(c,p)
return c:IsSetCard(0x9a7d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not s.saya_code_1[p][c:GetCode()]
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) and
Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsLocation(LOCATION_HAND) then
local code=tc:GetCode()
local p=tc:GetControler()
s.saya_code_1[p][code]=true
end
end
end
end
end
\ No newline at end of file
--撒野 绚丽
local s,id,o=GetID()
function s.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
s.saya_code_2={[0]={}, [1]={}}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(s.resetop)
Duel.RegisterEffect(ge1,0)
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
s.saya_code_2[p]={}
end
end
function s.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x19d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local ch=Duel.GetCurrentChain()
if ch>1 then
local p=Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)
if p==1-tp and Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(function(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if tc:GetFlagEffect(id+2)==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(id+2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
Duel.AdjustInstantly(c)
end
end
end
end
function s.efilter(e,re)
local res=re:IsActivated() and re:GetOwnerPlayer()~=e:GetHandlerPlayer()
if res then e:GetHandler():RegisterFlagEffect(id+o,RESET_PHASE+PHASE_END,0,1) end
local ct1=e:GetHandler():GetFlagEffect(id)
local ct2=e:GetHandler():GetFlagEffect(id+o)
if ct1>=ct2 then
return res
else
return false
end
end
function s.thfilter(c,p)
return c:IsSetCard(0x9a7d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not s.saya_code_2[p][c:GetCode()]
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) and
Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsLocation(LOCATION_HAND) then
local code=tc:GetCode()
local p=tc:GetControler()
s.saya_code_2[p][code]=true
end
end
end
end
end
\ No newline at end of file
--撒野 偏执
local s,id,o=GetID()
function s.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x19d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local ch=Duel.GetCurrentChain()
if ch>1 then
local p=Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)
if p==1-tp and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
end
end
function s.thfilter(c)
return c:IsType(TYPE_XYZ) and c:IsFaceup() and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil) and
Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_CARD,0,id)
local g1=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if #g1>0 and #g2>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg2=g2:Select(tp,1,2,sg1)
Duel.HintSelection(sg2)
local og=Group.CreateGroup()
for tc in aux.Next(sg2) do
if tc:IsType(TYPE_XYZ) and tc:GetOverlayCount()>0 then
og:Merge(tc:GetOverlayGroup())
end
end
if #og>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(sg1:GetFirst(),sg2)
end
end
end
\ No newline at end of file
--撒野 蚀爱
local s,id,o=GetID()
function s.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x19d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local ch=Duel.GetCurrentChain()
if ch>1 then
local p=Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)
if p==1-tp and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(0,1)
e1:SetCost(s.costchk)
e1:SetOperation(s.costop)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function s.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,id)
return Duel.CheckLPCost(tp,ct*400)
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,400)
end
function s.thfilter(c)
return c:IsType(TYPE_XYZ) and c:IsFaceup()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil) and
Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_MZONE,0,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
if tc then
local val=tc:GetRank()*400
if val>0 then
Duel.Damage(1-tp,val,REASON_EFFECT)
Duel.Recover(tp,val,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--撒野 极欲
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x9a7d),10,4,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.e1con)
e1:SetCost(s.e1cost)
e1:SetOperation(s.e1op)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(1193)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCost(s.e2cost)
e2:SetTarget(s.e2tg)
e2:SetOperation(s.e2op)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
s.saya_code_3={[0]={}, [1]={}}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(s.resetop)
Duel.RegisterEffect(ge2,0)
end
end
function s.resetop(e,tp,eg,ep,ev,re,r,rp)
for p=0,1 do
s.saya_code_3[p]={}
end
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
for tc in aux.Next(eg) do
local code=tc:GetCode()
local p=tc:GetSummonPlayer()
if tc:IsSetCard(0x9a7d) and not s.saya_code_3[p][code] then
s.saya_code_3[p][code]=true
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)>=5 and Duel.GetFlagEffect(tp,id+o)==0 end
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.e1con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.e1filter(c,ct)
return c:IsType(TYPE_XYZ) and c:GetRank()<=ct and c:IsAbleToGraveAsCost()
end
function s.e1cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetOverlayCount()
if chk==0 then return Duel.IsExistingMatchingCard(s.e1filter,tp,LOCATION_EXTRA,0,1,nil,ct) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.e1filter,tp,LOCATION_EXTRA,0,1,1,nil,ct)
e:SetLabel(g:GetFirst():GetAttack())
Duel.SendtoGrave(g,REASON_COST)
end
function s.e1op(e,tp,eg,ep,ev,re,r,rp)
local val=e:GetLabel()
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-val)
end
function s.e2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.e2filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function s.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.e2filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.e2op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.e2filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>=4 and Duel.IsExistingMatchingCard(s.e2trapfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g2=Duel.SelectMatchingCard(tp,s.e2trapfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local tc=g2:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
function s.e2trapfilter(c)
return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and not c:IsForbidden()
end
\ No newline at end of file
--撒野 狂恋
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedureLevelFree(c,s.mfilter,s.xyzcheck,2,2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.regcon)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(s.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--get effect
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1)
e4:SetCondition(s.e3con)
e4:SetTarget(s.e3tg)
e4:SetOperation(s.e3op)
c:RegisterEffect(e4)
end
function s.mfilter(c,xyzc)
return c:IsLevelAbove(1)
end
function s.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x9a7d) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.filter1(c,e,tp,rk,mc)
return c:IsRank(rk) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
function s.filter2(c,e,tp,rk,mc)
return (c:IsRank(rk+1) or c:IsRank(rk+2)) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.e3con(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.e3tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank(),c)
and g:IsExists(Card.IsSetCard,1,nil,tp,0x9a7d) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.e3op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
if g:IsExists(Card.IsSetCard,1,nil,tp,0x9a7d) then
local cg=g:Filter(Card.IsSetCard,nil,0x9a7d)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local sg=cg:Select(tp,1,1,nil)
if #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT)>0 then
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank(),c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
end
end
\ No newline at end of file
--撒野 瞬发
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
--overlay
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.ovcon)
e3:SetTarget(s.ovtg)
e3:SetOperation(s.ovop)
c:RegisterEffect(e3)
end
function s.handcon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.sfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,2000,2300,5,RACE_FAIRY,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.tgfilter(c,e,tp)
return c:IsSetCard(0x9a7d) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPES_NORMAL_TRAP_MONSTER,2000,2300,5,RACE_FAIRY,ATTRIBUTE_WIND) then return end
c:AddMonsterAttribute(TYPE_NORMAL)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local ch=Duel.GetCurrentChain()
if ch>1 then
local p=Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)
if p==1-tp and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_GRAVE) then
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g
if #hg>0 and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(2347656,3),aux.Stringid(2347656,4))==0) then
g=hg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
end
end
end
function s.ovcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.ovfilter,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() end
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not aux.NecroValleyFilter()(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,s.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #sg>0 then
Duel.HintSelection(sg)
local tc=sg:GetFirst()
if not tc:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
end
\ No newline at end of file
--撒野 回响
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
--overlay
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.ovcon)
e3:SetTarget(s.ovtg)
e3:SetOperation(s.ovop)
c:RegisterEffect(e3)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>=1
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x9a7d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,e,tp) and
Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetCurrentChain()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ct>ft then ct=ft end
if ct>4 then ct=4 end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil,e,tp)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct,nil)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
local fid=c:GetFieldID()
for tc in aux.Next(sg) do
if tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
end
sg:KeepAlive()
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local mt=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if ht>0 and mt>0 then
if ht>mt then ht=mt end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg2=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE,0,ht,ht,nil)
if #sg2>0 then
Duel.SendtoHand(sg2,nil,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
e1:SetCondition(s.rmcon)
e1:SetOperation(s.rmop)
Duel.RegisterEffect(e1,tp)
end
end
end
function s.rmfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(s.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(s.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
function s.thfilter(c)
return c:IsSetCard(0x9a7d) and c:IsAbleToHand() and c:IsFaceup()
end
function s.handcon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function s.sfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.ovcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsType(TYPE_XYZ)
and bit.band(Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION),LOCATION_MZONE)~=0
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rc=re:GetHandler()
if chk==0 then return rc~=c and rc:IsRelateToEffect(re) and rc:IsFaceup() and c:IsCanOverlay() end
end
function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not aux.NecroValleyFilter()(c) then return end
if not rc:IsRelateToEffect(re) or rc:IsFacedown() then return end
if not rc:IsType(TYPE_XYZ) then return end
if not rc:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(rc,Group.FromCards(c))
end
end
\ No newline at end of file
--创生之柱龙 恒星宇宙编年史
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xc0a),8,2,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
--spsummon
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetCode(EVENT_FREE_CHAIN)
e11:SetRange(LOCATION_MZONE)
e11:SetCountLimit(1,id+1)
e11:SetCost(s.spcost)
e11:SetTarget(s.thtg)
e11:SetOperation(s.thop)
c:RegisterEffect(e11)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.descon)
e1:SetCountLimit(1,id)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.descon1)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thfilter(c)
return c:IsSetCard(0xc0a) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil,TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
end
function s.descon1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_HAND)~=0 and re:IsActiveType(TYPE_FIELD)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable() and c:IsSetCard(0xc0a)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.cfilter(c)
return c:IsType(TYPE_FIELD) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc0a) and c:IsType(TYPE_MONSTER)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
\ No newline at end of file
--星间魔法少女队
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
aux.EnablePendulumAttribute(c,false)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),nil,nil,s.matfilter1,1,99)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(0xff,0)
e1:SetTarget(s.etarget)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetRange(LOCATION_MZONE)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(s.reccon)
e2:SetTarget(s.rectg)
e2:SetOperation(s.recop)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(s.recop2)
c:RegisterEffect(e4)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ADJUST)
ge1:SetRange(0xff-LOCATION_MZONE)
ge1:SetCondition(s.topcon)
ge1:SetOperation(s.topop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
Duel.RegisterEffect(ge2,1)
end
end
function s.matfilter1(c)
return c:GetOriginalType()&TYPE_SPELL~=0
end
function s.etarget(e,c)
return c:IsSetCard(0x854)
end
function s.efilter(e,re)
return not re:GetOwner():IsSetCard(0x854)
end
function s.cfilter(c)
return c:IsCode(91300100)
end
function s.thfilter(c)
return c:IsSetCard(0x854) and c:IsAbleToHand()
end
function s.topcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsForbidden() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.topop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return end
Duel.Hint(HINT_CARD,tp,c:GetCode())
local g=Duel.GetMatchingGroup(s.cfilter,tp,0xff,0,nil)
local sg=Duel.GetOverlayGroup(tp,1,1):Filter(Card.IsCode,nil,91300100)
if #sg>0 then g:Merge(sg) end
local sc=g:GetFirst()
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
sc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function s.splimit(e,c)
return not (c:IsCode(91300100) or not c:IsType(TYPE_EFFECT))
end
function s.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>1 and re:IsActiveType(TYPE_SPELL)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
local rec=Duel.GetCurrentChain()*500
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
local c=e:GetHandler()
local ct=Duel.GetCurrentChain()
if ct>3 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_PZONE,0,nil)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,true,true,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
end
function s.recop2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(d)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
local c=e:GetHandler()
local ct=Duel.GetCurrentChain()
if ct>2 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_PHASE+PHASE_END+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
end
\ No newline at end of file
--星间魔法飞弹
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(s.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP)
e1:SetCondition(aux.dscon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkactivate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ACTIVATE_COST)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_GRAVE)
e3:SetTargetRange(1,1)
e3:SetLabelObject(e2)
e3:SetTarget(function(e,te,tp)return te==e:GetLabelObject()end)
e3:SetOperation(s.costop)
c:RegisterEffect(e3)
end
function s.confilter(c)
return c:IsCode(91300100) and c:IsFaceup()
end
function s.actcon(e)
return Duel.IsExistingMatchingCard(s.confilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,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
function s.atkactivate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
local preatk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local postatk=tc:GetAttack()
local decatk=preatk-postatk
if decatk>=0 and decatk<2000 then Duel.Damage(1-tp,2000-decatk,REASON_EFFECT) end
end
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetHandler()
local tp=te:GetHandlerPlayer()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
tc:CreateEffectRelation(te)
local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(s.rsop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
\ No newline at end of file
--星间魔法飞弹
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(s.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP)
e1:SetCondition(aux.dscon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkactivate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ACTIVATE_COST)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_GRAVE)
e3:SetTargetRange(1,1)
e3:SetLabelObject(e2)
e3:SetTarget(function(e,te,tp)return te==e:GetLabelObject()end)
e3:SetOperation(s.costop)
c:RegisterEffect(e3)
end
function s.confilter(c)
return c:IsCode(91300100) and c:IsFaceup()
end
function s.actcon(e)
return Duel.IsExistingMatchingCard(s.confilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,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
function s.atkactivate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
local preatk=tc:GetAttack()
local dec=Duel.GetCurrentChain()*800
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-dec)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local postatk=tc:GetAttack()
local decatk=preatk-postatk
if decatk>=0 and decatk<dec then Duel.Damage(1-tp,dec-decatk,REASON_EFFECT) end
end
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetHandler()
local tp=te:GetHandlerPlayer()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
tc:CreateEffectRelation(te)
local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(s.rsop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
\ No newline at end of file
...@@ -55,7 +55,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end end
function c98941056.eftg(e,c) function c98941056.eftg(e,c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x9d) return c:IsFaceup() and c:IsSetCard(0x9d)
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
...@@ -180,7 +180,12 @@ function c98941056.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -180,7 +180,12 @@ function c98941056.activate(e,tp,eg,ep,ev,re,r,rp)
hg:RemoveCard(xc) hg:RemoveCard(xc)
xc=mat1:GetNext() xc=mat1:GetNext()
end end
local ss1=Duel.GetMatchingGroupCount(Card.IsSummonLocation,tp,LOCATION_MZONE,0,nil,LOCATION_EXTRA)
local ss2=Duel.GetMatchingGroupCount(Card.IsSummonLocation,tp,0,LOCATION_MZONE,nil,LOCATION_EXTRA)
if ss1<ss2 or (ss1==ss2 and Duel.SelectYesNo(tp,aux.Stringid(98941056,9))) then
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,1-tp,false,false,POS_FACEUP) end
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
...@@ -234,40 +239,36 @@ function c98941056.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -234,40 +239,36 @@ function c98941056.chop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFacedown() or not c:IsOnField() then return end if c:IsFacedown() or not c:IsOnField() then return end
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c98941056.repop) Duel.ChangeChainOperation(ev,c98941056.repop)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98941056.yyfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end end
function c98941056.repop(e,tp,eg,ep,ev,re,r,rp) function c98941056.repop(e,tp,eg,ep,ev,re,r,rp)
local oog=Duel.GetMatchingGroup(c98941056.disfilter,tp,LOCATION_MZONE,0,nil) local g1=Duel.GetMatchingGroup(c98941056.ctfilterzx,tp,LOCATION_MZONE,0,nil)
if oog:GetCount()==0 then local g2=Duel.GetMatchingGroup(c98941056.thfilterzx,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(s.filterx,1-tp,LOCATION_GRAVE,0,nil) if g1:GetCount()==0 or g2:GetCount()==0 then return end
if not Duel.IsPlayerAffectedByEffect(1-tp,59822133) and g:IsExists(s.sfilter1,1,nil,e,1-tp,g) then local ct=g1:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,4)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=g:FilterSelect(1-tp,s.sfilter1,1,1,nil,e,1-tp,g):GetFirst() local sg=g2:SelectSubGroup(tp,aux.dncheck,false,1,ct)
Duel.Hint(HINT_SELECTMSG,lp,aux.Stringid(id,5)) if sg and sg:GetCount()>0 then
local oc=g:FilterSelect(1-tp,s.sfilter2,1,1,sc,e,1-tp,sc):GetFirst() Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.SpecialSummonStep(sc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg)
Duel.ConfirmCards(tp,sc) Duel.ShuffleHand(tp)
Duel.SpecialSummonStep(oc,0,1-tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.ConfirmCards(tp,oc)
Duel.SpecialSummonComplete()
end
else
local g=Duel.GetMatchingGroup(s.filterx,tp,LOCATION_GRAVE,0,nil)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) and g:IsExists(s.sfilter1,1,nil,e,tp,g) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4))
local sc=g:FilterSelect(tp,s.sfilter1,1,1,nil,e,tp,g):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local oc=g:FilterSelect(tp,s.sfilter2,1,1,sc,e,tp,sc):GetFirst()
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sc)
Duel.SpecialSummonStep(oc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,oc)
Duel.SpecialSummonComplete()
end
end end
local g3=Duel.GetMatchingGroup(c98941056.ctfilterzx,1-tp,LOCATION_MZONE,0,nil)
local g4=Duel.GetMatchingGroup(c98941056.thfilterzx,1-tp,LOCATION_DECK,0,nil)
if g3:GetCount()==0 or g4:GetCount()==0 then return end
local ct1=g3:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local sg1=g4:SelectSubGroup(1-tp,aux.dncheck,false,1,ct1)
if sg1 and sg:GetCount()>0 then
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function c98941056.ctfilterzx(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA)
end
function c98941056.thfilterzx(c)
return c:IsType(TYPE_FLIP) and c:IsAbleToHand()
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment