Commit 60d7c775 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c18700432.lua

parent 828d19fe
Pipeline #32416 passed with stages
in 54 minutes and 27 seconds
......@@ -41,15 +41,33 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(2)
Duel.RegisterEffect(e2,tp)
end
function cm.disval(e,tp)
local mg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local occupy=0
if #mg<1 then return 0x1f1f0000 end
local sc=mg:GetFirst()
while sc do
occupy=occupy|aux.SequenceToGlobal(1-tp,sc:GetLocation()&0x0c,sc:GetSequence())
sc=mg:GetNext()
function cm.filter(c)
return c:GetSequence()<5
end
function cm.disval(e)
if (Duel.GetTurnCount()%2)==1 then
local tp=e:GetOwnerPlayer()
local mg=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
local occupy=0
if #mg<1 then return 0x1f1f0000 end
local sc=mg:GetFirst()
while sc do
occupy=occupy|aux.SequenceToGlobal(sc:GetControler(),sc:GetLocation()&0x0c,sc:GetSequence())
sc=mg:GetNext()
end
local lock=(0x1f1f0000)&(bit.bnot(occupy))
return lock
elseif (Duel.GetTurnCount()%2)==0 then
local tp=e:GetOwnerPlayer()
local mg=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_ONFIELD,nil)
local occupy=0
if #mg<1 then return 0x00001f1f end
local sc=mg:GetFirst()
while sc do
occupy=occupy|aux.SequenceToGlobal(sc:GetControler(),sc:GetLocation()&0x0c,sc:GetSequence())
sc=mg:GetNext()
end
local lock=(0x00001f1f)&(bit.bnot(occupy))
return lock
end
local lock=( 0x1f1f0000)&(bit.bnot(occupy))
return lock
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