Commit 7c62407a authored by 未闻皂名's avatar 未闻皂名

2023/11/28 新增:焰魔神 无情魔

parent ef5957cd
Pipeline #24182 passed with stages
in 5 minutes and 55 seconds
No preview for this file type
local m=120254036
local cm=_G["c"..m]
cm.name="焰魔神 无情魔"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedure(c,aux.Stringid(m,0),cm.sumcon,cm.sumop,SUMMON_TYPE_ADVANCE)
--To Hand / Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Summon Procedure
function cm.sumfilter(c,tp)
return c:IsType(TYPE_MAXIMUM)
end
function cm.sumcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.sumfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.sumfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
--To Hand
function cm.confilter(c)
return c:IsRace(RACE_FIEND)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_MAXIMUM) and c:IsAttribute(ATTRIBUTE_FIRE) and RD.IsAbleToHandOrSpecialSummon(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,3,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndToHandOrSpecialSummon(aux.Stringid(m,2),aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,nil,e,POS_FACEUP)
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