Commit 022c1cba authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent d3864767
Pipeline #29896 passed with stages
in 35 minutes and 42 seconds
...@@ -2,33 +2,39 @@ ...@@ -2,33 +2,39 @@
function c16400255.initial_effect(c) function c16400255.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetCost(c16400255.cost)
e1:SetCondition(c16400255.condition)
e1:SetTarget(c16400255.target) e1:SetTarget(c16400255.target)
e1:SetOperation(c16400255.activate) e1:SetOperation(c16400255.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c16400255.cfilter(c) function c16400255.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xce3) return c:IsSetCard(0xce3) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c16400255.condition(e,tp,eg,ep,ev,re,r,rp) function c16400255.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c16400255.cfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c16400255.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c16400255.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c16400255.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16400255.filter(c,e,tp)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0xce3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) function c16400255.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c16400255.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c16400255.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c16400255.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c16400255.activate(e,tp,eg,ep,ev,re,r,rp) function c16400255.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c16400255.cfilter,tp,LOCATION_MZONE,0,nil) local tc=Duel.GetFirstTarget()
if ct==0 then return end if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -75,7 +75,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK,0,1,e:GetLabel(),tp) local num=e:GetLabel()
if num>1 and Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then num=1 end
local sg=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK,0,1,num,tp)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
local sc=sg:GetFirst() local sc=sg:GetFirst()
while sc do while sc do
......
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