Commit 410cd215 authored by Huangnan's avatar Huangnan

fix

parent 676511c2
Pipeline #38400 passed with stages
in 62 minutes and 11 seconds
--奇晶置物
--帝国中枢智械-时依
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,18700201)
......
......@@ -105,36 +105,44 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e5,true)
end
function cm.movtg(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetFieldCard(tp,LOCATION_MZONE,5)
local bt=Duel.GetFieldCard(tp,LOCATION_MZONE,6)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 or not at or not bt end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
or not (at or bt) end
end
function cm.movop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local at=Duel.GetFieldCard(tp,LOCATION_MZONE,5)
local bt=Duel.GetFieldCard(tp,LOCATION_MZONE,6)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local b2=not Duel.GetFieldCard(tp,LOCATION_MZONE,5)
local b3=not Duel.GetFieldCard(tp,LOCATION_MZONE,6)
local c=e:GetHandler()
if c:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 or (Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 and (at or bt)) then return end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,7)},
{b2,aux.Stringid(m,8)},
{b3,aux.Stringid(m,9)})
if op==1 then
local b2=not Duel.GetFieldCard(tp,LOCATION_MZONE,5) and (Duel.GetFieldCard(tp,LOCATION_MZONE,6):IsControler(1-tp) or not Duel.GetFieldCard(tp,LOCATION_MZONE,6))
local b3=not Duel.GetFieldCard(tp,LOCATION_MZONE,6) and (Duel.GetFieldCard(tp,LOCATION_MZONE,5):IsControler(1-tp) or not Duel.GetFieldCard(tp,LOCATION_MZONE,5))
if not (b2 or b3) then
if tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 or (Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0
and (at or bt)) then return end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,7)},
{b2,aux.Stringid(m,8)},
{b3,aux.Stringid(m,9)})
if op==1 then
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
end
if op==2 then
Duel.MoveSequence(c,5)
end
if op==3 then
Duel.MoveSequence(c,6)
end
else
if tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
end
if op==2 then
Duel.MoveSequence(c,5)
end
if op==3 then
Duel.MoveSequence(c,6)
end
end
function cm.efilter(e,te)
return te:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():GetLinkedGroup():IsContains(te:GetHandler())
......
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