Commit e19bd978 authored by nanahira's avatar nanahira

location count cleanup

parent 2e720ddd
...@@ -24,7 +24,7 @@ function c12632096.ctfilter(c) ...@@ -24,7 +24,7 @@ function c12632096.ctfilter(c)
end end
function c12632096.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) function c12632096.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local rt=math.min(Duel.GetMatchingGroupCount(c12632096.ctfilter,tp,0,LOCATION_MZONE,nil),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL),c:GetOverlayCount(),3) local rt=math.min(Duel.GetMatchingGroupCount(c12632096.ctfilter,tp,0,LOCATION_MZONE,nil),(Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL),c:GetOverlayCount(),3))
if chk==0 then return rt>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return rt>0 and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,rt,REASON_COST) c:RemoveOverlayCard(tp,1,rt,REASON_COST)
local ct=Duel.GetOperatedGroup():GetCount() local ct=Duel.GetOperatedGroup():GetCount()
...@@ -44,7 +44,7 @@ function c12632096.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c12632096.ctop(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabel(c:GetFieldID()) e1:SetLabel(c:GetFieldID())
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local ct=math.min(e:GetLabel(),Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)) local ct=math.min(e:GetLabel(),(Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c12632096.ctfilter,tp,0,LOCATION_MZONE,ct,ct,nil) local g=Duel.SelectMatchingCard(tp,c12632096.ctfilter,tp,0,LOCATION_MZONE,ct,ct,nil)
Duel.GetControl(g,tp,PHASE_END,1) Duel.GetControl(g,tp,PHASE_END,1)
......
...@@ -72,7 +72,7 @@ function c1278431.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,7 +72,7 @@ function c1278431.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c1278431.spop(e,tp,eg,ep,ev,re,r,rp) function c1278431.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),3) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
if ft<1 then return end if ft<1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -57,7 +57,7 @@ function c25451652.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c25451652.spop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetMatchingGroup(c25451652.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) local g2=Duel.GetMatchingGroup(c25451652.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
local ct=5 local ct=5
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
ct=math.min(ct,g1:GetCount(),Duel.GetLocationCount(tp,LOCATION_MZONE)) ct=math.min(ct,g1:GetCount(),(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ct>0 and g2:GetCount()>0 then if ct>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g2:Select(tp,1,ct,nil) local tg=g2:Select(tp,1,ct,nil)
......
...@@ -27,7 +27,7 @@ function c25472513.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c25472513.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c25472513.spop(e,tp,eg,ep,ev,re,r,rp) function c25472513.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),4) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),4)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if ft<=0 then return end if ft<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -44,14 +44,14 @@ function c28806532.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -44,14 +44,14 @@ function c28806532.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28806532.tffilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28806532.tffilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c28806532.tffilter,tp,LOCATION_GRAVE,0,1,nil,tp) end and Duel.IsExistingTarget(c28806532.tffilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
local ct=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),2) local ct=math.min((Duel.GetLocationCount(tp,LOCATION_SZONE)),2)
local g=Duel.SelectTarget(tp,c28806532.tffilter,tp,LOCATION_GRAVE,0,1,ct,nil,tp) local g=Duel.SelectTarget(tp,c28806532.tffilter,tp,LOCATION_GRAVE,0,1,ct,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),0,0)
end end
function c28806532.tfop(e,tp,eg,ep,ev,re,r,rp) function c28806532.tfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<=0 then return end if g:GetCount()<=0 then return end
local ct=math.min(2,Duel.GetLocationCount(tp,LOCATION_SZONE)) local ct=math.min(2,(Duel.GetLocationCount(tp,LOCATION_SZONE)))
if ct<1 then return end if ct<1 then return end
if g:GetCount()>ct then if g:GetCount()>ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
......
...@@ -24,7 +24,7 @@ function c31548814.spfilter(c,e,tp) ...@@ -24,7 +24,7 @@ function c31548814.spfilter(c,e,tp)
end end
function c31548814.target(e,tp,eg,ep,ev,re,r,rp,chk) function c31548814.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),3) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c31548814.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c31548814.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return ft>0 and g:CheckWithSumEqual(Card.GetLevel,8,1,ft) return ft>0 and g:CheckWithSumEqual(Card.GetLevel,8,1,ft)
...@@ -32,7 +32,7 @@ function c31548814.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function c31548814.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c31548814.activate(e,tp,eg,ep,ev,re,r,rp) function c31548814.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),3) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c31548814.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c31548814.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end if ft<=0 or g:GetCount()==0 then return end
......
...@@ -106,7 +106,7 @@ function c3775068.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -106,7 +106,7 @@ function c3775068.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c3775068.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c3775068.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=3 local ft=3
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)) ft=math.min(ft,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c3775068.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectTarget(tp,c3775068.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -70,11 +70,11 @@ end ...@@ -70,11 +70,11 @@ end
function c40392714.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c40392714.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40392714.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40392714.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsRelateToBattle() if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0 and c:IsRelateToBattle()
and Duel.IsExistingTarget(c40392714.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c40392714.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=2 local ft=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)+1) ft=math.min(ft,(Duel.GetMZoneCount(tp,e:GetHandler(),tp)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40392714.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectTarget(tp,c40392714.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -47,11 +47,11 @@ function c41114306.spfilter(c,e,tp) ...@@ -47,11 +47,11 @@ function c41114306.spfilter(c,e,tp)
end end
function c41114306.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41114306.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41114306.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c41114306.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0
and Duel.IsExistingTarget(c41114306.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c41114306.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=2 local ft=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)+1) ft=math.min(ft,(Duel.GetMZoneCount(tp,e:GetHandler(),tp)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c41114306.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectTarget(tp,c41114306.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -85,7 +85,7 @@ function c4998619.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -85,7 +85,7 @@ function c4998619.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c4998619.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c4998619.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=3 local ft=3
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)) ft=math.min(ft,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4998619.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectTarget(tp,c4998619.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c55705473.spop(e,tp,eg,ep,ev,re,r,rp) function c55705473.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=2 local ct=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
ct=math.min(ct,Duel.GetLocationCount(tp,LOCATION_MZONE)) ct=math.min(ct,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ct<=0 then return end if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c55705473.spfilter,tp,LOCATION_DECK,0,1,ct,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c55705473.spfilter,tp,LOCATION_DECK,0,1,ct,nil,e,tp)
......
...@@ -27,7 +27,7 @@ function c58787301.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c58787301.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c58787301.activate(e,tp,eg,ep,ev,re,r,rp) function c58787301.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),2) local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if ft<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
......
...@@ -52,7 +52,7 @@ function c67120578.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -52,7 +52,7 @@ function c67120578.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67120578.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67120578.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67120578.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c67120578.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ct=math.min(2,Duel.GetLocationCount(tp,LOCATION_MZONE)) local ct=math.min(2,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67120578.spfilter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) local g=Duel.SelectTarget(tp,c67120578.spfilter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp)
......
...@@ -19,7 +19,7 @@ end ...@@ -19,7 +19,7 @@ end
function c67284107.spop(e,tp,eg,ep,ev,re,r,rp) function c67284107.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=5 local ft=5
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)) ft=math.min(ft,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,67284108,0,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,67284108,0,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
repeat repeat
local token=Duel.CreateToken(tp,67284108) local token=Duel.CreateToken(tp,67284108)
......
...@@ -88,11 +88,11 @@ end ...@@ -88,11 +88,11 @@ end
function c77387463.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77387463.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c77387463.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c77387463.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsRelateToBattle() if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0 and c:IsRelateToBattle()
and Duel.IsExistingTarget(c77387463.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c77387463.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=3 local ft=3
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)+1) ft=math.min(ft,(Duel.GetMZoneCount(tp,e:GetHandler(),tp)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c77387463.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectTarget(tp,c77387463.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -71,11 +71,11 @@ function c78509901.spfilter(c,e,tp) ...@@ -71,11 +71,11 @@ function c78509901.spfilter(c,e,tp)
end end
function c78509901.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c78509901.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c78509901.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c78509901.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0
and Duel.IsExistingTarget(c78509901.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c78509901.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=3 local ft=3
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ft=math.min(ft,Duel.GetLocationCount(tp,LOCATION_MZONE)+1) ft=math.min(ft,(Duel.GetMZoneCount(tp,e:GetHandler(),tp)))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c78509901.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) local g=Duel.SelectTarget(tp,c78509901.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -45,7 +45,7 @@ function c78785392.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function c78785392.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c78785392.activate(e,tp,eg,ep,ev,re,r,rp) function c78785392.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=math.min(4,Duel.GetLocationCount(tp,LOCATION_MZONE)) local ct=math.min(4,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
local g=Duel.GetMatchingGroup(c78785392.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c78785392.filter,tp,LOCATION_DECK,0,nil,e,tp)
if not Duel.IsPlayerAffectedByEffect(tp,59822133) if not Duel.IsPlayerAffectedByEffect(tp,59822133)
and ct>3 and g:GetClassCount(Card.GetCode)>3 then and ct>3 and g:GetClassCount(Card.GetCode)>3 then
......
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function c93749093.spop(e,tp,eg,ep,ev,re,r,rp) function c93749093.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=2 local ct=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
ct=math.min(ct,Duel.GetLocationCount(tp,LOCATION_MZONE)) ct=math.min(ct,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ct<=0 then return end if ct<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c93749093.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,ct,e:GetHandler(),e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c93749093.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,ct,e:GetHandler(),e,tp)
......
...@@ -60,7 +60,7 @@ function c94703021.tktg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +60,7 @@ function c94703021.tktg2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c94703021.tkop2(e,tp,eg,ep,ev,re,r,rp) function c94703021.tkop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSpecialSummonMonster(tp,94703022,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,94703022,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) then return end
local ct=math.min(Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_LINK),Duel.GetLocationCount(tp,LOCATION_MZONE)) local ct=math.min(Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_LINK),(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ct<1 then return end if ct<1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
repeat repeat
......
...@@ -55,7 +55,7 @@ function c94801854.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -55,7 +55,7 @@ function c94801854.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c94801854.spfilter2(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c94801854.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c94801854.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingTarget(c94801854.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
local ct=math.min(2,Duel.GetLocationCount(tp,LOCATION_MZONE)) local ct=math.min(2,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if Duel.IsPlayerAffectedByEffect(tp,59822133) or not Duel.IsEnvironment(40005099) then ct=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) or not Duel.IsEnvironment(40005099) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c94801854.spfilter2,tp,LOCATION_REMOVED,0,1,ct,nil,e,tp) local g=Duel.SelectTarget(tp,c94801854.spfilter2,tp,LOCATION_REMOVED,0,1,ct,nil,e,tp)
......
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