Commit d1625394 authored by 未闻皂名's avatar 未闻皂名

2025/7/21 新增:拉比天使 象牙

parent 0e977516
Pipeline #39317 passed with stages
in 42 minutes and 9 seconds
No preview for this file type
local cm,m=GetID()
cm.name="拉比天使 象牙"
function cm.initial_effect(c)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw
function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and RD.IsSpecialSummonTurn(c)
and c:GetMaterialCount()>=2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
RD.TargetDraw(tp,2)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.Draw()
end
\ No newline at end of file
local cm,m=GetID()
local list={120290039}
cm.name="宝牙的仪式"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Counter
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.ctfilter)
--Activate
local e1=RD.CreateRitualEffect(c,RITUAL_LEVEL_GREATER,cm.matfilter,cm.spfilter,nil,0,0,nil,RD.RitualToGrave,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
--Special Summon Counter
function cm.ctfilter(c)
return not c:IsSummonType(SUMMON_TYPE_RITUAL)
end
--Activate
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
end
function cm.matfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.spfilter(c)
return c:IsCode(list[1])
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetOperation(cm.limop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(cm.chainlm)
e:Reset()
end
function cm.chainlm(e,rp,tp)
return tp==rp
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