Commit 63f5823d authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

fix Senet Switch (#1880)

parent fa53f649
...@@ -22,8 +22,12 @@ function c63394872.filter(c,tp) ...@@ -22,8 +22,12 @@ function c63394872.filter(c,tp)
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end end
function c63394872.chkfilter(c,cseq)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-cseq)==1
end
function c63394872.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c63394872.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63394872.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63394872.chkfilter(chkc,e:GetLabel()) end
if chk==0 then return Duel.IsExistingTarget(c63394872.filter,tp,LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(c63394872.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63394872,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63394872,1))
local g=Duel.SelectTarget(tp,c63394872.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c63394872.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
......
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