Commit 33221871 authored by mercury233's avatar mercury233

update new cards

parent 0c27158c
#created by ...
#main
101105111
100200206
100281062
100281063
100281065
101107001
101107002
101107003
101107034
100417013
100417014
100417015
100417016
100417022
100417023
100417024
100417025
100417027
100417028
100417029
100417030
100417031
100417032
100417033
100417034
100417035
100417036
100312022
100312033
100417001
100417002
100417003
......@@ -17,9 +44,26 @@
100312001
100312002
#extra
101107036
100417017
100417018
100417019
100417020
100417007
100417008
100312040
100312052
100312051
!side
101105081
101105082
101105083
101105084
101105085
101105086
101105087
101105088
101105089
101105090
101105091
101105111
#The first line is used for comment
!setname 0x26b 许珀里翁
!setname 0x26f 朋克
!setname 0x26b 许珀里翁 ヒュペリオン
!setname 0x26f 朋克 P.U.N.K.
!setname 0x270 甲虫骑兵 Beetrooper
!setname 0x271 救祓少女 エクソシスター
pics/101105111.jpg

81.4 KB | W: | H:

pics/101105111.jpg

80.8 KB | W: | H:

pics/101105111.jpg
pics/101105111.jpg
pics/101105111.jpg
pics/101105111.jpg
  • 2-up
  • Swipe
  • Onion skin
