Commit d9176edf authored by 聖園ミカ's avatar 聖園ミカ 🐟

update

parent 8750347a
No preview for this file type
--无心之举
local m=23062074
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.setcon)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
local ar=Duel.GetAttacker()
if at and at:IsRace(RACE_BEASTWARRIOR) and at:IsType(TYPE_SYNCHRO) then
Duel.RegisterFlagEffect(at:GetControler(),m,RESET_PHASE+PHASE_END,0,1)
end
if ar and ar:IsRace(RACE_BEASTWARRIOR) and ar:IsType(TYPE_SYNCHRO) then
Duel.RegisterFlagEffect(ar:GetControler(),m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.cfilter(c)
return not c:IsRace(RACE_BEASTWARRIOR) and c:IsFaceup()
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,23062999,0,TYPES_TOKEN_MONSTER,200,200,3,RACE_BEASTWARRIOR,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,23062999,0,TYPES_TOKEN_MONSTER,200,200,3,RACE_BEASTWARRIOR,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,23062999)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,tp,sumtp,sumpos)
return not c:IsRace(RACE_BEASTWARRIOR)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>0
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SSet(tp,c)
end
end
--Echoes of the Stars
local m=81030069
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.desfilter(c,tp)
return c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0 and c:GetOriginalRace()&RACE_PYRO~=0 and Duel.GetMZoneCount(tp,c)>0
end
function cm.ssfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.ssfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sslimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.sslimit(e,c)
return not c:IsRace(RACE_PYRO)
end
function cm.costfilter(c,tp)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_LINK+TYPE_XYZ) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,tp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Release(g,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsAllTypes(TYPE_PENDULUM+TYPE_RITUAL)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
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