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