Commit 3eb98c07 authored by wind2009's avatar wind2009

Fix 万物の始源-「水」

parent 04ba2782
...@@ -57,7 +57,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,7 +57,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -26,15 +26,15 @@ function s.initial_effect(c) ...@@ -26,15 +26,15 @@ function s.initial_effect(c)
e2:SetOperation(s.activate(ATTRIBUTE_WATER)) e2:SetOperation(s.activate(ATTRIBUTE_WATER))
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.spfilter(c,e,tp,att) function s.spfilter(c,e,tp,att,rp)
if att and not c:IsAttribute(ATTRIBUTE_WATER) then return false end if att and not c:IsAttribute(ATTRIBUTE_WATER) then return false end
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,c:GetOwner()) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,c:GetOwner())
and Duel.IsExistingMatchingCard(s.desfilter,c:GetOwner(),LOCATION_MZONE,0,1,nil,c:GetOwner(),att) and Duel.IsExistingMatchingCard(s.desfilter,c:GetOwner(),LOCATION_MZONE,0,1,nil,c:GetOwner(),att,rp)
end end
function s.desfilter(c,tp,att) function s.desfilter(c,tp,att,rp)
if not att and not c:IsAttribute(ATTRIBUTE_WATER) then return false end if not att and not c:IsAttribute(ATTRIBUTE_WATER) then return false end
return c:IsFaceup() return c:IsFaceup()
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c,rp)>0
end end
function s.target(att) function s.target(att)
return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -51,10 +51,12 @@ function s.activate(att) ...@@ -51,10 +51,12 @@ function s.activate(att)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local sp=tc:GetOwner() local sp=tc:GetOwner()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.desfilter,sp,LOCATION_MZONE,0,1,1,nil,sp,att) local g=Duel.SelectMatchingCard(tp,s.desfilter,sp,LOCATION_MZONE,0,1,1,nil,sp,att,tp)
if g and Duel.Destroy(g,REASON_EFFECT)~=0 if g then
and aux.NecroValleyFilter()(tc) then Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,sp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(tc,0,tp,sp,false,false,POS_FACEUP_DEFENSE)
end end
end end
end
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