Commit 6fd58b64 authored by Tachibana's avatar Tachibana

得得得得得

parent 3f6c704b
No preview for this file type
......@@ -239,7 +239,6 @@
12029008 1 --射星之弓 阿尔忒弥斯
12029010 1 --永远的誓言 纯白女王
12029011 1 --王权代行者 纯白女王
12029014 0 --魅魔后辈 薇薇安
12029016 0 --惩戒双子
12029018 2 --希望的暗语 雪滴花
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)
e3:SetCode(EFFECT_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetLabelObject(e0)
e3:SetTargetRange(1,0)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCondition(c64831012.effectcondition)
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
--Suffering of Screw
local m=81012086
local cm=_G["c"..m]
function cm.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,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+900)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_PYRO)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_EXTRA,0,nil)
if ct==0 then return end
Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck()
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then ct=ct-1 end
Duel.ShuffleHand(tp)
if ct>0 then Duel.SortDecktop(tp,tp,ct) end
end
function cm.thfilter(c)
return c:IsRace(RACE_PYRO) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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 c81012089.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--tohand
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,81012089)
e0:SetCost(c81012089.thcost)
e0:SetTarget(c81012089.thtg)
e0:SetOperation(c81012089.thop)
c:RegisterEffect(e0)
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c81012089.adval)
c:RegisterEffect(e1)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c81012089.pencon)
e3:SetOperation(c81012089.penop)
c:RegisterEffect(e3)
end
function c81012089.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c81012089.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81012089.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c81012089.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c81012089.thfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c81012089.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and c81012089.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81012089.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c81012089.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c81012089.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c81012089.pencon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c81012089.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(81012089,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,29432356)
e2:SetTargetRange(1,0)
e2:SetValue(c81012089.pendvalue)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c81012089.pendvalue(e,c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
end
function c81012089.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
end
function c81012089.adval(e,c)
return Duel.GetMatchingGroupCount(c81012089.filter,c:GetControler(),LOCATION_MZONE,0,c)*800
end
--期待下次再会·拉蒂
local m=81022006
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_PZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,cm.costfilter,1,1,nil)
e:SetLabelObject(sg:GetFirst())
Duel.SendtoGrave(sg,REASON_COST)
end
function cm.tgfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cc=e:GetLabelObject()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tgfilter(chkc) and chkc~=cc end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_GRAVE,0,1,1,cc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PYRO) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PYRO)
Duel.Release(g,REASON_COST)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand() and c:IsAbleToDeck()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>=3 then
local sg=g:RandomSelect(tp,3)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
dg=sg:Filter(Card.IsAbleToDeck,tg)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
end
end
--意外的偶遇·爱米莉
local m=81022023
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.qfilter(c,e,tp,m,ft)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL)) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--路上小心·拉蒂
local m=81022027
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.initial_effect(c)
--
aux.EnablePendulumAttribute(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+900)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.tfilter1(c)
return c:IsRace(RACE_PYRO) and c:IsReleasable()
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tfilter1(chkc,e,tp) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.tfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectTarget(tp,cm.tfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,1,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,LOCATION_PZONE)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.Release(tc,REASON_EFFECT)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,81012999,0,0x4011,1550,1050,4,RACE_PYRO,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,81012999,0,0x4011,1550,1050,4,RACE_PYRO,ATTRIBUTE_FIRE) then return end
local token=Duel.CreateToken(tp,81012999)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--White Canvas
local m=81022030
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c81000000") end,function() require("script/c81000000") end)
function cm.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,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.matcon)
e2:SetTarget(cm.mattg)
e2:SetOperation(cm.matop)
c:RegisterEffect(e2)
end
function cm.relfil(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_PYRO) and c:IsReleasable() and Duel.GetMZoneCount(tp,c,tp)>0 and Duel.IsExistingMatchingCard(cm.spfil,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetRank())
end
function cm.spfil(c,e,tp,rk)
return c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsLevel(rk)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.relfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.relfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if g and Duel.Release(g,REASON_EFFECT)~=0 then
local rg=Duel.SelectMatchingCard(tp,cm.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp,g:GetFirst():GetRank())
if rg then
Duel.SpecialSummon(rg,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
end
end
end
function cm.cfilter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsCanBeEffectTarget(e) and c:IsRace(RACE_PYRO)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and eg:IsExists(cm.cfilter1,1,nil,e,tp)
end
function cm.tgfilter(c,tp,eg)
return eg:IsContains(c) and c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:IsRace(RACE_PYRO)
end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgfilter(chkc,tp,eg) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp,eg)
and e:GetHandler():IsCanOverlay() end
if eg:GetCount()==1 then
Duel.SetTargetCard(eg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--海滨静候·拉蒂
local m=81022034
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLED)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d then return false end
if d:IsControler(tp) then a,d=d,a end
return a:IsType(TYPE_RITUAL) and a:IsType(TYPE_PENDULUM) and d:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.thfilter(c)
return c:IsRace(RACE_PYRO) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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 cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_RITUAL)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if c:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsRelateToEffect(re) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetOperation(cm.tsop)
e1:SetReset(RESET_EVENT+0x17a0000)
re:GetHandler():RegisterEffect(e1)
if c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() then
Duel.BreakEffect()
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
end
--Starving Trancer
local m=81022046
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.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,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp,mc)
return c:IsType(TYPE_PENDULUM) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and mc:IsCanBeRitualMaterial(c)
end
function cm.rfilter(c,mc)
local mlv=mc:GetRitualLevel(c)
if mlv==mc:GetLevel() then return false end
local lv=c:GetLevel()
return lv==bit.band(mlv,0xffff) or lv==bit.rshift(mlv,16)
end
function cm.filter(c,e,tp)
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,c,e,tp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
return sg:IsExists(cm.rfilter,1,nil,c) or sg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,ft)
end
function cm.mfilter(c)
return c:GetLevel()>0 and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsFaceup() and c:IsAbleToGrave()
end
function cm.mzfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:GetSequence()<5
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
local mg=Duel.GetRitualMaterial(tp)
if ft>0 then
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_EXTRA,0,nil)
mg:Merge(mg2)
else
mg=mg:Filter(cm.mzfilter,nil,tp)
end
return mg:IsExists(cm.filter,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return end
local mg=Duel.GetRitualMaterial(tp)
if ft>0 then
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_EXTRA,0,nil)
mg:Merge(mg2)
else
mg=mg:Filter(cm.mzfilter,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:FilterSelect(tp,cm.filter,1,1,nil,e,tp)
local mc=mat:GetFirst()
if not mc then return end
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,mc,e,tp,mc)
if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local b1=sg:IsExists(cm.rfilter,1,nil,mc)
local b2=sg:CheckWithSumEqual(Card.GetLevel,mc:GetLevel(),1,ft)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(m,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:FilterSelect(tp,cm.rfilter,1,1,nil,mc)
local tc=tg:GetFirst()
tc:SetMaterial(mat)
if not mc:IsLocation(LOCATION_EXTRA) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectWithSumEqual(tp,Card.GetLevel,mc:GetLevel(),1,ft)
local tc=tg:GetFirst()
while tc do
tc:SetMaterial(mat)
tc=tg:GetNext()
end
if not mc:IsLocation(LOCATION_EXTRA) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.BreakEffect()
tc=tg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc=tg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
--宫子
function c85400000.initial_effect(c)
c:SetUniqueOnField(1,0,85400000)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
------不会被战斗破坏
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(85400000,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c85400000.ct)
e2:SetTarget(c85400000.sptg)
e2:SetOperation(c85400000.spop)
c:RegisterEffect(e2)
------解放一只衍生物,返回手牌特招幽灵形态
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c85400000.aa)
e3:SetOperation(c85400000.bb)
c:RegisterEffect(e3)
------特殊召唤成功时,解放怪兽特招布丁
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(85400000,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetCondition(c85400000.ccdd)
e4:SetTarget(c85400000.cc)
e4:SetOperation(c85400000.ccc)
c:RegisterEffect(e4)
------破坏场上的「一块布丁」
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetCondition(c85400000.cd)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e5)
------没吃布丁不能攻击
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_CONTROL)
e6:SetDescription(aux.Stringid(85400000,2))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE)
e6:SetCondition(c85400000.cdd)
e6:SetTarget(c85400000.dx)
e6:SetOperation(c85400000.zx)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_CONTROL_CHANGED)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetOperation(c85400000.regop)
c:RegisterEffect(e7)
------控制权未变更的回合改变布丁的控制权
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e8:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e8:SetRange(LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_ONFIELD)
e8:SetValue(1)
c:RegisterEffect(e8)
------不能做超量素材
end
function c85400000.ccdd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c85400000.filter(c,e,tp,ec)
return c:IsCode(85400200) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c85400000.fi(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function c85400000.fil(c)
return c:IsCode(85400100)
end
function c85400000.cd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85400000)==0
end
function c85400000.gl(c)
return c:IsCode(85400100) and c:IsControlerCanBeChanged()
end
function c85400000.dx(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c85400000.gl(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85400000.gl,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c85400000.gl,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c85400000.zx(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.GetControl (tc,tp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400000,6))
end
end
function c85400000.cdd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85400001)==0
end
function c85400000.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(85400001,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
end
function c85400000.ct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c85400000.fi,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c85400000.fi,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c85400000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c85400000.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c85400000.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and Duel.ConfirmCards(1-tp,c)
and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c85400000.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400000,3))
end
end
end
function c85400000.glq(c,e,tp)
return c:IsCode(85400100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c85400000.gllq(c)
return c:IsReleasable() and not c:IsCode(85400000,85400100) and c:IsFaceup()
end
function c85400000.aa(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c85400000.gllq(chkc) end
if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c85400000.glq,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.IsExistingTarget(c85400000.gllq,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,c85400000.gllq,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c85400000.bb(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Release(tc,REASON_EFFECT)
local p=tc:GetPreviousControler()
if Duel.GetLocationCount(p,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c85400000.glq,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400000,5))
Duel.SpecialSummon(g,0,tp,p,false,false,POS_FACEUP_DEFENSE)
end
end
end
function c85400000.cc(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85400000.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
function c85400000.ccc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c85400000.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local ct=Duel.Destroy(g,REASON_EFFECT)
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400000,4))
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(ct*500)
c:RegisterEffect(e1)
c:RegisterFlagEffect(85400000,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
end
end
--一块布丁
function c85400100.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(85400100,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c85400100.tg)
e1:SetOperation(c85400100.op)
c:RegisterEffect(e1)
-----特殊召唤宫子
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(85400100,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE)
e2:SetTarget(c85400100.dx)
e2:SetOperation(c85400100.zx)
c:RegisterEffect(e2)
-----改变「宫子」的控制权
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c85400100.fdfdfd)
e3:SetTarget(c85400100.ff)
e3:SetOperation(c85400100.gg)
e3:SetRange(LOCATION_MZONE)
c:RegisterEffect(e3)
-----被破坏时生成衍生物并除外卡组中的一张卡
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetValue(c85400100.atlimit)
c:RegisterEffect(e4)
------不会成为宫子的攻击对象
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e5)
------不能攻击
end
function c85400100.atlimit(e,c)
return c:IsCode(85400000)
end
function c85400100.fdfdfd(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetPreviousControler()
return Duel.GetFlagEffect(tp,85400100)==0
end
function c85400100.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c85400100.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c85400100.filter(c,e,tp,ec)
return c:IsCode(85400000) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c85400100.op(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,aux.NecroValleyFilter(c85400100.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400100,2))
end
end
function c85400100.glq(c)
return c:IsCode(85400000) and c:IsControlerCanBeChanged()
end
function c85400100.dx(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c85400100.glq(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85400100.glq,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c85400100.glq,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c85400100.zx(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400100,3))
if Duel.GetControl (tc,tp)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(85400000,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
end
function c85400100.bcbcbcb(c)
return c:IsCode(85400200) and c:IsAbleToRemove()
end
function c85400100.ff(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,85400300,0,0x4011,300,100,1,RACE_ZOMBIE,ATTRIBUTE_DARK) end
if Duel.IsExistingMatchingCard(c85400100.bcbcbcb,tp,LOCATION_DECK,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c85400100.gg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,85400300,0,0x4011,300,100,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,85400300)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetCountLimit(1,85400300)
e1:SetCondition(c85400100.dd)
e1:SetTarget(c85400100.aa)
e1:SetOperation(c85400100.oiiu)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetTarget(c85400100.po)
e2:SetOperation(c85400100.bb)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c85400100.ee)
e3:SetTarget(c85400100.fb)
e3:SetOperation(c85400100.bf)
token:RegisterEffect(e3,true)
Duel.RegisterFlagEffect(tp,85400100,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
end
if Duel.IsExistingMatchingCard(c85400100.bcbcbcb,tp,LOCATION_DECK,0,1,nil) then
local g=Duel.GetMatchingGroup(c85400100.bcbcbcb,tp,LOCATION_DECK,0,nil)
local tg=g:RandomSelect(tp,1)
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
function c85400100.ggggg(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and c:IsCode(85400500)
end
function c85400100.dd(de,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c85400100.ee(de,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c85400100.fb(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,e:GetHandler(),1,0,0)
end
function c85400100.bf(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Release(c,REASON_EFFECT)
end
end
function c85400100.aa(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c85400100.ggggg(chk) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c85400100.ggggg,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,0,0)
end
function c85400100.oiiu(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c85400100.ggggg,tp,LOCATION_DECK,0,1,1,nil)
Duel.SSet(tp,g)
end
function c85400100.po(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_RELEASE) then
local p=c:GetPreviousControler()
if chk==0 then return Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(p,85400400,0,0x4011,100,300,1,RACE_ZOMBIE,ATTRIBUTE_DARK)
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
end
function c85400100.bb(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,85400400,0,0x4011,100,300,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,85400400)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCategory(CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c85400100.jjjk)
e2:SetTarget(c85400100.bbba)
e2:SetOperation(c85400100.cccda)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetTarget(c85400100.ooi)
e3:SetOperation(c85400100.ioo)
token:RegisterEffect(e3,true)
end
function c85400100.jjjk(de,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c85400100.bbba(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,e:GetHandler(),1,0,0)
end
function c85400100.cccda(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Release(c,REASON_EFFECT)
end
end
function c85400100.filte(c,e,tp,ec)
return c:IsCode(85400100) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c85400100.ooi(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_RELEASE) then
local tp=c:GetPreviousControler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c85400100.filte,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
end
function c85400100.ioo(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c85400100.filte),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
end
--宫子的幽灵形态
function c85400200.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,85400200)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
------不会被战斗破坏
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
------不会被效果破坏
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
------己方不受战斗伤害
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(85400200,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c85400200.tdcon)
e4:SetTarget(c85400200.tdtg)
e4:SetOperation(c85400200.tdop)
c:RegisterEffect(e4)
------准备阶段回到卡组
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetRange(LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_ONFIELD)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e7:SetValue(c85400200.leak)
c:RegisterEffect(e7)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e8)
local e9=e5:Clone()
e9:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e9)
local e10=e5:Clone()
e10:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e10)
-----不能做祭品,不能做融合素材,不能做同调素材,不能做超量素材,不能做连接素材
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_IMMUNE_EFFECT)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetValue(c85400200.efilter)
e11:SetRange(LOCATION_ONFIELD)
e11:SetOwnerPlayer(tp)
c:RegisterEffect(e11)
-----不受其他卡的效果的影响
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_CANNOT_SUMMON)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e12:SetRange(LOCATION_ONFIELD)
e12:SetTargetRange(1,1)
e12:SetTarget(c85400200.reck)
c:RegisterEffect(e12)
local e13=e12:Clone()
e13:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e13)
local e14=e12:Clone()
e14:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e14)
-----这张卡在场时,不能召唤「宫子」
local e15=Effect.CreateEffect(c)
e15:SetCategory(CATEGORY_TODECK)
e15:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e15:SetCode(EVENT_SPSUMMON_SUCCESS)
e15:SetTarget(c85400200.gga)
e15:SetOperation(c85400200.abb)
c:RegisterEffect(e15)
-----特殊召唤成功时,场上的「宫子」返回卡组
local e16=Effect.CreateEffect(c)
e16:SetType(EFFECT_TYPE_SINGLE)
e16:SetCode(EFFECT_CANNOT_ATTACK)
e16:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e16)
------不能攻击
end
function c85400200.reck(e,c,sump,sumtype,sumpos,targetp)
return c:IsCode(85400000)
end
function c85400200.leak(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c85400200.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c85400200.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c85400200.filter(c,e,tp,ec)
return c:IsCode(85400000) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and not c:IsPublic()
end
function c85400200.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c85400200.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c85400200.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400200,1))
end
end
end
function c85400200.ffaf(c)
return c:IsCode(85400000) and c:IsAbleToDeck()
end
function c85400200.gga(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85400200.ffaf,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c85400200.ffaf,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c85400200.abb(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85400200.ffaf,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--布丁的怨灵
function c85400300.initial_effect(c)
end
--测试
function c85400400.initial_effect(c)
end
--怨灵的咆哮
function c85400500.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c85400500.cost)
e1:SetTarget(c85400500.target)
e1:SetOperation(c85400500.activate)
c:RegisterEffect(e1)
end
function c85400500.fi(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function c85400500.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c85400500.fi,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c85400500.fi,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Release(g,REASON_COST)
end
function c85400500.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c85400500.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
end
--梦中的香甜
function c85400600.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c85400600.cd)
e1:SetCost(c85400600.ct)
e1:SetTarget(c85400600.tg)
e1:SetOperation(c85400600.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c85400600.cdd)
e2:SetTarget(c85400600.tgg)
e2:SetOperation(c85400600.opp)
c:RegisterEffect(e2)
end
function c85400600.gl(c)
return c:IsCode(85400000)
end
function c85400600.glq(c,e,tp)
return c:IsCode(85400100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c85400600.glb(c,e,tp)
return c:IsCode(85400000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c85400600.cd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local sg=g:Filter(c85400600.gl,nil)
return sg:GetCount()>0
end
function c85400600.cdd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local sg=g:Filter(c85400600.gl,nil)
return sg:GetCount()<=0
end
function c85400600.ct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85400600.gl,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c85400600.gl,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c85400600.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c85400600.glq,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c85400600.op(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,aux.NecroValleyFilter(c85400600.glq),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
end
end
function c85400600.tgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c85400600.glb,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c85400600.opp(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,c85400600.glb,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
--把你变成布丁吃掉
function c85400700.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DAMAGE)
e1:SetCondition(c85400700.cd)
e1:SetTarget(c85400700.tg)
e1:SetOperation(c85400700.op)
c:RegisterEffect(e1)
end
function c85400700.cd(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c85400700.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(Duel.GetLP(tp))
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,ev)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev)
end
function c85400700.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,8000)
local b=e:GetLabel()
if b>0 and b<=8000 then
local tc=(8000-b)/2
Duel.Recover(1-tp,tc,REASON_EFFECT)
elseif b>8000 then
local bc=(b-8000)/2
Duel.Damage(1-tp,bc,REASON_EFFECT)
end
end
\ No newline at end of file
--宫子要隐身了
function c85400800.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c85400800.cd)
e1:SetTarget(c85400800.tg)
e1:SetOperation(c85400800.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c85400800.cdd)
e2:SetTarget(c85400800.tgg)
e2:SetOperation(c85400800.opp)
c:RegisterEffect(e2)
end
function c85400800.gl(c)
return c:IsCode(85400000)
end
function c85400800.glq(c,e,tp,ec)
return c:IsCode(85400200) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c85400800.cd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local sg=g:Filter(c85400800.gl,nil)
return sg:GetCount()>0
end
function c85400800.cdd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local sg=g:Filter(c85400800.gl,nil)
return sg:GetCount()<=0 and Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil
end
function c85400800.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c85400800.glq,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c85400800.op(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,aux.NecroValleyFilter(c85400800.glq),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
function c85400800.tgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c85400800.glq,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c85400800.opp(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,c85400800.glq,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
--不给布丁就捣蛋
function c85400900.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c85400900.cd)
e1:SetTarget(c85400900.tg)
e1:SetOperation(c85400900.op)
c:RegisterEffect(e1)
end
function c85400900.gl(c)
return c:IsCode(85400000)
end
function c85400900.cd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local sg=g:Filter(c85400900.gl,nil)
return sg:GetCount()>0
end
function c85400900.f(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_MONSTER)
end
function c85400900.filte(c,e,tp)
return c:IsCode(85400100) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c85400900.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=true
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,1-tp,LOCATION_HAND,0,1,nil)
local b3=Duel.IsExistingMatchingCard(c85400900.f,1-tp,LOCATION_MZONE,0,1,nil)
local b4=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c85400900.filte,1-tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,1,nil,e,tp)
if chk==0 then return b1 or b2 or b3 or b4 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(85400900,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(85400900,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(85400900,2)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(85400900,3)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(1-tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_DAMAGE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev)
end
if sel==2 then
e:SetCategory(CATEGORY_REMOVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end
if sel==3 then
e:SetCategory(CATEGORY_DISABLE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
end
if sel==4 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
end
function c85400900.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
if sel==2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToRemove,1-tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
if sel==3 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISABLE)
local sg=Duel.SelectMatchingCard(1-tp,c85400900.f,1-tp,LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
if tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
if sel==4 then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c85400900.filte),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE)
end
end
local g=Duel.GetFieldGroup(tp,LOCATION_SZONE,0)
local sg=g:Filter(c85400900.fa,nil)
if sg:GetCount()>0 then
Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_RULE)
end
end
function c85400900.fa(c)
return c:IsCode(85401000) and c:IsFaceup()
end
--狼的耳饰
function c85401000.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c85401000.sptg)
e1:SetOperation(c85401000.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c85401000.thcon)
e2:SetTarget(c85401000.thtg)
e2:SetOperation(c85401000.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c85401000.cdd)
e3:SetTarget(c85401000.tgg)
e3:SetOperation(c85401000.opp)
c:RegisterEffect(e3)
end
function c85401000.gl(c)
return c:IsCode(85400000)
end
function c85401000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local sg=g:Filter(c85401000.gl,nil)
if sg:GetCount()>0 then
e:SetCategory(CATEGORY_RECOVER)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
end
function c85401000.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local sg=g:Filter(c85401000.gl,nil)
if sg:GetCount()>0 then
Duel.Recover(1-tp,1000,REASON_EFFECT)
end
end
function c85401000.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0
end
function c85401000.thfilter(c)
return c:IsCode(85400900) and c:IsAbleToHand()
end
function c85401000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85401000.thfilter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c85401000.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c85401000.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 c85401000.cdd(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()==tp and Duel.GetAttackTarget()~=nil
end
function c85401000.tgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
function c85401000.opp(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(-1000)
tc:RegisterEffect(e1,true)
Duel.ChangeAttackTarget(nil)
end
--宫子想要布丁
function c85401100.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(85401100,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c85401100.spcd)
e1:SetTarget(c85401100.sptg)
e1:SetOperation(c85401100.spop)
c:RegisterEffect(e1)
-----尽可能召唤衍生物
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c85401100.tg)
e2:SetOperation(c85401100.op)
c:RegisterEffect(e2)
-----被破坏回手
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetValue(1)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetTarget(c85401100.ttt)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e5)
------衍生物不能解放,不能做连接素材
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetRange(LOCATION_FZONE)
e6:SetCode(EVENT_DESTROYED)
e6:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e6:SetCondition(c85401100.cdf)
e6:SetTarget(c85401100.tgf)
e6:SetOperation(c85401100.opf)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_RELEASE)
c:RegisterEffect(e7)
------破坏解放时加攻
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(85401100,0))
e8:SetCategory(CATEGORY_DESTROY)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetRange(LOCATION_FZONE)
e8:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e8:SetOperation(c85401100.ccc)
e8:SetTarget(c85401100.cc)
c:RegisterEffect(e8)
------破坏自己场上衍生物
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(85401100,2))
e9:SetCategory(CATEGORY_TOGRAVE)
e9:SetType(EFFECT_TYPE_IGNITION)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetRange(LOCATION_FZONE)
e9:SetOperation(c85401100.opb)
e9:SetTarget(c85401100.tgb)
c:RegisterEffect(e9)
------送去墓地
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e10:SetCode(EVENT_LEAVE_FIELD)
e10:SetOperation(c85401100.desop2)
c:RegisterEffect(e10)
------离场解放
end
function c85401100.fi1(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasable()
end
function c85401100.desop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85401100.fi1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Release(g,REASON_EFFECT)
end
end
function c85401100.tgb(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSendtoGrave(tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function c85401100.opb(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanSendtoGrave(tp,e:GetHandler()) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
function c85401100.spcd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85401101)+3>Duel.GetFlagEffect(tp,85401102)
end
function c85401100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0)
and (Duel.IsPlayerCanSpecialSummonMonster(tp,85401101,0,0x4011,0,0,0,RACE_PYRO,ATTRIBUTE_DARK) or Duel.IsPlayerCanSpecialSummonMonster(tp,85401103,0,0x4011,0,0,0,RACE_AQUA,ATTRIBUTE_LIGHT)) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
end
function c85401100.spop(e,tp,eg,ep,ev,re,r,rp)
local bt=Duel.GetLocationCount(tp,LOCATION_MZONE)
local be=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ft=bt+be
if ft<=0 or not (Duel.IsPlayerCanSpecialSummonMonster(tp,85401101,0,0x4011,0,0,0,RACE_PYRO,ATTRIBUTE_DARK) or Duel.IsPlayerCanSpecialSummonMonster(tp,85401103,0,0x4011,0,0,0,RACE_AQUA,ATTRIBUTE_LIGHT)) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then
if bt==0 then
be=1
else
bt=1
end
end
local fid=e:GetHandler():GetFieldID()
local g=Group.CreateGroup()
for i=1,bt do
local h=Duel.TossDice(tp,1)
if h<=4 then
local token=Duel.CreateToken(tp,85401101)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c85401100.damop)
token:RegisterEffect(e2,true)
token:RegisterFlagEffect(85401100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
g:AddCard(token)
else
local token=Duel.CreateToken(tp,85401103)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c85401100.damop1)
token:RegisterEffect(e2,true)
token:RegisterFlagEffect(85401100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
g:AddCard(token)
end
end
for i=1,be do
local h=Duel.TossDice(tp,1)
if h<=4 then
local token=Duel.CreateToken(tp,85401101)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c85401100.damop2)
token:RegisterEffect(e2,true)
token:RegisterFlagEffect(85401100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
g:AddCard(token)
else
local token=Duel.CreateToken(tp,85401103)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c85401100.damop3)
token:RegisterEffect(e2,true)
token:RegisterFlagEffect(85401100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
g:AddCard(token)
end
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c85401100.descon)
e1:SetOperation(c85401100.desop)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,85401102,RESET_EVENT,0,0)
end
function c85401100.desfilter(c,fid)
return c:GetFlagEffectLabel(85401100)==fid
end
function c85401100.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c85401100.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c85401100.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c85401100.desfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Destroy(tg,REASON_EFFECT)
end
function c85401100.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_DESTROY) then
Duel.Recover(c:GetPreviousControler(),200,REASON_EFFECT)
end
e:Reset()
end
function c85401100.damop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_DESTROY) then
Duel.Recover(c:GetPreviousControler(),500,REASON_EFFECT)
end
e:Reset()
end
function c85401100.damop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_DESTROY) then
Duel.Recover(c:GetPreviousControler(),200,REASON_EFFECT)
end
e:Reset()
end
function c85401100.damop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsReason(REASON_DESTROY) then
Duel.Recover(c:GetPreviousControler(),500,REASON_EFFECT)
end
e:Reset()
end
function c85401100.flll(c)
return c:IsCode(85400100) and c:IsAbleToHand() and not c:IsType(TYPE_TOKEN) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c85401100.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(c85401100.flll,nil)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
end
function c85401100.fllll(c)
return c:IsCode(85400100) and c:IsAbleToHand() and not c:IsType(TYPE_TOKEN) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c85401100.op(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c85401100.fllll,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.SendtoHand(tc,nil,REASON_EFFECT)
tc=g:GetNext()
end
end
end
function c85401100.ttt(e,c)
return c:IsType(TYPE_TOKEN)
end
function c85401100.cdf(de,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c85401100.tgf(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(c85401100.fll,nil)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
end
function c85401100.fll(c)
return c:IsCode(85400100)
end
function c85401100.g(c)
return c:IsCode(85400100)
end
function c85401100.bb(c)
return c:IsCode(85400000)
end
function c85401100.opf(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c85401100.g,nil)
if g:GetCount()>0 then
local bg=Duel.GetMatchingGroup(c85401100.bb,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=g:GetCount()
for i=1,tc,1 do
local bc=bg:GetFirst()
while bc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
bc:RegisterEffect(e1)
bc=bg:GetNext()
end
end
end
end
function c85401100.fi(c,e)
return c:IsType(TYPE_TOKEN) and c:IsDestructable(e) and c:IsCode(85401101)
end
function c85401100.fil(c,e)
return c:IsType(TYPE_TOKEN) and c:IsDestructable(e)
end
function c85401100.gl(c)
return c:IsCode(85400000)
end
function c85401100.cc(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85401100.fi,tp,LOCATION_ONFIELD,0,1,nil,e) end
local g=Duel.GetMatchingGroup(c85401100.fi,tp,LOCATION_ONFIELD,0,nil,e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,g,0,0)
end
function c85401100.ccc(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85401100.fi,tp,LOCATION_ONFIELD,0,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local bg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local sg=bg:Filter(c85401100.gl,nil)
if sg:GetCount()>0 then
local hg=Duel.GetMatchingGroup(c85401100.fil,tp,LOCATION_ONFIELD,0,nil,e)
if hg:GetCount()>0 then
Duel.Destroy(hg,REASON_EFFECT)
end
end
end
end
......@@ -928,7 +928,6 @@
#DJ YOSHITAKA 2207455797 525
#AD钙 540551322 537 0x530-0x53f
!setname 0x530 惧轮
!setname 0x3531 大祭环
!setname 0x5531 迫真空手
!setname 0xa531 悚牢
......
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