Commit 40e66034 authored by fallenstardust's avatar fallenstardust

fix

parent c6165da7
Pipeline #23881 passed with stages
in 34 seconds
...@@ -45,15 +45,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,15 +45,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
local atk=g:Filter(Card.IsType,nil,TYPE_MONSTER):GetSum(Card.GetBaseAttack)
if atk>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 and e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_XYZ):GetClassCount(Card.GetCode)>=3 then if Duel.Destroy(g,REASON_EFFECT)>0 and e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_XYZ):GetClassCount(Card.GetCode)>=3 then
local dg=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_MONSTER) local dg=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_MONSTER)
local atk=0 local atk=dg:GetSum(Card.GetBaseAttack)
for c in aux.Next(dg) do
atk=atk+c:GetBaseAttack()
end
if atk>0 then if atk>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
...@@ -61,7 +60,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +60,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ) and not c:IsForbidden()
end end
function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
...@@ -70,9 +69,8 @@ end ...@@ -70,9 +69,8 @@ end
function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk) function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,LOCATION_GRAVE)
end end
function s.copyop(e,tp,eg,ep,ev,re,r,rp) function s.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -21,18 +21,13 @@ function s.filter1(c,e) ...@@ -21,18 +21,13 @@ function s.filter1(c,e)
return c:GetRank()>0 and c:IsFaceup() and c:IsSetCard(0xba) and c:IsCanBeEffectTarget(e) return c:GetRank()>0 and c:IsFaceup() and c:IsSetCard(0xba) and c:IsCanBeEffectTarget(e)
end end
function s.filter2(c,e,tp,mg) function s.filter2(c,e,tp,mg)
local rk=0 local rk=mg:GetSum(Card.GetRank)
for c in aux.Next(mg) do
rk=rk+c:GetRank()
end
return c:IsRank(rk) and c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsRank(rk) and c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.fselect(g,tp,e) function s.fselect(g,tp,e)
return g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) return g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter1(chkc,e,tp) end
local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e,tp)
if chkc then return false end if chkc then return false end
local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
if chk==0 then return rg:CheckSubGroup(s.fselect,2,99,tp,e) end if chk==0 then return rg:CheckSubGroup(s.fselect,2,99,tp,e) 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