Commit 3b5a7cb4 authored by 未闻皂名's avatar 未闻皂名

2025/6/21 新增:饶有情趣的菓子雏偶姬

parent 1828f30c
Pipeline #37941 passed with stages
in 55 minutes and 21 seconds
No preview for this file type
......@@ -37,6 +37,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sp=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and RD.IsCanBeSpecialSummoned(tc,e,tp,POS_FACEUP)
local op=0
local success=false
local ex=tc:IsCode(list[2])
if th and sp then op=Duel.SelectOption(tp,1190,1152)
elseif th then op=0
else op=1 end
......@@ -45,7 +46,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
else
success=Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
end
if success and tc:IsCode(list[2]) then
if success and ex then
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
......
local cm,m=GetID()
local list={120155013}
cm.name="饶有情趣的菓子雏偶姬"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return (c:IsCode(list[1])
or (c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_AQUA)))
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.exfilter(c)
return c:GetOriginalCodeRule()==list[1]
end
function cm.setfilter(c)
return c:GetType()==TYPE_RITUAL+TYPE_SPELL and c:IsSSetable()
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local filter=RD.Filter(cm.spfilter,e,tp)
RD.SelectAndDoAction(HINTMSG_SPSUMMON,aux.NecroValleyFilter(filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local tc=g:GetFirst()
local ex=tc:IsCode(list[1])
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and ex then
RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
end
end
end
\ No newline at end of file
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