Commit b1d43928 authored by Nemo Ma's avatar Nemo Ma

Update c11621401.lua

parent c0f2ff9f
...@@ -66,28 +66,26 @@ function cm.refilter2(c,tp) ...@@ -66,28 +66,26 @@ function cm.refilter2(c,tp)
if re then if re then
val=re:GetValue() val=re:GetValue()
end end
return c:IsType(TYPE_TRAP) and (val==nil or val(re,c)~=true) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) return c:IsType(TYPE_TRAP) and (val==nil or val(re,c)~=true) and c:IsFaceup()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) or Duel.IsExistingMatchingCard(cm.refilter2,tp,0,LOCATION_ONFIELD,1,nil,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return (Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) or Duel.IsExistingMatchingCard(cm.refilter2,tp,0,LOCATION_ONFIELD,1,nil,tp)) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not aux.NecroValleyFilter()(c) then return end
local g=Duel.GetMatchingGroup(cm.refilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil,tp) local g=Duel.GetMatchingGroup(cm.refilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil,tp)
if Duel.IsExistingMatchingCard(cm.refilter2,tp,0,LOCATION_ONFIELD,1,nil,tp) then local dg=Duel.GetMatchingGroup(cm.refilter2,tp,0,LOCATION_ONFIELD,nil,tp)
local dg=Duel.GetMatchingGroup(cm.refilter2,tp,0,LOCATION_ONFIELD,nil,tp) g:Merge(dg)
g:Merge(dg)
end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if Duel.Release(sg,REASON_EFFECT)<1 then if Duel.Release(sg,REASON_EFFECT)<1 then
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
end end
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP) then
c:CompleteProcedure() c:CompleteProcedure()
end
end end
end end
--02 --02
......
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