Commit acd34316 authored by nanahira's avatar nanahira
parents d24307d6 5aef422c
......@@ -7,6 +7,7 @@ environment:
build_script:
- git config --global user.name "purerosefallen"
- git config --global user.email "78877@qq.com"
- git checkout master
- git clone https://github.com/purerosefallen/ygopro-222DIY
- cd ygopro-222DIY
......
......@@ -41,25 +41,19 @@ function cm.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) then return end
local seq=c:GetSequence()
if seq>4 then return end
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.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=(flag ^ 0xff)
Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
if s==1 then nseq=0
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
if c:IsRelateToEffect(e) and c:IsControler(tp) then
local seq=c:GetSequence()
if seq>4 then return end
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=0xff
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=flag & ~(0x1 << seq+1) end
Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
end
end
......
......@@ -27,24 +27,19 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if not cm.rmtg(e,tp,eg,ep,ev,re,r,rp,0) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) then
local seq=c:GetSequence()
if seq>4 then return end
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.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=(flag ^ 0xff)
local flag=0xff
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=flag & ~(0x1 << seq+1) end
Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
if s==1 then nseq=0
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
end
local g=c:GetColumnGroup():Filter(function(c) return c:IsControler(1-tp) end,nil)
......
......@@ -55,7 +55,7 @@ function cm.rmv(rg)
local te=tc:GetActivateEffect()
if not te then return end
local pr1,pr2=te:GetProperty()
pr2=pr2-(pr2 & EFFECT_FLAG2_COF)
pr2=pr2 & ~EFFECT_FLAG2_COF
te:SetProperty(pr1,pr2)
te:SetHintTiming(0,0)
rg:RemoveCard(tc)
......
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