Commit a81c8680 authored by Chen Bill's avatar Chen Bill

fix Duel.CheckReleaseGroupEx reason

parent d8330e0a
...@@ -28,11 +28,11 @@ end ...@@ -28,11 +28,11 @@ end
function c18491580.hspcon(e,c) function c18491580.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.CheckReleaseGroupEx(REASON_COST,tp,c18491580.hspfilter,1,c,tp) return Duel.CheckReleaseGroupEx(REASON_SPSUMMON,tp,c18491580.hspfilter,1,c,tp)
end end
function c18491580.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c18491580.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=Duel.SelectReleaseGroupEx(REASON_COST,tp,c18491580.hspfilter,1,1,c,tp) local sg=Duel.SelectReleaseGroupEx(REASON_SPSUMMON,tp,c18491580.hspfilter,1,1,c,tp)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_SPSUMMON)
end end
function c18491580.spcon(e,tp,eg,ep,ev,re,r,rp) function c18491580.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -58,7 +58,7 @@ function c25857246.filter(c) ...@@ -58,7 +58,7 @@ function c25857246.filter(c)
end end
function c25857246.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25857246.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.CheckReleaseGroupEx(REASON_COST,tp,c25857246.filter,1,nil) end and Duel.CheckReleaseGroupEx(REASON_EFFECT,tp,c25857246.filter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c25857246.operation(e,tp,eg,ep,ev,re,r,rp) function c25857246.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -66,7 +66,7 @@ function c25857246.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c25857246.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then ct=1 end if ct==0 then ct=1 end
if ct>2 then ct=2 end if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c25857246.filter,1,ct,nil) local g=Duel.SelectReleaseGroupEx(REASON_EFFECT,tp,c25857246.filter,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
local rct=Duel.Release(g,REASON_EFFECT) local rct=Duel.Release(g,REASON_EFFECT)
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c28711704.fselect(g,tp) function c28711704.fselect(g,tp)
Duel.SetSelectedCard(g) Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLevel,8) return g:CheckWithSumGreater(Card.GetLevel,8)
and Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(REASON_COST,tp,aux.IsInGroup,#g,nil,g) and Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(REASON_SPSUMMON,tp,aux.IsInGroup,#g,nil,g)
end end
function c28711704.hspcon(e,c) function c28711704.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -50,14 +50,14 @@ function c39468724.tgfilter(c) ...@@ -50,14 +50,14 @@ function c39468724.tgfilter(c)
end end
function c39468724.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c39468724.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39468724.tgfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c39468724.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.CheckReleaseGroupEx(REASON_COST,tp,c39468724.filter,1,e:GetHandler()) end and Duel.CheckReleaseGroupEx(REASON_EFFECT,tp,c39468724.filter,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c39468724.tgop(e,tp,eg,ep,ev,re,r,rp) function c39468724.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c39468724.tgfilter,tp,LOCATION_DECK,0,nil) local ct=Duel.GetMatchingGroupCount(c39468724.tgfilter,tp,LOCATION_DECK,0,nil)
if ct==0 then ct=1 end if ct==0 then ct=1 end
if ct>2 then ct=2 end if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c39468724.filter,1,ct,nil) local g=Duel.SelectReleaseGroupEx(REASON_EFFECT,tp,c39468724.filter,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local rct=Duel.Release(g,REASON_EFFECT) local rct=Duel.Release(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -29,13 +29,13 @@ function c42600274.hspcon(e,c) ...@@ -29,13 +29,13 @@ function c42600274.hspcon(e,c)
local ct=0 local ct=0
if Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,c42600274.hspfilter,1,nil,tp) then ct=ct-1 end if Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,c42600274.hspfilter,1,nil,tp) then ct=ct-1 end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct
and Duel.CheckReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY) and Duel.CheckReleaseGroupEx(REASON_SPSUMMON,tp,Card.IsRace,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY)
end end
function c42600274.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c42600274.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil local g=nil
if ft>0 then if ft>0 then
g=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY) g=Duel.SelectReleaseGroupEx(REASON_SPSUMMON,tp,Card.IsRace,1,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY)
else else
g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,c42600274.hspfilter,1,1,nil,tp) g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,c42600274.hspfilter,1,1,nil,tp)
end end
......
...@@ -81,7 +81,7 @@ function c6284176.rfilter(c) ...@@ -81,7 +81,7 @@ function c6284176.rfilter(c)
end end
function c6284176.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c6284176.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c6284176.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c6284176.repfilter,1,nil,tp)
and Duel.CheckReleaseGroupEx(REASON_COST,tp,c6284176.rfilter,1,nil) end and Duel.CheckReleaseGroupEx(REASON_EFFECT,tp,c6284176.rfilter,1,nil) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function c6284176.repval(e,c) function c6284176.repval(e,c)
...@@ -89,7 +89,7 @@ function c6284176.repval(e,c) ...@@ -89,7 +89,7 @@ function c6284176.repval(e,c)
end end
function c6284176.repop(e,tp,eg,ep,ev,re,r,rp) function c6284176.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,c6284176.rfilter,1,1,nil) local g=Duel.SelectReleaseGroupEx(REASON_EFFECT,tp,c6284176.rfilter,1,1,nil)
Duel.Hint(HINT_CARD,0,6284176) Duel.Hint(HINT_CARD,0,6284176)
Duel.Release(g,REASON_EFFECT+REASON_REPLACE) Duel.Release(g,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -20,14 +20,14 @@ function c64332231.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,14 +20,14 @@ function c64332231.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c64332231.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c64332231.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,Card.IsReleasableByEffect,1,nil) if chk==0 then return Duel.CheckReleaseGroupEx(REASON_EFFECT,tp,Card.IsReleasableByEffect,1,nil)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c64332231.desop(e,tp,eg,ep,ev,re,r,rp) function c64332231.desop(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local rg=Duel.SelectReleaseGroupEx(REASON_COST,tp,Card.IsReleasableByEffect,1,ct1,nil) local rg=Duel.SelectReleaseGroupEx(REASON_EFFECT,tp,Card.IsReleasableByEffect,1,ct1,nil)
local ct2=Duel.Release(rg,REASON_EFFECT) local ct2=Duel.Release(rg,REASON_EFFECT)
if ct2==0 then return end if ct2==0 then return end
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -25,7 +25,7 @@ function c75347539.initial_effect(c) ...@@ -25,7 +25,7 @@ function c75347539.initial_effect(c)
end end
c75347539.spchecks=aux.CreateChecks(Card.IsCode,{99785935,39256679,11549357}) c75347539.spchecks=aux.CreateChecks(Card.IsCode,{99785935,39256679,11549357})
function c75347539.fselect(g,tp) function c75347539.fselect(g,tp)
return aux.mzctcheck(g,tp) and Duel.CheckReleaseGroupEx(REASON_COST,tp,aux.IsInGroup,#g,nil,g) return aux.mzctcheck(g,tp) and Duel.CheckReleaseGroupEx(REASON_SPSUMMON,tp,aux.IsInGroup,#g,nil,g)
end end
function c75347539.spcon(e,c) function c75347539.spcon(e,c)
if c==nil then return true end if c==nil then return true 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