Commit 67e1100b authored by 聖園ミカ's avatar 聖園ミカ 🐟

duiduiduiduidui

parent 919fdcf1
...@@ -23,6 +23,7 @@ function cm.initial_effect(c) ...@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.sprcon) e2:SetCondition(cm.sprcon)
e2:SetTarget(cm.sprtg)
e2:SetOperation(cm.sprop) e2:SetOperation(cm.sprop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -65,20 +66,27 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,20 +66,27 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.sprfilter(c,ft,tp) function cm.sprfilter(c,tp)
return c:GetOriginalRace()==RACE_ZOMBIE and c:GetOriginalAttribute()==ATTRIBUTE_WATER return c:GetOriginalRace()==RACE_ZOMBIE and c:GetOriginalAttribute()==ATTRIBUTE_WATER
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end end
function cm.sprcon(e,c) function cm.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.CheckReleaseGroupEx(tp,cm.sprfilter,1,REASON_SPSUMMON,false,nil,tp)
return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.sprfilter,1,nil,ft,tp) end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.sprfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=e:GetLabelObject()
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.sprfilter,1,1,nil,ft,tp) Duel.Release(g,REASON_SPSUMMON)
Duel.Release(g,REASON_COST)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsCode(40009599) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND+LOCATION_GRAVE)) return c:IsCode(40009599) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND+LOCATION_GRAVE))
......
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