Commit c497f9b7 authored by VanillaSalt's avatar VanillaSalt

fix

parent 54625342
...@@ -20,17 +20,12 @@ function c98045062.filter1(c) ...@@ -20,17 +20,12 @@ function c98045062.filter1(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK) return c:IsFaceup() and not c:IsType(TYPE_LINK)
end end
function c98045062.filter2(c) function c98045062.filter2(c)
return c:IsFaceup() and c:IsControlerCanBeChanged() return c:IsFaceup() and c:IsControlerCanBeChanged(true)
end
function c98045062.filter3(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end end
function c98045062.cfilter(c,tp) function c98045062.cfilter(c,tp)
if c:IsControler(tp) then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)
return Duel.IsExistingTarget(c98045062.filter3,tp,0,LOCATION_MZONE,1,nil) if c:IsControler(tp) and c:GetSequence()<5 then ft=ft+1 end
else return ft>0 and Duel.IsExistingTarget(c98045062.filter2,tp,0,LOCATION_MZONE,1,c)
return Duel.IsExistingTarget(c98045062.filter2,tp,0,LOCATION_MZONE,1,c)
end
end end
function c98045062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98045062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then if chkc then
...@@ -65,23 +60,13 @@ function c98045062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,23 +60,13 @@ function c98045062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c98045062.filter1,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c98045062.filter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
else else
if e:GetLabel()==0 then if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c98045062.filter2,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
else
local rg=Duel.SelectReleaseGroup(tp,c98045062.cfilter,1,1,nil,tp) local rg=Duel.SelectReleaseGroup(tp,c98045062.cfilter,1,1,nil,tp)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
if rg:GetFirst():IsControler(tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c98045062.filter3,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c98045062.filter2,tp,0,LOCATION_MZONE,1,1,rg:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c98045062.filter2,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end end
e:SetLabel(sel) e:SetLabel(sel)
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