Commit 7e2f98c9 authored by 八宫一月's avatar 八宫一月 Committed by GitHub

Update c93729896.lua (#2468)

parent c327d772
...@@ -52,14 +52,26 @@ function s.spfilter(c,e,tp,eg) ...@@ -52,14 +52,26 @@ function s.spfilter(c,e,tp,eg)
return c:IsSetCard(0x1a5) and c:IsFaceupEx() and c:IsAbleToHand() return c:IsSetCard(0x1a5) and c:IsFaceupEx() and c:IsAbleToHand()
and eg:IsExists(s.filter,1,nil,lv,tp) and eg:IsExists(s.filter,1,nil,lv,tp)
end end
--check in Operation
function s.spfilter2(c,e,tp,g)
local lv=c:GetLevel()
return c:IsSetCard(0x1a5) and c:IsFaceupEx() and c:IsAbleToHand()
and g:IsExists(s.filter2,1,nil,lv,tp)
end
function s.filter2(c,lv,tp)
return (c:IsLevel(lv-1) or c:IsLevel(lv+1))
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,eg) end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,eg) end
e:SetLabelObject(eg) local g1=eg:Filter(s.cfilter,nil,tp)
g1:KeepAlive()
e:SetLabelObject(g1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g1=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,e:GetLabelObject()) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,g1)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
...@@ -68,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end end
end end
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