Commit c7dadedb authored by DailyShana's avatar DailyShana

fix location count for selecting disable field

parent e81b5d13
...@@ -12,7 +12,7 @@ function c40391316.initial_effect(c) ...@@ -12,7 +12,7 @@ function c40391316.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c40391316.disop(e,tp) function c40391316.disop(e,tp)
local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE) local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
if c==0 then return end if c==0 then return end
local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0) local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
if c>1 and Duel.SelectYesNo(tp,aux.Stringid(40391316,0)) then if c>1 and Duel.SelectYesNo(tp,aux.Stringid(40391316,0)) then
......
...@@ -26,7 +26,7 @@ function c48356796.initial_effect(c) ...@@ -26,7 +26,7 @@ function c48356796.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c48356796.accon(e,tp,eg,ep,ev,re,r,rp) function c48356796.accon(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetLocationCount(tp,LOCATION_SZONE) local c=Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
if e:GetHandler():IsFacedown() then return c>0 end if e:GetHandler():IsFacedown() then return c>0 end
return c>1 return c>1
end end
......
...@@ -50,8 +50,10 @@ function c53244294.zcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,8 +50,10 @@ function c53244294.zcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c53244294.ztg(e,tp,eg,ep,ev,re,r,rp,chk) function c53244294.ztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end +Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0 end
local dis=Duel.SelectDisableField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,0) local dis=Duel.SelectDisableField(tp,1,LOCATION_ONFIELD,LOCATION_ONFIELD,0)
e:SetLabel(dis) e:SetLabel(dis)
end end
......
...@@ -27,7 +27,7 @@ function c79569173.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c79569173.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c79569173.cfilter,1,nil,tp) return eg:IsExists(c79569173.cfilter,1,nil,tp)
end end
function c79569173.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79569173.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>2 end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>2 end
local c=e:GetHandler() local c=e:GetHandler()
c:SetTurnCounter(0) c:SetTurnCounter(0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -44,7 +44,7 @@ function c79569173.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +44,7 @@ function c79569173.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(dis) e:SetLabel(dis)
end end
function c79569173.activate(e,tp,eg,ep,ev,re,r,rp) function c79569173.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)<3 then return end if Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)<3 then return end
--disable field --disable field
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -12,7 +12,7 @@ function c90140980.initial_effect(c) ...@@ -12,7 +12,7 @@ function c90140980.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c90140980.disop(e,tp) function c90140980.disop(e,tp)
local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE) local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
if c==0 then return end if c==0 then return end
local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0) local dis1=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
if c>1 and Duel.SelectYesNo(tp,aux.Stringid(90140980,0)) then if c>1 and Duel.SelectYesNo(tp,aux.Stringid(90140980,0)) then
......
...@@ -16,7 +16,8 @@ function c90502999.initial_effect(c) ...@@ -16,7 +16,8 @@ function c90502999.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c90502999.target(e,tp,eg,ep,ev,re,r,rp,chk) function c90502999.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)>1 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)>1 end
local dis=Duel.SelectDisableField(tp,2,LOCATION_MZONE,LOCATION_MZONE,0) local dis=Duel.SelectDisableField(tp,2,LOCATION_MZONE,LOCATION_MZONE,0)
e:SetLabel(dis) e:SetLabel(dis)
end end
......
...@@ -9,8 +9,8 @@ function c92065772.initial_effect(c) ...@@ -9,8 +9,8 @@ function c92065772.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c92065772.operation(e,tp,eg,ep,ev,re,r,rp) function c92065772.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end and Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
--disable field --disable field
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -41,8 +41,10 @@ function c97466438.zcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,8 +41,10 @@ function c97466438.zcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(97466438)~=0 return e:GetHandler():GetFlagEffect(97466438)~=0
end end
function c97466438.ztg(e,tp,eg,ep,ev,re,r,rp,chk) function c97466438.ztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(tp,LOCATION_SZONE)+Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end +Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)
+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0 end
local dis=Duel.SelectDisableField(tp,1,LOCATION_MZONE+LOCATION_SZONE,LOCATION_MZONE+LOCATION_SZONE,0) local dis=Duel.SelectDisableField(tp,1,LOCATION_MZONE+LOCATION_SZONE,LOCATION_MZONE+LOCATION_SZONE,0)
e:SetLabel(dis) e:SetLabel(dis)
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