Commit 6fd58b64 authored by Tachibana's avatar Tachibana

得得得得得

parent 3f6c704b
No preview for this file type
...@@ -239,7 +239,6 @@ ...@@ -239,7 +239,6 @@
12029008 1 --射星之弓 阿尔忒弥斯 12029008 1 --射星之弓 阿尔忒弥斯
12029010 1 --永远的誓言 纯白女王 12029010 1 --永远的誓言 纯白女王
12029011 1 --王权代行者 纯白女王 12029011 1 --王权代行者 纯白女王
12029014 0 --魅魔后辈 薇薇安
12029016 0 --惩戒双子 12029016 0 --惩戒双子
12029018 2 --希望的暗语 雪滴花 12029018 2 --希望的暗语 雪滴花
12029070 0 --巨蛾娘的宝藏 12029070 0 --巨蛾娘的宝藏
......
--《U咩尊师传》
function c112310.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(112310,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetDescription(aux.Stringid(112310,1))
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,112310)
e1:SetTarget(c112310.sptg)
e1:SetOperation(c112310.spop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c112310.handcon)
c:RegisterEffect(e2)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c112310.splimit)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e3)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(423585,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,112310)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c112310.sptg)
e2:SetOperation(c112310.spop)
c:RegisterEffect(e2)
--Remove
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCountLimit(1)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE)
e4:SetCondition(c112310.recon)
e4:SetOperation(c112310.reop)
c:RegisterEffect(e4)
--
if not c112310.global_check then
c112310.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c112310.checkop)
Duel.RegisterEffect(ge1,0)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c112310.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c112310.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local xp=tc:GetControler()
local flag=Duel.GetFlagEffectLabel(xp,112310)
if flag then
Duel.SetFlagEffectLabel(xp,112310,flag+1)
else
Duel.RegisterFlagEffect(xp,112310,RESET_PHASE+PHASE_END,0,1,1)
end
tc=eg:GetNext()
end
end
function c112310.hfil(c)
return not c:IsRace(RACE_MACHINE)
end
function c112310.handcon(e)
return not Duel.IsExistingMatchingCard(c112310.hfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_MZONE,0,1,nil,RACE_MACHINE)
end
function c112310.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
function c112310.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_MACHINE)
end
function c112310.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c112310.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c112310.hfil,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_MZONE,0,1,nil,RACE_MACHINE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c112310.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,c112310.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c112310.recon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,112310)==0
end
function c112310.reop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,112310)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
--新人魅魔 薇薇安
local m=12029014
local cm=_G["c"..m]
function cm.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,0x1c0)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
Real_Sr={}
Dark_Sr={}
Real_Sr[1]=0
Dark_Sr[1]=0
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(ge3,0)
local ge4=Effect.GlobalEffect()
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_CHAINING)
ge4:SetOperation(cm.checkop2)
Duel.RegisterEffect(ge4,0)
local ge6=Effect.CreateEffect(c)
ge6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge6:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge6:SetOperation(cm.reset)
Duel.RegisterEffect(ge6,0)
end
end
function cm.checkop3(e,tp,eg,ep,ev,re,r,rp)
for k,v in ipairs(Dark_Sr) do
if v==re:GetHandler():GetCode() then
return end
end
if re:IsActiveType(TYPE_MONSTER) then
Dark_Sr[#Dark_Sr+1]=re:GetHandler():GetCode()
end
end
function cm.checkop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsControler(1-tp) then
Dark_Sr[#Dark_Sr+1]=re:GetHandler():GetCode()
end
end
function cm.reset(e,tp,eg,ep,ev,re,r,rp)
Real_Sr={}
Dark_Sr={}
Real_Sr[1]=0
Dark_Sr[1]=0
end
function cm.checkop1(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsControler(1-tp) then
Real_Sr[#Real_Sr+1]=tc:GetCode()
end
tc=eg:GetNext()
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(cm.drcon)
e2:SetOperation(cm.drop1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon1)
e1:SetOperation(cm.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(cm.drcon2)
e3:SetOperation(cm.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.tg2(e,re,tp)
return Dark_Sr and re:GetHandler():IsCode(table.unpack(Dark_Sr)) and not re:GetHandler():IsImmuneToEffect(e) and re:IsActiveType(TYPE_MONSTER)
end
function cm.tg(e,c)
return Real_Sr and c:IsCode(table.unpack(Real_Sr))
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(table.unpack(Dark_Sr))
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(table.unpack(Real_Sr))
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.filter(c,sp)
return c:GetSummonPlayer()==sp and c:IsCode(table.unpack(Real_Sr))
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m)
Duel.ResetFlagEffect(tp,m)
Duel.Draw(tp,n,REASON_EFFECT)
end
--惧 轮 猩 红 征 服 者
function c53701001.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e1)
--summon with no tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701001,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c53701001.sumcon)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701001.value)
c:RegisterEffect(e3)
--ac
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetValue(c53701001.aclimit)
c:RegisterEffect(e4)
--immune
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(53701001,0))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c53701001.immcost)
e5:SetOperation(c53701001.immop)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SPSUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701001.spcost)
e6:SetOperation(c53701001.spcop)
c:RegisterEffect(e6)
end
function c53701001.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1
end
function c53701001.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,2)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701001.sumcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=10
end
function c53701001.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*400
end
function c53701001.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function c53701001.immcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x530) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x530)
Duel.Release(g,REASON_COST)
end
function c53701001.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c53701001.efilter)
e4:SetOwnerPlayer(tp)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
end
end
function c53701001.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--惧 轮 启 程 女 巫
function c53701002.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701002,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c53701002.sptg)
e1:SetOperation(c53701002.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701002.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701002,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701002.descon)
e4:SetOperation(c53701002.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701002.spcost)
e6:SetOperation(c53701002.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701002.filter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c53701002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701002.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c53701002.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 sg=Duel.SelectMatchingCard(tp,c53701002.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c53701002.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*150
end
function c53701002.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701002.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701002.cfilter,1,nil,tp)
end
function c53701002.thfilter(c)
return c:IsSetCard(0x530) and c:IsAbleToHand()
end
function c53701002.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701002.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701002.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701002,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701002)
local nm=3
local g2=Duel.GetMatchingGroup(c53701002.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local hg=Duel.GetMatchingGroup(c53701002.thfilter,tp,LOCATION_GRAVE,0,nil)
if ter%nm==0 and #hg>0 then
Duel.Hint(HINT_CARD,0,53701002)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=hg:Select(tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function c53701002.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701002.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
--惧 轮 运 送 员
function c53701003.initial_effect(c)
c:SetSPSummonOnce(53701003)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),1,1)
c:EnableReviveLimit()
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701003.value)
c:RegisterEffect(e3)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SPSUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701003.spcost)
e6:SetOperation(c53701003.spcop)
c:RegisterEffect(e6)
end
function c53701003.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701003.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701003.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*150
end
--惧 轮 冰 点 雷 霆
function c53701004.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c53701004.condition)
e1:SetTarget(c53701004.target)
e1:SetOperation(c53701004.operation)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701004.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701004,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701004.descon)
e4:SetOperation(c53701004.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701004.spcost)
e6:SetOperation(c53701004.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
--count
if not c53701004.global_check then
c53701004.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c53701004.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
function c53701004.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701004.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701004.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if not tc:IsSetCard(0x530) then return end
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),53701004,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c53701004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,53701004)>=5
end
function c53701004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53701004.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c53701004.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*300
end
function c53701004.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701004.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701004.cfilter,1,nil,tp)
end
function c53701004.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701004.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701004.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701004,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701004)
local nm=3
local g2=Duel.GetMatchingGroup(c53701004.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local hg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if ter%nm==0 and #hg>0 then
Duel.Hint(HINT_CARD,0,53701004)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=hg:Select(tp,1,1,nil)
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
end
--惧 轮 猎 尘
function c53701005.initial_effect(c)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701005,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAINING)
e2:SetCost(c53701005.negcost)
e2:SetCondition(c53701005.negcon)
e2:SetTarget(c53701005.negtg)
e2:SetOperation(c53701005.negop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701005.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701005,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701005.descon)
e4:SetOperation(c53701005.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701005.spcost)
e6:SetOperation(c53701005.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701005.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701005.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701005.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and Duel.IsChainDisablable(ev) and loc==LOCATION_GRAVE
end
function c53701005.filter(c)
return c:IsDiscardable() and c:IsSetCard(0x530)
end
function c53701005.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53701005.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c53701005.filter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
end
function c53701005.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c53701005.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
function c53701005.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*300
end
function c53701005.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701005.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701005.cfilter,1,nil,tp)
end
function c53701005.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701005.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701005.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701005,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701005)
local nm=3
local g2=Duel.GetMatchingGroup(c53701005.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local dg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if ter%nm==0 and dg:GetCount()~=0 then
Duel.Hint(HINT_CARD,0,53701005)
Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--惧 轮 赤 压
function c53701006.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetCondition(c53701006.spcon)
e1:SetTarget(c53701006.sptg)
e1:SetOperation(c53701006.spop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701006.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701006,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701006.descon)
e4:SetOperation(c53701006.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701006.spcost)
e6:SetOperation(c53701006.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701006.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701006.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701006.spcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and loc==LOCATION_GRAVE
end
function c53701006.spfilter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c53701006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701006.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c53701006.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c53701006.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c53701006.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*150
end
function c53701006.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701006.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701006.cfilter,1,nil,tp)
end
function c53701006.thfilter(c)
return c:IsSetCard(0x530) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c53701006.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701006.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701006.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701006,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701006)
local nm=3
local g2=Duel.GetMatchingGroup(c53701006.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local hg=Duel.GetMatchingGroup(c53701006.thfilter,tp,LOCATION_DECK,0,nil)
if ter%nm==0 and #hg>0 then
Duel.Hint(HINT_CARD,0,53701006)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=hg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--惧 轮 邪 诞 老 人
function c53701007.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP,1)
e1:SetValue(1)
e1:SetCondition(c53701007.spcon)
e1:SetOperation(c53701007.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(53701007,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c53701007.target)
e2:SetCondition(c53701007.condition)
e2:SetOperation(c53701007.operation)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701007.value)
c:RegisterEffect(e3)
end
function c53701007.spfilter(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
end
function c53701007.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c53701007.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
function c53701007.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c53701007.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c53701007.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c53701007.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c53701007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53701007.tgfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c53701007.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c53701007.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c53701007.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*200
end
\ No newline at end of file
--惧 轮 小 魔 女
function c53701008.initial_effect(c)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701008,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1)
e2:SetCondition(c53701008.rmcon)
e2:SetTarget(c53701008.rmtg)
e2:SetOperation(c53701008.rmop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701008.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701008,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701008.descon)
e4:SetOperation(c53701008.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701008.spcost)
e6:SetOperation(c53701008.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701008.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701008.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701008.filter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and c:IsAbleToRemove()
end
function c53701008.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701008.filter,1,nil,1-tp)
end
function c53701008.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c53701008.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and c:IsLocation(LOCATION_GRAVE)
end
function c53701008.rmop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c53701008.filter2,nil,e,1-tp)
if sg:GetCount()==0 then return end
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
function c53701008.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*150
end
function c53701008.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701008.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701008.cfilter,1,nil,tp)
end
function c53701008.thfilter(c)
return c:IsSetCard(0x530) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c53701008.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701008.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701008.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701008,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701008)
local nm=3
local g2=Duel.GetMatchingGroup(c53701008.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local hg=Duel.GetMatchingGroup(c53701008.thfilter,tp,LOCATION_DECK,0,nil)
if ter%nm==0 and #hg>0 then
Duel.Hint(HINT_CARD,0,53701008)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=hg:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--惧 轮 梦 魇
function c53701009.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),2,2)
c:EnableReviveLimit()
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701009,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c53701009.rmcon)
e2:SetOperation(c53701009.rmop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701009.value)
c:RegisterEffect(e3)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SPSUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701009.spcost)
e6:SetOperation(c53701009.spcop)
c:RegisterEffect(e6)
end
function c53701009.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701009.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701009.filter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and c:IsAbleToRemove()
end
function c53701009.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701009.filter,1,nil,1-tp)
end
function c53701009.filter2(c)
return c:GetSequence()<5 and c:IsFaceup() and c:IsSetCard(0x530)
end
function c53701009.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local ag=Duel.GetMatchingGroup(c53701009.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
ag:Sub(lg)
if ag:GetCount()==0 then return end
Duel.Destroy(ag,REASON_EFFECT)
end
function c53701009.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*200
end
--惧 轮 浅 海 回 响
function c53701010.initial_effect(c)
--activate cost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCost(c53701010.costchk)
e1:SetOperation(c53701010.costop)
c:RegisterEffect(e1)
--lock
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701010,0))
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c53701010.lkcon)
e2:SetTarget(c53701010.lktg)
e2:SetOperation(c53701010.lkop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701010.value)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c53701010.efilter)
c:RegisterEffect(e4)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701010.spcost)
e6:SetOperation(c53701010.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701010.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701010.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701010.filter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp
end
function c53701010.lkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701010.filter,1,nil,1-tp)
end
function c53701010.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function c53701010.lkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
e:GetHandler():SetCardTarget(tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c53701010.rcon)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TO_DECK)
tc:RegisterEffect(e2)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_TO_HAND)
tc:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
tc:RegisterEffect(e5)
end
function c53701010.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c53701010.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*400
end
function c53701010.efilter(e,re,rp)
if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g:IsContains(e:GetHandler())
end
function c53701010.costchk(e,te_or_c,tp)
return Duel.IsPlayerCanDiscardDeckAsCost(tp,1)
end
function c53701010.costop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
Duel.DisableShuffleCheck()
Duel.Destroy(tc,REASON_COST)
end
--惧 轮 狂 突 猛 进
function c53701011.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON+TIMING_MSET+TIMING_SSET+TIMING_FLIPSUMMON+TIMING_EQUIP)
e1:SetCondition(c53701011.condition)
e1:SetCost(c53701011.cost)
e1:SetTarget(c53701011.target)
e1:SetOperation(c53701011.operation)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53701011,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c53701011.descon)
e3:SetTarget(c53701011.destg)
e3:SetOperation(c53701011.desop)
c:RegisterEffect(e3)
end
function c53701011.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c53701011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.GetFlagEffect(tp,53701011)==0 end
Duel.PayLPCost(tp,1000)
Duel.RegisterFlagEffect(tp,53701011,RESET_CHAIN,0,1)
end
function c53701011.filter(c,e,sp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c53701011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701011.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c53701011.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c53701011.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(53701011,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c53701011.thcon)
e3:SetOperation(c53701011.thop)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
end
function c53701011.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(53701011)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c53701011.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c53701011.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x530)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c53701011.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701011.cfilter,1,nil,tp)
end
function c53701011.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c53701011.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
--惧 轮 结 伴
function c53701012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,53701012)
e1:SetTarget(c53701012.target)
e1:SetOperation(c53701012.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701012,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,53701012)
e2:SetCondition(c53701012.thcon)
e2:SetTarget(c53701012.thtg)
e2:SetOperation(c53701012.thop)
c:RegisterEffect(e2)
end
function c53701012.filter(c)
return c:IsSetCard(0x530) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c53701012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53701012.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c53701012.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c53701012.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c53701012.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x530)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c53701012.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701012.cfilter,1,e:GetHandler(),tp)
end
function c53701012.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c53701012.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--惧 轮 临 时 修 理"
function c53701013.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,53701013)
e1:SetTarget(c53701013.target)
e1:SetOperation(c53701013.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701013,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,53701013)
e2:SetCondition(c53701013.drcon)
e2:SetCost(c53701013.drcost)
e2:SetTarget(c53701013.drtg)
e2:SetOperation(c53701013.drop)
c:RegisterEffect(e2)
end
function c53701013.filter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53701013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701013.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c53701013.activate(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,c53701013.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c53701013.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x530)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsAbleToDeck()
end
function c53701013.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701013.cfilter,1,e:GetHandler(),tp)
end
function c53701013.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c53701013.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c53701013.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLocation(LOCATION_GRAVE)
end
function c53701013.drop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c53701013.filter2,nil,e,tp)
if sg:GetCount()==0 then return end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
--惧轮午后小憩
function c53701014.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c53701014.target)
e1:SetOperation(c53701014.activate)
c:RegisterEffect(e1)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701014,1))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,53701014)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c53701014.tdtg)
e4:SetOperation(c53701014.tdop)
c:RegisterEffect(e4)
end
function c53701014.filter(c)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsAbleToHand()
end
function c53701014.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53701014.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
end
function c53701014.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c53701014.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetReset(RESET_CHAIN)
e1:SetOperation(c53701014.disop1)
Duel.RegisterEffect(e1,tp)
end
end
function c53701014.disop1(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():GetLocation()==LOCATION_GRAVE
then
Duel.NegateEffect(ev)
end
end
function c53701014.tdfilter(c)
return c:IsSetCard(0x530) and c:IsAbleToDeck()
end
function c53701014.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c53701014.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c53701014.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c53701014.tdfilter,tp,LOCATION_GRAVE,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c53701014.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--惧 轮 守 暮 人
function c53701015.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),2,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,53701015)
e1:SetCost(c53701015.spcost)
e1:SetTarget(c53701015.sptg)
e1:SetOperation(c53701015.spop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701015,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,53701035)
e2:SetCondition(c53701015.condition)
e2:SetTarget(c53701015.target)
e2:SetOperation(c53701015.operation)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701015.value)
c:RegisterEffect(e3)
end
function c53701015.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*200
end
function c53701015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.Release(e:GetHandler(),REASON_COST)
end
function c53701015.filter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53701015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c53701015.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c53701015.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,c53701015.filter,tp,LOCATION_HAND+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
function c53701015.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c53701015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53701015.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c53701015.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c53701015.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e:GetHandler():RegisterEffect(e1,true)
end
end
--惧 轮 突 入 兵
function c53701016.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,53701016)
e1:SetCondition(c53701016.spcon)
e1:SetTarget(c53701016.sptg)
e1:SetOperation(c53701016.spop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701016.value)
c:RegisterEffect(e3)
end
function c53701016.filter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:IsType(TYPE_MONSTER) and c:GetPreviousControler()==tp
end
function c53701016.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701016.filter,1,nil,1-tp)
end
function c53701016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53701016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsPosition(POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c53701016.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*100
end
--惧 轮 开 拓 双 星
function c53701017.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),2,3)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,53701017)
e1:SetTarget(c53701017.tktg)
e1:SetOperation(c53701017.tkop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701017,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_TOGRAVE+TIMING_EQUIP)
e2:SetCountLimit(1)
e2:SetCost(c53701017.discost)
e2:SetTarget(c53701017.distg)
e2:SetOperation(c53701017.disop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701017.value)
c:RegisterEffect(e3)
end
function c53701017.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone(tp)
if chk==0 then return zone~=0
and Duel.IsPlayerCanSpecialSummonMonster(tp,53701018,0,0x4011,100,100,1,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c53701017.tkop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if zone==0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,53701018,0,0x4011,100,100,1,RACE_MACHINE,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,53701018)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c53701017.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*300
end
function c53701017.cfilter(c,g)
return c:IsSetCard(0x530) and g:IsContains(c)
end
function c53701017.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,c53701017.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,c53701017.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function c53701017.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=e:GetHandler():GetLinkedZone(tp)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) and zone~=0
and Duel.IsPlayerCanSpecialSummonMonster(tp,53701018,0,0x4011,100,100,1,RACE_MACHINE,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c53701017.disop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
local tc=Duel.GetFirstTarget()
if zone==0 then return end
if tc:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,53701018,0,0x4011,100,100,1,RACE_MACHINE,ATTRIBUTE_DARK) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local token=Duel.CreateToken(tp,53701018)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
--惧 轮 荒 行 者
function c53701019.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c53701019.spcon)
e1:SetOperation(c53701019.spop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701019.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701019,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701019.descon)
e4:SetOperation(c53701019.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701019.spcost)
e6:SetOperation(c53701019.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701019.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701019.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701019.spfilter(c)
return c:IsSetCard(0x530) and c:IsAbleToRemoveAsCost()
end
function c53701019.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701019.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c53701019.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c53701019.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c53701019.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*200
end
function c53701019.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701019.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701019.cfilter,1,nil,tp)
end
function c53701019.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701019.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701019.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701019,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701019)
local nm=3
local g2=Duel.GetMatchingGroup(c53701019.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local hg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if ter%nm==0 and #hg>0 then
Duel.Hint(HINT_CARD,0,53701019)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=hg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
--惧 轮 莽 汉
function c53701020.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM+EFFECT_FLAG_UNCOPYABLE)
e1:SetTargetRange(POS_FACEUP,0)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c53701020.spcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c53701020.condition)
e2:SetOperation(c53701020.operation)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53701020,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,53701020)
e3:SetCondition(c53701020.thcon)
e3:SetTarget(c53701020.thtg)
e3:SetOperation(c53701020.thop)
c:RegisterEffect(e3)
end
function c53701020.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c53701020.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c53701020.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c53701020.filter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) and c:IsType(TYPE_MONSTER) and c:GetPreviousControler()==tp and c:IsAbleToHand()
end
function c53701020.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701020.filter,1,nil,1-tp)
end
function c53701020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c53701020.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c53701020.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=eg:Filter(c53701020.filter2,nil,e,1-tp)
if sg:GetCount()>=0 and c:IsRelateToEffect(e) then
Duel.SendtoHand(sg,1-tp,REASON_EFFECT)
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--惧 轮 擒 敌
function c53701021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCost(c53701021.cost)
e1:SetTarget(c53701021.target)
e1:SetOperation(c53701021.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c53701021.handcon)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53701021,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCost(c53701021.descost)
e3:SetTarget(c53701021.destg)
e3:SetOperation(c53701021.desop)
c:RegisterEffect(e3)
end
function c53701021.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
function c53701021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c53701021.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c53701021.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c53701021.filter(c,tp)
return c:GetSummonPlayer()~=tp and bit.band(c:GetSummonLocation(),LOCATION_GRAVE)~=0 and c:IsLocation(LOCATION_MZONE)
end
function c53701021.spfilter2(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53701021.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c53701021.filter,nil,tp)
local ct=g:GetCount()
if chk==0 then return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701021.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c53701021.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c53701021.filter,nil,tp):Filter(Card.IsRelateToEffect,nil,e)
local g2=Duel.SelectMatchingCard(tp,c53701021.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()<=0 and g2:GetCount()<=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=g2:GetFirst()
Duel.Destroy(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
if c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c53701021.eqlimit)
c:RegisterEffect(e1)
end
elseif c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
c:CancelToGrave(false)
end
end
function c53701021.eqlimit(e,c)
return e:GetOwner()==c
end
function c53701021.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
e:SetLabelObject(e:GetHandler():GetEquipTarget())
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c53701021.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsSummonType(SUMMON_TYPE_SPECIAL) end
if chk==0 then return Duel.IsExistingTarget(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsSummonType,tp,0,LOCATION_MZONE,1,1,nil,SUMMON_TYPE_SPECIAL)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c53701021.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--惧 轮 界 外 人
function c53701022.initial_effect(c)
--advance self
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701022,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetRange(LOCATION_HAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCondition(c53701022.sumcon)
e2:SetCost(c53701022.cost)
e2:SetTarget(c53701022.sumtg)
e2:SetOperation(c53701022.sumop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701022.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701022,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701022.descon)
e4:SetOperation(c53701022.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701022.spcost)
e6:SetOperation(c53701022.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701022.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701022.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701022.sumfilter(c)
return c:IsFaceup() and c:IsSetCard(0x530)
end
function c53701022.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c53701022.sumfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c53701022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRIBUTE_LIMIT)
e1:SetReset(RESET_CHAIN)
e1:SetValue(c53701022.tlimit)
e:GetHandler():RegisterEffect(e1)
if chk==0 then return Duel.CheckLPCost(tp,1800) end
Duel.PayLPCost(tp,1800)
end
function c53701022.tlimit(e,c)
return not c:IsSetCard(0x530)
end
function c53701022.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c53701022.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsSummonable(true,nil,1) and c:IsRelateToEffect(e) then
Duel.Summon(tp,c,true,nil,1)
end
end
function c53701022.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*200
end
function c53701022.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701022.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701022.cfilter,1,nil,tp)
end
function c53701022.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701022.spfilter(c,e,tp,rc)
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_SUMMON) and c:GetReasonCard()==rc and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53701022.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701022.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701022,RESET_EVENT+RESETS_STANDARD,0,1)
local g3=e:GetHandler():GetMaterial():Filter(c53701022.spfilter,nil,e,tp,e:GetHandler())
local ter=e:GetHandler():GetFlagEffect(53701022)
local nm=2
local g2=Duel.GetMatchingGroup(c53701022.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=1 end
local ct=g3:GetCount()
if ct>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if ter%nm==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct-1 then
Duel.Hint(HINT_CARD,0,53701022)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.SpecialSummon(g3,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--惧 轮 去 人
function c53701023.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701023,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetCondition(c53701023.drcon)
e1:SetTarget(c53701023.drtg)
e1:SetOperation(c53701023.drop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53701023,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,53701023+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c53701023.condition)
e2:SetTarget(c53701023.target)
e2:SetOperation(c53701023.operation)
c:RegisterEffect(e2)
end
function c53701023.cfilter(c,tp,rp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x530)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c53701023.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53701023.cfilter,1,nil,tp)
end
function c53701023.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c53701023.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c53701023.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c53701023.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanDiscardDeck(1-tp,1)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c53701023.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and not Duel.IsExistingMatchingCard(c53701023.filter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
Duel.DisableShuffleCheck()
Duel.Destroy(tc,REASON_EFFECT)
end
end
--惧 轮 渊 念
function c53701024.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701024,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,53701024)
e1:SetCost(c53701024.cpcost)
e1:SetTarget(c53701024.cptg)
e1:SetOperation(c53701024.cpop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(c53701024.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701024,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701024.descon)
e4:SetOperation(c53701024.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701024.spcost)
e6:SetOperation(c53701024.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701024.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701024.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701024.cpfilter(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) and c:IsSetCard(0x530) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function c53701024.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c53701024.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c53701024.cpfilter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c53701024.cpfilter,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c53701024.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
function c53701024.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*200
end
function c53701024.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701024.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701024.cfilter,1,nil,tp)
end
function c53701024.thfilter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c53701024.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701024.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701024.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701024,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701024)
local nm=3
local g2=Duel.GetMatchingGroup(c53701024.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=2 end
local hg=Duel.GetMatchingGroup(c53701024.thfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ter%nm==0 and #hg>0 then
Duel.Hint(HINT_CARD,0,53701024)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=hg:Select(tp,1,1,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--惧轮 天狼星
function c53701025.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),2,3)
c:EnableReviveLimit()
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701025.value)
c:RegisterEffect(e3)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701025,0))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701025.condition)
e4:SetTarget(c53701025.target)
e4:SetOperation(c53701025.operation)
c:RegisterEffect(e4)
--Revive
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(53701025,1))
e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1)
e5:SetTarget(c53701025.sumtg)
e5:SetOperation(c53701025.sumop)
c:RegisterEffect(e5)
end
function c53701025.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*300
end
function c53701025.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c53701025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) and e:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
end
function c53701025.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
Duel.Destroy(eg,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(53701025,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c53701025.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(53701025)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c53701025.sumop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--惧 轮 至 高 清 道 夫
function c53701026.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,99,c53701026.lcheck)
c:EnableReviveLimit()
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701026,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c53701026.actcon)
e1:SetOperation(c53701026.actop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701026.value)
c:RegisterEffect(e3)
--destroy
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(53701026,1))
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e9:SetCategory(CATEGORY_DESTROY)
e9:SetCode(EVENT_BATTLE_DESTROYING)
e9:SetCondition(c53701026.decon)
e9:SetTarget(c53701026.detg)
e9:SetOperation(c53701026.deop)
c:RegisterEffect(e9)
end
function c53701026.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x530)
end
function c53701026.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=0
end
function c53701026.actop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c53701026.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*400
end
function c53701026.decon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c53701026.defilter(c,rac)
return c:IsRace(rac)
end
function c53701026.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetHandler():GetBattleTarget()
local desg=Duel.GetMatchingGroup(c53701026.defilter,tp,0,LOCATION_DECK,nil,tc:GetRace())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,desg,desg:GetCount(),0,0)
end
function c53701026.deop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=e:GetHandler():GetBattleTarget()
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
Duel.ConfirmCards(tp,g)
local desg=Duel.GetMatchingGroup(c53701026.defilter,tp,0,LOCATION_DECK,nil,tc:GetRace())
Duel.Destroy(desg,REASON_EFFECT)
if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsChainAttackable() then
Duel.ChainAttack()
end
end
\ No newline at end of file
--惧 轮 急 转
function c53701027.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,53701027)
e1:SetTarget(c53701027.sptg)
e1:SetOperation(c53701027.spop)
c:RegisterEffect(e1)
--link rating
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,537010270)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c53701027.lktg)
e4:SetOperation(c53701027.lkop)
c:RegisterEffect(e4)
end
function c53701027.spfilter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53701027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701027.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c53701027.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c53701027.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=5 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c53701027.lkfilter(c)
return c:IsSetCard(0x530) and c:IsType(TYPE_LINK)
end
function c53701027.lktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53701027.lkfilter(chkc) end
local b1=Duel.IsExistingMatchingCard(c53701027.lkfilter,tp,LOCATION_MZONE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c53701027.lkfilter,tp,LOCATION_MZONE,0,1,nil)
local b3=Duel.IsExistingMatchingCard(c53701027.lkfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c53701027.lkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(53701027,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(53701027,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(53701027,2)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
end
function c53701027.lkop(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if sel==1 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0xff0000)
e2:SetValue(LINK_MARKER_BOTTOM_LEFT)
tc:RegisterEffect(e2)
elseif sel==2 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0xff0000)
e2:SetValue(LINK_MARKER_BOTTOM)
tc:RegisterEffect(e2)
else
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_LINK_MARKER_KOISHI)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0xff0000)
e2:SetValue(LINK_MARKER_BOTTOM_RIGHT)
tc:RegisterEffect(e2)
end
end
--惧 轮 掠 金 客
function c53701028.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),2,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53701028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,53701028)
e1:SetCondition(c53701028.spcon)
e1:SetTarget(c53701028.sptg)
e1:SetOperation(c53701028.spop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701028.value)
c:RegisterEffect(e3)
--draw
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(53701028,1))
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e9:SetCategory(CATEGORY_DESTROY)
e9:SetCode(EVENT_BATTLE_DESTROYING)
e9:SetCondition(c53701028.drcon)
e9:SetTarget(c53701028.drtg)
e9:SetOperation(c53701028.drop)
c:RegisterEffect(e9)
end
function c53701028.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c53701028.spfilter(c,e,tp)
return c:IsSetCard(0x530) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c53701028.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c53701028.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c53701028.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c53701028.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c53701028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c53701028.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*200
end
function c53701028.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c53701028.drfilter(c)
return c:IsFaceup() and c:IsSetCard(0x530)
end
function c53701028.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local gc=e:GetHandler():GetLinkedGroup():FilterCount(c53701028.drfilter,nil)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,gc)
end
function c53701028.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local gc=e:GetHandler():GetLinkedGroup():FilterCount(c53701028.drfilter,nil)
if gc>0 then
Duel.Draw(p,gc,REASON_EFFECT)
end
end
--惧 轮 破 晓 蝠
function c53701029.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x530),2,3)
c:EnableReviveLimit()
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e1)
--decrease atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c53701029.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(c53701029.value)
c:RegisterEffect(e4)
--actlimit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetValue(1)
e5:SetCondition(c53701029.actcon)
c:RegisterEffect(e5)
end
function c53701029.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*300
end
function c53701029.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*-200
end
function c53701029.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
--惧 轮 镜 面 骑 士
function c53701030.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c53701030.spcon)
e1:SetOperation(c53701030.spop)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c53701030.value)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(53701030,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c53701030.descon)
e4:SetOperation(c53701030.desop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SUMMON_COST)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(0xff)
e6:SetCost(c53701030.spcost)
e6:SetOperation(c53701030.spcop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_SPSUMMON_COST)
c:RegisterEffect(e7)
end
function c53701030.spcost(e,c,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0
end
function c53701030.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1)
Duel.DisableShuffleCheck()
Duel.Destroy(g,REASON_EFFECT)
end
function c53701030.spfilter(c)
return c:IsSetCard(0x530) and c:IsType(TYPE_MONSTER)
end
function c53701030.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53701030.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c53701030.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=Duel.SelectMatchingCard(tp,c53701030.spfilter,tp,LOCATION_HAND,0,1,1,c):GetFirst()
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
tc:RegisterFlagEffect(53701030,RESET_EVENT+RESETS_STANDARD,0,0)
end
function c53701030.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_GRAVE,nil,TYPE_MONSTER)*300
end
function c53701030.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x530) and c:IsControler(tp) and c:IsAttackPos()
end
function c53701030.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
e:SetLabelObject(tc)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c53701030.cfilter,1,nil,tp)
end
function c53701030.desfilter1(c,mc)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsCode(53701009) and c:GetLinkedGroup():IsContains(mc)
end
function c53701030.filter(c)
return c:GetFlagEffect(53701030)>0 and c:IsAbleToHand()
end
function c53701030.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c53701030.desop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53701030,RESET_EVENT+RESETS_STANDARD,0,1)
local ter=e:GetHandler():GetFlagEffect(53701030)
local nm=2
local g2=Duel.GetMatchingGroup(c53701030.desfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
if g2:GetCount()>0 then nm=1 end
local sg=Duel.GetMatchingGroup(c53701030.filter,tp,LOCATION_GRAVE,0,nil)
if ter%nm==0 and #sg>0 then
Duel.Hint(HINT_CARD,0,53701030)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
--ALC·ICG
function c53799025.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53799025,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,53799025)
e1:SetCondition(c53799025.thcon)
e1:SetTarget(c53799025.thtg)
e1:SetOperation(c53799025.thop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53799025,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c53799025.target)
e2:SetOperation(c53799025.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53799025,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c53799025.spcon)
e3:SetTarget(c53799025.sptg)
e3:SetOperation(c53799025.spop)
c:RegisterEffect(e3)
end
function c53799025.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c53799025.thfilter(c)
return c:IsCode(53799030) and c:IsAbleToHand()
end
function c53799025.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c53799025.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c53799025.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c53799025.cfilter(c,tp)
return c:GetSummonPlayer()==tp and not c:IsPreviousLocation(LOCATION_GRAVE) and c:IsLocation(LOCATION_MZONE)
end
function c53799025.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53799025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(c53799025.cfilter,1,e:GetHandler(),tp)
and Duel.IsExistingTarget(c53799025.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=eg:Filter(c53799025.cfilter,nil,tp)
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c53799025.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:GetSummonPlayer()==tp and not c:IsPreviousLocation(LOCATION_GRAVE) and c:IsLocation(LOCATION_MZONE)
end
function c53799025.operation(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,c53799025.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g2=eg:Filter(c53799025.filter2,nil,e,tp)
Duel.Destroy(g2,REASON_EFFECT)
end
end
function c53799025.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c53799025.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c53799025.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c53799025.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,c53799025.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -26,7 +26,7 @@ function c64831012.initial_effect(c) ...@@ -26,7 +26,7 @@ function c64831012.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_DISABLE) e3:SetCode(EFFECT_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetLabelObject(e0) e3:SetLabelObject(e0)
e3:SetTargetRange(1,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCondition(c64831012.effectcondition) e3:SetCondition(c64831012.effectcondition)
e3:SetTarget(c64831012.distarget) e3:SetTarget(c64831012.distarget)
......
--圣诞快乐·爱米莉
function c81012035.initial_effect(c)
c:EnableReviveLimit()
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(c81012035.sumlimit)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c81012035.effcon)
e2:SetOperation(c81012035.effop1)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_PRE_MATERIAL)
e3:SetCondition(c81012035.effcon)
e3:SetOperation(c81012035.effop2)
c:RegisterEffect(e3)
end
function c81012035.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
local sc=se:GetHandler()
return not (sc:IsType(TYPE_RITUAL) and sc:IsType(TYPE_SPELL))
and c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c81012035.effcon(e,tp,eg,ep,ev,re,r,rp)
return (r==REASON_RITUAL) and e:GetHandler():GetReasonCard():IsType(TYPE_PENDULUM)
end
function c81012035.effop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOperation(c81012035.sumop)
rc:RegisterEffect(e1,true)
end
function c81012035.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(c81012035.chainlm)
end
function c81012035.chainlm(e,rp,tp)
return tp==rp
end
function c81012035.effop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--清凉夏日·爱米莉
function c81012043.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PYRO),aux.NonTuner(Card.IsRace,RACE_PYRO),1,1)
--change level
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(c81012043.lvtg)
e1:SetOperation(c81012043.lvop)
c:RegisterEffect(e1)
--lv change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c81012043.nstg)
e2:SetOperation(c81012043.nsop)
c:RegisterEffect(e2)
--pendulum
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c81012043.pencon)
e6:SetTarget(c81012043.pentg)
e6:SetOperation(c81012043.penop)
c:RegisterEffect(e6)
end
function c81012043.lvfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_PYRO)
and Duel.IsExistingMatchingCard(c81012043.lvcfilter,tp,LOCATION_HAND,0,1,nil,c)
end
function c81012043.lvcfilter(c,mc)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and not c:IsPublic()
and (not mc or not c:IsLevel(mc:GetLevel()))
end
function c81012043.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c81012043.lvfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c81012043.lvfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c81012043.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c81012043.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local ec=tc
if not tc:IsRelateToEffect(e) then ec=nil end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c81012043.lvcfilter,tp,LOCATION_HAND,0,1,1,nil,ec)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
local pc=cg:GetFirst()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
pc:RegisterEffect(e2)
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
pc:RegisterEffect(e1)
end
end
end
function c81012043.nstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,aux.Stringid(81012043,0),aux.Stringid(81012043,1))
e:SetLabel(op)
end
function c81012043.nsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if e:GetLabel()==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_TUNER)
c:RegisterEffect(e2)
end
end
end
function c81012043.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c81012043.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c81012043.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--害羞女仆·理子
local m=81012054
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,2)
c:EnableReviveLimit()
Tenka.PyroLink(c)
--spsummon
local e0=aux.AddRitualProcEqual2(c,cm.filter,LOCATION_REMOVED,nil,cm.psfilter)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCode(0)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_MZONE)
e0:SetCost(cm.cost)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81012954)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLinkType(TYPE_PENDULUM) and c:IsLinkRace(RACE_PYRO)
end
function cm.filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL)
end
function cm.psfilter(c,e,tp)
return c~=e:GetHandler()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spcfilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--谨贺新年·爱米莉
function c81012064.initial_effect(c)
--reflect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c81012064.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81012064)
e2:SetCondition(c81012064.spcon)
e2:SetTarget(c81012064.sptg)
e2:SetOperation(c81012064.spop)
c:RegisterEffect(e2)
--act in set turn
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCondition(c81012064.actcon)
c:RegisterEffect(e3)
end
function c81012064.nfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsRace(RACE_PYRO)
end
function c81012064.actcon(e)
return Duel.IsExistingMatchingCard(c81012064.nfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c81012064.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c81012064.actop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c81012064.sucop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_END)
e3:SetOperation(c81012064.cedop)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabelObject(e2)
Duel.RegisterEffect(e3,tp)
end
function c81012064.actop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_RITUAL) and ep==tp then
Duel.SetChainLimit(c81012064.chainlm)
end
end
function c81012064.chainlm(e,rp,tp)
return tp==rp
end
function c81012064.sucfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetSummonPlayer()==tp
end
function c81012064.sucop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c81012064.sucfilter,1,nil,tp) then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c81012064.cedop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then
Duel.SetChainLimitTillChainEnd(c81012064.chainlm)
end
end
function c81012064.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_RITUAL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c81012064.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,81012064,0,0x11,1550,1050,8,RACE_PYRO,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c81012064.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,81012064,0,0x11,1550,1050,8,RACE_PYRO,ATTRIBUTE_FIRE) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,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:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(c81012064.splimit)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function c81012064.splimit(e,c)
return not c:IsRace(RACE_PYRO)
end
--碎花纷飞·爱米莉
function c81012077.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--Tuner
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,81012077)
e2:SetCondition(c81012077.tncon)
e2:SetOperation(c81012077.tnop)
c:RegisterEffect(e2)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c81012077.descost)
e5:SetTarget(c81012077.destg)
e5:SetOperation(c81012077.desop)
c:RegisterEffect(e5)
Duel.AddCustomActivityCounter(81012077,ACTIVITY_SPSUMMON,c81012077.counterfilter)
end
function c81012077.counterfilter(c)
return not c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c81012077.tncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA)
end
function c81012077.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c81012077.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(81012077,tp,ACTIVITY_SPSUMMON)==0 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:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c81012077.splimit)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c81012077.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c81012077.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c81012077.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and c81012077.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81012077.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c81012077.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c81012077.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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