Commit 0452fde6 authored by nekrozar's avatar nekrozar

missing check

parent 27fa54d7
...@@ -30,13 +30,15 @@ function c16719140.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,13 +30,15 @@ function c16719140.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return true end if chk==0 then return true end
end end
function c16719140.costfilter(c,e,tp,mg,rlv) function c16719140.costfilter(c,e,tp,mg,rlv,mc)
if not (c:IsLevelAbove(0) and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() if not (c:IsLevelAbove(0) and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))) then return false end and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))) then return false end
return mg:CheckSubGroup(c16719140.fselect,1,c:GetLevel(),tp,c:GetLevel()-rlv) return mg:CheckSubGroup(c16719140.fselect,1,c:GetLevel(),tp,c:GetLevel()-rlv,mc)
end end
function c16719140.fselect(g,tp,lv) function c16719140.fselect(g,tp,lv,mc)
if Duel.GetMZoneCount(tp,g)>0 then local mg=g:Clone()
mg:AddCard(mc)
if Duel.GetMZoneCount(tp,mg)>0 then
if lv<=0 then if lv<=0 then
return g:GetCount()==1 return g:GetCount()==1
else else
...@@ -55,11 +57,11 @@ function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,11 +57,11 @@ function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
if not c:IsLevelAbove(1) or not c:IsReleasableByEffect() or mg:GetCount()==0 then return false end if not c:IsLevelAbove(1) or not c:IsReleasableByEffect() or mg:GetCount()==0 then return false end
return Duel.IsExistingMatchingCard(c16719140.costfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mg,c:GetOriginalLevel()) return Duel.IsExistingMatchingCard(c16719140.costfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mg,c:GetOriginalLevel(),c)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16719140.costfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mg,c:GetOriginalLevel()) local g=Duel.SelectMatchingCard(tp,c16719140.costfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mg,c:GetOriginalLevel(),c)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
...@@ -75,7 +77,7 @@ function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +77,7 @@ function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then if spos~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=mg:SelectSubGroup(tp,c16719140.fselect,false,1,tc:GetLevel(),tp,tc:GetLevel()-c:GetOriginalLevel()) local g=mg:SelectSubGroup(tp,c16719140.fselect,false,1,tc:GetLevel(),tp,tc:GetLevel()-c:GetOriginalLevel(),c)
if g and g:GetCount()>0 then if g and g:GetCount()>0 then
g:AddCard(c) g:AddCard(c)
if Duel.Release(g,REASON_EFFECT)~=0 then if Duel.Release(g,REASON_EFFECT)~=0 then
......
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