Commit a20bbc81 authored by wind2009's avatar wind2009

Fix 妖精胞スポーア

parent f5328c0d
Pipeline #31960 passed with stages
in 1 minute and 9 seconds
No preview for this file type
--超究极魔导龙 --超究極魔導竜
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--xyz summon --xyz summon
......
...@@ -44,6 +44,7 @@ end ...@@ -44,6 +44,7 @@ end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -54,12 +55,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,12 +55,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST+RACE_FAIRY+RACE_PLANT) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST+RACE_FAIRY+RACE_PLANT) and c:IsLevelBelow(4)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.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
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
...@@ -83,8 +86,8 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,8 +86,8 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) or not aux.NecroValleyFilter()(tc) then return end
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
if tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then if tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
......
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.lvcon)
e1:SetOperation(s.lvop) e1:SetOperation(s.lvop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
...@@ -22,9 +23,12 @@ function s.initial_effect(c) ...@@ -22,9 +23,12 @@ function s.initial_effect(c)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLevelAbove(0)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsType(TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
local lv=Duel.AnnounceLevel(tp,1,Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,nil)) local lv=Duel.AnnounceLevel(tp,1,Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_MZONE,0,nil))
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -36,10 +40,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,10 +40,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceupEx() and (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST+RACE_FAIRY+RACE_PLANT) or c:IsCode(25862681)) return c:IsFaceupEx() and (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_BEAST+RACE_FAIRY+RACE_PLANT) and c:IsType(TYPE_MONSTER)
or c:IsCode(25862681))
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.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
......
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