Commit 55a34a75 authored by 未闻皂名's avatar 未闻皂名

2024/10/15 新增:狱火帝皇

parent e6c8118d
Pipeline #30492 passed with stages
in 12 minutes and 20 seconds
No preview for this file type
local m=120109045
local cm=_G["c"..m]
cm.name="狱火帝皇"
function cm.initial_effect(c)
--Cannot Special Summon
RD.CannotSpecialSummon(c)
--Advance Flag
RD.CreateAdvanceSummonFlag(c,20109045)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.check(g)
local ct=Duel.GetMatchingGroupCount(cm.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
return g:GetCount()<=ct
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:GetFlagEffect(20109045)~=0
end
cm.cost=RD.CostSendGraveSubToDeckBottom(cm.costfilter,cm.check,1,5,nil,nil,Group.GetCount)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
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