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

man!

parent aabb1661
No preview for this file type
......@@ -55,13 +55,13 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,Card.IsReleasable)
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler(),tp,Card.IsReleasable)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,Card.IsReleasable)
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler(),tp,Card.IsReleasable)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
Duel.Release(tc,REASON_RELEASE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -41,8 +41,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(2)
Duel.RegisterEffect(e2,tp)
end
function cm.disval(e)
local tp=e:GetOwnerPlayer()
function cm.disval(e,tp)
local mg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local occupy=0
if #mg<1 then return 0x1f1f0000 end
......
......@@ -17,7 +17,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.condition)
......@@ -84,24 +84,46 @@ function cm.setop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,1,3,nil)
Duel.SSet(tp,sg,REASON_EFFECT)
local tc=sg:GetFirst()
while tc do
local sg=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,LOCATION_GRAVE,0,1,3,nil)
if Duel.SSet(tp,sg,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local fid=e:GetFieldID()
local og=Duel.GetOperatedGroup()
local oc=og:GetFirst()
while oc do
if oc:IsControler(tp) then
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
else
oc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,1,fid)
end
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(cm.tdop)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
tc=tg:GetNext()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT)
function cm.retfilter(c,fid)
return c:GetFlagEffectLabel(m)==fid
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.retfilter,nil,e:GetLabel())
g:DeleteGroup()
e:Reset()
local tc=sg:GetFirst()
while tc do
Duel.SendtoGrave(tc,REASON_EFFECT)
tc=sg:GetNext()
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