Commit a92fedf8 authored by GuGu's avatar GuGu

Update c26100.lua

parent c85fc5fd
Pipeline #40899 passed with stage
in 5 seconds
...@@ -10,7 +10,7 @@ function c26100.initial_effect(c) ...@@ -10,7 +10,7 @@ function c26100.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(26100,0)) e1:SetDescription(aux.Stringid(26100,0))
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c26100.cost) e1:SetCost(c26100.cost)
e1:SetTarget(c26100.thtg) e1:SetTarget(c26100.thtg)
...@@ -76,33 +76,32 @@ function c26100.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,33 +76,32 @@ 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)
e:SetLabel(100) local c=e:GetHandler()
if chk==0 then return true end e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c26100.costfilter,1,REASON_COST,true,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c26100.costfilter,1,1,REASON_COST,true,nil,tp)
Duel.Release(g,REASON_COST)
end end
function c26100.costfilter(c,e,tp) function c26100.costfilter(c,tp)
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) return c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0
end end
function c26100.filter(c,e,tp) function c26100.filter(c,e,tp,el)
return c:IsSetCard(0x208) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsLevelBelow(4) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsSetCard(0x208) and c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(4)
and ((ft>0 or el==100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
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)
local rg=Duel.GetMatchingGroup(c26100.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c26100.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetLabel()) end
if chk==0 then Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,nil,1,tp,LOCATION_GRAVE)
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 Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c26100.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c26100.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end end
function c26100.damcon(e,tp,eg,ep,ev,re,r,rp) function c26100.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
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