Commit 86b04898 authored by 聖園ミカ's avatar 聖園ミカ 🐟

duiduiduiduidui

parent bdc4bd47
No preview for this file type
...@@ -62,7 +62,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsPublic() return c:IsSetCard(0x1ef1) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
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.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
cm.pendulum_level=6 cm.pendulum_level=6
--special summon --special summon
function cm.cfilter(c) function cm.cfilter(c)
return c:IsSetCard(0x1ef1) and c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsLevelBelow(4) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end
...@@ -112,12 +112,11 @@ function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -112,12 +112,11 @@ function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.penop(e,tp,eg,ep,ev,re,r,rp) function cm.penop(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.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
--spsummon --spsummon
......
...@@ -49,6 +49,7 @@ function cm.initial_effect(c) ...@@ -49,6 +49,7 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,96071070) e3:SetCountLimit(1,96071070)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop) e3:SetOperation(cm.setop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--move --move
...@@ -123,6 +124,12 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,6 +124,12 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--position --position
function cm.setfilter(c)
return c:IsSetCard(0x1ef1) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function cm.setfilter(c,mc,tp) function cm.setfilter(c,mc,tp)
if not (c:IsSetCard(0x1ef1) and c:IsType(TYPE_TRAP)) then return false end if not (c:IsSetCard(0x1ef1) and c:IsType(TYPE_TRAP)) then return false end
if not mc or mc:IsControler(1-tp) then if not mc or mc:IsControler(1-tp) then
...@@ -133,7 +140,7 @@ function cm.setfilter(c,mc,tp) ...@@ -133,7 +140,7 @@ function cm.setfilter(c,mc,tp)
end end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc and Duel.SSet(tp,sc)~=0 then if sc and Duel.SSet(tp,sc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -122,7 +122,7 @@ function cm.stpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,7 +122,7 @@ function cm.stpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.stpfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,spchk) local g=Duel.SelectMatchingCard(tp,cm.stpfilter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,spchk)
if g:GetCount()>0 then if g:GetCount()>0 then
local sc=g:GetFirst() local sc=g:GetFirst()
if spchk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) if spchk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
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