Commit 5ac6ca81 authored by POLYMER's avatar POLYMER

fix

parent a5e32f21
...@@ -55,8 +55,8 @@ function s.seop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,8 +55,8 @@ function s.seop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
Duel.AdjustAll()
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END) e2:SetCode(EVENT_CHAIN_END)
...@@ -64,7 +64,6 @@ function s.seop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,6 @@ function s.seop(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(s.tgop) e2:SetOperation(s.tgop)
e2:SetCountLimit(1) e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -85,10 +84,9 @@ end ...@@ -85,10 +84,9 @@ end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ag=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local ag=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if ag:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if ag:GetCount()<=0 and g:GetCount()>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
local atk=tc:GetBaseAttack() local atk=tc:GetBaseAttack()
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
...@@ -106,7 +104,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +104,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
if c:IsRelateToEffect(e) then Duel.AdjustAll()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END) e2:SetCode(EVENT_CHAIN_END)
...@@ -114,7 +112,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,7 +112,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(s.tgop) e2:SetOperation(s.tgop)
e2:SetCountLimit(1) e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end
end end
-- --
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
...@@ -144,7 +141,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -144,7 +141,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
g=tg g=tg
end end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(ng,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
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