Commit 298770c9 authored by GuGu's avatar GuGu

Update c26100.lua 满场跳怪

parent 73e8a541
Pipeline #19219 passed with stage
in 46 seconds
...@@ -76,33 +76,26 @@ function c26100.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,33 +76,26 @@ function c26100.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c26100.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c26100.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) e:SetLabel(100)
local rg=Group.CreateGroup() if chk==0 then return true end
local flag=0 end
local zc=g:GetFirst() function c26100.costfilter(c,e,tp)
while zc do return c:IsReleasable() and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or c:IsLocation(LOCATION_MZONE) and Duel.GetMZoneCount(tp,c)>0)
if Duel.IsExistingMatchingCard(c26100.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then
flag=1
rg:AddCard(zc)
end
zc=g:GetNext()
end
if chk==0 then return flag>0 end
local rc=rg:Select(tp,1,1,nil)
Duel.Release(rc,REASON_COST)
if rc:GetFirst():IsType(TYPE_RITUAL) then
e:SetLabel(2)
else
e:SetLabel(0)
end
end end
function c26100.filter(c,e,tp) function c26100.filter(c,e,tp)
return c:IsSetCard(0x208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:GetLevel()==4 return c:IsSetCard(0x208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:GetLevel()==4
end end
function c26100.target(e,tp,eg,ep,ev,re,r,rp,chk) function c26100.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local rg=Duel.GetMatchingGroup(c26100.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e,tp)
and Duel.IsExistingMatchingCard(c26100.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then
Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,nil,1,0,0) if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return rg and Duel.IsExistingMatchingCard(c26100.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
e:SetLabel(0)
local g=rg:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c26100.operation(e,tp,eg,ep,ev,re,r,rp) function c26100.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return 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