Commit 510e3009 authored by nekrozar's avatar nekrozar

fix special summon any number of

parent 422fa5c4
......@@ -27,14 +27,13 @@ function c22567609.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Recover(tp,1000,REASON_EFFECT)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c22567609.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22567609,1)) then
Duel.BreakEffect()
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(22567609,1)) then
Duel.SpecialSummonStep(g:GetNext(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
Duel.SpecialSummonComplete()
Duel.ConfirmCards(1-tp,Duel.GetOperatedGroup())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
end
end
......@@ -25,6 +25,7 @@ end
function c22873798.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22873798.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -20,7 +20,7 @@ function c32679370.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c32679370.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -25,6 +25,7 @@ end
function c46384403.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c46384403.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -57,10 +57,9 @@ function c55705473.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c55705473.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
ct=math.min(ct,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c55705473.spfilter,tp,LOCATION_DECK,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -31,16 +31,15 @@ function c57844634.filter(c,e,tp)
return c:IsCode(57844634) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp)
end
function c57844634.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)
Duel.Damage(1-tp,500,REASON_EFFECT)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c57844634.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(57844634,1)) then
Duel.BreakEffect()
Duel.SpecialSummonStep(g:GetFirst(),0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(57844634,1)) then
Duel.SpecialSummonStep(g:GetNext(),0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
end
Duel.SpecialSummonComplete()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
end
end
......@@ -25,19 +25,13 @@ function c60668166.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60668166.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(c60668166.filter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60668166.filter,tp,LOCATION_DECK,0,1,ct,nil,e,tp)
if g:GetCount()>0 then
local t1=g:GetFirst()
local t2=g:GetNext()
Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,t1)
if t2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(60668166,1)) then
Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,t2)
end
Duel.SpecialSummonComplete()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -46,9 +46,9 @@ function c60930169.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60930169.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if ft<=0 then return end
if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c60930169.spfilter,tp,LOCATION_DECK,0,1,ft,nil,e,tp,e:GetLabel())
if g:GetCount()>0 then
......
......@@ -23,7 +23,7 @@ function c72714226.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c72714226.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -20,11 +20,15 @@ function c79279397.filter(c,e,tp)
end
function c79279397.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c79279397.filter,tp,LOCATION_DECK,0,nil,e,tp)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c79279397.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
Duel.Damage(tp,sg:GetCount()*1000,REASON_EFFECT)
local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(tp,ct*1000,REASON_EFFECT)
end
end
end
......@@ -24,11 +24,12 @@ function c84451804.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c84451804.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,10456559)
if ft<ct then ct=ft end
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,10456559))
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c84451804.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,ct,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -27,13 +27,12 @@ function c95178994.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Damage(1-tp,500,REASON_EFFECT)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c95178994.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(95178994,1)) then
Duel.BreakEffect()
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP_ATTACK)
if ft>1 and g:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(95178994,1)) then
Duel.SpecialSummonStep(g:GetNext(),0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
Duel.SpecialSummonComplete()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
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