Commit a13e4176 authored by wind2009's avatar wind2009 Committed by GitHub

Fix same chain limit effect (#3051)

parent 84a1e0d2
......@@ -113,9 +113,9 @@ end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.cfilter(chkc) end
if chk==0 then return c:GetFlagEffect(id)==0
if chk==0 then return Duel.GetFlagEffect(tp,id+o)==0
and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
c:RegisterFlagEffect(id,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
......@@ -142,9 +142,9 @@ function s.rfilter(c)
end
function s.rsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return e:IsCostChecked() and c:GetFlagEffect(id)==0
if chk==0 then return e:IsCostChecked() and Duel.GetFlagEffect(tp,id)==0
and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
c:RegisterFlagEffect(id,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
......
......@@ -35,7 +35,7 @@ function s.srfilter(c)
end
function s.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.srfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.GetFlagEffect(tp,id)==0 end
and Duel.GetFlagEffect(tp,id+o)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
......@@ -67,7 +67,7 @@ function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
aux.RCheckAdditional=nil
return res and Duel.GetFlagEffect(tp,id)==0
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
......
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