Commit 71bd7441 authored by mercury233's avatar mercury233

use aux.dncheck

parent a78a038b
...@@ -62,9 +62,6 @@ function c35906693.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,9 +62,6 @@ function c35906693.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c35906693.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c35906693.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function c35906693.eqcheck(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c35906693.eqop(e,tp,eg,ep,ev,re,r,rp) function c35906693.eqop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -72,7 +69,7 @@ function c35906693.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +69,7 @@ function c35906693.eqop(e,tp,eg,ep,ev,re,r,rp)
if ft<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end if ft<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.GetMatchingGroup(c35906693.eqfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tp) local g=Duel.GetMatchingGroup(c35906693.eqfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tp)
local sg=g:SelectSubGroup(tp,c35906693.eqcheck,false,1,ft) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
local ec=sg:GetFirst() local ec=sg:GetFirst()
while ec do while ec do
Duel.Equip(tp,ec,tc,true,true) Duel.Equip(tp,ec,tc,true,true)
......
...@@ -77,14 +77,11 @@ end ...@@ -77,14 +77,11 @@ end
function c56337500.spfilter(c,e,tp) function c56337500.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_CYBERSE) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c56337500.spcheck(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c56337500.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c56337500.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
local g=Duel.GetMatchingGroup(c56337500.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c56337500.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return g:CheckSubGroup(c56337500.spcheck,2,2) return g:CheckSubGroup(aux.dncheck,2,2)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end end
...@@ -92,7 +89,7 @@ function c56337500.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +89,7 @@ function c56337500.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c56337500.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c56337500.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c56337500.spcheck,false,2,2) local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg then if sg then
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
......
...@@ -72,17 +72,14 @@ function c69394324.spfilter(c,e,tp) ...@@ -72,17 +72,14 @@ function c69394324.spfilter(c,e,tp)
return c:IsSetCard(0xc008) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc008) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeEffectTarget(e) and c:IsCanBeEffectTarget(e)
end end
function c69394324.spcheck(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c69394324.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69394324.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69394324.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c69394324.spfilter(chkc,e,tp) end
local g=Duel.GetMatchingGroup(c69394324.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c69394324.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3
and g:CheckSubGroup(c69394324.spcheck,3,3) end and g:CheckSubGroup(aux.dncheck,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c69394324.spcheck,false,3,3) local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0)
end end
......
...@@ -62,15 +62,12 @@ function c74431740.tdfilter(c,e) ...@@ -62,15 +62,12 @@ function c74431740.tdfilter(c,e)
return not c:IsCode(74431740) and (aux.IsCodeListed(c,80280737) or c:IsCode(80280737)) and c:IsAbleToDeck() return not c:IsCode(74431740) and (aux.IsCodeListed(c,80280737) or c:IsCode(80280737)) and c:IsAbleToDeck()
and (not e or c:IsCanBeEffectTarget(e)) and (not e or c:IsCanBeEffectTarget(e))
end end
function c74431740.tdcheck(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c74431740.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74431740.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74431740.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c74431740.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c74431740.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c74431740.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetMatchingGroup(c74431740.tdfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) local g=Duel.GetMatchingGroup(c74431740.tdfilter,tp,LOCATION_GRAVE,0,e:GetHandler(),e)
local sg=g:SelectSubGroup(tp,c74431740.tdcheck,false,1,#g) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,#g)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,#sg,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,#sg,0,0)
end end
......
...@@ -17,14 +17,11 @@ function c856784.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,14 +17,11 @@ function c856784.condition(e,tp,eg,ep,ev,re,r,rp)
local tg=g:GetMaxGroup(Card.GetAttack) local tg=g:GetMaxGroup(Card.GetAttack)
return tg:IsExists(Card.IsControler,1,nil,1-tp) and Duel.GetLP(tp)<Duel.GetLP(1-tp) return tg:IsExists(Card.IsControler,1,nil,1-tp) and Duel.GetLP(tp)<Duel.GetLP(1-tp)
end end
function c856784.check(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c856784.target(e,tp,eg,ep,ev,re,r,rp,chk) function c856784.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if not Duel.IsPlayerCanDraw(tp,1) then return false end if not Duel.IsPlayerCanDraw(tp,1) then return false end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
return g:CheckSubGroup(c856784.check,3,3) return g:CheckSubGroup(aux.dncheck,3,3)
end end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
...@@ -33,7 +30,7 @@ function c856784.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +30,7 @@ function c856784.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,c856784.check,false,3,3) local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
if Duel.ShuffleDeck(tp)~=0 then if Duel.ShuffleDeck(tp)~=0 then
for i=1,3 do for i=1,3 do
......
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