Commit 3fff7b63 authored by nekrozar's avatar nekrozar Committed by DailyShana

fix ABC-Dragon Buster, AtoZ Dragon Buster Cannon and so on (#459)

parent 40996050
...@@ -97,6 +97,6 @@ function c12678870.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +97,6 @@ function c12678870.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,ft,ft,nil) local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
g:Sub(sg) g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_RULE)
end end
end end
...@@ -145,10 +145,16 @@ function c1561110.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -145,10 +145,16 @@ function c1561110.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0)
end end
function c1561110.spop2(e,tp,eg,ep,ev,re,r,rp) function c1561110.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=sg:GetCount() if ft<=0 or g:GetCount()==0 or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) then if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g: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)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_RULE)
end end
end end
...@@ -41,14 +41,20 @@ end ...@@ -41,14 +41,20 @@ end
function c39778366.operation(e,tp,eg,ep,ev,re,r,rp) function c39778366.operation(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
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) if g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end local sg=nil
if sg:GetCount()>ft then if g:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil) sg=g:Select(tp,ft,ft,nil)
g:Sub(sg)
else
sg=g
end end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_RULE)
end
end end
function c39778366.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c39778366.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -138,6 +138,6 @@ function c42901635.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,6 +138,6 @@ function c42901635.spop2(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,ft,ft,nil) local sg=g: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)
g:Sub(sg) g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_RULE)
end end
end end
...@@ -130,6 +130,6 @@ function c48063985.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -130,6 +130,6 @@ function c48063985.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,ft,ft,nil) local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
g:Sub(sg) g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_RULE)
end end
end end
...@@ -42,7 +42,7 @@ function c57815601.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c57815601.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,ft,ft,nil) local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
g:Sub(sg) g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_RULE)
end end
end end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
......
...@@ -140,10 +140,16 @@ function c65172015.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -140,10 +140,16 @@ function c65172015.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,tp,LOCATION_REMOVED)
end end
function c65172015.spop2(e,tp,eg,ep,ev,re,r,rp) function c65172015.spop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=sg:GetCount() if ft<=0 or g:GetCount()==0 or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if ct>0 and (ct==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) then if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g: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)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_RULE)
end end
end end
...@@ -109,6 +109,6 @@ function c86274272.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,6 +109,6 @@ function c86274272.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,ft,ft,nil) local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
g:Sub(sg) g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_RULE)
end end
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