Kello515
  • Kello515
  • Advanced Member Topic Starter
2015-10-26T16:55:41Z
Continuous spell card - Brilliant Ritual Lights
Once per turn you can ritual summon 1 monster from your deck using monsters in your side of the field or Hand.
If you would special summon a ritual monster that requires a "Brilliant Light" monster you can ban from you graveyard these monsters.

Continuous spell card - Void Lights
When a Ritual monster is special summoned all monsters your opponent control lose atk equal the atk of the summoned monster.

Continuous spell card - Brilliant Lights Alliance
When a ritual monster is special summoned negate all other monsters effects on the field except ritual monsters

Continuous Spell - SleepWalking
if you control a ritual monster your opponent cannot activate traps or spell cards

Continuous Trap Card - Violet Breakdown
You can use or opponents monsters for a ritual summon and it cannot be negated
Kello515
  • Kello515
  • Advanced Member Topic Starter
2015-10-26T17:14:26Z
--Brilliant Ritual Lights
function c49447616.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49447616,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,49447616)
e2:SetTarget(c49447616.sptg)
e2:SetOperation(c49447616.spop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c49447616.damcon)
e3:SetTarget(c49447616.damtg)
e3:SetOperation(c49447616.damop)
c:RegisterEffect(e3)
end
function c49447616.mfilter0(c)
return c:IsCanBeRitualMaterial() and c:IsAbleToRemove()
end
function c49447616.mfilter1(c,e)
return c:IsCanBeRitualMaterial() and not c:IsImmuneToEffect(e)
end
function c49447616.mfilter2(c,e)
return c:IsCanBeRitaulMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c49447616.spfilter1(c,e,tp,m,f,chkf)
return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_FAIRY) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) and c:CheckRitualMaterial(m,nil,chkf)
end
function c49447616.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_FAIRY) and c:IsSetCard(0x515) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) and c:CheckRitualMaterial(m,nil,chkf)
end
function c49447616.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local res=Duel.IsExistingMatchingCard(c73360025.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,mg1,nil,chkf)
if res then return true end
local mg2=Duel.GetMatchingGroup(c49447616.mfilter0,tp,LOCATION_GRAVE,0,nil)
mg2:Merge(mg1)
res=Duel.IsExistingMatchingCard(c49447616.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,mg2,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c73360025.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c49447616.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c49447616.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c49447616.spfilter1,tp,LOCATION_DECK,0,nil,e,tp,mg1,nil,chkf)
local mg2=Duel.GetMatchingGroup(c49447616.mfilter2,tp,LOCATION_GRAVE,0,nil,e)
mg2:Merge(mg1)
local sg2=Duel.GetMatchingGroup(c49447616.spfilter2,tp,LOCATION_DECK,0,nil,e,tp,mg2,nil,chkf)
sg1:Merge(sg2)
local mg3=nil
local sg3=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg3=Duel.GetMatchingGroup(c73360025.spfilter1,tp,LOCATION_DECK,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg3~=nil and sg3:GetCount()>0) then
local sg=sg1:Clone()
if sg3 then sg:Merge(sg3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg3==nil or not sg3:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if tc:IsSetCard(0x515) then
local mat1=Duel.SelectRitualMaterial(tp,tc,mg2,nil,chkf)
tc:SetMaterial(mat1)
local mat2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
mat1:Sub(mat2)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat2)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP)
else
local mat=Duel.SelectRitualMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat)
end
tc:CompleteProcedure()
elseif Duel.IsPlayerCanSpecialSummon(tp) then
local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0)
Duel.ConfirmCards(1-tp,cg1)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg2)
Duel.ShuffleHand(tp)
end
end
function c49447616.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c49447616.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000)
end
function c49447616.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end

how i add the level limit here to make the ritual summon