Commit af7ea629 authored by POLYMER's avatar POLYMER

fix

parent 3a23306b
...@@ -132,7 +132,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -132,7 +132,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if KOISHI_CHECK then if KOISHI_CHECK then
Duel.Exile(c,0) Duel.Exile(c,0)
else else
Duel.SendtoGrave(c,REASON_RULE) Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
end end
elseif c:IsLocation(LOCATION_HAND) then elseif c:IsLocation(LOCATION_HAND) then
if not cm.r then if not cm.r then
...@@ -150,7 +150,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -150,7 +150,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Exile(tc,0) Duel.Exile(tc,0)
else else
Duel.SendtoGrave(c,REASON_RULE) Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_RULE) Duel.SendtoHand(tc,nil,REASON_RULE)
end end
......
...@@ -36,7 +36,7 @@ function cm.fselect(g) ...@@ -36,7 +36,7 @@ function cm.fselect(g)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetCurrentChain()==0 and (e:GetHandler():IsAbleToHand() or (e:GetHandler():IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil))) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetCurrentChain()==0 and (e:GetHandler():IsAbleToHand() or (e:GetHandler():IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil))) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,2,nil)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
...@@ -9,7 +9,6 @@ function cm.initial_effect(c) ...@@ -9,7 +9,6 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
...@@ -37,14 +36,11 @@ end ...@@ -37,14 +36,11 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x9212) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() return c:IsSetCard(0x9212) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.filter,2,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,cm.filter,2,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,nil,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Release(g,REASON_EFFECT) Duel.Release(g,REASON_EFFECT)
end end
end end
......
...@@ -9,7 +9,6 @@ function cm.initial_effect(c) ...@@ -9,7 +9,6 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
...@@ -27,14 +26,12 @@ end ...@@ -27,14 +26,12 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x9212) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() return c:IsSetCard(0x9212) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.filter,2,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,cm.filter,2,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,nil,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Release(g,REASON_EFFECT) Duel.Release(g,REASON_EFFECT)
end end
end end
......
...@@ -21,12 +21,13 @@ function cm.initial_effect(c) ...@@ -21,12 +21,13 @@ function cm.initial_effect(c)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.cfilter(c,e,tp) function cm.rfilter(c,tp)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and c:IsReleasable()
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.cfilter,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,cm.cfilter,2,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
......
...@@ -21,12 +21,13 @@ function cm.initial_effect(c) ...@@ -21,12 +21,13 @@ function cm.initial_effect(c)
e3:SetOperation(cm.operation) e3:SetOperation(cm.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.cfilter(c,e,tp) function cm.rfilter(c,tp)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and c:IsReleasable()
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.cfilter,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,cm.cfilter,2,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
......
...@@ -27,7 +27,7 @@ function cm.filter(c,e,tp) ...@@ -27,7 +27,7 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0x9212) or c:IsType(TYPE_RITUAL) return c:IsSetCard(0x9212) or c:IsType(TYPE_RITUAL)
end end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk) function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEUP) then return false end if (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEUP) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then if m2 then
mg:Merge(m2) mg:Merge(m2)
...@@ -38,22 +38,23 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_e ...@@ -38,22 +38,23 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_e
mg:RemoveCard(c) mg:RemoveCard(c)
end end
local lv=level_function(c) local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal) aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal) local res=mg:CheckSubGroup(aux.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil aux.GCheckAdditional=nil
return res return res
end end
function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater") return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.RitualUltimateFilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater") local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.RitualUltimateFilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
...@@ -64,9 +65,9 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,9 +65,9 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater") aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater") local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end if not mat then goto cancel end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -78,12 +79,13 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,12 +79,13 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-----2 -----2
function cm.cfilter(c,tp) function cm.rfilter(c,tp)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER) and c:IsReleasable()
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.cfilter,1,nil)end if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,cm.cfilter,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -8,16 +8,17 @@ function cm.initial_effect(c) ...@@ -8,16 +8,17 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.rstg) e1:SetTarget(cm.rstg)
e1:SetOperation(cm.rsop) e1:SetOperation(cm.rsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--e1 --e1
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0x9212) return c:IsSetCard(0x9212)
end end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk) function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEUP) then return false end if (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEUP) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then if m2 then
mg:Merge(m2) mg:Merge(m2)
...@@ -28,22 +29,23 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_e ...@@ -28,22 +29,23 @@ function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_e
mg:RemoveCard(c) mg:RemoveCard(c)
end end
local lv=level_function(c) local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal) aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal) local res=mg:CheckSubGroup(aux.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil aux.GCheckAdditional=nil
return res return res
end end
function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater") return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.RitualUltimateFilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater") local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.RitualUltimateFilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater")
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
...@@ -54,9 +56,9 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,9 +56,9 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater") aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater") local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end if not mat then goto cancel end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -66,5 +68,4 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,5 +68,4 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
\ No newline at end of file
...@@ -39,6 +39,7 @@ function cm.initial_effect(c) ...@@ -39,6 +39,7 @@ function cm.initial_effect(c)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
SNNM.ActivatedAsSpellorTrapCheck(c)
end end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do for tc in aux.Next(eg) do
......
...@@ -52,12 +52,13 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,12 +52,13 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(cm.sp) e2:SetOperation(cm.sp)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
tc:CreateEffectRelation(e2)
end end
function cm.sp(e,tp,eg,ep,ev,re,r,rp) function cm.sp(e,tp,eg,ep,ev,re,r,rp)
local re=e:GetLabelObject() local re=e:GetLabelObject()
if not re then return end if not re then return end
local tc=re:GetLabelObject() local tc=re:GetLabelObject()
if not tc or Duel.GetMZoneCount(tp)==0 or tc:GetLevel()~=Duel.GetFlagEffect(0,m) then return end if not tc or not tc:IsRelateToEffect(e) or Duel.GetMZoneCount(tp)==0 or tc:GetLevel()~=Duel.GetFlagEffect(0,m) then return end
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
e:Reset() e:Reset()
......
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