Commit 48c8d2e8 authored by Chen Bill's avatar Chen Bill

update Duel.CheckReleaseGroupEx

parent 865e1757
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ 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(tp,c18491580.hspfilter,1,c,tp) return Duel.CheckReleaseGroupEx(REASON_COST,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(tp,c18491580.hspfilter,1,1,c,tp) local sg=Duel.SelectReleaseGroupEx(tp,c18491580.hspfilter,1,1,c,tp)
......
...@@ -39,7 +39,7 @@ function c24361622.thfilter(c) ...@@ -39,7 +39,7 @@ function c24361622.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand() return c:IsFaceup() and c:IsAbleToHand()
end end
function c24361622.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c24361622.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c24361622.thcfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c24361622.thcfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c24361622.thcfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroupEx(tp,c24361622.thcfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
......
...@@ -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(tp,c25857246.filter,1,nil) end and Duel.CheckReleaseGroupEx(REASON_COST,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)
......
...@@ -22,7 +22,7 @@ function c27331568.filter(c) ...@@ -22,7 +22,7 @@ function c27331568.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)
end end
function c27331568.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c27331568.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c27331568.cfilter,1,nil,tp) end 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(tp,c27331568.cfilter,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLevel()) e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
......
...@@ -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(tp,aux.IsInGroup,#g,nil,g) and Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(REASON_COST,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
......
...@@ -48,7 +48,7 @@ function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -48,7 +48,7 @@ function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31516413,2)) c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31516413,2))
end end
function c31516413.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c31516413.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,e:GetHandler(),0x69) end 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(tp,Card.IsSetCard,1,1,e:GetHandler(),0x69)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
......
...@@ -48,7 +48,7 @@ function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -48,7 +48,7 @@ function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(3300267,2)) c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(3300267,2))
end end
function c3300267.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c3300267.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,e:GetHandler(),0x69) end 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(tp,Card.IsSetCard,1,1,e:GetHandler(),0x69)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
......
...@@ -29,7 +29,7 @@ function c33971095.cfilter(c) ...@@ -29,7 +29,7 @@ function c33971095.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x106)
end end
function c33971095.filter(c,tp) function c33971095.filter(c,tp)
return c:IsFaceup() and c:IsLevelAbove(1) and Duel.CheckReleaseGroupEx(tp,c33971095.cfilter,1,c,c) return c:IsFaceup() and c:IsLevelAbove(1) and Duel.CheckReleaseGroupEx(REASON_COST,tp,c33971095.cfilter,1,c,c)
end end
function c33971095.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33971095.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33971095.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33971095.filter(chkc) end
......
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function c34419588.rlcheck(sg,c,tp) function c34419588.rlcheck(sg,c,tp)
local g=sg:Clone() local g=sg:Clone()
g:AddCard(c) g:AddCard(c)
return Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(tp,aux.IsInGroup,#g,nil,g) return Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(REASON_COST,tp,aux.IsInGroup,#g,nil,g)
end end
function c34419588.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c34419588.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -50,7 +50,7 @@ function c39468724.tgfilter(c) ...@@ -50,7 +50,7 @@ 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(tp,c39468724.filter,1,e:GetHandler()) end and Duel.CheckReleaseGroupEx(REASON_COST,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)
...@@ -72,7 +72,7 @@ function c39468724.negfilter(c,tp) ...@@ -72,7 +72,7 @@ function c39468724.negfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() return c:IsType(TYPE_MONSTER) and c:IsReleasable()
end end
function c39468724.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c39468724.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c39468724.negfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c39468724.negfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c39468724.negfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroupEx(tp,c39468724.negfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
......
...@@ -29,7 +29,7 @@ function c42600274.hspcon(e,c) ...@@ -29,7 +29,7 @@ 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(tp,Card.IsRace,1,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY) and Duel.CheckReleaseGroupEx(REASON_COST,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)
......
...@@ -56,7 +56,7 @@ end ...@@ -56,7 +56,7 @@ end
function c44632120.rlcheck(sg,c,tp) function c44632120.rlcheck(sg,c,tp)
local g=sg:Clone() local g=sg:Clone()
g:AddCard(c) g:AddCard(c)
return Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(tp,aux.IsInGroup,#g,nil,g) return Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(REASON_COST,tp,aux.IsInGroup,#g,nil,g)
end end
function c44632120.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c44632120.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -30,8 +30,8 @@ function c56619314.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,8 +30,8 @@ function c56619314.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.CheckReleaseGroup(REASON_COST,tp,c56619314.spfilter,1,nil,RACE_DRAGON,tp) then ct=ct-1 end if Duel.CheckReleaseGroup(REASON_COST,tp,c56619314.spfilter,1,nil,RACE_DRAGON,tp) then ct=ct-1 end
if Duel.CheckReleaseGroup(REASON_COST,tp,c56619314.spfilter,1,nil,RACE_FIEND,tp) then ct=ct-1 end if Duel.CheckReleaseGroup(REASON_COST,tp,c56619314.spfilter,1,nil,RACE_FIEND,tp) then ct=ct-1 end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct
and Duel.CheckReleaseGroupEx(tp,Card.IsRace,1,e:GetHandler(),RACE_DRAGON) and Duel.CheckReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,e:GetHandler(),RACE_DRAGON)
and Duel.CheckReleaseGroupEx(tp,Card.IsRace,1,e:GetHandler(),RACE_FIEND) and Duel.CheckReleaseGroupEx(REASON_COST,tp,Card.IsRace,1,e:GetHandler(),RACE_FIEND)
end end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>0 then if ft>0 then
......
...@@ -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(tp,c6284176.rfilter,1,nil) end and Duel.CheckReleaseGroupEx(REASON_COST,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)
......
...@@ -20,7 +20,7 @@ function c64332231.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ 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(tp,Card.IsReleasableByEffect,1,nil) if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,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)
......
...@@ -16,7 +16,7 @@ function c64442155.costfilter(c) ...@@ -16,7 +16,7 @@ function c64442155.costfilter(c)
return c:IsSetCard(0x2093) and c:GetType()&0x81==0x81 and c:IsReleasable() return c:IsSetCard(0x2093) and c:GetType()&0x81==0x81 and c:IsReleasable()
end end
function c64442155.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c64442155.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c64442155.costfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,c64442155.costfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectReleaseGroupEx(tp,c64442155.costfilter,1,1,nil) local g=Duel.SelectReleaseGroupEx(tp,c64442155.costfilter,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
......
...@@ -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(tp,aux.IsInGroup,#g,nil,g) return aux.mzctcheck(g,tp) and Duel.CheckReleaseGroupEx(REASON_COST,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
......
...@@ -27,7 +27,7 @@ function c79402185.costfilter(c,tp) ...@@ -27,7 +27,7 @@ function c79402185.costfilter(c,tp)
return c:IsCode(43017476,58071123) and (c:IsControler(tp) or c:IsFaceup()) return c:IsCode(43017476,58071123) and (c:IsControler(tp) or c:IsFaceup())
end end
function c79402185.fgoal(g,tp) function c79402185.fgoal(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(tp,aux.IsInGroup,#g,nil,g) return Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(REASON_COST,tp,aux.IsInGroup,#g,nil,g)
end end
function c79402185.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c79402185.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
......
...@@ -42,7 +42,7 @@ function c91946859.spfilter(c,e,tp) ...@@ -42,7 +42,7 @@ function c91946859.spfilter(c,e,tp)
return c:GetType()&0x81==0x81 and c:IsSetCard(0x2093) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) return c:GetType()&0x81==0x81 and c:IsSetCard(0x2093) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
end end
function c91946859.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c91946859.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c91946859.cfilter,1,nil,e,tp) end 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(tp,c91946859.cfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
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