Commit d10310ac authored by mercury233's avatar mercury233 Committed by DailyShana

fix Blue-Eyes Spirit Dragon related cards (#562)

parent b473e02c
...@@ -113,7 +113,8 @@ end ...@@ -113,7 +113,8 @@ end
function c12670770.spop(e,tp,eg,ep,ev,re,r,rp) function c12670770.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c12670770.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c12670770.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil) local g=tg:Select(tp,ft,ft,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -35,7 +35,8 @@ end ...@@ -35,7 +35,8 @@ end
function c13803864.spop(e,tp,eg,ep,ev,re,r,rp) function c13803864.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c13803864.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c13803864.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil) local g=tg:Select(tp,ft,ft,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -25,10 +25,11 @@ function c23282832.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,10 +25,11 @@ function c23282832.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE)
end end
function c23282832.op(e,tp,eg,ep,ev,re,r,rp) function c23282832.op(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft1<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c23282832.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,ft1,ft1,nil,e,tp,Duel.GetTurnCount()) local g=Duel.SelectMatchingCard(tp,c23282832.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,ft,ft,nil,e,tp,Duel.GetTurnCount())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -68,7 +68,8 @@ function c24221808.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,8 @@ function c24221808.spop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=g:Filter(c24221808.spfilter,nil,e:GetHandler(),e,tp) local tg=g:Filter(c24221808.spfilter,nil,e:GetHandler(),e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:Select(tp,ft,ft,nil) local sg=tg:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -23,10 +23,11 @@ function c27174286.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,10 +23,11 @@ function c27174286.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end end
function c27174286.op(e,tp,eg,ep,ev,re,r,rp) function c27174286.op(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft1<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c27174286.filter,tp,LOCATION_REMOVED,0,ft1,ft1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c27174286.filter,tp,LOCATION_REMOVED,0,ft,ft,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -26,6 +26,7 @@ end ...@@ -26,6 +26,7 @@ end
function c32603633.op(e,tp,eg,ep,ev,re,r,rp) function c32603633.op(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c32603633.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c32603633.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
while g:GetCount()>0 and ft>0 do while g:GetCount()>0 and ft>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -50,7 +50,8 @@ end ...@@ -50,7 +50,8 @@ end
function c3758046.spop(e,tp,eg,ep,ev,re,r,rp) function c3758046.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c3758046.filter,tp,LOCATION_GRAVE,0,nil,e,tp,Duel.GetTurnCount()) local tg=Duel.GetMatchingGroup(c3758046.filter,tp,LOCATION_GRAVE,0,nil,e,tp,Duel.GetTurnCount())
if ft<=0 or (Duel.IsPlayerAffectedByEffect(tp,59822133) and tg:GetCount()>1 and ft>1) then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil local g=nil
if tg:GetCount()>ft then if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -28,6 +28,7 @@ end ...@@ -28,6 +28,7 @@ end
function c55008284.activate(e,tp,eg,ep,ev,re,r,rp) function c55008284.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c55008284.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc:GetCode()) local g=Duel.GetMatchingGroup(c55008284.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc:GetCode())
......
...@@ -33,7 +33,8 @@ end ...@@ -33,7 +33,8 @@ end
function c6713443.spop(e,tp,eg,ep,ev,re,r,rp) function c6713443.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c6713443.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c6713443.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil) local g=tg:Select(tp,ft,ft,nil)
local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -45,6 +45,7 @@ function c72881007.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,7 @@ function c72881007.activate(e,tp,eg,ep,ev,re,r,rp)
g=Duel.GetOperatedGroup() g=Duel.GetOperatedGroup()
local ct=g:FilterCount(c72881007.ctfilter,nil,1-tp) local ct=g:FilterCount(c72881007.ctfilter,nil,1-tp)
if ft>ct then ft=ct end if ft>ct then ft=ct end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,c72881007.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp) g=Duel.SelectMatchingCard(tp,c72881007.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -20,7 +20,8 @@ end ...@@ -20,7 +20,8 @@ end
function c74845897.op(e,tp,eg,ep,ev,re,r,rp) function c74845897.op(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c74845897.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c74845897.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or (Duel.IsPlayerAffectedByEffect(tp,59822133) and tg:GetCount()>1 and ft>1) then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil local g=nil
if tg:GetCount()>ft then if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -34,7 +34,8 @@ function c77778835.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,8 @@ function c77778835.operation(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c77778835.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c77778835.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil) local g=tg:Select(tp,ft,ft,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -54,10 +54,11 @@ function c82052602.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,10 +54,11 @@ function c82052602.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,82052602,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,82052602,RESET_PHASE+PHASE_END,0,1)
end end
function c82052602.activate(e,tp,eg,ep,ev,re,r,rp) function c82052602.activate(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft1==0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c82052602.filter,tp,LOCATION_GRAVE,0,ft1,ft1,nil,Duel.GetTurnCount(),e,tp) local g=Duel.SelectMatchingCard(tp,c82052602.filter,tp,LOCATION_GRAVE,0,ft,ft,nil,Duel.GetTurnCount(),e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -39,7 +39,8 @@ end ...@@ -39,7 +39,8 @@ end
function c88307361.sumop(e,tp,eg,ep,ev,re,r,rp) function c88307361.sumop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c88307361.filter,tp,LOCATION_DECK,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c88307361.filter,tp,LOCATION_DECK,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 or (ft>1 and tg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil) local g=tg:Select(tp,ft,ft,nil)
local c=e:GetHandler() local c=e:GetHandler()
......
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