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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment