Commit d8330e0a authored by Chen Bill's avatar Chen Bill

update Duel.SelectReleaseGroupEx

parent 48c8d2e8
......@@ -31,7 +31,7 @@ function c18491580.hspcon(e,c)
return Duel.CheckReleaseGroupEx(REASON_COST,tp,c18491580.hspfilter,1,c,tp)
end
function c18491580.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=Duel.SelectReleaseGroupEx(tp,c18491580.hspfilter,1,1,c,tp)
local sg=Duel.SelectReleaseGroupEx(REASON_COST,tp,c18491580.hspfilter,1,1,c,tp)
Duel.Release(sg,REASON_COST)
end
function c18491580.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,7 +41,7 @@ end
function c24361622.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c24361622.thcfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c24361622.thcfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c24361622.thcfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c24361622.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -66,7 +66,7 @@ function c25857246.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then ct=1 end
if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(tp,c25857246.filter,1,ct,nil)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c25857246.filter,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local rct=Duel.Release(g,REASON_EFFECT)
......
......@@ -23,7 +23,7 @@ function c27331568.filter(c)
end
function c27331568.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c27331568.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c27331568.cfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c27331568.cfilter,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
......
......@@ -49,7 +49,7 @@ function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c)
end
function c31516413.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,Card.IsSetCard,1,e:GetHandler(),0x69) end
local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,e:GetHandler(),0x69)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsSetCard,1,1,e:GetHandler(),0x69)
Duel.Release(g,REASON_COST)
end
function c31516413.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -49,7 +49,7 @@ function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c)
end
function c3300267.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,Card.IsSetCard,1,e:GetHandler(),0x69) end
local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,e:GetHandler(),0x69)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsSetCard,1,1,e:GetHandler(),0x69)
Duel.Release(g,REASON_COST)
end
function c3300267.desfilter(c)
......
......@@ -37,7 +37,7 @@ function c33971095.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c33971095.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,c33971095.filter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
local sg=Duel.SelectReleaseGroupEx(tp,c33971095.cfilter,1,99,tc,tc)
local sg=Duel.SelectReleaseGroupEx(REASON_COST,tp,c33971095.cfilter,1,99,tc,tc)
Duel.Release(sg,REASON_COST)
e:SetLabel(sg:GetCount())
end
......
......@@ -57,7 +57,7 @@ function c39468724.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c39468724.tgfilter,tp,LOCATION_DECK,0,nil)
if ct==0 then ct=1 end
if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(tp,c39468724.filter,1,ct,nil)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c39468724.filter,1,ct,nil)
if g:GetCount()>0 then
local rct=Duel.Release(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......@@ -74,7 +74,7 @@ end
function c39468724.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c39468724.negfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c39468724.negfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c39468724.negfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c39468724.negop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,7 +35,7 @@ function c42600274.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
g=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY)
g=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY)
else
g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,c42600274.hspfilter,1,1,nil,tp)
end
......
......@@ -35,15 +35,15 @@ function c56619314.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 then
local g1=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),RACE_DRAGON)
local g2=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),RACE_FIEND)
local g1=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_DRAGON)
local g2=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_FIEND)
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
elseif ft==0 then
local g1=Duel.SelectReleaseGroup(REASON_COST,tp,c56619314.spfilter,1,1,nil,RACE_DRAGON+RACE_FIEND,tp)
local rac=RACE_DRAGON
if g1:GetFirst():IsRace(RACE_DRAGON) then rac=RACE_FIEND end
local g2=Duel.SelectReleaseGroupEx(tp,Card.IsRace,1,1,e:GetHandler(),rac)
local g2=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),rac)
g1:Merge(g2)
Duel.Release(g1,REASON_COST)
else
......
......@@ -40,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectReleaseGroupEx(tp,s.rfilter,1,1,nil)
local rg=Duel.SelectReleaseGroupEx(REASON_COST,tp,s.rfilter,1,1,nil)
if rg:GetCount()>0 then
Duel.HintSelection(rg)
Duel.Release(rg,REASON_EFFECT)
......
......@@ -89,7 +89,7 @@ function c6284176.repval(e,c)
end
function c6284176.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectReleaseGroupEx(tp,c6284176.rfilter,1,1,nil)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c6284176.rfilter,1,1,nil)
Duel.Hint(HINT_CARD,0,6284176)
Duel.Release(g,REASON_EFFECT+REASON_REPLACE)
end
......@@ -27,7 +27,7 @@ function c64332231.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c64332231.desop(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local rg=Duel.SelectReleaseGroupEx(tp,Card.IsReleasableByEffect,1,ct1,nil)
local rg=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsReleasableByEffect,1,ct1,nil)
local ct2=Duel.Release(rg,REASON_EFFECT)
if ct2==0 then return end
Duel.BreakEffect()
......
......@@ -18,7 +18,7 @@ end
function c64442155.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c64442155.costfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectReleaseGroupEx(tp,c64442155.costfilter,1,1,nil)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c64442155.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c64442155.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -43,7 +43,7 @@ function c91946859.spfilter(c,e,tp)
end
function c91946859.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c91946859.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c91946859.cfilter,1,1,nil,e,tp)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c91946859.cfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
end
function c91946859.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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