Commit 4b27829d authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c81902078.lua

parent a272055d
...@@ -106,34 +106,23 @@ end ...@@ -106,34 +106,23 @@ end
--Release --Release
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
local og1=e:GetHandler():GetOverlayGroup()
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local og2=e:GetHandler():GetOverlayGroup()
local oc=og2:GetFirst()
while oc do
og1:RemoveCard(oc)
oc=og2:GetNext()
end
og1:KeepAlive()
e:SetLabelObject(og1)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsRank(5) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsAttack(2500) return c:IsRank(5) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsAttack(2500)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetLabelObject()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,og,e,tp) end and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON,nil,nil,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON,nil,nil,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=2 local ct=2
local og=e:GetLabelObject()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then ct=Duel.GetLocationCount(tp,LOCATION_MZONE) end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then ct=Duel.GetLocationCount(tp,LOCATION_MZONE) end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,og,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>1 then if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ct,nil) local sg=g:Select(tp,1,ct,nil)
...@@ -166,7 +155,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -166,7 +155,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
og:DeleteGroup()
end end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
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