Commit a2c20316 authored by POLYMER's avatar POLYMER

fix

parent b9ae2ca1
This diff is collapsed.
...@@ -36,29 +36,29 @@ end ...@@ -36,29 +36,29 @@ end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local ac=g:GetFirst() local ac=g:GetFirst()
local num=#g local ag=Group.CreateGroup()
for i=1,num do for i=1,#g do
if talon[ac:GetCode()]==nil then if talon[ac:GetCode()]~=nil then
g:RemoveCard(ac) ag:AddCard(ac)
end end
ac=g:GetNext() ac=g:GetNext()
end end
if chk==0 then return g:GetCount()>0 end if chk==0 then return ag:GetCount()>0 end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
--Debug.Message("a") --Debug.Message("a")
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local ac=g:GetFirst() local ac=g:GetFirst()
local ag=Group.CreateGroup()
for i=1,#g do for i=1,#g do
if talon[ac:GetCode()]==nil then if talon[ac:GetCode()]~=nil then
g:RemoveCard(ac) ag:AddCard(ac)
end end
ac=g:GetNext() ac=g:GetNext()
end end
--Debug.Message("b") if ag:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
--Debug.Message("c") local sg=ag:Select(tp,1,1,nil)
local sg=g:Select(tp,1,1,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local ace=talon[sg:GetFirst():GetCode()] local ace=talon[sg:GetFirst():GetCode()]
cm.ActivateEffect(ace,tp,e) cm.ActivateEffect(ace,tp,e)
......
...@@ -84,6 +84,16 @@ function c9910953.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,6 +84,16 @@ function c9910953.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
e2:SetLabelObject(e3) e2:SetLabelObject(e3)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
--chk
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e0:SetLabelObject(e2)
e0:SetOperation(c9910953.chk)
tc:RegisterEffect(e0)
tc:RegisterFlagEffect(9910953,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910953,1))
end end
end end
end end
...@@ -98,3 +108,28 @@ function c9910953.effectfilter(e,ct) ...@@ -98,3 +108,28 @@ function c9910953.effectfilter(e,ct)
end end
return tc and tc==te:GetHandler() return tc and tc==te:GetHandler()
end end
function c9910953.chk(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=e:GetLabelObject()
local e3=e2:GetLabelObject()
local te=c:GetReasonEffect()
if c:GetFlagEffect(9910953)==0 or not te or not te:IsActivated() or te:GetHandler()~=c then
e2:Reset()
e3:Reset()
else
--reset
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAIN_END)
e0:SetLabelObject(e3)
e0:SetOperation(c9910953.resetop)
Duel.RegisterEffect(e0,tp)
end
end
function c9910953.resetop(e,tp,eg,ep,ev,re,r,rp)
local e3=e:GetLabelObject()
local e4=e3:GetLabelObject()
e3:Reset()
e4:Reset()
e:Reset()
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