Commit 45a327e7 authored by nanahira's avatar nanahira

Update c37564214.lua

parent 9e27244a
...@@ -41,25 +41,19 @@ function cm.seqcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,25 +41,19 @@ function cm.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp) function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) then return end if c:IsRelateToEffect(e) and c:IsControler(tp) then
local seq=c:GetSequence() local seq=c:GetSequence()
if seq>4 then return end if seq>4 then return end
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0 local flag=0xff
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.replace(flag,0x1,seq-1) end if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=flag & ~(0x1 << seq-1) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.replace(flag,0x1,seq+1) end if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=flag & ~(0x1 << seq-1) end
flag=(flag ^ 0xff) Duel.Hint(HINT_SELECTMSG,tp,571)
Duel.Hint(HINT_SELECTMSG,tp,571) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) local nseq=math.log(s,2)
local nseq=0 Duel.MoveSequence(c,nseq)
if s==1 then nseq=0 end
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
Duel.MoveSequence(c,nseq)
end
end 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