Commit 4218341f authored by VanillaSalt's avatar VanillaSalt

fix

parent f0bd706d
......@@ -21,6 +21,7 @@ function c3784434.initial_effect(c)
end
function c3784434.seqcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
......@@ -31,8 +32,8 @@ function c3784434.seqop(e,tp,eg,ep,ev,re,r,rp)
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end
if seq>0 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=bit.replace(flag,0x1,seq+1) end
flag=bit.bxor(flag,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
......@@ -44,14 +45,15 @@ function c3784434.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveSequence(c,nseq)
end
end
function c3784434.dircon(e,tp)
local seq=4-e:GetHandler():GetSequence()
return Duel.GetFieldCard(e:GetOwnerPlayer(),LOCATION_MZONE,seq)==nil
and Duel.GetFieldCard(e:GetOwnerPlayer(),LOCATION_SZONE,seq)==nil
end
function c3784434.atkcon(e)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil
and e:GetHandler():GetSequence()+Duel.GetAttackTarget():GetSequence()==4
local c=e:GetHandler()
local at=Duel.GetAttackTarget()
if (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==c and at then
local s1=c:GetSequence()
local s2=at:GetSequence()
if s1==5 then s1=1 elseif s1==6 then s1=3 end
if s2==5 then s2=1 elseif s2==6 then s2=3 end
return s1+s2==4
else return false end
end
......@@ -41,8 +41,8 @@ function c39188539.seqop(e,tp,eg,ep,ev,re,r,rp)
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end
if seq>0 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=bit.replace(flag,0x1,seq+1) end
flag=bit.bxor(flag,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
......@@ -57,27 +57,10 @@ end
function c39188539.filter(c,s1)
if not c:IsAbleToHand() then return false end
local s2=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) then
if s2>=5 then return false end
if s1<5 then
return s1+s2==4
else
return (s1==5 and s2==3) or (s1==6 and s2==1)
end
end
if s1<5 then
if s2<5 then
return s1+s2==4
else
return (s2==5 and s1==3) or (s2==6 and s1==1)
end
else
if s2<5 then
return (s1==5 and s2==3) or (s1==6 and s2==1)
else
return false
end
end
if c:IsLocation(LOCATION_SZONE) and s2>=5 then return false end
if s1==5 then s1=1 elseif s1==6 then s1=3 end
if s2==5 then s2=1 elseif s2==6 then s2=3 end
return s1+s2==4
end
function c39188539.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c39188539.filter(chkc,e:GetHandler():GetSequence()) end
......
......@@ -37,8 +37,8 @@ function c63394872.seqop(e,tp,eg,ep,ev,re,r,rp)
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end
if seq>0 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=bit.replace(flag,0x1,seq+1) end
flag=bit.bxor(flag,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
......
......@@ -18,6 +18,7 @@ function c76573247.initial_effect(c)
end
function c76573247.seqcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
......@@ -28,8 +29,8 @@ function c76573247.seqop(e,tp,eg,ep,ev,re,r,rp)
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end
if seq>0 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=bit.replace(flag,0x1,seq+1) end
flag=bit.bxor(flag,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
......@@ -41,8 +42,14 @@ function c76573247.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveSequence(c,nseq)
end
end
function c76573247.filter(c,s1)
local s2=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s2>=5 then return false end
if s1==5 then s1=1 elseif s1==6 then s1=3 end
if s2==5 then s2=1 elseif s2==6 then s2=3 end
return s1+s2==4
end
function c76573247.dircon(e)
local p=1-e:GetHandlerPlayer()
local seq=4-e:GetHandler():GetSequence()
return Duel.GetFieldCard(p,LOCATION_MZONE,seq)==nil and Duel.GetFieldCard(p,LOCATION_SZONE,seq)==nil
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingTarget(c76573247.filter,tp,0,LOCATION_ONFIELD,1,nil,e:GetHandler():GetSequence())
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