Commit 9b1f43a2 authored by mercury233's avatar mercury233

rm & update new cards

parent 847816ab
#created by ...
#main
100420001
100420002
100420006
100420007
100420016
100420017
100420018
100420019
100420020
100420021
100420023
100420024
100420025
100420026
100420027
100420029
100420030
100420031
100420032
100420033
100420034
100420035
100420036
100420037
100420038
100420039
100420040
#extra
100420003
100420004
100420005
100420022
!side
#created by ...
#main
101201064
100200001
100200231
100200232
100200233
100206001
100206002
100206007
100206008
100206009
100206010
100200230
100200234
#extra
100206003
100206004
100206005
100206006
100205001
100205002
!side
101111081
101111082
101111083
101111084
101111085
101111201
101111087
101111088
101111089
101111090
101111091
101111092
#created by ...
#main
101201001
101201002
101201205
101201206
101201207
101201064
100200001
#extra
101201203
101201204
!side
#The first line is used for comment
!setname 0x1052 门之守护神|守护者 Gate Guardian
!setname 0x607a 焰圣剑 焔聖剣
!setname 0x192 黄金荣耀 Gold Pride
!setname 0x193 迷宫壁 Labyrinth Wall
!setname 0x194 至爱 フェイバリット
!setname 0x195 征服斗魂 VS(ヴァンキッシュ・ソウル)
!setname 0x196 新式魔厨 ヌーベルズ
!setname 0x197 食谱 レシピ
--神聖なる魔術師
--Saincred Magician
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.spfilter(c,e,tp)
return c:IsCode(31560081,id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--バーニング・ドラゴン
--Script by 奥克斯
function c100200231.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100200231)
e1:SetCondition(c100200231.spcon)
e1:SetTarget(c100200231.sptg)
e1:SetOperation(c100200231.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100200231+100)
e2:SetCost(c100200231.descost)
e2:SetTarget(c100200231.destg)
e2:SetOperation(c100200231.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c100200231.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2
end
function c100200231.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 c100200231.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 c100200231.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c100200231.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200231.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c100200231.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c100200231.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100200231.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200231.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c100200231.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c100200231.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100200231.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--三眼の死霊
--Script by 奥克斯
function c100200232.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200232,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100200232)
e1:SetCost(c100200232.cost)
e1:SetTarget(c100200232.target)
e1:SetOperation(c100200232.operation)
c:RegisterEffect(e1)
end
function c100200232.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,REASON_COST)
end
function c100200232.thfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(10) and c:IsAbleToHand()
end
function c100200232.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200232.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100200232.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200232.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
--ローズ・パピヨン
--Script by 奥克斯
function c100200233.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200233,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,7))
e1:SetValue(0x1)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(c100200233.dircon)
c:RegisterEffect(e2)
end
function c100200233.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function c100200233.dircon(e)
return Duel.IsExistingMatchingCard(c100200233.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
--血肉の代償
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--summon count
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition1)
e1:SetCost(s.cost1)
e1:SetTarget(s.target1)
e1:SetOperation(s.operation1)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+o)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCondition(s.condition2)
e2:SetCost(s.cost2)
e2:SetTarget(s.target2)
e2:SetOperation(s.operation2)
c:RegisterEffect(e2)
end
function s.condition1(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.cost1(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 s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=0
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_SET_SUMMON_COUNT_LIMIT)}
for _,te in ipairs(ce) do
ct=math.max(ct,te:GetValue())
end
return ct<3
end
end
function s.operation1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(3)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.condition2(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn==1-tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function s.filter(c)
return c:IsSummonable(true,nil) or c:IsMSetable(true,nil)
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct1=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local ct2=Duel.GetFlagEffect(tp,80604091)
return ct1-ct2>0
end
Duel.RegisterFlagEffect(tp,80604091,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
end
end
end
--フレイム・ウィングマン-フレイム・シュート
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.ffilter,2,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--material check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(s.valcheck)
c:RegisterEffect(e3)
end
s.material_setcode=0x8
function s.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x3008) and (not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
function s.valcheck(e,c)
local mg=c:GetMaterial()
if mg:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then
c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
end
function s.thfilter(c)
return c:IsSetCard(0x194) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.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 s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and c:GetFlagEffect(id)>0 end
Duel.Release(c,REASON_COST)
end
function s.spfilter(c,e,tp,rc)
return c:IsSetCard(0x3008) and c:IsLevelBelow(7) and not c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp,rc)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,nil,e,tp,e:GetHandler())
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end
--リンク・デコーダー
--Link Decoder
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddLinkProcedure(c,s.mfilter,1,1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.mfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK
and rc:IsRace(RACE_CYBERSE) and rc:GetBaseAttack()>=2300
end
function s.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 s.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
--Labyrinth Heavy Tank
--scripted by JoyJ
function c100206001.initial_effect(c)
aux.AddCodeList(c,25955164,62340868,98434877)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206001,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c100206001.ntcon)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c100206001.atklimit)
c:RegisterEffect(e2)
--to field
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100206001,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,100206001)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c100206001.tftg)
e3:SetOperation(c100206001.tfop)
c:RegisterEffect(e3)
end
function c100206001.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c100206001.atklimit(e,tp,eg,ep,ev,re,r,rp)
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)
e:GetHandler():RegisterEffect(e1)
end
function c100206001.tffilter(c,tp)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c100206001.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100206001.tffilter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_HAND,0,1,nil,tp) end
end
function c100206001.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x193)
end
function c100206001.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c100206001.tffilter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100206001.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100206001,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--Shadow Ghoul of the Labyrinth
--scripted by JoyJ
function c100206002.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206002,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100206002)
e1:SetCost(c100206002.thcost)
e1:SetTarget(c100206002.thtg)
e1:SetOperation(c100206002.thop)
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_BATTLE_START)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100206002+100)
e2:SetCondition(c100206002.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100206002.destg)
e2:SetOperation(c100206002.desop)
c:RegisterEffect(e2)
end
function c100206002.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c100206002.thfilter(c)
return c:IsSetCard(0x193) and c:IsAbleToHand()
end
function c100206002.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c100206002.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100206002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c100206002.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 and Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tg)
end
end
function c100206002.descfilter(c)
return c:IsFaceup() and c:IsSetCard(0x193)
end
function c100206002.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetBattleMonster(1-tp)
if not tc then return false end
e:SetLabelObject(tc)
return Duel.IsExistingMatchingCard(c100206002.descfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100206002.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c100206002.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--Gate Guardians Combined
--scripted by JoyJ
function c100206003.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,25955164,62340868,98434877,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206003,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(3,100206003)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100206003.discon)
e2:SetTarget(c100206003.distg)
e2:SetOperation(c100206003.disop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100206003,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c100206003.spcon)
e3:SetTarget(c100206003.sptg)
e3:SetOperation(c100206003.spop)
c:RegisterEffect(e3)
end
function c100206003.discfilter(c,tp)
return c:IsControler(tp) and c:IsOnField()
end
function c100206003.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c100206003.discfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c100206003.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,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 c100206003.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c100206003.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100206003.spfilter(c,e,tp)
return c:IsSetCard(0x1052) and c:IsLevelBelow(11) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c100206003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100206003.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c100206003.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100206003.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
--Gate Guardian of Thunder and Wind
--scripted by JoyJ
function c100206004.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddCodeList(c,98434877)
aux.AddFusionProcCode2(c,25955164,62340868,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206004,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100206004)
e1:SetTarget(c100206004.thtg)
e1:SetOperation(c100206004.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206004,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c100206004.spcon)
e2:SetTarget(c100206004.sptg)
e2:SetOperation(c100206004.spop)
c:RegisterEffect(e2)
end
function c100206004.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
and aux.IsCodeListed(c,25955164) and aux.IsCodeListed(c,62340868) and aux.IsCodeListed(c,98434877)
end
function c100206004.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c100206004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100206004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c100206004.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #tg>0 and Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,tg)
end
end
function c100206004.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100206004.spfilter(c,e,tp)
return c:IsCode(25955164,62340868) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100206004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100206004.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c100206004.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,c100206004.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Gate Guardian of Wind and Water
--scripted by JoyJ
function c100206005.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,62340868,98434877,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206005,1))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(2,100206005)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100206005.discon)
e1:SetTarget(c100206005.distg)
e1:SetOperation(c100206005.disop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206005,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c100206005.spcon)
e2:SetTarget(c100206005.sptg)
e2:SetOperation(c100206005.spop)
c:RegisterEffect(e2)
end
function c100206005.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and ((re:GetActivateLocation()&LOCATION_ONFIELD)>0 or re:IsHasType(EFFECT_TYPE_ACTIVATE))
and Duel.IsChainDisablable(ev)
end
function c100206005.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(100206005)==0 end
c:RegisterFlagEffect(100206005,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c100206005.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c100206005.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100206005.spfilter(c,e,tp)
return c:IsCode(62340868,98434877) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100206005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100206005.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c100206005.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,c100206005.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Gate Guardian of Water and Thunder
--scripted by JoyJ
function c100206006.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,25955164,98434877,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--atk 0
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206006,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(2,100206006)
e1:SetCondition(aux.dscon)
e1:SetTarget(c100206006.atktg)
e1:SetOperation(c100206006.atkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206006,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c100206006.spcon)
e2:SetTarget(c100206006.sptg)
e2:SetOperation(c100206006.spop)
c:RegisterEffect(e2)
end
function c100206006.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.nzatk(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil)
and c:GetFlagEffect(100206006)==0 end
c:RegisterFlagEffect(100206006,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
end
function c100206006.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToChain() and tc:GetAttack()>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c100206006.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100206006.spfilter(c,e,tp)
return c:IsCode(25955164,98434877) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100206006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100206006.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c100206006.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,c100206006.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Labyrinth Wall Shadow
--scripted by JoyJ
function c100206007.initial_effect(c)
aux.AddCodeList(c,25955164,62340868,98434877)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c100206007.target)
c:RegisterEffect(e2)
--to field
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100206007,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(c100206007.tftg)
e3:SetOperation(c100206007.tfop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100206007,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(c100206007.descon)
e4:SetTarget(c100206007.destg)
e4:SetOperation(c100206007.desop)
c:RegisterEffect(e4)
end
function c100206007.target(e,c)
return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) and c:GetOriginalLevel()<5
end
function c100206007.tffilter(c,tp)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c100206007.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100206007.tffilter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_HAND,0,1,nil,tp) end
end
function c100206007.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c100206007.tffilter,tp,LOCATION_DECK+LOCATION_REMOVED+LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function c100206007.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c100206007.desfilter(c)
return c:IsAttackBelow(1600) and c:IsFaceup()
end
function c100206007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c100206007.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100206007.desfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100206007.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100206007.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--Double Attack! Wind and Thunder!!
--scripted by JoyJ
function c100206008.initial_effect(c)
aux.AddCodeList(c,25955164,62340868,98434877)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206008,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c100206008.condition)
e1:SetTarget(c100206008.target)
e1:SetOperation(c100206008.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206008,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100206008)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100206008.thtg)
e2:SetOperation(c100206008.thop)
c:RegisterEffect(e2)
end
function c100206008.filter(c)
return c:IsSetCard(0x1052) and c:IsFaceup()
end
function c100206008.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100206008.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c100206008.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100206008.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c100206008.thfilter(c)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877) and c:IsAbleToHand()
end
function c100206008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100206008.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c100206008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100206008.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Riryoku Guardian
--scripted by JoyJ
function c100206009.initial_effect(c)
aux.AddCodeList(c,25955164,62340868,98434877)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206009,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100206009)
e1:SetCondition(c100206009.condition)
e1:SetTarget(c100206009.target)
e1:SetOperation(c100206009.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206009,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100206009+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100206009.thtg)
e2:SetOperation(c100206009.thop)
c:RegisterEffect(e2)
end
function c100206009.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c100206009.filter(c)
return c:IsOriginalSetCard(0x1052) and c:IsFaceup()
end
function c100206009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100206009.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100206009.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100206009.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100206009.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(Duel.GetLP(1-tp))
tc:RegisterEffect(e1)
end
end
function c100206009.thfilter(c)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877) and c:IsAbleToHand()
end
function c100206009.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100206009.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c100206009.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100206009.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Prey of the Jirai Gumo
--scripted by JoyJ
function c100206010.initial_effect(c)
aux.AddCodeList(c,25955164,62340868,98434877)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100206010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100206010)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c100206010.target)
e1:SetOperation(c100206010.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100206010,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,100206010+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100206010.thtg)
e2:SetOperation(c100206010.thop)
c:RegisterEffect(e2)
end
function c100206010.target(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_MZONE,seq)
and Duel.IsPlayerCanSpecialSummonMonster(tp,100206010,0,TYPES_NORMAL_TRAP_MONSTER,2100,100,5,RACE_INSECT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100206010.filter(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_MZONE)
end
function c100206010.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=c:GetSequence()
local zone=1<<seq
if not Duel.CheckLocation(tp,LOCATION_MZONE,seq)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,100206010,0,TYPES_NORMAL_TRAP_MONSTER,2100,100,5,RACE_INSECT,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP,zone)~=0 then
local g=c:GetColumnGroup():Filter(c100206010.filter,nil,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(100206010,2)) then
Duel.BreakEffect()
local tg=g:Clone()
if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
tg=g:Select(tp,1,1,nil)
end
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
end
end
function c100206010.thfilter(c)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877) and c:IsAbleToHand()
end
function c100206010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100206010.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c100206010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100206010.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ゼノ・メテオロス
--Script by 奥克斯
function c100420001.initial_effect(c)
--special summon of hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100420001)
e1:SetCondition(c100420001.spcon)
e1:SetTarget(c100420001.sptg)
e1:SetOperation(c100420001.spop)
c:RegisterEffect(e1)
--destroy and special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420001,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100420001+100)
e2:SetTarget(c100420001.dsptg)
e2:SetOperation(c100420001.dspop)
c:RegisterEffect(e2)
end
function c100420001.cfilter(c)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100420001.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100420001.cfilter,1,nil)
end
function c100420001.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 c100420001.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 c100420001.desfilter(c,e,tp)
return c:IsFaceupEx() and c:IsRace(RACE_DINOSAUR) and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(c100420001.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp)
end
function c100420001.spfilter(c,e,tp)
return c:IsRace(RACE_DINOSAUR) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100420001.dsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420001.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c100420001.dspop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100420001.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(c100420001.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e,tp)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c100420001.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #sg==0 then return end
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function c100420001.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT+RACE_WYRM)
end
--超越竜メテオロス
--Script by 奥克斯
function c100420002.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c100420002.splimit)
c:RegisterEffect(e0)
--destroy and special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420002,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,100420002)
e1:SetCondition(c100420002.dspcon)
e1:SetTarget(c100420002.dsptg)
e1:SetOperation(c100420002.dspop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420002,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,100420002+100)
e2:SetTarget(c100420002.tgtg)
e2:SetOperation(c100420002.tgop)
c:RegisterEffect(e2)
--special summon or self
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420002,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,100420002+200)
e3:SetTarget(c100420002.tdtg)
e3:SetOperation(c100420002.tdop)
c:RegisterEffect(e3)
end
function c100420002.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c100420002.dspcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c100420002.desfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsFaceupEx()
end
function c100420002.dsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c100420002.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
if chk==0 then return g:CheckSubGroup(aux.mzctcheck,2,2,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c100420002.dspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c100420002.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
if #g==0 or not g:CheckSubGroup(aux.mzctcheck,2,2,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:SelectSubGroup(tp,aux.mzctcheck,false,2,2,tp)
Duel.HintSelection(dg)
if Duel.Destroy(dg,REASON_EFFECT)==0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c100420002.tgfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsAbleToGrave()
end
function c100420002.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420002.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100420002.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100420002.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c100420002.tdfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c100420002.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420002.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
if e:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
end
end
function c100420002.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c100420002.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
local c=e:GetHandler()
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)>0
and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(100420002,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--超越竜ギガントザウラー
--Script by 奥克斯
function c100420003.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_DINOSAUR),aux.FilterBoolFunction(Card.IsFusionType,TYPE_NORMAL),true)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420003,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420003)
e1:SetTarget(c100420003.thtg)
e1:SetOperation(c100420003.thop)
c:RegisterEffect(e1)
--special summon or self
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420003,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,100420003+100)
e2:SetTarget(c100420003.tdtg)
e2:SetOperation(c100420003.tdop)
c:RegisterEffect(e2)
end
function c100420003.thfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsAbleToHand()
end
function c100420003.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100420003.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100420003.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c100420003.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_TOHAND)
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c100420003.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
if e:GetLabel()>0
and Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0)>0
and Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)>0
and Duel.SelectYesNo(tp,aux.Stringid(100420003,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.Destroy(g1,REASON_EFFECT)
end
end
end
function c100420003.tdfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c100420003.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420003.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
if e:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
end
end
function c100420003.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c100420003.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
local c=e:GetHandler()
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)>0
and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(100420003,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--超越竜グレイスザウルス
--Script by 奥克斯
function c100420004.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c100420004.indestg)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--special summon or self
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100420004,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,100420004)
e4:SetTarget(c100420004.tdtg)
e4:SetOperation(c100420004.tdop)
c:RegisterEffect(e4)
end
function c100420004.indestg(e,c)
return c:IsRace(RACE_DINOSAUR) and c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE)
end
function c100420004.tdfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c100420004.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420004.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
if e:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
end
end
function c100420004.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c100420004.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
local c=e:GetHandler()
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)>0
and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(100420004,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--超越竜ドリルグナトゥス
--Script by 奥克斯
function c100420005.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100420005)
e1:SetCost(c100420005.spcost)
e1:SetTarget(c100420005.sptg)
e1:SetOperation(c100420005.spop)
c:RegisterEffect(e1)
--double
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_INVOLVING_BATTLE_DAMAGE)
e2:SetCondition(c100420005.damcon)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e2)
--special summon or self
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420005,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,100420005+100)
e3:SetTarget(c100420005.tdtg)
e3:SetOperation(c100420005.tdop)
c:RegisterEffect(e3)
end
function c100420005.spcost(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 c100420005.spfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100420005.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100420005.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100420005.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100420005.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100420005.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 c100420005.damcon(e)
local c=e:GetHandler()
return c:GetBattleTarget()~=nil and c:GetOverlayCount()==0
end
function c100420005.tdfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c100420005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420005.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
if e:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
end
end
function c100420005.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c100420005.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
local c=e:GetHandler()
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)>0
and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(100420005,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--グラウンド・ゼノ
--Script by 奥克斯
function c100420006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420006,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100420006)
e1:SetTarget(c100420006.target)
e1:SetOperation(c100420006.activate)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420006,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100420006+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100420006.fstg)
e2:SetOperation(c100420006.fsop)
c:RegisterEffect(e2)
end
function c100420006.filter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsType(TYPE_TUNER+TYPE_NORMAL) and c:IsAbleToHand()
end
function c100420006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420006.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND)
end
function c100420006.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100420006.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g==0 then return false end
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c100420006.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c100420006.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DINOSAUR)
and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c100420006.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c100420006.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(c100420006.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100420006.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c100420006.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c100420006.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(c100420006.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
end
--超越天翔
--scripted by JoyJ
function c100420007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100420007+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c100420007.target)
e1:SetOperation(c100420007.activate)
c:RegisterEffect(e1)
end
function c100420007.filter(c,e,tp)
return c:IsFaceupEx() and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100420007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c100420007.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100420007.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100420007.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100420007.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--VS ラゼン
--scripted by JoyJ
function c100420016.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420016,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100420016)
e1:SetTarget(c100420016.thtg)
e1:SetOperation(c100420016.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--show fire for indes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420016,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420016+100)
e3:SetCost(c100420016.indescost)
e3:SetTarget(c100420016.indestg)
e3:SetOperation(c100420016.indesop)
c:RegisterEffect(e3)
--show fire and dark for destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100420016,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100420016+100)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c100420016.descost)
e4:SetTarget(c100420016.destg)
e4:SetOperation(c100420016.desop)
c:RegisterEffect(e4)
end
function c100420016.thfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c100420016.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420016.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,100420016)==0 end
Duel.RegisterFlagEffect(tp,100420016,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100420016.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100420016.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100420016.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c100420016.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420016.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420016.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420016.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100420016)==0 end
Duel.RegisterFlagEffect(tp,100420016,RESET_CHAIN,0,1)
end
function c100420016.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
end
function c100420016.descfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c100420016.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420016.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_FIRE,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
function c100420016.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,100420016)==0 end
Duel.RegisterFlagEffect(tp,100420016,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100420016.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT)
end
--VS パンテラ
--scripted by JoyJ
function c100420017.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100420017)
e1:SetCondition(c100420017.spcon)
e1:SetTarget(c100420017.sptg)
e1:SetOperation(c100420017.spop)
c:RegisterEffect(e1)
--show earth for indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420017,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100420017+100)
e2:SetCost(c100420017.indescost)
e2:SetTarget(c100420017.indestg)
e2:SetOperation(c100420017.indesop)
c:RegisterEffect(e2)
--show earth and fire for destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420017,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420017+100)
e3:SetHintTiming(0,TIMING_EQUIP+TIMING_END_PHASE)
e3:SetCost(c100420017.descost)
e3:SetTarget(c100420017.destg)
e3:SetOperation(c100420017.desop)
c:RegisterEffect(e3)
end
function c100420017.spcfilter(c)
return c:GetSequence()<5
end
function c100420017.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c100420017.spcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100420017.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)
and Duel.GetFlagEffect(tp,100420017)==0 end
Duel.RegisterFlagEffect(tp,100420017,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100420017.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100420017.indescfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end
function c100420017.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420017.indescfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420017.indescfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420017.indestg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100420017)==0 end
Duel.RegisterFlagEffect(tp,100420017,RESET_CHAIN,0,1)
end
function c100420017.indesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
c:RegisterEffect(e1)
end
function c100420017.descfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c100420017.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420017.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
function c100420017.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,100420017)==0 end
Duel.RegisterFlagEffect(tp,100420017,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function c100420017.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local g=c:GetColumnGroup():Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
Duel.Destroy(g,REASON_EFFECT)
end
--VS ヘヴィ・ボーガー
--scripted by JoyJ
function c100420018.initial_effect(c)
--return and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420018,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420018)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100420018.spcon)
e1:SetTarget(c100420018.sptg)
e1:SetOperation(c100420018.spop)
c:RegisterEffect(e1)
--show dark for draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420018,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100420018+100)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c100420018.drcost)
e2:SetTarget(c100420018.drtg)
e2:SetOperation(c100420018.drop)
c:RegisterEffect(e2)
--show earth and fire for damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420018,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420018+100)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCost(c100420018.dmgcost)
e3:SetTarget(c100420018.dmgtg)
e3:SetOperation(c100420018.dmgop)
c:RegisterEffect(e3)
end
function c100420018.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100420018.spfilter(c,tp)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_MACHINE)
and Duel.GetMZoneCount(tp,c)>0
end
function c100420018.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100420018.spfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c100420018.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetFlagEffect(tp,100420018)==0 end
Duel.RegisterFlagEffect(tp,100420018,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100420018.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100420018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100420018.drcfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsPublic()
end
function c100420018.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420018.drcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420018.drcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420018.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFlagEffect(tp,100420018)==0 end
Duel.RegisterFlagEffect(tp,100420018,RESET_CHAIN,0,1)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100420018.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 c100420018.dmgcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c100420018.dmgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420018.dmgcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_FIRE)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
function c100420018.dmgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100420018)==0 end
Duel.RegisterFlagEffect(tp,100420018,RESET_CHAIN,0,1)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function c100420018.dmgop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--VS Dr.マッドラヴ
--scripted by JoyJ
function c100420019.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420019,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100420019)
e1:SetTarget(c100420019.thtg)
e1:SetOperation(c100420019.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--show dark for atk/def down
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420019,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420019+100)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(aux.dscon)
e3:SetCost(c100420019.adcost)
e3:SetTarget(c100420019.adtg)
e3:SetOperation(c100420019.adop)
c:RegisterEffect(e3)
--show earth and dark for rtohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100420019,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100420019+100)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCost(c100420019.rthcost)
e4:SetTarget(c100420019.rthtg)
e4:SetOperation(c100420019.rthop)
c:RegisterEffect(e4)
end
function c100420019.thfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100420019.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420019.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFlagEffect(tp,100420019)==0 end
Duel.RegisterFlagEffect(tp,100420019,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100420019.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100420019.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100420019.adcfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and not c:IsPublic()
end
function c100420019.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420019.adcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420019.adcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420019.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(tp,100420019)==0 end
Duel.RegisterFlagEffect(tp,100420019,RESET_CHAIN,0,1)
end
function c100420019.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
function c100420019.rthcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c100420019.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420019.rthcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
function c100420019.rthtgfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c100420019.rthtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420019.rthtgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg=g:GetMinGroup(Card.GetDefense)
if chk==0 then return tg:IsExists(Card.IsAbleToHand,1,nil)
and Duel.GetFlagEffect(tp,100420019)==0 end
Duel.RegisterFlagEffect(tp,100420019,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,PLAYER_ALL,LOCATION_MZONE)
end
function c100420019.rthop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100420019.rthtgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g>0 then
local tg=g:GetMinGroup(Card.GetDefense)
if #tg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
tg=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.HintSelection(tg)
end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--VS プルトンHG
--scripted by JoyJ
function c100420020.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100420020)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c100420020.spcon)
e1:SetTarget(c100420020.sptg)
e1:SetOperation(c100420020.spop)
c:RegisterEffect(e1)
--show fire for def up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420020,1))
e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100420020+100)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCondition(aux.dscon)
e2:SetCost(c100420020.defcost)
e2:SetTarget(c100420020.deftg)
e2:SetOperation(c100420020.defop)
c:RegisterEffect(e2)
--show earth and dark for atk up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420020,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420020+100)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCondition(aux.dscon)
e3:SetCost(c100420020.atkcost)
e3:SetTarget(c100420020.atktg)
e3:SetOperation(c100420020.atkop)
c:RegisterEffect(e3)
end
function c100420020.spcfilter1(c)
return c:GetSequence()<5
end
function c100420020.spcfilter2(c)
return c:GetSequence()<5 and c:IsSetCard(0x195) and c:IsFaceup()
end
function c100420020.spcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=1-tp then return false end
local ct1=Duel.GetMatchingGroupCount(c100420020.spcfilter1,tp,LOCATION_MZONE,0,nil)
local ct2=Duel.GetMatchingGroupCount(c100420020.spcfilter2,tp,LOCATION_MZONE,0,nil)
return ct1==0 or ct1==ct2
end
function c100420020.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)
and Duel.GetFlagEffect(tp,100420020)==0 end
Duel.RegisterFlagEffect(tp,100420020,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100420020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100420020.defcfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c100420020.defcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420020.defcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420020.defcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420020.deftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100420020)==0 end
Duel.RegisterFlagEffect(tp,100420020,RESET_CHAIN,0,1)
end
function c100420020.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c100420020.atkcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and not c:IsPublic()
end
function c100420020.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420020.atkcfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_EARTH,ATTRIBUTE_DARK)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
function c100420020.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100420020)==0 end
Duel.RegisterFlagEffect(tp,100420020,RESET_CHAIN,0,1)
end
function c100420020.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--VS 龍帝ヴァリウス
--scripted by JoyJ
function c100420021.initial_effect(c)
--return and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100420021,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420021)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100420021.spcon)
e1:SetTarget(c100420021.sptg)
e1:SetOperation(c100420021.spop)
c:RegisterEffect(e1)
--show earth to immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100420021,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100420021+100)
e2:SetCost(c100420021.imcost)
e2:SetTarget(c100420021.imtg)
e2:SetOperation(c100420021.imop)
c:RegisterEffect(e2)
--show earth and fire and dark for destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420021,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420021+100)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(c100420021.descost)
e3:SetTarget(c100420021.destg)
e3:SetOperation(c100420021.desop)
c:RegisterEffect(e3)
end
function c100420021.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100420021.spfilter(c,tp)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_DRAGON)
and Duel.GetMZoneCount(tp,c)>0
end
function c100420021.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100420021.spfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c100420021.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetFlagEffect(tp,100420021)==0 end
Duel.RegisterFlagEffect(tp,100420021,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100420021.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100420021.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) and c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100420021.imcfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsPublic()
end
function c100420021.imcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420021.imcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420021.imcfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420021.imtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100420021)==0 end
Duel.RegisterFlagEffect(tp,100420021,RESET_CHAIN,0,1)
end
function c100420021.imop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100420021.efilter)
c:RegisterEffect(e1)
end
function c100420021.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function c100420021.descfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK+ATTRIBUTE_FIRE) and not c:IsPublic()
end
function c100420021.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420021.descfilter,tp,LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(aux.dabcheck,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,3,3)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
function c100420021.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,100420021)==0 end
Duel.RegisterFlagEffect(tp,100420021,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100420021.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToChain() then c=nil end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--闘神の虚像
--scripted by JoyJ
function c100420022.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c100420022.matfilter,1,1)
--cannot be link material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--cannot be battle target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCondition(c100420022.atkcon)
e1:SetValue(c100420022.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100420022,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100420022)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCondition(c100420022.condition)
e3:SetTarget(c100420022.sptg)
e3:SetOperation(c100420022.spop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100420022,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100420022)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCondition(c100420022.condition)
e4:SetTarget(c100420022.thtg)
e4:SetOperation(c100420022.thop)
c:RegisterEffect(e4)
end
function c100420022.matfilter(c,lc,sumtype,tp)
return c:IsLinkSetCard(0x195)
end
function c100420022.atkfilter(c)
return c:IsSetCard(0x195) and c:IsFaceup()
end
function c100420022.atkcon(e)
return Duel.IsExistingMatchingCard(c100420022.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c100420022.atkval(e,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
local tg=g:GetMaxGroup(Card.GetAttack)
return not tg:IsContains(c) or c:IsFacedown()
end
function c100420022.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c100420022.spfilter(c,e,tp)
return c:IsSetCard(0x195) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100420022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100420022.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100420022.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100420022.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100420022.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x195) and c:IsAbleToHand()
end
function c100420022.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100420022.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c100420022.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100420022.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Stake Your Soul!
--Script by 奥克斯
function c100420023.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100420023+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100420023.cost)
e1:SetTarget(c100420023.target)
e1:SetOperation(c100420023.activate)
c:RegisterEffect(e1)
end
function c100420023.filter(c,e,tp)
return not c:IsPublic() and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c100420023.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c)
end
function c100420023.spfilter(c,e,tp,pc)
return c:IsSetCard(0x195) and c:IsAttribute(pc:GetAttribute()) and not c:IsCode(pc:GetCode())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100420023.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100420023.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100420023.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c100420023.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100420023.activate(e,tp,eg,ep,ev,re,r,rp)
local pc=e:GetLabelObject()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or pc==nil then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c100420023.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,pc):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(100420023,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c100420023.thcon)
e1:SetOperation(c100420023.thop)
Duel.RegisterEffect(e1,tp)
end
end
function c100420023.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(100420023)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c100420023.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
--VS 螺旋流辻風
--scripted by JoyJ
function c100420024.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420024+EFFECT_COUNT_CODE_OATH)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE)
e1:SetTarget(c100420024.target)
e1:SetOperation(c100420024.activate)
c:RegisterEffect(e1)
end
function c100420024.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x195) and c:IsCanChangePosition()
end
function c100420024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100420024.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100420024.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c100420024.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c100420024.filter2(c)
return c:IsFaceup() and c:IsSetCard(0x195)
end
function c100420024.filter3(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c100420024.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsLocation(LOCATION_MZONE)
and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)>0 then
local g=Duel.GetMatchingGroup(c100420024.filter2,tp,LOCATION_MZONE,0,nil)
local num=g:GetClassCount(Card.GetCode)
local g2=Duel.GetMatchingGroup(c100420024.filter3,tp,0,LOCATION_MZONE,nil)
if #g>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(100420024,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=g2:Select(tp,1,num,nil)
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end
end
end
--VS コンティニュー
--scripted by JoyJ
function c100420025.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,100420025+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c100420025.cost)
e1:SetTarget(c100420025.target)
e1:SetOperation(c100420025.activate)
c:RegisterEffect(e1)
end
function c100420025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c100420025.filter(c,e,tp,ft)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))
end
function c100420025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100420025.filter(chkc,e,tp,ft) end
if chk==0 then return Duel.IsExistingTarget(c100420025.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100420025.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
end
function c100420025.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end
if not aux.NecroValleyFilter()(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--VS トリニティ・バースト
--scripted by JoyJ
function c100420026.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100420026+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c100420026.target)
e1:SetOperation(c100420026.activate)
c:RegisterEffect(e1)
end
function c100420026.spfilter(c,e,tp,attr)
return c:IsSetCard(0x195) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:GetOriginalAttribute()~=attr
end
function c100420026.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x195) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c100420026.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetOriginalAttribute())
end
function c100420026.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100420026.filter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c100420026.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100420026.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100420026.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local attr=tc:GetOriginalAttribute()
local max=Duel.GetMZoneCount(tp)
if max>2 then max=2 end
if max<1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then max=1 end
local g=Duel.GetMatchingGroup(c100420026.spfilter,tp,LOCATION_HAND,0,nil,e,tp,attr)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:SelectSubGroup(tp,aux.dncheck,false,1,max)
local rg=tc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
local fid=c:GetFieldID()
local sg=Group.CreateGroup()
for sc in aux.Next(tg) do
if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc: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)
sc:RegisterEffect(e2)
sc:RegisterFlagEffect(100420026,RESET_EVENT+RESETS_STANDARD,0,1,fid)
rg:Merge(sc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp))
sg:AddCard(sc)
end
end
if #sg>0 then
sg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
e1:SetCondition(c100420026.thcon)
e1:SetOperation(c100420026.thop)
Duel.RegisterEffect(e1,tp)
end
Duel.SpecialSummonComplete()
if #rg>0 and Duel.SelectYesNo(tp,aux.Stringid(100420026,1)) then
Duel.BreakEffect()
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
end
end
function c100420026.thfilter(c,fid)
return c:GetFlagEffectLabel(100420026)==fid
end
function c100420026.thcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c100420026.thfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c100420026.thop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c100420026.thfilter,nil,e:GetLabel())
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
--VS 龍帝ノ槍
function c100420027.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,100420027+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100420027.condition)
e1:SetTarget(c100420027.target)
e1:SetOperation(c100420027.activate)
c:RegisterEffect(e1)
end
function c100420027.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x195)
end
function c100420027.cfilter2(c,tp)
return c:IsOnField() and c:IsControler(tp)
end
function c100420027.condition(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c100420027.cfilter2,1,nil,tp) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c100420027.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c100420027.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 c100420027.dmgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x195) and c:GetAttack()>0
end
function c100420027.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev)
and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(c100420027.dmgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100420027,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c100420027.dmgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Damage(1-tp,g:GetFirst():GetAttack(),REASON_EFFECT)
end
end
--ブエリヤベース・ド・ヌーベルズ
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--be target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5
and Duel.GetDecktopGroup(tp,5):FilterCount(Card.IsAbleToHand,nil)>0 end
Duel.SetTargetPlayer(tp)
end
function s.thfilter(c)
return c:IsSetCard(0x196) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,5)
local g=Duel.GetDecktopGroup(p,5)
local tg=g:Filter(s.thfilter,nil)
if #tg>0 and Duel.SelectYesNo(p,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=tg:Select(p,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
end
Duel.ShuffleDeck(p)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function s.relfilter(c,tp,ec)
return c:IsReleasableByEffect() and c:IsAttackPos()
and Duel.GetMZoneCount(tp,Group.FromCards(c,ec))>0
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x196) and c:IsLevel(2,3) and c:GetType()&0x81==0x81
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(s.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp,c)
if g:GetCount()==0 then return end
g:AddCard(c)
if Duel.Release(g,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
end
end
--コンフィラス・ド・ヌーベルズ
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
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,id)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--be target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function s.relfilter(c,tp,ec)
return c:IsReleasableByEffect() and c:IsAttackPos()
and Duel.GetMZoneCount(tp,Group.FromCards(c,ec))>0
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x196) and c:IsLevel(3,4) and c:GetType()&0x81==0x81
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(s.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp,c)
if g:GetCount()==0 then return end
g:AddCard(c)
if Duel.Release(g,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
end
end
--ポワレティス・ド・ヌーベルズ
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
--be target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(aux.TRUE)
c:RegisterEffect(e3)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.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 s.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 s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0
end
function s.relfilter1(c,tp)
return c:IsSetCard(0x196) and c:IsFaceup() and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c)
end
function s.relfilter2(c,tp,ec)
return c:IsReleasableByEffect() and c:IsAttackPos()
and Duel.GetMZoneCount(tp,Group.FromCards(c,ec))>0
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x196) and c:IsLevel(4,5) and c:GetType()&0x81==0x81
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.relfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
local tc1=g:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc2=Duel.SelectMatchingCard(tp,s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc1,tp,tc1):GetFirst()
g:AddCard(tc2)
if Duel.Release(g,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
end
end
--フォアグラシャ・ド・ヌーベルズ
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK)
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,id)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
--be target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(aux.TRUE)
c:RegisterEffect(e3)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetTargetsRelateToChain()
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0
end
function s.relfilter1(c,tp)
return c:IsSetCard(0x196) and c:IsFaceup() and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c)
end
function s.relfilter2(c,tp,ec)
return c:IsReleasableByEffect() and c:IsAttackPos()
and Duel.GetMZoneCount(tp,Group.FromCards(c,ec))>0
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x196) and c:IsLevel(5,6) and c:GetType()&0x81==0x81
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.relfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
local tc1=g:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc2=Duel.SelectMatchingCard(tp,s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc1,tp,tc1):GetFirst()
g:AddCard(tc2)
if Duel.Release(g,REASON_EFFECT)~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
end
end
--バグリエル・ド・ヌーベルズ
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--release
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
e:SetLabel(e:GetHandler():GetSummonType()&SUMMON_VALUE_NOUVELLEZ)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
local rg=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,nil)
if e:GetLabel()>0 and #rg>0 then
Duel.BreakEffect()
Duel.Release(rg,REASON_EFFECT)
end
end
function s.relfilter(c)
return c:IsReleasableByEffect() and c:IsAttackPos()
end
function s.spfilter(c,e,tp)
return c:IsCode(30243636) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.relfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.relfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,s.relfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
end
end
end
--Nouvellez Auberge 『ÀTable』
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCost(s.drcost1)
e2:SetTarget(s.drtg1)
e2:SetOperation(s.drop1)
c:RegisterEffect(e2)
--phase end
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.drcon2)
e3:SetTarget(s.drtg2)
e3:SetOperation(s.drop2)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c:IsSetCard(0x197) and c:IsAbleToHand()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function s.costfilter(c)
return c:GetType()&0x81==0x81 and c:IsAbleToDeckAsCost()
end
function s.drcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
end
function s.drtg1(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 s.drop1(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 s.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.tdfilter(c,tp)
return c:IsSetCard(0x197) and c:IsAbleToDeck()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,c)
end
function s.drtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,1,g)
g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
if #g==0 or aux.PlaceCardsOnDeckBottom(tp,g)==0 then return end
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
--Voici la Carte~メニューはこちら~
--scripted by JoyJ
function c100420036.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,100420036+EFFECT_COUNT_CODE_OATH)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c100420036.target)
e1:SetOperation(c100420036.activate)
c:RegisterEffect(e1)
end
function c100420036.filter(c)
return c:IsSetCard(0x196) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100420036.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100420036.filter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>1 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100420036.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c100420036.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100420036.filter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tc=sg:Select(1-tp,1,1,nil):GetFirst()
local code=0
if tc:IsRace(RACE_BEASTWARRIOR) then code=100420037 end
if tc:IsRace(RACE_WARRIOR) then code=100420038 end
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100420036.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,code)
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsRace(RACE_BEASTWARRIOR+RACE_WARRIOR)
and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(100420036,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
Duel.SendtoHand(sg2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg2)
end
end
--Recette de Poisson~魚料理のレシピ~
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,100420029)
local e1=aux.AddRitualProcGreater2(c,s.filter,LOCATION_HAND,nil,nil,true,s.extraop)
e1:SetCategory(e1:GetCategory()|(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION))
c:RegisterEffect(e1)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x196)
end
function s.thfilter(c)
return c:IsSetCard(0x197) and c:IsAbleToHand() and not c:IsCode(id) and c:GetType()&0x82==0x82
end
function s.extraop(e,tp,eg,ep,ev,re,r,rp,tc,mat)
if not tc or not tc:IsCode(100420029) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--Recette de Viande~肉料理のレシピ~
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,100420030)
aux.AddRitualProcGreater2(c,s.filter,LOCATION_HAND,nil,nil,false,s.extraop)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x196)
end
function s.extraop(e,tp,eg,ep,ev,re,r,rp,tc,mat)
if not tc or not tc:IsCode(100420030) then return end
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
end
end
--Recette de Personnel~賄いのレシピ~
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.tktg)
e2:SetOperation(s.tkop)
c:RegisterEffect(e2)
--ritual
local e3=aux.AddRitualProcEqual2(c,s.filter,LOCATION_HAND,nil,nil,true)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.ritcost)
c:RegisterEffect(e3)
end
function s.tgfilter(c)
return c:IsFaceup() and c:GetType()&0x81==0x81
end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsPlayerCanSpecialSummonMonster(tp,100420139,0,TYPES_TOKEN_MONSTER,50,50,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,100420139,0,TYPES_TOKEN_MONSTER,50,50,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP) then return end
local token=Duel.CreateToken(tp,100420139)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
function s.filter(c,e,tp)
return c:IsSetCard(0x196)
end
function s.ritcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) end
Duel.SendtoGrave(c,REASON_COST)
end
--Recette de Spécialité~料理長自慢のレシピ~
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetCondition(s.negcon)
e1:SetTarget(s.negtg)
e1:SetOperation(s.negop)
c:RegisterEffect(e1)
--release
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.relcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.reltg)
e2:SetOperation(s.relop)
c:RegisterEffect(e2)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.negfilter(c)
return c:IsFaceup() and c:IsSetCard(0x196) and c:GetType()&0x81==0x81
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
and Duel.IsChainNegatable(ev)
end
function s.negtg(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)
end
function s.descfilter(c)
return c:IsFaceup() and c:IsSetCard(0x196) and c:GetType()&0x81==0x81 and c:GetSummonType()&SUMMON_VALUE_NOUVELLEZ>0
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable()
and Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT)
end
end
function s.relfilter(c,tp)
return c:IsCode(30243636) and c:IsFaceup() and c:IsSummonPlayer(tp)
end
function s.relcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.relfilter,1,nil,tp)
end
function s.reltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil) end
end
function s.relop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,nil)
if #g>0 then
Duel.Release(g,REASON_EFFECT)
end
end
--Minairuka
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(s.discost)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTRIBUTE)&ATTRIBUTE_WATER>0
end
function s.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 s.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 s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(aux.NegateAnyFilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() 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+RESET_OPPO_TURN)
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+RESET_OPPO_TURN)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e3)
end
end
end
--Orphebull the Harmonious Bullfighter Bard
--scripted by Raye & Mercury233
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
s.spchecks=aux.CreateChecks(Card.IsAttribute,{ATTRIBUTE_LIGHT,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK,ATTRIBUTE_DARK})
function s.spcostfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetMZoneCount(tp)<=0 then return false end
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,c)
return g:CheckSubGroupEach(s.spchecks)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroupEach(tp,s.spchecks,true)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
local gatk=g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
local matk=g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:DeleteGroup()
if gatk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(gatk*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e1)
end
if matk>1 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetValue(matk-1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e2)
end
if matk==0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE)
c:RegisterEffect(e3)
end
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsControler(1-tp)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
--Diabolantis the Menacing Mantis
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--materials
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--semd to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(s.valcheck)
e0:SetLabelObject(e1)
c:RegisterEffect(e0)
--tuner
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.condition)
e2:SetTarget(s.tntg)
e2:SetOperation(s.tnop)
c:RegisterEffect(e2)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.filter(c)
return c:IsRace(RACE_INSECT+RACE_PLANT) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,e:GetLabel(),nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function s.valcheck(e,c)
e:GetLabelObject():SetLabel(c:GetMaterialCount()-1)
end
function s.tfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT+RACE_PLANT) and not c:IsType(TYPE_TUNER)
end
function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1)
end
end
--Xyz Align
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.tgfilter(c,e)
return c:IsFaceup() and c:IsLevelAbove(0) and c:IsCanBeEffectTarget(e)
end
function s.gcheck(sg,tp)
return sg:IsExists(Card.IsControler,1,nil,tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
if chk==0 then return g:CheckSubGroup(s.gcheck,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local sg=g:SelectSubGroup(tp,s.gcheck,false,2,2,tp)
Duel.SetTargetCard(sg)
local exlv=0
if sg:GetClassCount(Card.GetLevel)==1 then
exlv=sg:GetFirst():GetLevel()
end
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,12,exlv)
e:SetLabel(lv)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
local race=0
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
race=race|tc:GetRace()
tc=g:GetNext()
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and race>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetLabel(race)
e2:SetTarget(s.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(e:GetLabel())
end
--Made to Order Mermaid Outfit Outfitter
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.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 s.filter(c,...)
return c:IsCode(...) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_REMOVED)) then return end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,tc:GetCode())
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--Gold Pride - Nytro Head
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--spsummon token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.tkcon)
e2:SetTarget(s.tktg)
e2:SetOperation(s.tkop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*2)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCondition(s.descon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function s.target(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 s.operation(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 s.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,8,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,0)
end
function s.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,8,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP,1-tp) then return end
local token=Duel.CreateToken(tp,id+o)
if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
token:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==1-tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function s.dfilter(c)
return c:IsCode(id+o) and c:IsFaceup()
end
function s.sfilter(c,p,seq,loc)
local sseq=c:GetSequence()
if c:IsControler(1-p) then
return loc==LOCATION_MZONE and c:IsLocation(LOCATION_MZONE)
and (sseq==5 and seq==3 or sseq==6 and seq==1)
end
if c:IsLocation(LOCATION_SZONE) then
return sseq<5 and (sseq==seq or loc==LOCATION_SZONE and math.abs(sseq-seq)==1)
end
if sseq<5 then
return sseq==seq or loc==LOCATION_MZONE and math.abs(sseq-seq)==1
else
return loc==LOCATION_MZONE and (sseq==5 and seq==1 or sseq==6 and seq==3)
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.dfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectTarget(tp,s.dfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
local g=Duel.GetMatchingGroup(s.sfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tc:GetControler(),tc:GetSequence(),tc:GetLocation())
g:AddCard(tc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(s.sfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,tc,tc:GetControler(),tc:GetSequence(),tc:GetLocation())
g:AddCard(tc)
Duel.Destroy(g,REASON_EFFECT)
end
end
--Gold Pride - Captain Carrie
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
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(id,2))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,id+o*2)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(s.atktg)
e4:SetOperation(s.atkop)
c:RegisterEffect(e4)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function s.target(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 s.operation(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 s.filter(c)
return c:IsSetCard(0x192) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.afilter(c)
return c:IsFaceup() and c:IsSetCard(0x192) and c:IsSummonLocation(LOCATION_EXTRA)
end
function s.rfilter(c)
return c:IsSetCard(0x192) and c:IsAbleToRemove()
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.afilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.afilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.afilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_GRAVE,0,1,3,nil)
if #g==0 then return end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ct>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct*500)
tc:RegisterEffect(e1)
end
end
--Gold Pride – Star Leon
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--sp summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.tdcon)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.atkfilter(c)
return c:IsFaceup() and c:GetBaseAttack()>0
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.atkfilter,tp,0,LOCATION_MZONE,1,1,nil)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=tc:GetBaseAttack()
if c:IsRelateToEffect(e) and c:IsFaceup()
and tc:IsFaceup() and tc:IsRelateToEffect(e) and atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
if Duel.GetLP(tp)<Duel.GetLP(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function s.spfilter(c,e,tp)
return c:IsCode(101111201) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsExtraDeckMonster()
and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--Gold Pride – Nytro Blaster
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.mfilter,2,2,s.lcheck)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.tdcon)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.mfilter(c)
return c:IsLevelAbove(0) and c:IsLinkSetCard(0x192)
end
function s.lcheck(g,lc)
return g:GetClassCount(Card.GetLevel)==g:GetCount()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.desfilter(c,tp,seq)
local sseq=c:GetSequence()
if c:IsControler(tp) then
return sseq==5 and seq==3 or sseq==6 and seq==1
end
if c:IsLocation(LOCATION_SZONE) then
return sseq<5 and sseq==seq
end
if sseq<5 then
return math.abs(sseq-seq)==1
end
if sseq>=5 then
return sseq==5 and seq==1 or sseq==6 and seq==3
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local cg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tc,tp,tc:GetSequence())
if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLP(tp)<Duel.GetLP(1-tp) and #cg>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Destroy(cg,REASON_EFFECT)
end
end
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(id)>0
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function s.spfilter(c,e,tp)
return c:IsCode(101111087) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsExtraDeckMonster()
and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--Gold Pride – The Crowd Goes Wild!
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.thfilter(c,code)
return not c:IsCode(code) and c:IsSetCard(0x192) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.cfilter(c,tp)
return not c:IsPublic() and c:IsSetCard(0x192) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x192) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.ShuffleHand(tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local atk=sg:GetFirst():GetBaseAttack()
Duel.SetLP(tp,Duel.GetLP(tp)-atk)
end
end
end
--Gold Pride – Start Your Engines!
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.dgfilter(c,e,tp)
return c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x192) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and s.dgfilter(chkc,e,tp) end
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if chk==0 then return eg:IsExists(s.dgfilter,1,nil,e,tp) and #sg>=3 end
local dg=eg
if #eg>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=eg:FilterSelect(tp,s.dgfilter,1,1,nil,e,tp)
end
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if #g<3 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleDeck(tp)
local cg=sg:RandomSelect(1-tp,1)
if Duel.SpecialSummon(cg,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--Gold Pride - Leon
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--spsummon grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--synchro
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o*2)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCondition(s.scon)
e4:SetTarget(s.stg)
e4:SetOperation(s.sop)
c:RegisterEffect(e4)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function s.target(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 s.operation(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 s.filter(c,e,tp)
return not c:IsRace(RACE_WARRIOR) and c:IsSetCard(0x192)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.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_DEFENSE) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsSetCard(0x192) and c:IsLocation(LOCATION_EXTRA)
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x192)
if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x192)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,g):GetFirst()
if sc then Duel.SynchroSummon(tp,sc,nil,g) end
end
--ホイール・シンクロン
--Wheel Synchron
--coded by Lyris
local s,id,o=GetID()
function s.initial_effect(c)
--nontuner
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(s.tnval)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.nstg)
e2:SetOperation(s.nsop)
c:RegisterEffect(e2)
--reduce level
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.lvtg)
e3:SetOperation(s.lvop)
c:RegisterEffect(e3)
end
function s.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function s.filter(c)
return c:IsLevelBelow(4) and c:IsSummonable(true,nil)
end
function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.nsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function s.lvfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsLevelAbove(2)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local t={}
for i=1,4 do
if tc:GetLevel()-i>0 then table.insert(t,i) end
end
if #t==0 then return end
local lv=Duel.AnnounceNumber(tp,table.unpack(t))
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-lv)
tc:RegisterEffect(e1)
end
end
--レボリューション・シンクロン
--Revolution Synchron
--coded by Lyris & chronogenexx & Mercury233
--not fully implemented
local s,id,o=GetID()
function s.initial_effect(c)
--hand synchro
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetValue(s.matval)
c:RegisterEffect(e1)
--register HOpT
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_BE_PRE_MATERIAL)
e0:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetLabelObject(e1)
e0:SetCondition(s.hsyncon)
e0:SetOperation(s.hsynreg)
c:RegisterEffect(e0)
--spsum self
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.matval(e,c)
return c:IsType(TYPE_SYNCHRO) and (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) or c:IsSetCard(0xc2))
end
function s.hsyncon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_SYNCHRO and s.matval(nil,c:GetReasonCard()) and c:IsPreviousLocation(LOCATION_HAND)
end
function s.hsynreg(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():UseCountLimit(tp)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsLevelAbove(7) and c:IsType(TYPE_SYNCHRO)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0 then
local oc=Duel.GetOperatedGroup():GetFirst()
local c=e:GetHandler()
if oc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
end
--コズミック・クェーサー・ドラゴン
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(s.synlimit)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(s.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(s.spcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
s.material_type=TYPE_SYNCHRO
function s.synlimit(e,se,sp,st)
return st&SUMMON_TYPE_SYNCHRO==SUMMON_TYPE_SYNCHRO and not se
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>0
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=e:GetLabel()
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and aux.NegateAnyFilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,ct,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dg=Duel.GetTargetsRelateToChain()
local tc=dg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
tc=dg:GetNext()
end
end
function s.valcheck(e,c)
e:GetLabelObject():SetLabel(c:GetMaterialCount()+1)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function s.spfilter(c,e,tp,ec)
return c.cosmic_quasar_dragon_summon and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,ec,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
--バラムニエル・ド・ヌーベルズ
--Script by 小壶
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--release
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon1)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(s.spcon2)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e3)
end
SUMMON_VALUE_NOUVELLEZ=0x8000
function s.thfilter(c)
return c:IsSetCard(0x196,0x197) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()&SUMMON_VALUE_NOUVELLEZ==0
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()&SUMMON_VALUE_NOUVELLEZ>0
end
function s.relfilter(c)
return c:IsReleasableByEffect() and c:IsAttackPos()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x196) and c:IsLevel(6) and c:GetType()&0x81==0x81
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.relfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.relfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,s.relfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_VALUE_NOUVELLEZ,tp,tp,true,false,POS_FACEUP)
end
end
end
--赤き竜
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.thfilter(c)
return aux.IsCodeListed(c,101201204) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cfilter(c,e,tp)
return c:IsFaceup() and c:IsLevelAbove(7) and c:IsType(TYPE_SYNCHRO) and not c:IsCode(id)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLevel(),e:GetHandler())
end
function s.spfilter(c,e,tp,lv,ec)
return c:IsLevel(lv) and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON)
and Duel.GetLocationCountFromEx(tp,tp,ec,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.cfilter(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and c:IsLocation(LOCATION_EXTRA)
and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetLevel(),nil):GetFirst()
if sc then
sc:SetMaterial(nil)
if Duel.SpecialSummon(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
sc:CompleteProcedure()
end
end
end
end
--シンクロ・オーバートップ
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101201204)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(7,8) and c:IsRace(RACE_DRAGON)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(s.splimit)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetTargetsRelateToChain()
if #g==0 then return end
if #g>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if #g>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ft,ft,nil)
end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function s.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.spfilter2(c,e,tp)
return c:IsCode(101201204) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
--シンクロ・ワールド
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101201204)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.ctop)
c:RegisterEffect(e2)
--increase or decrease lv
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetLabel(4)
e3:SetCost(s.countercost)
e3:SetTarget(s.lvtg)
e3:SetOperation(s.lvop)
c:RegisterEffect(e3)
--special summon tuner
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetLabel(7)
e4:SetCost(s.countercost)
e4:SetTarget(s.sptg1)
e4:SetOperation(s.spop1)
c:RegisterEffect(e4)
--special summon synchro
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE)
e5:SetLabel(10)
e5:SetCost(s.countercost)
e5:SetTarget(s.sptg2)
e5:SetOperation(s.spop2)
c:RegisterEffect(e5)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,3))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_DESTROYED)
e6:SetCondition(s.spcon)
e6:SetTarget(s.sptg3)
e6:SetOperation(s.spop3)
c:RegisterEffect(e6)
end
s.counter_add_list={0x104d}
function s.ctfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.ctfilter,1,nil) then
e:GetHandler():AddCounter(0x104d,2)
end
end
function s.countercost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x104d,e:GetLabel(),REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x104d,e:GetLabel(),REASON_COST)
end
function s.lvfilter(c)
return c:IsFaceup() and c:GetLevel()>0
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local sel=0
local lvl=1
if tc:IsLevel(1) then
sel=Duel.SelectOption(tp,aux.Stringid(id,4))
else
sel=Duel.SelectOption(tp,aux.Stringid(id,4),aux.Stringid(id,5))
end
if sel==1 then
lvl=-1
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lvl)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function s.spfilter1(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop1(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(s.spfilter1),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.spfilter2(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop2(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(s.spfilter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_FZONE) and c:IsReason(REASON_EFFECT)
end
function s.spfilter3(c,e,tp)
return c:IsCode(101201204) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter3,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop3(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(s.spfilter3,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
--くず鉄の神像
--scripted by Raye
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101201204)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(7,8)
and c:IsFaceupEx() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local fid=e:GetHandler():GetFieldID()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
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(s.tdcon)
e1:SetOperation(s.tdop)
Duel.RegisterEffect(e1,tp)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEDOWN)
and c:IsPreviousLocation(LOCATION_SZONE) and c:IsReason(REASON_EFFECT)
end
function s.spfilter(c,e,tp)
return c:IsCode(101201204) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
--コズミック・ブレイザー・ドラゴン
function c21123811.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21123811,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c21123811.discon)
e2:SetCost(c21123811.cost)
e2:SetTarget(c21123811.distg)
e2:SetOperation(c21123811.disop)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(21123811,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON)
e3:SetCondition(c21123811.dscon)
e3:SetCost(c21123811.cost)
e3:SetTarget(c21123811.dstg)
e3:SetOperation(c21123811.dsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e5)
--negate attack
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(21123811,2))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_ATTACK_ANNOUNCE)
e6:SetCountLimit(1)
e6:SetCondition(c21123811.negcon)
e6:SetCost(c21123811.cost)
e6:SetOperation(c21123811.negop)
c:RegisterEffect(e6)
end
c21123811.material_type=TYPE_SYNCHRO
c21123811.cosmic_quasar_dragon_summon=true
function c21123811.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c21123811.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c21123811.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c21123811.distg(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 c21123811.disop(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 c21123811.dscon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.GetCurrentChain()==0
end
function c21123811.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c21123811.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c21123811.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c21123811.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
function c21123811.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--聖珖神竜 スターダスト・シフル
function c26268488.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetValue(c26268488.indct)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26268488,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c26268488.discon)
e3:SetTarget(c26268488.distg)
e3:SetOperation(c26268488.disop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(26268488,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c26268488.sptg)
e4:SetOperation(c26268488.spop)
c:RegisterEffect(e4)
end
c26268488.material_type=TYPE_SYNCHRO
c26268488.cosmic_quasar_dragon_summon=true
function c26268488.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function c26268488.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c26268488.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c26268488.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateEffect(ev) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c26268488.spfilter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c26268488.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c26268488.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c26268488.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c26268488.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c26268488.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 c35952884.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--multi attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c35952884.mtcon)
e2:SetOperation(c35952884.mtop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c35952884.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(35952884,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c35952884.discon)
e3:SetTarget(c35952884.distg)
e3:SetOperation(c35952884.disop)
c:RegisterEffect(e3)
--Special Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(35952884,1))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c35952884.sumcon)
e4:SetTarget(c35952884.sumtg)
e4:SetOperation(c35952884.sumop)
c:RegisterEffect(e4)
end
c35952884.material_type=TYPE_SYNCHRO
c35952884.cosmic_quasar_dragon_summon=true
function c35952884.valcheck(e,c)
e:GetLabelObject():SetLabel(c:GetMaterialCount()-1)
end
function c35952884.mtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>0
end
function c35952884.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(ct-1)
c:RegisterEffect(e1)
end
function c35952884.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c35952884.distg(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 c35952884.disop(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 c35952884.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c35952884.filter(c,e,tp)
return c:IsCode(24696097) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c35952884.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c35952884.sumop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(c35952884.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,true,POS_FACEUP)
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