Commit b2ea4e7d authored by 聖園ミカ's avatar 聖園ミカ 🐟

hop

parent 15fe600c
Pipeline #31098 passed with stages
in 27 minutes and 54 seconds
......@@ -71,16 +71,25 @@ end
function s.tgcon(e,c)
if c==nil then return true end
local sp=e:GetHandler():GetControler()
return Duel.GetLocationCount(sp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.relfilter,sp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.GetTurnPlayer()==sp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
return Duel.IsExistingMatchingCard(s.relfilter,sp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and (Duel.GetLocationCount(sp,LOCATION_SZONE)>0 or Duel.IsExistingMatchingCard(s.relfilter,sp,LOCATION_SZONE,0,1,nil)) and Duel.GetTurnPlayer()==sp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local tp=c:GetControler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_CARD,1-tp,id)
if Duel.Release(g,REASON_COST)~=0 then
Mermaid_VHisc.sp(c,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_CARD,1-tp,id)
if Duel.Release(g,REASON_COST)~=0 then
Mermaid_VHisc.sp(c,tp)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Hint(HINT_CARD,1-tp,id)
if Duel.Release(g,REASON_COST)~=0 then
Mermaid_VHisc.sp(c,tp)
end
end
end
......
......@@ -99,9 +99,25 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp)
g:DeleteGroup()
end
end
function cm.sprfilter(c)
function cm.sprfilter1(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
and c:IsType(TYPE_RITUAL)
end
function cm.sprfilter2(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_FUSION)
end
function cm.sprfilter3(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_SYNCHRO)
end
function cm.sprfilter4(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_XYZ)
end
function cm.sprfilter5(c)
return c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_LINK)
end
function cm.gcheck(g,tp)
return Duel.GetMZoneCount(tp,g)>0
......@@ -109,11 +125,31 @@ end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
return g:CheckSubGroup(cm.gcheck,5,5,tp)
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(cm.sprfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g2=Duel.GetMatchingGroup(cm.sprfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g3=Duel.GetMatchingGroup(cm.sprfilter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g4=Duel.GetMatchingGroup(cm.sprfilter4,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g5=Duel.GetMatchingGroup(cm.sprfilter5,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
g:Merge(g1)
g:Merge(g2)
g:Merge(g3)
g:Merge(g4)
g:Merge(g5)
return #g1>0 and #g2>0 and #g3>0 and #g4>0 and #g5>0 and g:CheckSubGroup(cm.gcheck,5,5,tp)
end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(cm.sprfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g2=Duel.GetMatchingGroup(cm.sprfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g3=Duel.GetMatchingGroup(cm.sprfilter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g4=Duel.GetMatchingGroup(cm.sprfilter4,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
local g5=Duel.GetMatchingGroup(cm.sprfilter5,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,e:GetHandler())
g:Merge(g1)
g:Merge(g2)
g:Merge(g3)
g:Merge(g4)
g:Merge(g5)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroupEach(tp,cm.spchecks,true,aux.mzctcheck,tp)
if sg then
......@@ -405,7 +441,7 @@ function cm.soop(e,tp,eg,ep,ev,re,r,rp)
local dg1=g1:Select(tp,1,1,nil)
Duel.SendtoDeck(dg1,tp,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
local g2=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE):Filter(aux.NecroValleyFilter(cm.bcfilter),nil)
local g2=Duel.GetFieldGroup(1- tp,0,LOCATION_GRAVE):Filter(aux.NecroValleyFilter(cm.bcfilter),nil)
if #g2>0 then
Duel.Hint(HINTMSG_SELECT,1-tp,HINTMSG_TODECK)
local dg2=g2:Select(1-tp,1,1,nil)
......
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