--勇気の天使ヴィクトリカ
--
--Script by REIKAI
function c100200206.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200206,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100200206)
e1:SetTarget(c100200206.sptg)
e1:SetOperation(c100200206.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100200206+100)
e2:SetCost(c100200206.thcost)
e2:SetCondition(c100200206.thcon)
e2:SetTarget(c100200206.thtg)
e2:SetOperation(c100200206.thop)
c:RegisterEffect(e2)
end
function c100200206.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c100200206.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200206.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100200206.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,c100200206.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local atk=tc:GetAttack()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(math.ceil(atk*2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
local lp=Duel.GetLP(tp)-tc:GetBaseAttack()
Duel.SetLP(tp,lp)
end
Duel.SpecialSummonComplete()
end
end
function c100200206.cfilter(c,tp)
return c:IsLevelAbove(1) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100200206.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetLevel())
end
function c100200206.thfilter(c,lv)
return c:IsRace(RACE_FAIRY) and c:IsAbleToHand() and c:IsLevel(lv)
end
function c100200206.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c100200206.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE)
end
function c100200206.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local cg=Duel.GetMatchingGroup(c100200206.cfilter,tp,LOCATION_GRAVE,0,c,tp)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return cg:GetCount()>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=cg:Select(tp,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
local lv=tc:GetLevel()
e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100200206.thop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200206.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--マジシャンズ・サルベーション
--
--Scripted by KillerDJ
function c100281062.initial_effect(c)
aux.AddCodeList(c,46986414,38033121)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100281062+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c100281062.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100281062,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,100281062+100)
e2:SetCondition(c100281062.spcon)
e2:SetTarget(c100281062.sptg)
e2:SetOperation(c100281062.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c100281062.setfilter(c)
return c:IsCode(48680970) and c:IsSSetable()
end
function c100281062.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100281062.setfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100281062,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg)
end
end
function c100281062.cfilter(c,tp)
return c:IsFaceup() and c:IsCode(46986414,38033121) and c:IsSummonPlayer(tp)
end
function c100281062.tgfilter(c,e,tp,g)
return g:IsContains(c) and Duel.IsExistingMatchingCard(c100281062.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end
function c100281062.spfilter(c,e,tp,code)
return c:IsCode(46986414,38033121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code)
end
function c100281062.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100281062.cfilter,1,nil,tp)
end
function c100281062.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c100281062.cfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100281062.tgfilter(chkc,e,tp,g) end
if chk==0 then return Duel.IsExistingTarget(c100281062.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,g)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if g:GetCount()==1 then
Duel.SetTargetCard(g)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100281062.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,g)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100281062.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100281062.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,code)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--切り裂かれし闇
--
--Scripted by KillerDJ & mercury233
function c100281063.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100281063,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100281063)
e2:SetCondition(c100281063.drcon)
e2:SetTarget(c100281063.drtg)
e2:SetOperation(c100281063.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100281063,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100281063+100)
e4:SetCondition(c100281063.atkcon)
e4:SetOperation(c100281063.atkop)
c:RegisterEffect(e4)
if not c100281063.global_check then
c100281063.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c100281063.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c100281063.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
c:RegisterFlagEffect(100281063,RESET_EVENT+0x4fe0000,0,1)
end
end
function c100281063.cfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsSummonPlayer(tp) and not c:IsType(TYPE_TOKEN)
end
function c100281063.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100281063.cfilter,1,nil,tp)
end
function c100281063.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100281063.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 c100281063.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,at=Duel.GetBattleMonster(tp)
return a and at and (a:IsType(TYPE_NORMAL) and a:IsLevelAbove(5)
or a:GetFlagEffect(100281063)>0 and (a:IsSummonType(SUMMON_TYPE_RITUAL)
or a:IsSummonType(SUMMON_TYPE_FUSION)
or a:IsSummonType(SUMMON_TYPE_SYNCHRO)
or a:IsSummonType(SUMMON_TYPE_XYZ)))
end
function c100281063.atkop(e,tp,eg,ep,ev,re,r,rp)
local a,at=Duel.GetBattleMonster(tp)
if not a:IsRelateToBattle() or a:IsFacedown() or not at:IsRelateToBattle() or at:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(at:GetAttack())
a:RegisterEffect(e1)
end
--真の光
--
--Scripted by KillerDJ
function c100281065.initial_effect(c)
aux.AddCodeList(c,89631139)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--select effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100281065,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,100281065)
e2:SetTarget(c100281065.target)
e2:SetOperation(c100281065.operation)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,89631139))
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100281065,3))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c100281065.descon)
e4:SetTarget(c100281065.destg)
e4:SetOperation(c100281065.desop)
c:RegisterEffect(e4)
end
function c100281065.cfilter(c,code)
return c:IsCode(code) and (c:IsFaceup() or not c:IsOnField())
end
function c100281065.filter1(c,e,tp)
return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100281065.filter2(c,tp)
return aux.IsCodeListed(c,89631139) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
and not Duel.IsExistingMatchingCard(c100281065.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function c100281065.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100281065.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c100281065.filter2,tp,LOCATION_DECK,0,1,nil,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(100281065,1),aux.Stringid(100281065,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(100281065,1))
else
op=Duel.SelectOption(tp,aux.Stringid(100281065,2))+1
end
if op==0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
else
e:SetCategory(0)
end
e:SetLabel(op)
end
function c100281065.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100281065.filter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100281065.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
end
function c100281065.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousSequence()<5
end
function c100281065.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100281065.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--Chorus in the Sky
--coded by Lyris
function c100312022.initial_effect(c)
aux.AddCodeList(c,56433456)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100312022+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c100312022.cost)
e1:SetTarget(c100312022.target)
e1:SetOperation(c100312022.activate)
c:RegisterEffect(e1)
end
function c100312022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c100312022.thfilter1(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToHand()
end
function c100312022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100312022.thfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100312022.thfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100312022.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100312022.filter(c)
return c:IsFaceup() and (c:IsCode(56433456) or aux.IsCodeListed(c,56433456)) and c:IsAbleToHand()
end
function c100312022.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
local g=Duel.GetMatchingGroup(c100312022.filter,tp,LOCATION_REMOVED,0,nil)
if (Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,56433456) or Duel.IsEnvironment(56433456))
and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(100312022,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
--失われた聖域
--Lost Sanctuary
--coded by Lyris
function c100312033.initial_effect(c)
aux.AddCodeList(c,56433456)
aux.EnableChangeCode(c,56433456,LOCATION_SZONE+LOCATION_GRAVE)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100312033+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100312033.target)
e1:SetOperation(c100312033.activate)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100312133+100)
e2:SetCost(c100312033.discost)
e2:SetTarget(c100312033.distg)
e2:SetOperation(c100312033.disop)
c:RegisterEffect(e2)
end
function c100312033.filter(c)
return (c:IsCode(56433456) or aux.IsCodeListed(c,56433456)) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c100312033.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c100312033.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c100312033.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,c100312033.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
function c100312033.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c100312033.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100312033.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100312033.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100312033.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c100312033.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
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(c)
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
......@@ -60,10 +60,10 @@ function c100312040.posfilter(c)
end
function c100312040.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100312040.posfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c100312040.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100312040.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100312040.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100312040.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
local g=Duel.SelectTarget(tp,c100312040.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c100312040.posop(e,tp,eg,ep,ev,re,r,rp)
......
--エクソシスター・エリス
--
--Scripted by KillerDJ
function c100417013.initial_effect(c)
aux.AddCodeList(c,100417014)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417013,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100417013)
e1:SetCondition(c100417013.effcon)
e1:SetTarget(c100417013.efftg)
e1:SetOperation(c100417013.effop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417013,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417013+100)
e2:SetCondition(c100417013.spcon)
e2:SetTarget(c100417013.sptg)
e2:SetOperation(c100417013.spop)
c:RegisterEffect(e2)
end
function c100417013.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417013.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x270)
end
function c100417013.cfilter1(c)
return c:IsFaceup() and c:IsCode(100417014)
end
function c100417013.effcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417013.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100417013.efftg(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 c100417013.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c100417013.cfilter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c100417013.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417013.filter,1,nil)
end
function c100417013.spfilter(c,e,tp,mc)
return c:IsSetCard(0x696) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c100417013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c100417013.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100417013.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417013.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--エクソシスター・ステラ
--
--Scripted by KillerDJ
function c100417014.initial_effect(c)
aux.AddCodeList(c,100417013)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417014,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,100417014)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c100417014.efftg)
e1:SetOperation(c100417014.effop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417014+100)
e2:SetCondition(c100417014.spcon)
e2:SetTarget(c100417014.sptg)
e2:SetOperation(c100417014.spop)
c:RegisterEffect(e2)
end
function c100417014.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417014.effspfilter(c,e,tp)
return c:IsSetCard(0x270) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100417014.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100417014.effspfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100417014.cfilter(c)
return c:IsFaceup() and c:IsCode(100417013)
end
function c100417014.effop(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,c100417014.effspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c100417014.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c100417014.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417014.filter,1,nil)
end
function c100417014.spfilter(c,e,tp,mc)
return c:IsSetCard(0x270) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c100417014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c100417014.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100417014.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417014.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--エクソシスター・ソフィア
--
--Scripted by KillerDJ
function c100417015.initial_effect(c)
aux.AddCodeList(c,100417016)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417015)
e1:SetCondition(c100417015.effcon)
e1:SetTarget(c100417015.efftg)
e1:SetOperation(c100417015.effop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417015,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+101107081)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417015+100)
e2:SetCondition(c100417015.spcon)
e2:SetTarget(c100417015.sptg)
e2:SetOperation(c100417015.spop)
c:RegisterEffect(e2)
end
function c100417015.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417015.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x270)
end
function c100417015.effcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c100417015.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c100417015.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100417015.cfilter1(c)
return c:IsFaceup() and c:IsCode(100417016)
end
function c100417015.effop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(c100417015.cfilter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c100417015.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417015.filter,1,nil)
end
function c100417015.spfilter(c,e,tp,mc)
return c:IsSetCard(0x270) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c100417015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c100417015.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100417015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417015.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--エクソシスター・イレーヌ
--
--Scripted by KillerDJ
function c100417016.initial_effect(c)
aux.AddCodeList(c,100417015)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417016,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100417016)
e1:SetCost(c100417016.effcost)
e1:SetTarget(c100417016.efftg)
e1:SetOperation(c100417016.effop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417016+100)
e2:SetCondition(c100417016.spcon)
e2:SetTarget(c100417016.sptg)
e2:SetOperation(c100417016.spop)
c:RegisterEffect(e2)
end
function c100417016.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417016.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function c100417016.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100417016.cfilter(c)
return c:IsFaceup() and c:IsCode(100417015)
end
function c100417016.effop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(c100417016.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c100417016.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417016.filter,1,nil)
end
function c100417016.spfilter(c,e,tp,mc)
return c:IsSetCard(0x270) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c100417016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c100417016.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100417016.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417016.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
--エクソシスター・ミカリエス
--
--Scripted by KillerDJ
function c100417017.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c100417017.effcon)
e1:SetOperation(c100417017.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100417017.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417017,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100417017)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(c100417017.rmcon)
e3:SetTarget(c100417017.rmtg)
e3:SetOperation(c100417017.rmop)
c:RegisterEffect(e3)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(c100417017.batfilter)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100417017,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1,100417017+100)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c100417017.thcost)
e5:SetTarget(c100417017.thtg)
e5:SetOperation(c100417017.thop)
c:RegisterEffect(e5)
end
function c100417017.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c100417017.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(100417017,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c100417017.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x270) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100417017.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100417017)~=0
end
function c100417017.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE+LOCATION_ONFIELD)
end
function c100417017.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c100417017.batfilter(e,c)
return c:IsSummonLocation(LOCATION_GRAVE)
end
function c100417017.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100417017.thfilter(c)
return c:IsSetCard(0x270) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100417017.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417017.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100417017.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100417017.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
--エクソシスター・カスピテル
--
--Scripted by KillerDJ
function c100417018.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--cannot spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417018,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100417018)
e1:SetCondition(c100417018.con)
e1:SetOperation(c100417018.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100417018.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417018,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,100417018+100)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c100417018.thcost)
e3:SetTarget(c100417018.thtg)
e3:SetOperation(c100417018.thop)
c:RegisterEffect(e3)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(c100417018.batfilter)
c:RegisterEffect(e4)
end
function c100417018.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x270) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100417018.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c100417018.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(c100417018.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100417018.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
end
function c100417018.batfilter(e,c)
return c:IsSummonLocation(LOCATION_GRAVE)
end
function c100417018.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100417018.thfilter(c)
return c:IsSetCard(0x270) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c100417018.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417018.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100417018.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100417018.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
--エクソシスター・ジブリーヌ
--
--Scripted by KillerDJ
function c100417019.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c100417019.effcon)
e1:SetOperation(c100417019.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100417019.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417019,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100417019)
e3:SetCondition(c100417019.discon)
e3:SetTarget(c100417019.distg)
e3:SetOperation(c100417019.disop)
c:RegisterEffect(e3)
--indes effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(c100417019.indval)
c:RegisterEffect(e4)
--attack up
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100417019,1))
e5:SetCategory(CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1,100417019+100)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(c100417019.atkcost)
e5:SetOperation(c100417019.atkop)
c:RegisterEffect(e5)
end
function c100417019.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c100417019.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(100417019,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c100417019.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x270) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100417019.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100417019)~=0
end
function c100417019.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c100417019.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
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(c)
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
function c100417019.indval(e,te,rp)
return rp==1-e:GetHandlerPlayer() and te:IsActivated() and te:GetHandler():IsSummonLocation(LOCATION_GRAVE)
end
function c100417019.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100417019.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_XYZ))
e1:SetValue(800)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--エクソシスター・フソフィール
--
--Scripted by KillerDJ
function c100417020.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--cannot spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417020,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100417020)
e1:SetCondition(c100417020.con)
e1:SetOperation(c100417020.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100417020.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--indes effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(c100417020.indval)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100417020,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100417020+100)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(c100417020.thcost)
e4:SetTarget(c100417020.thtg)
e4:SetOperation(c100417020.thop)
c:RegisterEffect(e4)
end
function c100417020.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x270) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c100417020.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1
end
function c100417020.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c100417020.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c100417020.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function c100417020.indval(e,te,rp)
return rp==1-e:GetHandlerPlayer() and te:IsActivated() and te:GetHandler():IsSummonLocation(LOCATION_GRAVE)
end
function c100417020.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100417020.thtg(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:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c100417020.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--エクソシスター・アーメント
--
--Scripted by KillerDJ
function c100417022.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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100417022+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100417022.cost)
e1:SetCondition(c100417022.condition)
e1:SetTarget(c100417022.target)
e1:SetOperation(c100417022.activate)
c:RegisterEffect(e1)
end
function c100417022.checkfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE)
end
function c100417022.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c100417022.checkfilter,tp,0,LOCATION_MZONE,1,nil) then return true end
return Duel.GetTurnPlayer()~=tp
end
function c100417022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c100417022.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c100417022.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x270)
and Duel.IsExistingMatchingCard(c100417022.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c100417022.spfilter2(c,e,tp,mc,att)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x270) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
and not Duel.IsExistingMatchingCard(c100417022.cfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c100417022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100417022.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100417022.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100417022.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100417022.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417022.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetAttribute())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
--エクソシスター・カルペディベル
--
--Scripted by KillerDJ
function c100417023.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c100417023.eftg)
e1:SetValue(c100417023.efilter)
c:RegisterEffect(e1)
--ban
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417023,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100417023)
e2:SetCondition(c100417023.bancon)
e2:SetTarget(c100417023.bantg)
e2:SetOperation(c100417023.banop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417023,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100417023+100)
e3:SetCondition(c100417023.descon)
e3:SetTarget(c100417023.destg)
e3:SetOperation(c100417023.desop)
c:RegisterEffect(e3)
end
function c100417023.eftg(e,c)
return c:IsFaceup() and c:IsSetCard(0x270)
end
function c100417023.efilter(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSummonLocation(LOCATION_GRAVE) and re:GetActivateLocation()==LOCATION_MZONE
end
function c100417023.cfilter(c,tp,sumt)
return c:IsFaceup() and c:IsSetCard(0x270) and c:IsSummonType(sumt) and c:IsSummonPlayer(tp)
end
function c100417023.bancon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100417023.cfilter,1,nil,tp,SUMMON_TYPE_XYZ)
end
function c100417023.bantg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c100417023.banop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c100417023.distg1)
e1:SetLabel(ac)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c100417023.discon)
e2:SetOperation(c100417023.disop)
e2:SetLabel(ac)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c100417023.distg2)
e3:SetLabel(ac)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c100417023.distg1(e,c)
local ac=e:GetLabel()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsOriginalCodeRule(ac)
else
return c:IsOriginalCodeRule(ac) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
end
function c100417023.distg2(e,c)
local ac=e:GetLabel()
return c:IsOriginalCodeRule(ac)
end
function c100417023.discon(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel()
return re:GetHandler():IsOriginalCodeRule(ac)
end
function c100417023.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c100417023.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return tc:IsSetCard(0x270) and tc:IsControler(tp)
end
function c100417023.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100417023.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c100417023.desfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c100417023.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100417023.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100417023.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
--エクソシスター・バディス
--
--Scripted by KillerDJ
function c100417024.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:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,100417024+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100417024.cost)
e1:SetTarget(c100417024.target)
e1:SetOperation(c100417024.activate)
c:RegisterEffect(e1)
end
function c100417024.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c100417024.spfilter1(c,e,tp)
return c:IsSetCard(0x270) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c100417024.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c100417024.spfilter2(c,e,tp,code)
return c:IsSetCard(0x270) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and aux.IsCodeListed(c,code)
end
function c100417024.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c100417024.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,LOCATION_DECK)
end
function c100417024.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c100417024.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g1==0 then return end
local g2=Duel.SelectMatchingCard(tp,c100417024.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1:GetFirst():GetCode())
g1:Merge(g2)
local tc=g1:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(100417024,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417024,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c100417024.tdcon)
e1:SetOperation(c100417024.tdop)
Duel.RegisterEffect(e1,tp)
tc=g1:GetNext()
end
Duel.SpecialSummonComplete()
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100417024.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100417024.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(100417024)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c100417024.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
function c100417024.splimit(e,c)
return not c:IsSetCard(0x270) and c:IsLocation(LOCATION_EXTRA)
end
--アラメシアの儀
--
--Script by IceBarrierTrishula
function c100417025.initial_effect(c)
aux.AddCodeList(c,100417125)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100417025+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100417025.condition)
e1:SetCost(c100417025.cost)
e1:SetTarget(c100417025.target)
e1:SetOperation(c100417025.operation)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(100417025,ACTIVITY_CHAIN,c100417025.chainfilter)
end
function c100417025.chainfilter(re,tp,cid)
local rc=re:GetHandler()
return not (re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE) and not rc:IsSummonType(SUMMON_TYPE_SPECIAL))
end
function c100417025.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,100417125)
end
function c100417025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100417025,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(c100417025.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100417025.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsLocation(LOCATION_MZONE)
end
function c100417025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,100417125,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_FAIRY,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c100417025.cfilter(c)
return c:IsCode(100417029) and c:IsFaceup()
end
function c100417025.setfilter(c)
return c:IsCode(100417029) and not c:IsForbidden()
end
function c100417025.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,100417125,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_FAIRY,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,100417125)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(c100417025.setfilter,tp,LOCATION_DECK,0,nil)
if not Duel.IsExistingMatchingCard(c100417025.cfilter,tp,LOCATION_SZONE,0,1,nil) and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(100417025,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--遺跡の魔鉱戦士
--
--Script by IceBarrierTrishula
function c100417027.initial_effect(c)
aux.AddCodeList(c,100417125)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100417027)
e1:SetCondition(c100417027.spcon)
e1:SetTarget(c100417027.sptg)
e1:SetOperation(c100417027.spop)
c:RegisterEffect(e1)
--cannot atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetCondition(c100417027.atkcon)
c:RegisterEffect(e2)
--set card
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100417027+100)
e3:SetCondition(c100417027.setcon)
e3:SetTarget(c100417027.settg)
e3:SetOperation(c100417027.setop)
c:RegisterEffect(e3)
if not c100417027.global_check then
c100417027.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c100417027.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c100417027.check(c)
return c and aux.IsCodeListed(c,100417125)
end
function c100417027.checkop(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(0)
if c100417027.check(a) then Duel.RegisterFlagEffect(0,100417027,RESET_PHASE+PHASE_END,0,1) end
if c100417027.check(d) then Duel.RegisterFlagEffect(1,100417027,RESET_PHASE+PHASE_END,0,1) end
end
function c100417027.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417027.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417027.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100417027.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 c100417027.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 c100417027.atkcon(e)
return not Duel.IsExistingMatchingCard(c100417027.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c100417027.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100417027)>0
end
function c100417027.setfilter(c)
return aux.IsCodeListed(c,100417125) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c100417027.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417027.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c100417027.setop(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,c100417027.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
--流離のグリフォンライダー
--Wandering Gryphon Rider
--scripted by RayeHikawa
function c100417028.initial_effect(c)
aux.AddCodeList(c,100417125)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100417028)
e1:SetCondition(c100417028.spcon)
e1:SetTarget(c100417028.sptg)
e1:SetOperation(c100417028.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417028,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,100417028+100)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100417028.negcon)
e2:SetTarget(c100417028.negtg)
e2:SetOperation(c100417028.negop)
c:RegisterEffect(e2)
end
function c100417028.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417028.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or Duel.IsExistingMatchingCard(c100417028.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100417028.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 c100417028.spop(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 c100417028.negcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c100417028.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c100417028.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c100417028.negop(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 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
--運命の旅路
--
--Script by IceBarrierTrishula
function c100417029.initial_effect(c)
aux.AddCodeList(c,100417125)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417029,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,100417029)
e1:SetTarget(c100417029.thtg)
e1:SetOperation(c100417029.thop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417029,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100417029+100)
e2:SetTarget(c100417029.eqtg)
e2:SetOperation(c100417029.eqop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c100417029.indtg)
e4:SetCountLimit(1)
e4:SetValue(c100417029.indct)
c:RegisterEffect(e4)
end
function c100417029.thfilter(c)
return aux.IsCodeListed(c,100417125) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c100417029.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417029.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c100417029.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100417029.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
end
end
function c100417029.eqfilter(c,equip,tp)
return c:IsType(TYPE_EQUIP) and aux.IsCodeListed(c,100417125)
and (c:IsAbleToHand() or equip and c:CheckUniqueOnField(tp) and not c:IsForbidden())
end
function c100417029.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417029.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local equip=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100417029.cfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(c100417029.eqfilter,tp,LOCATION_DECK,0,1,nil,equip,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c100417029.eqop(e,tp,eg,ep,ev,re,r,rp)
local equip=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100417029.cfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c100417029.eqfilter,tp,LOCATION_DECK,0,1,1,nil,equip,tp)
local tc=g:GetFirst()
if g:GetCount()>0 then
if equip and tc:CheckUniqueOnField(tp) and not tc:IsForbidden()
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(100417029,2))==1) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sc=Duel.SelectMatchingCard(tp,c100417029.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Equip(tp,tc,sc:GetFirst())
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c100417029.indtg(e,c)
return c:GetEquipCount()>0
end
function c100417029.indct(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
--光の聖剣ダンネル
--
--Script by IceBarrierTrishula
function c100417030.initial_effect(c)
aux.AddCodeList(c,100417125)
c:SetUniqueOnField(1,0,100417030)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c100417030.target)
e1:SetOperation(c100417030.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c100417030.eqlimit)
c:RegisterEffect(e2)
--Increase Atk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(c100417030.atkval)
c:RegisterEffect(e3)
--grave to equip
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,100417030)
e4:SetTarget(c100417030.eqtg)
e4:SetOperation(c100417030.eqop)
c:RegisterEffect(e4)
end
function c100417030.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c100417030.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c100417030.eqlimit(e,c)
return c:IsControler(e:GetHandlerPlayer())
end
function c100417030.atkfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,100417125)
end
function c100417030.atkval(e)
local g=Duel.GetMatchingGroup(c100417030.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetCode)*500
end
function c100417030.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417030.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c100417030.cfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c100417030.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c100417030.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c100417030.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--星空蝶
--
--Script by IceBarrierTrishula
function c100417031.initial_effect(c)
aux.AddCodeList(c,100417125)
c:SetUniqueOnField(1,0,100417031)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c100417031.target)
e1:SetOperation(c100417031.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c100417031.eqlimit)
c:RegisterEffect(e2)
--Decrease Atk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c100417031.atkval)
c:RegisterEffect(e3)
--grave to equip
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,100417031)
e4:SetTarget(c100417031.eqtg)
e4:SetOperation(c100417031.eqop)
c:RegisterEffect(e4)
end
function c100417031.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c100417031.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c100417031.eqlimit(e,c)
return c:IsControler(e:GetHandlerPlayer())
end
function c100417031.atkfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,100417125)
end
function c100417031.atkval(e)
local g=Duel.GetMatchingGroup(c100417031.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetCode)*-500
end
function c100417031.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417031.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c100417031.cfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c100417031.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c100417031.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c100417031.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--騎竜ドラコバック
--
--Script by IceBarrierTrishula
function c100417032.initial_effect(c)
aux.AddCodeList(c,100417125)
c:SetUniqueOnField(1,0,100417032)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c100417032.target)
e1:SetOperation(c100417032.activate)
c:RegisterEffect(e1)
--Equip Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c100417032.eqlimit)
c:RegisterEffect(e2)
--Return hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,100417032)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c100417032.thcon)
e3:SetTarget(c100417032.thtg)
e3:SetOperation(c100417032.thop)
c:RegisterEffect(e3)
--grave to equip
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_EQUIP)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,100417032+100)
e4:SetTarget(c100417032.eqtg)
e4:SetOperation(c100417032.eqop)
c:RegisterEffect(e4)
end
function c100417032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c100417032.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c100417032.eqlimit(e,c)
return c:IsControler(e:GetHandlerPlayer())
end
function c100417032.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetEquipTarget():IsType(TYPE_EFFECT)
end
function c100417032.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100417032.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c100417032.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417032.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c100417032.cfilter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c100417032.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c100417032.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c100417032.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:CheckUniqueOnField(tp) then
Duel.Equip(tp,c,tc)
end
end
--暗黒神殿ザララーム
--
--Script by IceBarrierTrishula
function c100417033.initial_effect(c)
aux.AddCodeList(c,100417125)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--cannot activate effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(0,1)
e1:SetCondition(c100417033.actlimcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100417033.damcon)
e2:SetTarget(c100417033.damtg)
e2:SetOperation(c100417033.damop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c100417033.thcon)
e3:SetTarget(c100417033.thtg)
e3:SetOperation(c100417033.thop)
c:RegisterEffect(e3)
end
function c100417033.actlimfilter(c)
return c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,100417030)
end
function c100417033.actlimcon(e)
local ph=Duel.GetCurrentPhase()
local tp=e:GetHandlerPlayer()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
and Duel.IsExistingMatchingCard(c100417033.actlimfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100417033.damcon(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsCode(100417125) and rc:IsControler(tp)
end
function c100417033.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=eg:GetFirst()
local bc=c:GetBattleTarget()
Duel.SetTargetCard(bc)
local dam=bc:GetBaseAttack()
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c100417033.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
c:RegisterFlagEffect(100417033,RESET_PHASE+PHASE_END,0,1)
end
function c100417033.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100417033)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100417033.thfilter(c)
return aux.IsCodeListed(c,100417125) and c:IsType(TYPE_FIELD) and not c:IsCode(100417033) and c:IsAbleToHand()
end
function c100417033.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417033.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c100417033.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100417033.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--迷い花の森
--
--Script by IceBarrierTrishula
function c100417034.initial_effect(c)
aux.AddCodeList(c,100417125)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c100417034.immtg)
e1:SetValue(c100417034.immval)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c100417034.drcon)
e2:SetTarget(c100417034.drtg)
e2:SetOperation(c100417034.drop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c100417034.thcon)
e3:SetTarget(c100417034.thtg)
e3:SetOperation(c100417034.thop)
c:RegisterEffect(e3)
end
function c100417034.immtg(e,c)
return c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,100417031)
end
function c100417034.immval(e,re)
return re:IsActivated() and re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function c100417034.drcon(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsCode(100417125) and rc:IsControler(tp)
end
function c100417034.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100417034.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
c:RegisterFlagEffect(100417034,RESET_PHASE+PHASE_END,0,1)
end
function c100417034.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(100417034)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100417034.thfilter(c)
return aux.IsCodeListed(c,100417125) and c:IsType(TYPE_FIELD) and not c:IsCode(100417034) and c:IsAbleToHand()
end
function c100417034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417034.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c100417034.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100417034.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--サンダー・ディスチャージ
--
--Script by IceBarrierTrishula
function c100417035.initial_effect(c)
aux.AddCodeList(c,100417125)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417035,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100417035+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c100417035.condition)
e1:SetTarget(c100417035.target)
e1:SetOperation(c100417035.operation)
c:RegisterEffect(e1)
end
function c100417035.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417035.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417035.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100417035.tgfilter(c,tp)
return c:IsFaceup() and c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(c100417035.cfilter2,1,nil)
and Duel.IsExistingMatchingCard(c100417035.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
end
function c100417035.cfilter2(c)
return c:IsFaceup() and aux.IsCodeListed(c,100417125)
end
function c100417035.desfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c100417035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c100417035.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100417035.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c100417035.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local dg=Duel.GetMatchingGroup(c100417035.desfilter,tp,0,LOCATION_MZONE,nil,g:GetFirst():GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c100417035.efilter(c,tp)
return c:IsType(TYPE_EQUIP) and aux.IsCodeListed(c,100417125) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c100417035.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local dg=Duel.GetMatchingGroup(c100417035.desfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
if Duel.Destroy(dg,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c100417035.efilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(100417035,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100417035,1))
local eg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100417035.efilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100417035,2))
local mg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Equip(tp,eg:GetFirst(),mg:GetFirst())
end
end
end
--リザレクション・ブレス
--Resurrection Breath
--coded by Lyris
function c100417036.initial_effect(c)
aux.AddCodeList(c,100417125)
--spsummon & equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100417036+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100417036.condition)
e1:SetTarget(c100417036.target)
e1:SetOperation(c100417036.activate)
c:RegisterEffect(e1)
end
function c100417036.cfilter(c)
return c:IsFaceup() and c:IsCode(100417125)
end
function c100417036.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417036.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100417036.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c100417036.filter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c100417036.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp,c)
end
function c100417036.eqfilter(c,tp,tc)
return c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckEquipTarget(tc) and aux.IsCodeListed(c,100417125)
end
function c100417036.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=math.min(2,(Duel.GetLocationCount(tp,LOCATION_MZONE)))
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,0,tp,false,false)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=tg:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if not g1 then return end
for tc in aux.Next(g1) do
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) 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_STANDARD)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
Duel.SpecialSummonComplete()
local g2=Duel.GetMatchingGroup(c100417036.filter,tp,LOCATION_MZONE,0,1,nil,tp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(100417036,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sc=g2:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local mg=Duel.SelectMatchingCard(aux.NecroValleyFilter(c100417036.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp,sc)
Duel.Equip(tp,mg:GetFirst(),sc)
end
end
--Baby Mudragon
--coded by Lyris
function c101105081.initial_effect(c)
--non tuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c101105081.tnval)
c:RegisterEffect(e1)
--change race or attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(c101105081.condition)
e2:SetTarget(c101105081.target)
e2:SetOperation(c101105081.operation)
c:RegisterEffect(e2)
end
function c101105081.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function c101105081.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c101105081.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c101105081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101105081.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101105081.filter,tp,LOCATION_MZONE,0,1,nil) end
local ar=0
local op=Duel.SelectOption(tp,aux.Stringid(101105081,0),aux.Stringid(101105081,1))
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
ar=Duel.AnnounceRace(tp,1,RACE_ALL)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
ar=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL)
end
e:SetLabel(op,ar)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101105081.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c101105081.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local c,op,ar=e:GetHandler(),e:GetLabel()
if op==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(ar)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ar)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--Pazuzule
--coded by Lyris & mercury233
function c101105082.initial_effect(c)
aux.EnablePendulumAttribute(c)
--scale
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c101105082.target)
e1:SetOperation(c101105082.operation)
c:RegisterEffect(e1)
--cannot disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c101105082.distg)
c:RegisterEffect(e2)
end
function c101105082.filter(c,tc)
return c:GetOriginalLevel()>0 and c:GetOriginalLevel()~=tc:GetCurrentScale()
end
function c101105082.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101105082.filter,tp,LOCATION_PZONE,0,1,c,c) end
local tc=Duel.GetFirstMatchingCard(c101105082.filter,tp,LOCATION_PZONE,0,c,c)
Duel.SetTargetCard(tc)
end
function c101105082.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(tc:GetOriginalLevel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c101105082.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c101105082.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumtype&SUMMON_TYPE_PENDULUM~=SUMMON_TYPE_PENDULUM
end
function c101105082.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
--Night's End Administrator
--coded by Lyris
function c101105083.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsCode,36107810),aux.NonTuner(nil),1)
--banish
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105083,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c101105083.target)
e1:SetOperation(c101105083.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101105083.condition)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101105083,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,101105083)
e3:SetCondition(c101105083.spcon)
e3:SetTarget(c101105083.sptg)
e3:SetOperation(c101105083.spop)
c:RegisterEffect(e3)
end
function c101105083.cfilter(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() and c:IsControler(tp)
end
function c101105083.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101105083.cfilter,1,e:GetHandler(),tp)
end
function c101105083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101105083.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c101105083.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and (rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) or c:IsReason(REASON_BATTLE))
end
function c101105083.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105083.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101105083.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101105083.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101105083.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101105083.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--Ra'ten, the Heavenly General
--coded by Lyris
function c101105084.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,99,c101105084.lcheck)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c101105084.target)
e1:SetOperation(c101105084.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101105084)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c101105084.destg)
e2:SetOperation(c101105084.desop)
c:RegisterEffect(e2)
end
function c101105084.lcheck(g)
return g:GetClassCount(Card.GetLinkRace)==1
end
function c101105084.cfilter(c,e,tp,lg,zone)
return c:IsFaceup() and lg:IsContains(c)
and Duel.IsExistingMatchingCard(c101105084.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetRace(),zone)
end
function c101105084.chkfilter(c,e,tp,lg,rc)
return c:IsFaceup() and lg:IsContains(c) and c:GetRace()&rc==rc
end
function c101105084.spfilter(c,e,tp,rac,zone)
return c:IsLevelBelow(4) and c:IsRace(rac) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c101105084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
local zone=c:GetLinkedZone(tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101105084.chkfilter(chkc,e,tp,lg,e:GetLabel(),zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingTarget(c101105084.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,lg,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101105084.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,lg,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
e:SetLabel(g:GetFirst():GetRace())
end
function c101105084.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local zone=c:GetLinkedZone(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c101105084.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc:GetRace(),zone):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c101105084.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101105084.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
--D.D.D. - Different Dimension Derby
--coded by Lyris
function c101105085.initial_effect(c)
--banish
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCondition(c101105085.condition)
e1:SetTarget(c101105085.target)
e1:SetOperation(c101105085.activate)
c:RegisterEffect(e1)
if not c101105085.global_check then
c101105085.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c101105085.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c101105085.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then c:RegisterFlagEffect(101105085,RESET_EVENT+0x4fe0000,0,1) end
end
function c101105085.cfilter(c)
if c:IsFacedown() or c:GetFlagEffect(101105085)==0 then return false end
for _,st in ipairs{SUMMON_TYPE_RITUAL,SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK} do
if c:IsSummonType(st) then return true end
end
return false
end
function c101105085.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101105085.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101105085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101105085.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--Beetrooper Scale Bomber
--coded by Lyris
function c101105086.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105086,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101105086)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c101105086.spcon)
e1:SetTarget(c101105086.sptg)
e1:SetOperation(c101105086.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--When a monster your opponent controls activates its effect (Quick Effect): You can Tribute 1 Insect monster; destroy it.
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,39041551)
e3:SetCondition(c101105086.condition)
e3:SetCost(c101105086.cost)
e3:SetTarget(c101105086.target)
e3:SetOperation(c101105086.operation)
c:RegisterEffect(e3)
end
function c101105086.filter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsControler(tp)
end
function c101105086.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101105086.filter,1,nil,tp)
end
function c101105086.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 c101105086.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 c101105086.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER)
end
function c101105086.cfilter(c,tp)
return c:IsRace(RACE_INSECT) and (c:IsControler(tp) or c:IsFaceup())
end
function c101105086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101105086.cfilter,1,re:GetHandler(),tp) end
local g=Duel.SelectReleaseGroup(tp,c101105086.cfilter,1,1,re:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c101105086.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c101105086.operation(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--Beetrooper Sting Lancer
--Script by REIKAI
function c101105087.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101105087,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,101105087)
e1:SetCondition(c101105087.spcon)
e1:SetTarget(c101105087.sptg)
e1:SetOperation(c101105087.spop)
c:RegisterEffect(e1)
--th effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101105087,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,101105087+100)
e2:SetTarget(c101105087.thtg)
e2:SetOperation(c101105087.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101105087.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c101105087.tdfilter1(c)
return c:IsRace(RACE_INSECT) and c:IsAbleToDeck()
end
function c101105087.tdfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c101105087.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingTarget(c101105087.tdfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(c101105087.tdfilter2,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c101105087.tdfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,c101105087.tdfilter2,tp,0,LOCATION_GRAVE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101105087.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0
or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,1,REASON_EFFECT)
end
end
function c101105087.schfilter(c)
return c:IsSetCard(0x270) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function c101105087.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101105087.schfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101105087.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101105087.schfilter,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
--Beetrooper Armor Horn
--coded by Lyris
function c101105088.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),2,2)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(aux.NOT(Card.IsRace),RACE_INSECT))
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101105088)
e2:SetTarget(c101105088.target)
e2:SetOperation(c101105088.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,101105188)
e3:SetCost(c101105088.spcost)
e3:SetTarget(c101105088.sptg)
e3:SetOperation(c101105088.spop)
c:RegisterEffect(e3)
end
function c101105088.filter(c)
return c:IsRace(RACE_INSECT) and c:IsSummonable(true,nil)
end
function c101105088.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105088.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c101105088.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,c101105088.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function c101105088.cfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost()
end
function c101105088.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101105088.cfilter,tp,LOCATION_GRAVE,0,3,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101105088.cfilter,tp,LOCATION_GRAVE,0,3,3,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101105088.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 c101105088.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 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
--Giant Beetrooper Invincible Atlas
--
--scripted by RayeHikawa & mercury233
function c101105089.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_INSECT),2)
--cannot target & indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetCondition(c101105089.condition)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
--splimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c101105089.splimit)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101105089,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101105089)
e4:SetCost(c101105089.spcost)
e4:SetTarget(c101105089.sptg)
e4:SetOperation(c101105089.spop)
c:RegisterEffect(e4)
--atk up
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101105089,1))
e5:SetCategory(CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,101105089)
e5:SetCost(c101105089.atkcost)
e5:SetTarget(c101105089.atktg)
e5:SetOperation(c101105089.atkop)
c:RegisterEffect(e5)
end
function c101105089.condition(e)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:IsAttackBelow(3000)
end
function c101105089.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c101105089.costfilter(c,tp)
return c:IsRace(RACE_INSECT) and (c:IsControler(tp) or c:IsFaceup())
end
function c101105089.spcostfilter(c,tp)
return c101105089.costfilter(c,tp) and Duel.GetMZoneCount(tp,c)>0
end
function c101105089.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101105089.spcostfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c101105089.spcostfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c101105089.spfilter(c,e,tp)
return c:IsSetCard(0x270) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105089.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105089.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101105089.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101105089.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)
end
end
end
function c101105089.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101105089.costfilter,1,e:GetHandler(),tp) end
local g=Duel.SelectReleaseGroup(tp,c101105089.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function c101105089.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c101105089.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--Beetrooper Formation
--coded by Lyris
function c101105090.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--revive
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101105090)
e1:SetTarget(c101105090.sptg)
e1:SetOperation(c101105090.spop)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,101105190)
e2:SetCondition(c101105090.condition)
e2:SetTarget(c101105090.target)
e2:SetOperation(c101105090.operation)
c:RegisterEffect(e2)
end
function c101105090.filter(c,e,tp)
return c:IsSetCard(0x270) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101105090.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101105090.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101105090.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101105090.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101105090.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
Duel.SetLP(tp,Duel.GetLP(tp)-tc:GetBaseAttack())
end
Duel.SpecialSummonComplete()
end
function c101105090.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:IsRace(RACE_INSECT)
end
function c101105090.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101105090.cfilter,1,nil,tp)
end
function c101105090.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101105190,0x270,TYPES_TOKEN_MONSTER,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c101105090.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,101105190,0x270,TYPES_TOKEN_MONSTER,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then return end
local tk=Duel.CreateToken(tp,101105190)
Duel.SpecialSummon(tk,0,tp,tp,false,false,POS_FACEUP)
end
--Beetrooper Fly & Sting
--coded by Lyris
function c101105091.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101105091)
e1:SetCondition(c101105091.condition)
e1:SetTarget(c101105091.target)
e1:SetOperation(c101105091.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101105091)
e2:SetCondition(c101105091.setcon)
e2:SetCost(c101105091.setcost)
e2:SetTarget(c101105091.settg)
e2:SetOperation(c101105091.setop)
c:RegisterEffect(e2)
end
function c101105091.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x270)
end
function c101105091.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c101105091.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c101105091.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) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c101105091.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c101105091.cfilter2(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsAttackAbove(3000)
end
function c101105091.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(c101105091.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end
function c101105091.costfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost()
end
function c101105091.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105091.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101105091.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101105091.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c101105091.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end
end
......@@ -16,6 +16,7 @@ function c101105111.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101105111)
e2:SetTarget(c101105111.sptg)
e2:SetOperation(c101105111.spop)
......
--マジクリボー
--
--Scripted by KillerDJ
function c101107001.initial_effect(c)
aux.AddCodeList(c,46986414,38033121)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101107001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101107001)
e1:SetCost(c101107001.spcost)
e1:SetCondition(c101107001.spcon)
e1:SetTarget(c101107001.sptg)
e1:SetOperation(c101107001.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101107001,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101107001+100)
e2:SetCondition(c101107001.thcon)
e2:SetTarget(c101107001.thtg)
e2:SetOperation(c101107001.thop)
c:RegisterEffect(e2)
if not c101107001.global_check then
c101107001.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(c101107001.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101107001.checkop(e,tp,eg,ep,ev,re,r,rp)
if (bit.band(r,REASON_EFFECT)~=0 and rp==1-ep) or bit.band(r,REASON_BATTLE)~=0 then
Duel.RegisterFlagEffect(ep,101107001,RESET_PHASE+PHASE_END,0,1)
end
end
function c101107001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c101107001.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.GetFlagEffect(tp,101107001)~=0
end
function c101107001.spfilter(c,e,tp)
return c:IsCode(46986414,38033121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101107001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101107001.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101107001.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,aux.NecroValleyFilter(c101107001.spfilter),tp,LOCATION_DECK+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 c101107001.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetPreviousRaceOnField()&RACE_SPELLCASTER~=0 and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c101107001.thcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c101107001.cfilter,1,nil,tp)
end
function c101107001.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 c101107001.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
--ディメンション・コンジュラー
--
--Scripted by KillerDJ
function c101107002.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101107002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101107002)
e1:SetTarget(c101107002.thtg)
e1:SetOperation(c101107002.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101107002,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,101107002+100)
e3:SetCondition(c101107002.drcon)
e3:SetTarget(c101107002.drtg)
e3:SetOperation(c101107002.drop)
c:RegisterEffect(e3)
end
function c101107002.thfilter(c)
return c:IsCode(28553439) and c:IsAbleToHand()
end
function c101107002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101107002.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101107002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101107002.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c101107002.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function c101107002.drfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end
function c101107002.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101107002.drfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,ct)
end
function c101107002.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c101107002.drfilter,p,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct>0 and Duel.Draw(p,ct,REASON_EFFECT)==ct then
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if tg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=tg:Select(p,ct,ct,nil)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
Duel.SortDecktop(p,p,ct)
end
end
--合体竜ティマイオス
--
--Scripted by KillerDJ
function c101107003.initial_effect(c)
aux.AddCodeList(c,46986414)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101107003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101107003)
e1:SetCost(c101107003.spcost)
e1:SetTarget(c101107003.sptg)
e1:SetOperation(c101107003.spop)
c:RegisterEffect(e1)
--fusion summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101107003,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101107003+100)
e2:SetTarget(c101107003.fsptg)
e2:SetOperation(c101107003.fspop)
c:RegisterEffect(e2)
end
function c101107003.cfilter(c,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsRace(RACE_SPELLCASTER) or aux.IsCodeListed(c,46986414) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and Duel.GetMZoneCount(tp,c)>0
end
function c101107003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return
Duel.IsExistingMatchingCard(c101107003.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101107003.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c101107003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101107003.spop(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 c101107003.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c101107003.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101107003.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER)
end
function c101107003.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
aux.FCheckAdditional=c101107003.fcheck
local res=Duel.IsExistingMatchingCard(c101107003.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101107003.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101107003.fspop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101107003.filter1,nil,e)
aux.FCheckAdditional=c101107003.fcheck
local sg1=Duel.GetMatchingGroup(c101107003.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101107003.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
end
--イリュージョン・オブ・カオス
--
--Scripted by KillerDJ
function c101107034.initial_effect(c)
aux.AddCodeList(c,46986414)
--
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101107034,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101107034)
e1:SetCost(c101107034.thcost)
e1:SetTarget(c101107034.thtg)
e1:SetOperation(c101107034.thop)
c:RegisterEffect(e1)
--disable and spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86509711,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101107034+100)
e2:SetCondition(c101107034.discon)
e2:SetTarget(c101107034.distg)
e2:SetOperation(c101107034.disop)
c:RegisterEffect(e2)
end
function c101107034.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c101107034.thfilter(c)
return (c:IsCode(46986414) or aux.IsCodeListed(c,46986414)) and c:IsAbleToHand()
and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_RITUAL)
end
function c101107034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101107034.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c101107034.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101107034.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
end
end
end
function c101107034.spfilter(c,e,tp)
return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101107034.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER)
end
function c101107034.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c101107034.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function c101107034.disop(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 c:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101107034.spfilter),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
Duel.NegateEffect(ev)
end
end
end
--超魔導戦士-マスター・オブ・カオス
--
--Scripted by KillerDJ
function c101107036.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,46986414,c101107036.matfilter,1,true,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101107036,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,101107036)
e1:SetCondition(c101107036.spcon)
e1:SetTarget(c101107036.sptg)
e1:SetOperation(c101107036.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101107036,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101107036+100)
e2:SetCost(c101107036.remcost)
e2:SetTarget(c101107036.remtg)
e2:SetOperation(c101107036.remop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101107036,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,101107036+200)
e3:SetCondition(c101107036.thcon)
e3:SetTarget(c101107036.thtg)
e3:SetOperation(c101107036.thop)
c:RegisterEffect(e3)
end
function c101107036.matfilter(c)
return c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL)
end
function c101107036.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c101107036.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101107036.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101107036.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101107036.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101107036.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101107036.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101107036.remcostfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and (c:IsControler(tp) or c:IsFaceup())
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,c)
end
function c101107036.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp):Filter(c101107036.remcostfilter,nil,tp)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
aux.UseExtraReleaseCount(sg,tp)
Duel.Release(sg,REASON_COST)
end
function c101107036.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c101107036.remop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c101107036.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c101107036.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c101107036.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101107036.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101107036.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101107036.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101107036.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment