Commit b1d43928 authored by Nemo Ma's avatar Nemo Ma

Update c11621401.lua

parent c0f2ff9f
......@@ -66,28 +66,26 @@ function cm.refilter2(c,tp)
if re then
val=re:GetValue()
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
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)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
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)
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)
g:Merge(dg)
end
local dg=Duel.GetMatchingGroup(cm.refilter2,tp,0,LOCATION_ONFIELD,nil,tp)
g:Merge(dg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:Select(tp,1,1,nil)
if Duel.Release(sg,REASON_EFFECT)<1 then
Duel.Release(sg,REASON_COST)
end
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP) then
c:CompleteProcedure()
end
end
end
--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