Commit d6e78bf0 authored by mercury233's avatar mercury233 Committed by GitHub

use aux.GCheckAdditional (#1267)

parent 7b95184c
...@@ -71,7 +71,9 @@ function c12215894.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +71,9 @@ function c12215894.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c12215894.cfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(c12215894.cfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=9 end if chk==0 then return g:GetClassCount(Card.GetCode)>=9 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.dncheck,false,9,9) aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,9,9)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c12215894.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c12215894.target2(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -57,7 +57,9 @@ function c14386013.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,9 @@ function c14386013.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c14386013.drfilter),p,LOCATION_HAND+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c14386013.drfilter),p,LOCATION_HAND+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:SelectSubGroup(p,aux.dncheck,false,1,Duel.GetFieldGroupCount(p,LOCATION_DECK,0)) aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(p,aux.TRUE,false,1,Duel.GetFieldGroupCount(p,LOCATION_DECK,0))
aux.GCheckAdditional=nil
if sg then if sg then
Duel.ConfirmCards(1-p,sg) Duel.ConfirmCards(1-p,sg)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
......
...@@ -25,7 +25,9 @@ function c16329071.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,9 @@ function c16329071.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16329071.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16329071.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)<5 then return end if g:GetClassCount(Card.GetCode)<5 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,5,5) aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,5,5)
aux.GCheckAdditional=nil
local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND) local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if cg:GetCount()>0 then if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
......
...@@ -47,7 +47,9 @@ function c17956906.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,7 +47,9 @@ function c17956906.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local pay=Duel.AnnounceNumber(tp,table.unpack(pay_list)) local pay=Duel.AnnounceNumber(tp,table.unpack(pay_list))
Duel.PayLPCost(tp,pay*1000) Duel.PayLPCost(tp,pay*1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,pay,pay) aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,pay,pay)
aux.GCheckAdditional=nil
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,sg:GetCount(),0,0)
end end
......
...@@ -56,7 +56,9 @@ function c23187256.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,9 @@ function c23187256.operation(e,tp,eg,ep,ev,re,r,rp)
if ct>ft then ct=ft end if ct>ft then ct=ft end
if g1:GetCount()>0 and ct>0 then if g1:GetCount()>0 and ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=g1:SelectSubGroup(tp,aux.drkcheck,false,1,ct) aux.GCheckAdditional=aux.drkcheck
local g2=g1:SelectSubGroup(tp,aux.TRUE,false,1,ct)
aux.GCheckAdditional=nil
for tc in aux.Next(g2) do for tc in aux.Next(g2) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -50,7 +50,9 @@ function c28770951.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,7 +50,9 @@ function c28770951.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c28770951.filter,tp,LOCATION_GRAVE,0,nil,e) local g=Duel.GetMatchingGroup(c28770951.filter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:GetClassCount(Card.GetCode)>=5 and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return g:GetClassCount(Card.GetCode)>=5 and Duel.IsPlayerCanDraw(tp,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,5,5) aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,5,5)
aux.GCheckAdditional=nil
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......
...@@ -66,7 +66,9 @@ function c35546670.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,7 +66,9 @@ function c35546670.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return g:GetClassCount(Card.GetCode)>=8 end if chk==0 then return g:GetClassCount(Card.GetCode)>=8 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.dncheck,false,8,8) aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,8,8)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c35546670.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35546670.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -35,14 +35,16 @@ function c36328300.exfilter(c,tp) ...@@ -35,14 +35,16 @@ function c36328300.exfilter(c,tp)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c))>0 return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c))>0
end end
function c36328300.gselect(g,tp) function c36328300.gselect(g,tp)
return aux.dncheck(g) and Duel.GetLocationCountFromEx(tp,tp,g)>0 return Duel.GetLocationCountFromEx(tp,tp,g)>0
end end
function c36328300.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c36328300.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c36328300.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c36328300.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=7 if chk==0 then return g:GetClassCount(Card.GetCode)>=7
and (Duel.GetLocationCountFromEx(tp)>0 or g:IsExists(c36328300.exfilter,1,nil,tp)) end and (Duel.GetLocationCountFromEx(tp)>0 or g:IsExists(c36328300.exfilter,1,nil,tp)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,c36328300.gselect,false,7,7,tp) local rg=g:SelectSubGroup(tp,c36328300.gselect,false,7,7,tp)
aux.GCheckAdditional=nil
Duel.SendtoGrave(rg,REASON_COST) Duel.SendtoGrave(rg,REASON_COST)
end end
function c36328300.filter(c,e,tp) function c36328300.filter(c,e,tp)
......
...@@ -61,12 +61,14 @@ function c45148985.sprcon(e,c) ...@@ -61,12 +61,14 @@ function c45148985.sprcon(e,c)
return ft>-5 and g:GetClassCount(Card.GetCode)>=5 and (ft>0 or g:IsExists(c45148985.mzfilter,ct,nil)) return ft>-5 and g:GetClassCount(Card.GetCode)>=5 and (ft>0 or g:IsExists(c45148985.mzfilter,ct,nil))
end end
function c45148985.gselect(g,tp) function c45148985.gselect(g,tp)
return aux.dncheck(g) and Duel.GetMZoneCount(tp,g)>0 return Duel.GetMZoneCount(tp,g)>0
end end
function c45148985.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c45148985.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c45148985.sprfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c45148985.sprfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,c45148985.gselect,false,5,5,tp) local rg=g:SelectSubGroup(tp,c45148985.gselect,false,5,5,tp)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c45148985.rmlimit(e,c,tp,r) function c45148985.rmlimit(e,c,tp,r)
......
...@@ -109,7 +109,9 @@ function c59934749.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -109,7 +109,9 @@ function c59934749.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(59934749,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(59934749,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local rg=cg:SelectSubGroup(tp,aux.dncheck,false,lv,lv) aux.GCheckAdditional=aux.dncheck
local rg=cg:SelectSubGroup(tp,aux.TRUE,false,lv,lv)
aux.GCheckAdditional=nil
Duel.SendtoGrave(rg,REASON_COST) Duel.SendtoGrave(rg,REASON_COST)
e:SetLabel(lv) e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
...@@ -54,7 +54,9 @@ function c73881652.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,7 +54,9 @@ function c73881652.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and g:GetClassCount(Card.GetCode)>4 end and g:GetClassCount(Card.GetCode)>4 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,5,5) aux.GCheckAdditional=aux.dncheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,5,5)
aux.GCheckAdditional=nil
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,5,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -65,7 +65,9 @@ function c77075360.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,9 @@ function c77075360.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ct=math.min(g:GetClassCount(Card.GetLevel),ft) local ct=math.min(g:GetClassCount(Card.GetLevel),ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dlvcheck,false,ct,ct) aux.GCheckAdditional=aux.dlvcheck
local sg=g:SelectSubGroup(tp,aux.TRUE,false,ct,ct)
aux.GCheckAdditional=nil
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c77075360.regop(e,tp,eg,ep,ev,re,r,rp) function c77075360.regop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -50,7 +50,9 @@ function c78785392.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,9 @@ function c78785392.activate(e,tp,eg,ep,ev,re,r,rp)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=g:SelectSubGroup(tp,aux.dncheck,false,4,4) aux.GCheckAdditional=aux.dncheck
local g1=g:SelectSubGroup(tp,aux.TRUE,false,4,4)
aux.GCheckAdditional=nil
local tc=g1:GetFirst() local tc=g1:GetFirst()
while tc do while tc do
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
......
...@@ -39,7 +39,9 @@ end ...@@ -39,7 +39,9 @@ end
function c79407975.spop(e,tp,eg,ep,ev,re,r,rp,c) function c79407975.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c79407975.spfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c79407975.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.dncheck,false,7,7) aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,7,7)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c79407975.cfilter(c) function c79407975.cfilter(c)
......
...@@ -37,7 +37,9 @@ function c82428674.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,9 @@ function c82428674.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c82428674.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c82428674.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil)
if ct==0 or g:GetCount()==0 then return end if ct==0 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,aux.dlvcheck,false,1,ct) aux.GCheckAdditional=aux.dlvcheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,1,ct)
aux.GCheckAdditional=nil
local rc=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) local rc=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
if rc>0 then if rc>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -40,12 +40,14 @@ function c91588074.spcon(e,c) ...@@ -40,12 +40,14 @@ function c91588074.spcon(e,c)
return g:GetClassCount(Card.GetCode)>=10 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE)) return g:GetClassCount(Card.GetCode)>=10 and (ft>0 or g:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE))
end end
function c91588074.gselect(g,tp) function c91588074.gselect(g,tp)
return aux.dncheck(g) and Duel.GetMZoneCount(tp,g)>0 return Duel.GetMZoneCount(tp,g)>0
end end
function c91588074.spop(e,tp,eg,ep,ev,re,r,rp,c) function c91588074.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c) local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,c91588074.gselect,false,10,10,tp) local rg=g:SelectSubGroup(tp,c91588074.gselect,false,10,10,tp)
aux.GCheckAdditional=nil
local cg=rg:Filter(Card.IsFacedown,nil) local cg=rg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
......
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