Commit 3f1e0f20 authored by POLYMER's avatar POLYMER

fix

parent 68f7c5af
...@@ -71,7 +71,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -71,7 +71,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local sg=g:Filter(Card.IsOnField,nil) local sg=g:Filter(Card.IsOnField,nil)
Duel.SendtoGrave(sg,REASON_SPSUMMON+REASON_COST) Duel.SendtoGrave(sg,REASON_SPSUMMON+REASON_COST)
Duel.SSet(tp,g-sg,tp,false) Duel.MoveToField((g-sg):GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEDOWN,false)
Duel.RaiseEvent((g-sg):GetFirst(),EVENT_SSET,e,REASON_SPSUMMON+REASON_COST,tp,tp,0)
--Duel.SSet(tp,g-sg,tp,false)
g:DeleteGroup() g:DeleteGroup()
end end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -42,8 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,8 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
and c:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsSummonLocation(LOCATION_GRAVE) then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsSummonLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -11,33 +11,26 @@ function c33700160.initial_effect(c) ...@@ -11,33 +11,26 @@ function c33700160.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c33700160.filter(c) function c33700160.filter(c)
return c:IsFaceup() return c:IsFaceup() and c:IsDefenseAbove(0)
end end
function c33700160.target(e,tp,eg,ep,ev,re,r,rp,chk) function c33700160.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c33700160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if chk==0 then return Duel.IsExistingMatchingCard(c33700160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c33700160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg,def=g:GetMaxGroup(Card.GetDefense) local tg,def=g:GetMaxGroup(Card.GetDefense)
if chk==0 then return tg:GetCount()>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,#tg,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,tg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,#tg*def)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,0)
end end
function c33700160.activate(e,tp,eg,ep,ev,re,r,rp) function c33700160.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33700160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c33700160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local tg,def=g:GetMaxGroup(Card.GetDefense) local tg=g:GetMaxGroup(Card.GetDefense)
Duel.Destroy(tg,REASON_EFFECT) Duel.Destroy(tg,REASON_EFFECT)
local dg=Duel.GetOperatedGroup() local dg=Duel.GetOperatedGroup()
local tc=dg:GetFirst() local rec=dg:GetSum(Card.GetDefense)
local def=0 if rec>0 then
while tc do Duel.BreakEffect()
local tdef=tc:GetDefense() Duel.Recover(tp,rec,REASON_EFFECT)
if tdef>0 then def=def+tdef end Duel.Recover(1-tp,rec,REASON_EFFECT)
tc=dg:GetNext()
end end
if def>0 then end
Duel.BreakEffect()
Duel.Recover(tp,def,REASON_EFFECT,true)
Duel.Recover(1-tp,def,REASON_EFFECT,true)
Duel.RDComplete()
end
end
end end
\ No newline at end of file
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