Commit 31c502b0 authored by 聖園ミカ's avatar 聖園ミカ 🐟

wdnmd

parent e18159bd
Pipeline #25930 passed with stages
in 30 minutes and 34 seconds
...@@ -23,25 +23,32 @@ function cm.initial_effect(c) ...@@ -23,25 +23,32 @@ function cm.initial_effect(c)
e3:SetOperation(cm.atkop) e3:SetOperation(cm.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.rfilter(c,tp) function cm.costfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_MONSTER) return Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.rfilter,1,REASON_COST,true,nil,tp) end e:SetLabel(100)
local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.rfilter,1,1,REASON_COST,true,nil,tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end end
------- -------
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp) ...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
...@@ -49,8 +51,11 @@ function cm.thfilter(c) ...@@ -49,8 +51,11 @@ function cm.thfilter(c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_EXTRA,0,1,nil) if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_EXTRA,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp) ...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
...@@ -49,8 +51,11 @@ function cm.sfilter(c,e,tp) ...@@ -49,8 +51,11 @@ function cm.sfilter(c,e,tp)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
if Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp) ...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
...@@ -47,10 +49,14 @@ end ...@@ -47,10 +49,14 @@ end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsAttack(1550) and c:IsDefense(1050) and not c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() return c:IsAttack(1550) and c:IsDefense(1050) and not c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil) if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp) ...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
...@@ -49,8 +51,11 @@ function cm.tefilter(c) ...@@ -49,8 +51,11 @@ function cm.tefilter(c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
if Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp, LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp, LOCATION_DECK,0,1,1,nil)
......
...@@ -31,16 +31,18 @@ function cm.costfilter(c,tp) ...@@ -31,16 +31,18 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
...@@ -50,12 +52,16 @@ function cm.thfilter(c) ...@@ -50,12 +52,16 @@ function cm.thfilter(c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil) if not c:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
local sg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local vg=sg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(vg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp) ...@@ -30,16 +30,18 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
...@@ -49,8 +51,11 @@ function cm.tgfilter(c) ...@@ -49,8 +51,11 @@ function cm.tgfilter(c)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_REMOVED,0,1,nil) if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -30,24 +30,29 @@ function cm.costfilter(c,tp) ...@@ -30,24 +30,29 @@ function cm.costfilter(c,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end local g=Duel.GetReleaseGroup(tp,true):Filter(cm.costfilter,e:GetHandler(),tp)
if chk==0 then return #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp) local rg=g:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST) local tc=rg:GetFirst()
Duel.Release(tc,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then if chk==0 then
e:SetLabel(0) e:SetLabel(0)
return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return res and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true,POS_FACEUP)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if not c:IsRelateToEffect(e) then return end
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,nil) if Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
end
if Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_PZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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