Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
a205fcdd
Commit
a205fcdd
authored
Sep 18, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prescripts
parent
7dcb2cff
Changes
64
Hide whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
3585 additions
and
955 deletions
+3585
-955
expansions/script/c100200138.lua
expansions/script/c100200138.lua
+78
-0
expansions/script/c100220001.lua
expansions/script/c100220001.lua
+0
-38
expansions/script/c100221001.lua
expansions/script/c100221001.lua
+174
-0
expansions/script/c100222001.lua
expansions/script/c100222001.lua
+82
-0
expansions/script/c100305000.lua
expansions/script/c100305000.lua
+1
-0
expansions/script/c100305002.lua
expansions/script/c100305002.lua
+5
-8
expansions/script/c100407001.lua
expansions/script/c100407001.lua
+76
-0
expansions/script/c100407003.lua
expansions/script/c100407003.lua
+121
-0
expansions/script/c100407004.lua
expansions/script/c100407004.lua
+121
-0
expansions/script/c100407007.lua
expansions/script/c100407007.lua
+115
-0
expansions/script/c100407008.lua
expansions/script/c100407008.lua
+98
-0
expansions/script/c100407009.lua
expansions/script/c100407009.lua
+74
-0
expansions/script/c100407014.lua
expansions/script/c100407014.lua
+85
-0
expansions/script/c100407015.lua
expansions/script/c100407015.lua
+106
-0
expansions/script/c100407017.lua
expansions/script/c100407017.lua
+109
-0
expansions/script/c100420001.lua
expansions/script/c100420001.lua
+0
-98
expansions/script/c100420018.lua
expansions/script/c100420018.lua
+0
-59
expansions/script/c101003002.lua
expansions/script/c101003002.lua
+84
-0
expansions/script/c101003007.lua
expansions/script/c101003007.lua
+100
-0
expansions/script/c101003009.lua
expansions/script/c101003009.lua
+35
-0
expansions/script/c101003010.lua
expansions/script/c101003010.lua
+81
-0
expansions/script/c101003011.lua
expansions/script/c101003011.lua
+77
-0
expansions/script/c101003012.lua
expansions/script/c101003012.lua
+39
-0
expansions/script/c101003013.lua
expansions/script/c101003013.lua
+83
-0
expansions/script/c101003014.lua
expansions/script/c101003014.lua
+88
-0
expansions/script/c101003015.lua
expansions/script/c101003015.lua
+78
-0
expansions/script/c101003016.lua
expansions/script/c101003016.lua
+80
-0
expansions/script/c101003017.lua
expansions/script/c101003017.lua
+82
-0
expansions/script/c101003018.lua
expansions/script/c101003018.lua
+83
-0
expansions/script/c101003020.lua
expansions/script/c101003020.lua
+110
-0
expansions/script/c101003039.lua
expansions/script/c101003039.lua
+48
-0
expansions/script/c101003045.lua
expansions/script/c101003045.lua
+63
-0
expansions/script/c101003046.lua
expansions/script/c101003046.lua
+91
-0
expansions/script/c101003047.lua
expansions/script/c101003047.lua
+71
-0
expansions/script/c101003052.lua
expansions/script/c101003052.lua
+3
-3
expansions/script/c101003054.lua
expansions/script/c101003054.lua
+74
-0
expansions/script/c101003055.lua
expansions/script/c101003055.lua
+88
-0
expansions/script/c101003056.lua
expansions/script/c101003056.lua
+88
-0
expansions/script/c101003057.lua
expansions/script/c101003057.lua
+55
-0
expansions/script/c101003059.lua
expansions/script/c101003059.lua
+42
-0
expansions/script/c101003063.lua
expansions/script/c101003063.lua
+52
-0
expansions/script/c101003066.lua
expansions/script/c101003066.lua
+1
-1
expansions/script/c101003069.lua
expansions/script/c101003069.lua
+97
-0
expansions/script/c101003070.lua
expansions/script/c101003070.lua
+88
-0
expansions/script/c101003071.lua
expansions/script/c101003071.lua
+70
-0
expansions/script/c101003072.lua
expansions/script/c101003072.lua
+84
-0
expansions/script/c12171659.lua
expansions/script/c12171659.lua
+0
-46
expansions/script/c12510878.lua
expansions/script/c12510878.lua
+0
-68
expansions/script/c15327215.lua
expansions/script/c15327215.lua
+0
-85
expansions/script/c18378582.lua
expansions/script/c18378582.lua
+0
-61
expansions/script/c28573958.lua
expansions/script/c28573958.lua
+0
-89
expansions/script/c30907810.lua
expansions/script/c30907810.lua
+0
-3
expansions/script/c44595286.lua
expansions/script/c44595286.lua
+0
-51
expansions/script/c48783998.lua
expansions/script/c48783998.lua
+0
-51
expansions/script/c49905576.lua
expansions/script/c49905576.lua
+0
-22
expansions/script/c55794644.lua
expansions/script/c55794644.lua
+0
-76
expansions/script/c5645210.lua
expansions/script/c5645210.lua
+44
-0
expansions/script/c63519819.lua
expansions/script/c63519819.lua
+130
-0
expansions/script/c64631466.lua
expansions/script/c64631466.lua
+131
-0
expansions/script/c84177693.lua
expansions/script/c84177693.lua
+0
-30
expansions/script/c91123920.lua
expansions/script/c91123920.lua
+0
-34
expansions/script/c91188343.lua
expansions/script/c91188343.lua
+0
-40
expansions/script/c91345518.lua
expansions/script/c91345518.lua
+0
-41
expansions/script/c97750534.lua
expansions/script/c97750534.lua
+0
-51
No files found.
expansions/script/c100200138.lua
0 → 100644
View file @
a205fcdd
--サブテラーの導師
--Subterror Guru
--Scripted by Eerie Code
function
c100200138
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100200138
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
100200138
)
e1
:
SetTarget
(
c100200138
.
thtg
)
e1
:
SetOperation
(
c100200138
.
thop
)
c
:
RegisterEffect
(
e1
)
--position
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100200138
,
1
))
e2
:
SetCategory
(
CATEGORY_POSITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
100200138
+
100
)
e2
:
SetCondition
(
c100200138
.
setcon1
)
e2
:
SetTarget
(
c100200138
.
settg
)
e2
:
SetOperation
(
c100200138
.
setop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
0x1e0
)
e3
:
SetCondition
(
c100200138
.
setcon2
)
c
:
RegisterEffect
(
e3
)
end
function
c100200138
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xed
)
and
not
c
:
IsCode
(
100200138
)
and
c
:
IsAbleToHand
()
end
function
c100200138
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100200138
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100200138
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100200138
.
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
c100200138
.
setcfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xed
)
end
function
c100200138
.
setcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c100200138
.
setcfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
function
c100200138
.
setcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c100200138
.
setcfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
function
c100200138
.
setfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
function
c100200138
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
~=
c
and
c100200138
.
setfilter
(
chkc
)
end
if
chk
==
0
then
return
c100200138
.
setfilter
(
c
)
and
Duel
.
IsExistingTarget
(
c100200138
.
setfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c100200138
.
setfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
c
)
g
:
AddCard
(
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
2
,
0
,
0
)
end
function
c100200138
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
g
=
Group
.
FromCards
(
c
,
tc
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_DEFENSE
)
end
end
expansions/script/c100220001.lua
deleted
100644 → 0
View file @
7dcb2cff
--コード・トーカー
--Code Talker
--Scripted by Eerie Code
function
c100220001
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_EFFECT
),
2
,
2
)
c
:
EnableReviveLimit
()
--atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c100220001
.
atkval
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetCondition
(
c100220001
.
incon
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetValue
(
c100220001
.
inval
)
c
:
RegisterEffect
(
e3
)
end
function
c100220001
.
atkval
(
e
,
c
)
return
c
:
GetLinkedGroupCount
()
*
500
end
function
c100220001
.
incon
(
e
)
return
e
:
GetHandler
():
GetLinkedGroupCount
()
>
0
end
function
c100220001
.
inval
(
e
,
re
,
r
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
end
expansions/script/c100221001.lua
0 → 100644
View file @
a205fcdd
--超天新龍オッドアイズ・レボリューション・ドラゴン
--Odd-Eyes Revolution Dragon
--Scripted by Eerie Code
function
c100221001
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c100221001
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100221001
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTarget
(
c100221001
.
sptg
)
e2
:
SetOperation
(
c100221001
.
spop
)
c
:
RegisterEffect
(
e2
)
--spsummon condition
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e3
:
SetValue
(
c100221001
.
splimit
)
c
:
RegisterEffect
(
e3
)
--special summon rule
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCondition
(
c100221001
.
hspcon
)
e4
:
SetOperation
(
c100221001
.
hspop
)
c
:
RegisterEffect
(
e4
)
--tohand
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
100221001
,
1
))
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_HAND
)
e5
:
SetCost
(
c100221001
.
thcost
)
e5
:
SetTarget
(
c100221001
.
thtg
)
e5
:
SetOperation
(
c100221001
.
thop
)
c
:
RegisterEffect
(
e5
)
--atk/def
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetValue
(
c100221001
.
atkval
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e6
:
Clone
()
e7
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e7
)
--todeck
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetCategory
(
CATEGORY_TODECK
)
e8
:
SetType
(
EFFECT_TYPE_IGNITION
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCountLimit
(
1
)
e8
:
SetCost
(
c100221001
.
tdcost
)
e8
:
SetTarget
(
c100221001
.
tdtg
)
e8
:
SetOperation
(
c100221001
.
tdop
)
c
:
RegisterEffect
(
e8
)
end
function
c100221001
.
psplimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
return
not
c
:
IsRace
(
RACE_DRAGON
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
end
function
c100221001
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsType
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c100221001
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c100221001
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c100221001
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c100221001
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c100221001
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
~=
0
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c100221001
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
and
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
end
function
c100221001
.
hspfilter1
(
c
,
g
,
ft
)
local
rg
=
Group
.
FromCards
(
c
)
local
ct
=
ft
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
ct
=
ct
+
1
end
return
c
:
IsType
(
TYPE_FUSION
)
and
g
:
IsExists
(
c100221001
.
hspfilter2
,
1
,
rg
,
g
,
rg
,
ft
)
end
function
c100221001
.
hspfilter2
(
c
,
g
,
rg
,
ft
)
local
rg2
=
rg
:
Clone
()
rg2
:
AddCard
(
c
)
local
ct
=
ft
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
ct
=
ct
+
1
end
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
g
:
IsExists
(
c100221001
.
hspfilter3
,
1
,
rg2
,
ft
)
end
function
c100221001
.
hspfilter3
(
c
,
ft
)
local
ct
=
ft
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
ct
=
ct
+
1
end
return
c
:
IsType
(
TYPE_XYZ
)
and
ct
>
0
end
function
c100221001
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<-
2
then
return
false
end
local
g
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
Card
.
IsRace
,
nil
,
RACE_DRAGON
)
return
g
:
IsExists
(
c100221001
.
hspfilter1
,
1
,
nil
,
g
,
ft
)
end
function
c100221001
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
Card
.
IsRace
,
nil
,
RACE_DRAGON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c100221001
.
hspfilter1
,
1
,
1
,
nil
,
g
,
ft
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g2
=
g
:
FilterSelect
(
tp
,
c100221001
.
hspfilter2
,
1
,
1
,
g1
,
g
,
g1
,
ft
)
g1
:
Merge
(
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g3
=
g
:
FilterSelect
(
tp
,
c100221001
.
hspfilter3
,
1
,
1
,
g1
,
ft
)
g1
:
Merge
(
g3
)
Duel
.
Release
(
g1
,
REASON_COST
+
REASON_MATERIAL
)
end
function
c100221001
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
CheckLPCost
(
tp
,
500
)
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
Duel
.
PayLPCost
(
tp
,
500
)
end
function
c100221001
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsLevelBelow
(
8
)
and
c
:
IsAbleToHand
()
end
function
c100221001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100221001
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100221001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100221001
.
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
c100221001
.
atkval
(
e
,
c
)
return
math.floor
(
Duel
.
GetLP
(
1
-
e
:
GetHandlerPlayer
())
/
2
)
end
function
c100221001
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
function
c100221001
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
e
:
GetHandler
())
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c100221001
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
expansions/script/c100222001.lua
0 → 100644
View file @
a205fcdd
--白闘気双頭神龍
--White Aura Biphamet
function
c100222001
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_SYNCHRO
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100222001
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c100222001
.
tkcon
)
e1
:
SetTarget
(
c100222001
.
tktg
)
e1
:
SetOperation
(
c100222001
.
tkop
)
c
:
RegisterEffect
(
e1
)
--token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100222001
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_END_PHASE
)
e2
:
SetCondition
(
c100222001
.
tkcon2
)
e2
:
SetTarget
(
c100222001
.
tktg
)
e2
:
SetOperation
(
c100222001
.
tkop2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100222001
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c100222001
.
spcon
)
e3
:
SetTarget
(
c100222001
.
sptg
)
e3
:
SetOperation
(
c100222001
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c100222001
.
tkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c100222001
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
100222001
+
100
,
0
,
0x4011
,
3300
,
3000
,
10
,
RACE_FISH
,
ATTRIBUTE_WATER
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c100222001
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
100222001
+
100
,
0
,
0x4011
,
3300
,
3000
,
10
,
RACE_FISH
,
ATTRIBUTE_WATER
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
100222001
+
100
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c100222001
.
tkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
TYPE_TOKEN
)
end
function
c100222001
.
tkop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
100222001
+
100
,
0
,
0x4011
,
3300
,
3000
,
10
,
RACE_FISH
,
ATTRIBUTE_WATER
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
100222001
+
100
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c100222001
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_DESTROY
)
and
rp
~=
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousControler
()
==
tp
end
function
c100222001
.
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
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
100222001
+
100
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c100222001
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
expansions/script/c100305000.lua
View file @
a205fcdd
...
...
@@ -42,4 +42,5 @@ function c100305000.thop(e,tp,eg,ep,ev,re,r,rp)
dg
:
Remove
(
Card
.
IsCode
,
nil
,
tc
:
GetCode
())
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
expansions/script/c100305002.lua
View file @
a205fcdd
...
...
@@ -13,8 +13,8 @@ end
function
c100305002
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsType
(
TYPE_COUNTER
)
end
function
c100305002
.
thfilter
(
c
,
c
c
)
return
c
:
IsType
(
TYPE_COUNTER
)
and
not
c
:
IsCode
(
c
c
)
and
c
:
IsAbleToHand
()
function
c100305002
.
thfilter
(
c
,
c
ode
)
return
c
:
IsType
(
TYPE_COUNTER
)
and
not
c
:
IsCode
(
c
ode
)
and
c
:
IsAbleToHand
()
end
function
c100305002
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -26,15 +26,12 @@ function c100305002.atkop(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e1
)
local
rc
=
re
:
GetHandler
()
if
not
rc
then
return
end
local
c
c
=
rc
:
GetCode
()
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
c100305002
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
c
c
)
if
(
Duel
.
IsExistingMatchingCard
(
c100305002
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
)
and
g
:
GetCount
()
>
0
then
local
c
ode
=
rc
:
GetCode
()
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
c100305002
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
c
ode
)
if
Duel
.
IsEnvironment
(
56433456
)
and
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_CARD
,
0
,
100305002
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
end
function
c100305002
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
expansions/script/c100407001.lua
0 → 100644
View file @
a205fcdd
--ミレニアム・アイズ・イリュージョニスト
--Millennium-Eyes Illusionist
function
c100407001
.
initial_effect
(
c
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100407001
,
0
))
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
100407001
)
e1
:
SetCost
(
c100407001
.
eqcost
)
e1
:
SetTarget
(
c100407001
.
eqtg
)
e1
:
SetOperation
(
c100407001
.
eqop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100407001
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
100407001
+
100
)
e2
:
SetCondition
(
c100407001
.
thcon
)
e2
:
SetTarget
(
c100407001
.
thtg
)
e2
:
SetOperation
(
c100407001
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c100407001
.
eqcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
c100407001
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAbleToChangeControler
()
end
function
c100407001
.
eqfilter
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
:
IsFaceup
()
and
((
c
:
IsSetCard
(
0x20a
)
and
c
:
IsType
(
TYPE_FUSION
))
or
c
:
IsCode
(
64631466
,
63519819
))
and
m
.
CanEquipMonster
(
c
)
end
function
c100407001
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c100407001
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c100407001
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c100407001
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c100407001
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
function
c100407001
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc1
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100407001
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc2
=
g
:
GetFirst
()
if
not
tc2
then
return
end
local
m
=
_G
[
"c"
..
tc2
:
GetCode
()]
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc1
:
IsControler
(
1
-
tp
)
then
m
.
EquipMonster
(
tc2
,
tp
,
tc1
)
end
end
function
c100407001
.
thfilter
(
c
,
e
)
return
(
c
:
IsSetCard
(
0x20a
)
and
c
:
IsType
(
TYPE_FUSION
))
or
c
:
IsCode
(
64631466
,
63519819
)
end
function
c100407001
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c100407001
.
thfilter
,
1
,
nil
)
end
function
c100407001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c100407001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
end
expansions/script/c100407003.lua
0 → 100644
View file @
a205fcdd
--ミレニアム・アイズ・サクリファイス
--Millennium-Eyes Restrict
function
c100407003
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
64631466
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_EFFECT
),
1
,
true
,
true
)
--Equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100407003
,
0
))
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c100407003
.
eqcon
)
e1
:
SetTarget
(
c100407003
.
eqtg
)
e1
:
SetOperation
(
c100407003
.
eqop
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c100407003
.
atkval
)
c
:
RegisterEffect
(
e2
)
-- def
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e3
:
SetValue
(
c100407003
.
defval
)
c
:
RegisterEffect
(
e3
)
--disable
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_DISABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e4
:
SetTarget
(
c100407003
.
distg
)
c
:
RegisterEffect
(
e4
)
--atk limit
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e5
:
SetTarget
(
c100407003
.
distg
)
c
:
RegisterEffect
(
e5
)
end
function
c100407003
.
CanEquipMonster
(
c
)
return
true
end
function
c100407003
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
ep
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c100407003
.
eqfilter
(
c
)
return
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAbleToChangeControler
()
end
function
c100407003
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c100407003
.
eqfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c100407003
.
eqfilter
,
tp
,
0
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c100407003
.
eqfilter
,
tp
,
0
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
function
c100407003
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
end
function
c100407003
.
EquipMonster
(
c
,
tp
,
tc
)
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
--Add Equip limit
tc
:
RegisterFlagEffect
(
100407003
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c100407003
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
end
function
c100407003
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
c100407003
.
EquipMonster
(
c
,
tp
,
tc
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
function
c100407003
.
atkval
(
e
,
c
)
local
atk
=
0
local
g
=
c
:
GetEquipGroup
()
local
tc
=
g
:
GetFirst
()
while
tc
do
if
tc
:
GetFlagEffect
(
100407003
)
~=
0
and
tc
:
IsFaceup
()
and
tc
:
GetAttack
()
>=
0
then
atk
=
atk
+
tc
:
GetAttack
()
end
tc
=
g
:
GetNext
()
end
return
atk
end
function
c100407003
.
defval
(
e
,
c
)
local
atk
=
0
local
g
=
c
:
GetEquipGroup
()
local
tc
=
g
:
GetFirst
()
while
tc
do
if
tc
:
GetFlagEffect
(
100407003
)
~=
0
and
tc
:
IsFaceup
()
and
tc
:
GetDefense
()
>=
0
then
atk
=
atk
+
tc
:
GetDefense
()
end
tc
=
g
:
GetNext
()
end
return
atk
end
function
c100407003
.
disfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetFlagEffect
(
100407003
)
~=
0
end
function
c100407003
.
distg
(
e
,
c
)
local
g
=
e
:
GetHandler
():
GetEquipGroup
():
Filter
(
c100407003
.
disfilter
,
nil
)
return
c
:
IsFaceup
()
and
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
end
expansions/script/c100407004.lua
0 → 100644
View file @
a205fcdd
--サクリファイス・フュージョン
--Relinquished Fusion
function
c100407004
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c100407004
.
target
)
e1
:
SetOperation
(
c100407004
.
activate
)
c
:
RegisterEffect
(
e1
)
--equip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100407004
,
0
))
e2
:
SetCategory
(
CATEGORY_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c100407004
.
eqcost
)
e2
:
SetTarget
(
c100407004
.
eqtg
)
e2
:
SetOperation
(
c100407004
.
eqop
)
c
:
RegisterEffect
(
e2
)
end
function
c100407004
.
filter0
(
c
)
return
c
:
IsAbleToRemove
()
end
function
c100407004
.
filter1
(
c
,
e
)
return
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c100407004
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
(
c
:
IsSetCard
(
0x20a
)
or
c
:
IsCode
(
63519819
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c100407004
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c100407004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c100407004
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c100407004
.
filter3
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c100407004
.
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
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c100407004
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c100407004
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c100407004
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c100407004
.
filter3
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c100407004
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c100407004
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
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
.
Remove
(
mat1
,
POS_FACEUP
,
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
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c100407004
.
eqcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c100407004
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAbleToChangeControler
()
end
function
c100407004
.
eqfilter
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
:
IsFaceup
()
and
(
c
:
IsSetCard
(
0x20a
)
or
c
:
IsCode
(
64631466
,
63519819
))
and
m
.
CanEquipMonster
(
c
)
end
function
c100407004
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c100407004
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c100407004
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c100407004
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c100407004
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
function
c100407004
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc1
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100407004
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc2
=
g
:
GetFirst
()
local
m
=
_G
[
"c"
..
tc2
:
GetCode
()]
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc1
:
IsControler
(
1
-
tp
)
and
tc2
then
m
.
EquipMonster
(
tc2
,
tp
,
tc1
)
end
end
expansions/script/c100407007.lua
0 → 100644
View file @
a205fcdd
--寄生虫パラノイド
--Parasite Paranoid
--Scripted by Eerie Code
function
c100407007
.
initial_effect
(
c
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
100407007
)
e1
:
SetTarget
(
c100407007
.
eqtg
)
e1
:
SetOperation
(
c100407007
.
eqop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100407007
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCondition
(
c100407007
.
spcon
)
e2
:
SetTarget
(
c100407007
.
sptg
)
e2
:
SetOperation
(
c100407007
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c100407007
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c100407007
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFacedown
()
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
Equip
(
tp
,
c
,
tc
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c100407007
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e1
)
--race
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_CHANGE_RACE
)
e2
:
SetValue
(
RACE_INSECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2
)
--cannot attack
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e3
:
SetValue
(
c100407007
.
atlimit
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e3
)
--disable
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetLabelObject
(
tc
)
e4
:
SetCondition
(
c100407007
.
discon
)
e4
:
SetOperation
(
c100407007
.
disop
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e4
)
end
function
c100407007
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
c100407007
.
atlimit
(
e
,
c
)
return
c
:
IsRace
(
RACE_INSECT
)
end
function
c100407007
.
disfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsRace
(
RACE_INSECT
)
end
function
c100407007
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
rc
=
re
:
GetHandler
()
if
not
tc
or
rc
~=
tc
then
return
false
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
c100407007
.
disfilter
,
1
,
nil
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c100407007
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
function
c100407007
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c100407007
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_INSECT
)
and
c
:
IsLevelAbove
(
7
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c100407007
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c100407007
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c100407007
.
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
,
c100407007
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
expansions/script/c100407008.lua
0 → 100644
View file @
a205fcdd
--究極変異態・インセクト女王
--Ultimately Mutated Insect Queen
--Scripted by Eerie Code
function
c100407008
.
initial_effect
(
c
)
c
:
EnableUnsummonable
()
--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
(
c100407008
.
splimit
)
c
:
RegisterEffect
(
e1
)
--indes
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
:
SetCondition
(
c100407008
.
indcon
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_INSECT
))
e2
:
SetValue
(
c100407008
.
indval
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetCondition
(
c100407008
.
indcon
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_INSECT
))
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
--chain attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
100407008
,
0
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e4
:
SetCondition
(
c100407008
.
atcon
)
e4
:
SetCost
(
c100407008
.
atcost
)
e4
:
SetOperation
(
c100407008
.
atop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
91512835
,
0
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e5
:
SetCountLimit
(
1
)
e5
:
SetTarget
(
c100407008
.
sptg
)
e5
:
SetOperation
(
c100407008
.
spop
)
c
:
RegisterEffect
(
e4
)
end
function
c100407008
.
splimit
(
e
,
se
,
sp
,
st
)
return
se
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
end
function
c100407008
.
indfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_INSECT
)
end
function
c100407008
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c100407008
.
indfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
function
c100407008
.
indval
(
e
,
re
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
end
function
c100407008
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetAttacker
()
==
c
and
c
:
IsChainAttackable
(
0
,
true
)
end
function
c100407008
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
nil
,
1
,
e
:
GetHandler
())
nd
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
nil
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c100407008
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToBattle
()
then
return
end
Duel
.
ChainAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
+
PHASE_DAMAGE_CAL
)
c
:
RegisterEffect
(
e1
)
end
function
c100407008
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
91512836
,
0
,
0x4011
,
100
,
100
,
1
,
RACE_INSECT
,
ATTRIBUTE_EARTH
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c100407008
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
91512836
,
0
,
0x4011
,
100
,
100
,
1
,
RACE_INSECT
,
ATTRIBUTE_EARTH
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
91512836
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
expansions/script/c100407009.lua
0 → 100644
View file @
a205fcdd
--超進化の繭
--Super Cocoon of Evolution
--Scripted by Eerie Code
function
c100407009
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c100407009
.
target
)
e1
:
SetOperation
(
c100407009
.
activate
)
c
:
RegisterEffect
(
e1
)
--shuffle and draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
100407009
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c100407009
.
tdtg
)
e2
:
SetOperation
(
c100407009
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c100407009
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_INSECT
)
and
c
:
IsReleasableByEffect
()
and
c
:
GetEquipCount
()
>
0
end
function
c100407009
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_INSECT
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
c100407009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
loc
=
LOCATION_MZONE
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
loc
=
0
end
return
Duel
.
IsExistingMatchingCard
(
c100407009
.
cfilter
,
tp
,
LOCATION_MZONE
,
loc
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c100407009
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100407009
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
LOCATION_MZONE
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
loc
=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100407009
.
cfilter
,
tp
,
LOCATION_MZONE
,
loc
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
Release
(
g
,
REASON_EFFECT
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c100407009
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
end
function
c100407009
.
tdfilter
(
c
)
return
c
:
IsRace
(
RACE_INSECT
)
and
c
:
IsAbleToDeck
()
end
function
c100407009
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c100407009
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c100407009
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c100407009
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c100407009
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_DECK
+
LOCATION_EXTRA
)
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c100407014.lua
0 → 100644
View file @
a205fcdd
--BM-4 ボムスパイダー
--BM-4 Bomb Spider
--Scripted by Eerie Code
function
c100407014
.
initial_effect
(
c
)
--Destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100407014
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c100407014
.
destg
)
e1
:
SetOperation
(
c100407014
.
desop
)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100407014
,
0
))
e2
:
SetCategory
(
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
100407014
)
e2
:
SetCondition
(
c100407014
.
damcon1
)
e2
:
SetTarget
(
c100407014
.
damtg
)
e2
:
SetOperation
(
c100407014
.
damop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c100407014
.
damcon2
)
c
:
RegisterEffect
(
e3
)
end
function
c100407014
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
c100407014
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c100407014
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c100407014
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
2
,
0
,
0
)
end
function
c100407014
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
function
c100407014
.
damcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
bc
=
tc
:
GetBattleTarget
()
return
tc
:
GetPreviousControler
()
~=
tp
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
and
bc
:
IsControler
(
tp
)
and
bc
:
GetOriginalAttribute
()
==
ATTRIBUTE_DARK
and
bc
:
GetOriginalRace
()
==
RACE_MACHINE
end
function
c100407014
.
damfilter1
(
c
,
tp
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetPreviousControler
()
~=
tp
end
function
c100407014
.
damcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
return
rc
:
IsControler
(
tp
)
and
rc
:
GetOriginalAttribute
()
==
ATTRIBUTE_DARK
and
rc
:
GetOriginalRace
()
==
RACE_MACHINE
and
eg
:
IsExists
(
c100407014
.
damfilter1
,
1
,
nil
,
tp
)
end
function
c100407014
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
function
c100407014
.
damfilter2
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetPreviousControler
()
~=
tp
end
function
c100407014
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
c100407014
.
damfilter2
,
nil
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
Damage
(
1
-
tp
,
math.ceil
(
g
:
GetFirst
():
GetBaseAttack
()
/
2
),
REASON_EFFECT
)
end
end
expansions/script/c100407015.lua
0 → 100644
View file @
a205fcdd
-- デスペラード・リボルバー・ドラゴン
--Desperado Barrel Dragon
function
c100407015
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
100407015
,
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
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetCondition
(
c100407015
.
condition
)
e1
:
SetTarget
(
c100407015
.
target
)
e1
:
SetOperation
(
c100407015
.
operation
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100407015
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_COIN
+
CATEGORY_DRAW
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c100407015
.
descon
)
e2
:
SetCost
(
c68450517
.
descost
)
e2
:
SetTarget
(
c100407015
.
destg
)
e2
:
SetOperation
(
c100407015
.
desop
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100407015
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetTarget
(
c100407015
.
thtg
)
e3
:
SetOperation
(
c100407015
.
thop
)
c
:
RegisterEffect
(
e3
)
end
c100407015
.
toss_coin
=
true
function
c100407015
.
filter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
bit
.
band
(
c
:
GetPreviousRaceOnField
(),
RACE_MACHINE
)
~=
0
and
bit
.
band
(
c
:
GetPreviousAttributeOnField
(),
ATTRIBUTE_DARK
)
~=
0
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
c100407015
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c100407015
.
filter
,
1
,
nil
,
tp
)
end
function
c100407015
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c100407015
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c100407015
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
)
end
function
c100407015
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetAttackAnnouncedCount
()
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c100407015
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c100407015
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
local
c1
,
c2
,
c3
=
Duel
.
TossCoin
(
tp
,
3
)
local
ct
=
c1
+
c2
+
c3
if
ct
==
0
then
return
end
if
ct
>
g
:
GetCount
()
then
ct
=
g
:
GetCount
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
dg
=
g
:
Select
(
tp
,
1
,
ct
,
nil
)
Duel
.
HintSelection
(
dg
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
if
c1
+
c2
+
c3
==
3
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c100407015
.
thfilter
(
c
)
return
c
.
toss_coin
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsLevelBelow
(
7
)
and
c
:
IsAbleToHand
()
end
function
c100407015
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100407015
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c100407015
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100407015
.
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
expansions/script/c100407017.lua
0 → 100644
View file @
a205fcdd
--銃砲撃
--Gun Cannon Shot
--Script by nekrozar
function
c100407017
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--coin
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c100407017
.
regcon
)
e2
:
SetOperation
(
c100407017
.
regop
)
c
:
RegisterEffect
(
e2
)
--coin result
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100407017
,
0
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCondition
(
c100407017
.
coincon1
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetOperation
(
c100407017
.
coinop1
)
c
:
RegisterEffect
(
e3
)
end
function
c100407017
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ex
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_COIN
)
return
ex
end
function
c100407017
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_TOSS_COIN
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCondition
(
c100407017
.
effcon
)
e1
:
SetOperation
(
c100407017
.
effop
)
e1
:
SetLabelObject
(
re
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
+
RESET_CHAIN
)
c
:
RegisterEffect
(
e1
)
end
function
c100407017
.
effcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
==
e
:
GetLabelObject
()
end
function
c100407017
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
100407017
)
local
ct
=
0
local
res
=
{
Duel
.
GetCoinResult
()}
for
i
=
1
,
ev
do
if
res
[
i
]
==
1
then
ct
=
ct
+
1
end
end
if
ct
>
0
then
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
)
end
if
ct
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
if
ct
>
2
then
local
hg
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
if
hg
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
tp
,
hg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
sg
=
hg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_DISCARD
)
Duel
.
ShuffleHand
(
1
-
tp
)
end
end
end
function
c100407017
.
coincon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ex
,
eg
,
et
,
cp
,
ct
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_COIN
)
if
ex
and
ct
>
1
then
e
:
SetLabelObject
(
re
)
return
true
else
return
false
end
end
function
c100407017
.
coinop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_TOSS_COIN_NEGATE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c100407017
.
coincon2
)
e1
:
SetOperation
(
c100407017
.
coinop2
)
e1
:
SetLabelObject
(
e
:
GetLabelObject
())
e1
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c100407017
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
==
e
:
GetLabelObject
()
end
function
c100407017
.
coinop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
res
=
{
Duel
.
GetCoinResult
()}
local
ct
=
ev
for
i
=
1
,
ct
do
res
[
i
]
=
1
end
Duel
.
SetCoinResult
(
table.unpack
(
res
))
end
expansions/script/c100420001.lua
deleted
100644 → 0
View file @
7dcb2cff
--サブテラーマリスの妖魔
--Subterror Behemoth Apparition
--Script by nekrozar
function
c100420001
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_FLIP
),
2
,
2
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e1
:
SetValue
(
c100420001
.
matcheck
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100420001
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
100420001
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c100420001
.
tgtg
)
e2
:
SetOperation
(
c100420001
.
tgop
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
100420001
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_FLIP
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c100420001
.
thcon
)
e3
:
SetTarget
(
c100420001
.
thtg
)
e3
:
SetOperation
(
c100420001
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c100420001
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xed
)
and
c
:
GetOriginalLevel
()
>=
0
end
function
c100420001
.
matcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
():
Filter
(
c100420001
.
matfilter
,
nil
)
local
atk
=
g
:
GetSum
(
Card
.
GetOriginalLevel
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
*
100
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
end
function
c100420001
.
tgfilter
(
c
)
return
c
:
IsType
(
TYPE_FLIP
)
and
c
:
IsAbleToGrave
()
end
function
c100420001
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
,
tp
,
zone
)
end
function
c100420001
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c100420001
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c100420001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c100420001
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100420001
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c100420001
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
zone
~=
0
and
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
,
zone
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
function
c100420001
.
cfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
end
function
c100420001
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
return
lg
and
eg
:
IsExists
(
c100420001
.
cfilter
,
1
,
nil
,
lg
)
end
function
c100420001
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_FLIP
)
and
c
:
IsAbleToHand
()
end
function
c100420001
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c100420001
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c100420001
.
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
expansions/script/c100420018.lua
deleted
100644 → 0
View file @
7dcb2cff
--SPYRAL-ザ・ダブルヘリックス
--SPYRAL - The Double Helix
--Script by nekrozar
function
c100420018
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xee
),
2
,
2
)
--change name
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e1
:
SetValue
(
41091257
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
100420018
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
100420018
)
e2
:
SetTarget
(
c100420018
.
sptg
)
e2
:
SetOperation
(
c100420018
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c100420018
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsSetCard
(
0xee
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
(
zone
~=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)))
end
function
c100420018
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c100420018
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
e
:
SetLabel
(
Duel
.
SelectOption
(
tp
,
70
,
71
,
72
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c100420018
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
==
0
then
return
end
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
tc
=
g
:
GetFirst
()
local
opt
=
e
:
GetLabel
()
if
(
opt
==
0
and
tc
:
IsType
(
TYPE_MONSTER
))
or
(
opt
==
1
and
tc
:
IsType
(
TYPE_SPELL
))
or
(
opt
==
2
and
tc
:
IsType
(
TYPE_TRAP
))
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c100420018
.
spfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
local
sc
=
sg
:
GetFirst
()
if
sc
then
if
zone
~=
0
and
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
and
(
not
sc
:
IsAbleToHand
()
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
100420018
,
1
)))
then
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
else
Duel
.
SendtoHand
(
sc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
end
end
end
end
expansions/script/c101003002.lua
0 → 100644
View file @
a205fcdd
--ロックアウト・ガードナー
--Lockout Gardna
--Script by nekrozar
function
c101003002
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003002
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c101003002
.
spcon
)
e1
:
SetTarget
(
c101003002
.
sptg
)
e1
:
SetOperation
(
c101003002
.
spop
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003002
,
1
))
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c101003002
.
discon
)
e2
:
SetTarget
(
c101003002
.
distg
)
e2
:
SetOperation
(
c101003002
.
disop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003002
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
GetControler
()
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
end
function
c101003002
.
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
,
POS_FACEUP_ATTACK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c101003002
.
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_ATTACK
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c101003002
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
==
tp
or
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
or
g
:
GetCount
()
~=
1
then
return
false
end
local
tc
=
g
:
GetFirst
()
e
:
SetLabelObject
(
tc
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsRace
(
RACE_CYBERSE
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
end
function
c101003002
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
e
:
GetLabelObject
()
if
chk
==
0
then
return
true
end
local
g
=
Group
.
FromCards
(
tc
,
re
:
GetHandler
())
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
2
,
0
,
0
)
end
function
c101003002
.
disfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
end
function
c101003002
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
c101003002
.
disfilter
,
nil
,
e
)
local
tc
=
g
:
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
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
expansions/script/c101003007.lua
0 → 100644
View file @
a205fcdd
--シェルヴァレット・ドラゴン
--Shellrokket Dragon
--Scripted by Eerie Code
function
c101003007
.
initial_effect
(
c
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003007
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
101003007
)
e1
:
SetCondition
(
c101003007
.
descon
)
e1
:
SetTarget
(
c101003007
.
destg
)
e1
:
SetOperation
(
c101003007
.
desop
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetOperation
(
c101003007
.
regop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003007
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
or
not
g
:
IsContains
(
c
)
then
return
false
end
return
re
:
IsActiveType
(
TYPE_LINK
)
end
function
c101003007
.
desfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
end
function
c101003007
.
desfilter2
(
c
,
s
)
local
seq
=
c
:
GetSequence
()
return
seq
<
5
and
math.abs
(
seq
-
s
)
==
1
end
function
c101003007
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c101003007
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
:
GetColumnGroup
())
if
chk
==
0
then
return
c
:
IsDestructable
()
and
g
:
GetCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
end
function
c101003007
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
lg
=
c
:
GetColumnGroup
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c101003007
.
desfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
lg
)
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
BreakEffect
()
local
tc
=
nil
if
g
:
GetCount
()
==
1
then
tc
=
g
:
GetFirst
()
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
seq
=
tc
:
GetSequence
()
local
dg
=
Group
.
CreateGroup
()
if
seq
<
5
then
dg
=
Duel
.
GetMatchingGroup
(
c101003007
.
desfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
seq
)
end
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
dg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
end
end
end
function
c101003007
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003007
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
,
101003007
+
100
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetTarget
(
c101003007
.
sptg
)
e1
:
SetOperation
(
c101003007
.
spop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c101003007
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x102
)
and
not
c
:
IsCode
(
101003007
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003007
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003007
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003007
.
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
,
c101003007
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c101003009.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・エンジェル
--Tindangle Angel
function
c101003009
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003009
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
101003009
)
e1
:
SetTarget
(
c101003009
.
target
)
e1
:
SetOperation
(
c101003009
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c101003009
.
filter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_FLIP
)
and
not
c
:
IsCode
(
101003009
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
end
function
c101003009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003009
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c101003009
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c101003009
.
filter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
ph
=
Duel
.
GetCurrentPhase
()
if
tp
~=
Duel
.
GetTurnPlayer
()
and
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
expansions/script/c101003010.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・ベース・ガードナー
--Tindangle Base Gardna
function
c101003010
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetTargetRange
(
POS_FACEUP_DEFENSE
,
0
)
e1
:
SetCountLimit
(
1
,
101003010
)
e1
:
SetCondition
(
c101003010
.
condition
)
c
:
RegisterEffect
(
e1
)
--Special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003010
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c101003010
.
spcost
)
e2
:
SetCondition
(
c101003010
.
spcon
)
e2
:
SetTarget
(
c101003010
.
sptg
)
e2
:
SetOperation
(
c101003010
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c101003010
.
filter
(
c
)
return
c
:
IsFacedown
()
end
function
c101003010
.
condition
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003010
.
filter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c101003010
.
cfilter
(
c
,
tp
,
zone
)
local
seq
=
c
:
GetSequence
()
if
c
:
IsControler
(
1
-
tp
)
then
seq
=
seq
+
16
end
return
bit
.
extract
(
zone
,
seq
)
~=
0
end
function
c101003010
.
lkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
end
function
c101003010
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
0
local
lg
=
Duel
.
GetMatchingGroup
(
c101003010
.
lkfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
for
tc
in
aux
.
Next
(
lg
)
do
zone
=
bit
.
bor
(
zone
,
tc
:
GetLinkedZone
())
end
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c101003010
.
cfilter
,
1
,
nil
,
tp
,
zone
)
end
function
c101003010
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c101003010
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x20b
)
and
(
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
or
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
))
end
function
c101003010
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c101003010
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
c101003010
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c101003010
.
spfilter
),
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
spos
=
0
if
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
then
spos
=
spos
+
POS_FACEUP_ATTACK
end
if
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
then
spos
=
spos
+
POS_FACEDOWN_DEFENSE
end
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
spos
)
if
tc
:
IsFacedown
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
expansions/script/c101003011.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・ハウンド
--Tindangle Hound
function
c101003011
.
initial_effect
(
c
)
--flip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003011
,
0
))
e1
:
SetCategory
(
CATEGORY_POSITION
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c101003011
.
target
)
e1
:
SetOperation
(
c101003011
.
operation
)
c
:
RegisterEffect
(
e1
)
--atk down
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetValue
(
c101003011
.
val
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003011
,
1
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCategory
(
CATEGORY_POSITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c101003011
.
poscon
)
e3
:
SetTarget
(
c101003011
.
postg
)
e3
:
SetOperation
(
c101003011
.
posop
)
c
:
RegisterEffect
(
e3
)
end
function
c101003011
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
and
c
:
GetBaseAttack
()
>
0
end
function
c101003011
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c101003011
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003011
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c101003011
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
e
:
GetHandler
())
end
function
c101003011
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
atk
=
tc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
end
end
function
c101003011
.
val
(
e
,
c
)
return
c
:
GetLinkedGroupCount
()
*-
1000
end
function
c101003011
.
poscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
end
function
c101003011
.
posfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsCanChangePosition
()
end
function
c101003011
.
postg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c101003011
.
posfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003011
.
posfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
Duel
.
SelectTarget
(
tp
,
c101003011
.
posfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c101003011
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsPosition
(
POS_FACEUP_DEFENSE
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
end
end
expansions/script/c101003012.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・アポストル
--Tindangle Apostle
--Script by nekrozar
function
c101003012
.
initial_effect
(
c
)
--flip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003012
,
0
))
e1
:
SetCategory
(
CATEGORY_POSITION
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
101003012
)
e1
:
SetTarget
(
c101003012
.
target
)
e1
:
SetOperation
(
c101003012
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c101003012
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFacedown
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
nil
,
1
,
0
,
0
)
end
function
c101003012
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsAbleToHand
()
end
function
c101003012
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFacedown
,
tp
,
LOCATION_MZONE
,
0
,
1
,
3
,
nil
)
if
g
:
GetCount
()
>
0
then
local
ct
=
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
if
ct
==
g
:
GetCount
()
and
g
:
IsExists
(
Card
.
IsSetCard
,
ct
,
nil
,
0x20b
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c101003012
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003012
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
sg
:
Select
(
tp
,
1
,
ct
,
nil
)
Duel
.
SendtoHand
(
tg
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
end
end
expansions/script/c101003013.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・イントルーダー
--Tindangle Intruder
--Script by nekrozar
function
c101003013
.
initial_effect
(
c
)
--flip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003013
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
101003013
)
e1
:
SetTarget
(
c101003013
.
target
)
e1
:
SetOperation
(
c101003013
.
operation
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003013
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
101003113
)
e2
:
SetTarget
(
c101003013
.
tgtg
)
e2
:
SetOperation
(
c101003013
.
tgop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003013
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
101003213
)
e3
:
SetCondition
(
c101003013
.
spcon
)
e3
:
SetTarget
(
c101003013
.
sptg
)
e3
:
SetOperation
(
c101003013
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c101003013
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsAbleToHand
()
end
function
c101003013
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003013
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003013
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003013
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c101003013
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsAbleToGrave
()
end
function
c101003013
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003013
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003013
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003013
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c101003013
.
cfilter
(
c
,
tp
)
return
c
:
IsPosition
(
POS_FACEDOWN_DEFENSE
)
and
c
:
IsControler
(
tp
)
end
function
c101003013
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c101003013
.
cfilter
,
1
,
nil
,
tp
)
end
function
c101003013
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c101003013
.
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_FACEDOWN_DEFENSE
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
expansions/script/c101003014.lua
0 → 100644
View file @
a205fcdd
--蒼穹の機界騎士
--Mekk-Knight of the Blue Sky
--Scripted by Eerie Code
function
c101003014
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003014
)
e1
:
SetCondition
(
c101003014
.
hspcon
)
e1
:
SetValue
(
c101003014
.
hspval
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003014
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
101003014
+
100
)
e2
:
SetTarget
(
c101003014
.
thtg
)
e2
:
SetOperation
(
c101003014
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCondition
(
c101003014
.
thcon
)
c
:
RegisterEffect
(
e3
)
end
function
c101003014
.
cfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_SZONE
)
and
s
==
5
then
return
false
end
if
c
:
IsControler
(
tp
)
then
return
s
==
seq
or
(
seq
==
1
and
s
==
5
)
or
(
seq
==
3
and
s
==
6
)
else
return
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
)
end
end
function
c101003014
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003014
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c101003014
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003014
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
0
,
zone
end
function
c101003014
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
end
function
c101003014
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
101003014
)
and
c
:
IsAbleToHand
()
end
function
c101003014
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c101003014
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ct
=
e
:
GetHandler
():
GetColumnGroup
():
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
if
chk
==
0
then
return
ct
>
0
and
g
:
GetClassCount
(
Card
.
GetCode
)
>=
ct
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
ct
,
tp
,
LOCATION_DECK
)
end
function
c101003014
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c101003014
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ct
=
e
:
GetHandler
():
GetColumnGroup
():
FilterCount
(
Card
.
IsControler
,
nil
,
1
-
tp
)
if
ct
<=
0
or
g
:
GetClassCount
(
Card
.
GetCode
)
<
ct
then
return
end
local
hg
=
Group
.
CreateGroup
()
for
i
=
1
,
ct
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
hg
:
AddCard
(
tc
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
tc
:
GetCode
())
end
Duel
.
SendtoHand
(
hg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
end
expansions/script/c101003015.lua
0 → 100644
View file @
a205fcdd
--翠嵐の機界騎士
--Mekk-Knight of the Green Heights
--Scripted by Eerie Code
function
c101003015
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003015
)
e1
:
SetCondition
(
c101003015
.
hspcon
)
e1
:
SetValue
(
c101003015
.
hspval
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003015
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c101003015
.
thcon
)
e2
:
SetTarget
(
c101003015
.
thtg
)
e2
:
SetOperation
(
c101003015
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003015
.
cfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_SZONE
)
and
s
==
5
then
return
false
end
if
c
:
IsControler
(
tp
)
then
return
s
==
seq
or
(
seq
==
1
and
s
==
5
)
or
(
seq
==
3
and
s
==
6
)
else
return
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
)
end
end
function
c101003015
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003015
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c101003015
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003015
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
0
,
zone
end
function
c101003015
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetBattleTarget
()
return
(
Duel
.
GetAttacker
()
==
c
or
Duel
.
GetAttackTarget
()
==
c
)
and
tc
and
c
:
GetColumnGroup
():
IsContains
(
tc
)
end
function
c101003015
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c101003015
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c101003015
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003015
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003015
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c101003015
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c101003016.lua
0 → 100644
View file @
a205fcdd
--燈影の機界騎士
--Mekk-Knight of the Flickering Flame
--Scripted by Eerie Code
function
c101003016
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003016
)
e1
:
SetCondition
(
c101003016
.
hspcon
)
e1
:
SetValue
(
c101003016
.
hspval
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003016
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCondition
(
c101003016
.
spcon
)
e2
:
SetTarget
(
c101003016
.
sptg
)
e2
:
SetOperation
(
c101003016
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003016
.
cfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_SZONE
)
and
s
==
5
then
return
false
end
if
c
:
IsControler
(
tp
)
then
return
s
==
seq
or
(
seq
==
1
and
s
==
5
)
or
(
seq
==
3
and
s
==
6
)
else
return
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
)
end
end
function
c101003016
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003016
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c101003016
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003016
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
0
,
zone
end
function
c101003016
.
spcfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetPreviousSequence
()
return
c
:
GetPreviousControler
()
~=
tp
and
(
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
))
end
function
c101003016
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c101003016
.
spcfilter
,
1
,
nil
,
tp
,
e
:
GetHandler
():
GetSequence
())
end
function
c101003016
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003016
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003016
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c101003016
.
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
,
c101003016
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c101003017.lua
0 → 100644
View file @
a205fcdd
--黄華の機界騎士
--Mekk-Knight of the Yellow Bloom
--Scripted by Eerie Code
function
c101003017
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003017
)
e1
:
SetCondition
(
c101003017
.
hspcon
)
e1
:
SetValue
(
c101003017
.
hspval
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003017
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c101003017
.
cost
)
e3
:
SetTarget
(
c101003017
.
target
)
e3
:
SetOperation
(
c101003017
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c101003017
.
cfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_SZONE
)
and
s
==
5
then
return
false
end
if
c
:
IsControler
(
tp
)
then
return
s
==
seq
or
(
seq
==
1
and
s
==
5
)
or
(
seq
==
3
and
s
==
6
)
else
return
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
)
end
end
function
c101003017
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003017
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c101003017
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003017
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
0
,
zone
end
function
c101003017
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c101003017
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003017
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003017
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c101003017
.
filter
(
c
,
g
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
g
:
IsContains
(
c
)
end
function
c101003017
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
cg
=
e
:
GetHandler
():
GetColumnGroup
()
if
chkc
then
return
c101003017
.
filter
(
chkc
,
cg
)
and
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003017
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
,
cg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003017
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
cg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c101003017
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c101003018.lua
0 → 100644
View file @
a205fcdd
--紅蓮の機界騎士
--Mekk-Knight of the Crimson Lotus
--Scripted by Eerie Code
function
c101003018
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003018
)
e1
:
SetCondition
(
c101003018
.
hspcon
)
e1
:
SetValue
(
c101003018
.
hspval
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003018
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c101003018
.
cost
)
e3
:
SetTarget
(
c101003018
.
target
)
e3
:
SetOperation
(
c101003018
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c101003018
.
cfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_SZONE
)
and
s
==
5
then
return
false
end
if
c
:
IsControler
(
tp
)
then
return
s
==
seq
or
(
seq
==
1
and
s
==
5
)
or
(
seq
==
3
and
s
==
6
)
else
return
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
)
end
end
function
c101003018
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003018
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c101003018
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003018
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
0
,
zone
end
function
c101003018
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c101003018
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003018
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003018
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c101003018
.
filter
(
c
,
g
)
return
c
:
IsFaceup
()
and
g
:
IsContains
(
c
)
end
function
c101003018
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
cg
=
c
:
GetColumnGroup
()
if
chkc
then
return
c101003018
.
filter
(
chkc
,
cg
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003018
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
,
cg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003018
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
c
,
cg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c101003018
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c101003020.lua
0 → 100644
View file @
a205fcdd
--紫宵の機界騎士
--Mekk-Knight of the Purple Dusk
--Scripted by Eerie Code
function
c101003020
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
101003020
)
e1
:
SetCondition
(
c101003020
.
hspcon
)
e1
:
SetValue
(
c101003020
.
hspval
)
c
:
RegisterEffect
(
e1
)
--banish & search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003020
,
0
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
101003020
+
100
)
e2
:
SetTarget
(
c101003020
.
thtg
)
e2
:
SetOperation
(
c101003020
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003020
.
cfilter
(
c
,
tp
,
seq
)
local
s
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_SZONE
)
and
s
==
5
then
return
false
end
if
c
:
IsControler
(
tp
)
then
return
s
==
seq
or
(
seq
==
1
and
s
==
5
)
or
(
seq
==
3
and
s
==
6
)
else
return
s
==
4
-
seq
or
(
seq
==
1
and
s
==
6
)
or
(
seq
==
3
and
s
==
5
)
end
end
function
c101003020
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003020
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c101003020
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
local
zone
=
0
for
i
=
0
,
4
do
if
Duel
.
GetMatchingGroupCount
(
c101003020
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
,
i
)
>=
2
then
zone
=
zone
+
math.pow
(
2
,
i
)
end
end
return
0
,
zone
end
function
c101003020
.
rmfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
and
c
:
IsAbleToRemove
()
end
function
c101003020
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
101003020
)
and
c
:
IsAbleToHand
()
end
function
c101003020
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c101003020
.
rmfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003020
.
rmfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c101003020
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003020
.
rmfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003020
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
and
tc
:
IsLocation
(
LOCATION_REMOVED
)
then
local
ct
=
1
if
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
ct
=
2
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c101003020
.
retcon
)
e1
:
SetOperation
(
c101003020
.
retop
)
if
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
e1
:
SetReset
(
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
2
)
e1
:
SetValue
(
Duel
.
GetTurnCount
())
else
e1
:
SetReset
(
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
)
e1
:
SetValue
(
0
)
end
Duel
.
RegisterEffect
(
e1
,
tp
)
tc
:
RegisterFlagEffect
(
101003020
,
RESET_PHASE
+
PHASE_STANDBY
+
RESET_SELF_TURN
,
0
,
ct
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003020
.
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
end
function
c101003020
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetTurnPlayer
()
~=
tp
or
Duel
.
GetTurnCount
()
==
e
:
GetValue
()
then
return
false
end
return
e
:
GetLabelObject
():
GetFlagEffect
(
101003020
)
~=
0
end
function
c101003020
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
ReturnToField
(
tc
)
end
expansions/script/c101003039.lua
0 → 100644
View file @
a205fcdd
--アンダークロックテイカー
--Underclock Taker
--Script by nekrozar
function
c101003039
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_EFFECT
),
2
,
2
)
c
:
EnableReviveLimit
()
--atkdown
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101003039
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c101003039
.
atktg
)
e1
:
SetOperation
(
c101003039
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c101003039
.
atkfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
GetAttack
()
>
0
and
g
:
IsContains
(
c
)
end
function
c101003039
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003039
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
lg
)
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003039
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
lg
)
e
:
SetLabelObject
(
g
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c101003039
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
then
local
atk
=
tc1
:
GetAttack
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc2
:
RegisterEffect
(
e1
)
end
end
expansions/script/c101003045.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・アキュート・ケルベロス
--Tindangle Acute Cerberus
function
c101003045
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x20b
),
3
,
3
)
--atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c101003045
.
atkcon
)
e1
:
SetValue
(
3000
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c101003045
.
atkval
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003045
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c101003045
.
spcon
)
e3
:
SetTarget
(
c101003045
.
sptg
)
e3
:
SetOperation
(
c101003045
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c101003045
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c101003045
.
atkcon
(
e
)
local
g
=
Duel
.
GetMatchingGroup
(
c101003045
.
cfilter
,
e
:
GetHandler
():
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
and
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
101003010
)
end
function
c101003045
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20b
)
end
function
c101003045
.
atkval
(
e
,
c
)
return
c
:
GetLinkedGroup
():
FilterCount
(
c101003045
.
atkfilter
,
nil
)
*
600
end
function
c101003045
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetAttackedCount
()
>
0
end
function
c101003045
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
101003145
,
0x20b
,
0x4011
,
0
,
0
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c101003045
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
101003145
,
0x20b
,
0x4011
,
0
,
0
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
then
return
end
local
token
=
Duel
.
CreateToken
(
tp
,
101003145
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
expansions/script/c101003046.lua
0 → 100644
View file @
a205fcdd
--オルターガイスト・ヘクスティア
--Altergeist Hextia
--Scripted by Eerie Code
function
c101003046
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x103
),
2
,
2
)
--atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c101003046
.
atkval
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003046
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c101003046
.
discon
)
e2
:
SetCost
(
c101003046
.
discost
)
e2
:
SetTarget
(
c101003046
.
distg
)
e2
:
SetOperation
(
c101003046
.
disop
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
101003046
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
101003046
)
e3
:
SetCondition
(
c101003046
.
thcon
)
e3
:
SetTarget
(
c101003046
.
thtg
)
e3
:
SetOperation
(
c101003046
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c101003046
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x103
)
and
c
:
GetBaseAttack
()
>=
0
end
function
c101003046
.
atkval
(
e
,
c
)
local
lg
=
c
:
GetLinkedGroup
():
Filter
(
c101003046
.
atkfilter
,
nil
)
return
g
:
GetSum
(
Card
.
GetBaseAttack
)
end
function
c101003046
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c101003046
.
cfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x103
)
and
g
:
IsContains
(
c
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c101003046
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c101003046
.
cfilter
,
1
,
nil
,
lg
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c101003046
.
cfilter
,
1
,
1
,
nil
,
lg
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c101003046
.
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
c101003046
.
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
c101003046
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c101003046
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x103
)
and
c
:
IsAbleToHand
()
end
function
c101003046
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003046
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003046
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003046
.
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
expansions/script/c101003047.lua
0 → 100644
View file @
a205fcdd
--星痕の機界騎士
--Mekk-Knight of the World Remains
--Scripted by Eerie Code
function
c101003047
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x20c
),
2
)
--direct attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetCondition
(
c101003047
.
dircon
)
c
:
RegisterEffect
(
e1
)
--cannot be target/effect indestructable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c101003047
.
indcon
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
101003047
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
101003047
)
e4
:
SetCost
(
c101003047
.
spcost
)
e4
:
SetTarget
(
c101003047
.
sptg
)
e4
:
SetOperation
(
c101003047
.
spop
)
c
:
RegisterEffect
(
e4
)
end
function
c101003047
.
dircon
(
e
)
return
e
:
GetHandler
():
GetColumnGroupCount
()
==
0
end
function
c101003047
.
indcon
(
e
)
local
c
=
e
:
GetHandler
()
return
c
:
GetSequence
()
>
4
and
c
:
GetLinkedGroupCount
()
==
0
end
function
c101003047
.
spcfilter
(
c
,
hc
)
return
c
:
GetColumnGroup
():
IsContains
(
hc
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c101003047
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c101003047
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
loc
=
LOCATION_ONFIELD
if
ft
<=
0
then
loc
=
LOCATION_MZONE
end
if
chk
==
0
then
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c101003047
.
spcfilter
,
tp
,
loc
,
0
,
1
,
c
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003047
.
spcfilter
,
tp
,
loc
,
0
,
1
,
1
,
c
,
c
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c101003047
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003047
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003047
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003047
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
expansions/script/c101003052.lua
View file @
a205fcdd
...
...
@@ -14,7 +14,7 @@ function c101003052.initial_effect(c)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_DRAGON
))
e2
:
SetValue
(
5
00
)
e2
:
SetValue
(
3
00
)
c
:
RegisterEffect
(
e2
)
--cannot link summon
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -84,7 +84,7 @@ function c101003052.atktg(e,c)
return
not
c
:
IsType
(
TYPE_LINK
)
end
function
c101003052
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
Is
Type
(
RACE_CYBERSE
)
return
c
:
IsFaceup
()
and
c
:
Is
Race
(
RACE_CYBERSE
)
and
c
:
IsType
(
TYPE_LINK
)
end
function
c101003052
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c101003052
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
1
...
...
@@ -97,5 +97,5 @@ function c101003052.limcon(e)
return
Duel
.
GetMatchingGroupCount
(
c101003052
.
cfilter
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>
1
end
function
c101003052
.
atlimit
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
Is
Typ
e
(
RACE_CYBERSE
)
return
c
:
IsFaceup
()
and
c
:
Is
Rac
e
(
RACE_CYBERSE
)
end
expansions/script/c101003054.lua
0 → 100644
View file @
a205fcdd
--ナーゲルの守護天
--Protected Sky of Nagel
--Scripted by Eerie Code
function
c101003054
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
c101003054
.
indtg
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetValue
(
c101003054
.
indval
)
c
:
RegisterEffect
(
e3
)
--double damage
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetTargetRange
(
0
,
1
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetValue
(
c101003054
.
damval
)
c
:
RegisterEffect
(
e4
)
--search
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCountLimit
(
1
,
101003054
)
e5
:
SetCost
(
c101003054
.
thcost
)
e5
:
SetTarget
(
c101003054
.
thtg
)
e5
:
SetOperation
(
c101003054
.
thop
)
c
:
RegisterEffect
(
e5
)
end
function
c101003054
.
indtg
(
e
,
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
GetSequence
()
<
5
end
function
c101003054
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
local
tp
=
e
:
GetHandlerPlayer
()
if
Duel
.
GetFlagEffect
(
tp
,
101003054
)
~=
0
or
bit
.
band
(
r
,
REASON_BATTLE
)
==
0
or
not
rc
:
IsSetCard
(
0x20b
)
or
not
rc
:
IsControler
(
tp
)
then
return
val
end
Duel
.
ResetFlagEffect
(
tp
,
101003054
)
return
val
*
2
end
function
c101003054
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsDiscardable
()
end
function
c101003054
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c101003054
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
DiscardHand
(
tp
,
c101003054
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c101003054
.
filter
(
c
)
return
c
:
IsCode
(
101003054
)
and
c
:
IsAbleToHand
()
end
function
c101003054
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003054
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003054
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c101003054
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tc
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c101003055.lua
0 → 100644
View file @
a205fcdd
--オイラーサーキット
--Euler Circuit
--Scripted by Eerie Code
function
c101003055
.
initial_effect
(
c
)
--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
(
0
,
LOCATION_MZONE
)
e2
:
SetCondition
(
c101003055
.
atkcon
)
c
:
RegisterEffect
(
e2
)
--give control
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_CONTROL
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c101003055
.
ctcon
)
e3
:
SetTarget
(
c101003055
.
cttg
)
e3
:
SetOperation
(
c101003055
.
ctop
)
c
:
RegisterEffect
(
e3
)
--search
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCountLimit
(
1
,
101003055
)
e5
:
SetCost
(
c101003055
.
thcost
)
e5
:
SetTarget
(
c101003055
.
thtg
)
e5
:
SetOperation
(
c101003055
.
thop
)
c
:
RegisterEffect
(
e5
)
end
function
c101003055
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20b
)
end
function
c101003055
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c101003055
.
atkfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
3
,
nil
)
end
function
c101003055
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c101003055
.
ctfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20b
)
and
c
:
IsAbleToChangeControler
()
end
function
c101003055
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c101003055
.
ctfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003055
.
ctfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONTROL
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003055
.
ctfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
g
,
1
,
0
,
0
)
end
function
c101003055
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
tp
)
then
Duel
.
GetControl
(
tc
,
1
-
tp
)
end
end
function
c101003055
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsDiscardable
()
end
function
c101003055
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c101003055
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
DiscardHand
(
tp
,
c101003055
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c101003055
.
filter
(
c
)
return
c
:
IsCode
(
101003055
)
and
c
:
IsAbleToHand
()
end
function
c101003055
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003055
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003055
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c101003055
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tc
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c101003056.lua
0 → 100644
View file @
a205fcdd
--星遺物が刻む傷痕
--Wounds Carved on the World Legacy
--Script by nekrozar
function
c101003056
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--atk/def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x20c
))
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetValue
(
300
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
--draw
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
101003056
,
0
))
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCost
(
c101003056
.
drcost
)
e4
:
SetTarget
(
c101003056
.
drtg
)
e4
:
SetOperation
(
c101003056
.
drop
)
c
:
RegisterEffect
(
e4
)
--to grave
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
101003056
,
1
))
e5
:
SetCategory
(
CATEGORY_TOGRAVE
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetCost
(
c101003056
.
tgcost
)
e5
:
SetTarget
(
c101003056
.
tgtg
)
e5
:
SetOperation
(
c101003056
.
tgop
)
c
:
RegisterEffect
(
e5
)
end
function
c101003056
.
costfilter1
(
c
)
return
((
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
))
or
c
:
IsSetCard
(
0xfe
))
and
c
:
IsDiscardable
()
end
function
c101003056
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101003056
.
costfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
DiscardHand
(
tp
,
c101003056
.
costfilter1
,
1
,
1
,
REASON_DISCARD
+
REASON_COST
)
end
function
c101003056
.
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
c101003056
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
c101003056
.
costfilter2
(
c
)
return
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsAbleToRemoveAsCost
()
end
function
c101003056
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c101003056
.
costfilter2
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
6
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
local
rg
=
Group
.
CreateGroup
()
for
i
=
1
,
6
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
rg
:
AddCard
(
sg
:
GetFirst
())
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
():
GetCode
())
end
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
end
function
c101003056
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_EXTRA
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_EXTRA
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c101003056
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_EXTRA
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
expansions/script/c101003057.lua
0 → 100644
View file @
a205fcdd
--星遺物へと至る鍵
--Key to World Legacy
--Script by nekrozar
function
c101003057
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c101003057
.
target
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c101003057
.
discon
)
e2
:
SetOperation
(
c101003057
.
disop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003057
.
thfilter
(
c
)
return
((
c
:
IsSetCard
(
0x20c
)
and
c
:
IsType
(
TYPE_MONSTER
))
or
c
:
IsSetCard
(
0xfe
))
and
c
:
IsAbleToHand
()
end
function
c101003057
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c101003057
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
true
end
if
Duel
.
IsExistingTarget
(
c101003057
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003057
,
0
))
then
e
:
SetCategory
(
CATEGORY_TOHAND
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetOperation
(
c101003057
.
activate
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003057
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
else
e
:
SetCategory
(
0
)
e
:
SetProperty
(
0
)
e
:
SetOperation
(
nil
)
end
end
function
c101003057
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c101003057
.
cfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
end
function
c101003057
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_TRAP
)
and
re
:
GetHandler
():
GetColumnGroup
():
FilterCount
(
c101003057
.
cfilter
,
nil
,
tp
)
>
0
end
function
c101003057
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
expansions/script/c101003059.lua
0 → 100644
View file @
a205fcdd
--栄光の聖騎士団
--Glory of the Noble Knights
--Script by nekrozar
function
c101003059
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
101003059
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c101003059
.
target
)
e1
:
SetOperation
(
c101003059
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c101003059
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107a
)
and
Duel
.
IsExistingMatchingCard
(
c101003059
.
eqfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c101003059
.
eqfilter
(
c
,
tc
,
tp
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
CheckEquipTarget
(
tc
)
and
c
:
CheckUniqueOnField
(
tp
)
and
not
c
:
IsForbidden
()
end
function
c101003059
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c101003059
.
filter
(
chkc
,
tp
)
end
local
ft
=
0
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
ft
=
1
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
ft
and
Duel
.
IsExistingTarget
(
c101003059
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c101003059
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
end
function
c101003059
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsControler
(
tp
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003059
.
eqfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tc
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
Equip
(
tp
,
g
:
GetFirst
(),
tc
)
end
end
end
expansions/script/c101003063.lua
0 → 100644
View file @
a205fcdd
--ダウンビート
--Downbeat
--Script by nekrozar
function
c101003063
.
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
,
101003063
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c101003063
.
cost
)
e1
:
SetTarget
(
c101003063
.
target
)
e1
:
SetOperation
(
c101003063
.
activate
)
e1
:
SetLabel
(
0
)
c
:
RegisterEffect
(
e1
)
end
function
c101003063
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
if
chk
==
0
then
return
true
end
end
function
c101003063
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetOriginalLevel
()
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003063
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
,
e
,
tp
)
end
function
c101003063
.
spfilter
(
c
,
tc
,
e
,
tp
)
return
c
:
GetOriginalLevel
()
==
tc
:
GetOriginalLevel
()
-
1
and
c
:
GetOriginalRace
()
==
tc
:
GetOriginalRace
()
and
c
:
GetOriginalAttribute
()
==
tc
:
GetOriginalAttribute
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003063
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
GetLabel
()
~=
100
then
return
false
end
e
:
SetLabel
(
0
)
return
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
CheckReleaseGroup
(
tp
,
c101003063
.
costfilter
,
1
,
nil
,
e
,
tp
)
end
e
:
SetLabel
(
0
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c101003063
.
costfilter
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c101003063
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003063
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tc
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c101003066.lua
View file @
a205fcdd
...
...
@@ -9,7 +9,7 @@ function c101003066.initial_effect(c)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c101003066
.
target
)
e1
:
SetOperation
(
c101003066
.
activate
)
e1
:
SetOperation
(
c101003066
.
operation
)
c
:
RegisterEffect
(
e1
)
--extra attack
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c101003069.lua
0 → 100644
View file @
a205fcdd
--ティンダングル・ドロネー
--Tindangle Dalaunay
--Script by nekrozar
function
c101003069
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c101003069
.
condition
)
e1
:
SetTarget
(
c101003069
.
target
)
e1
:
SetOperation
(
c101003069
.
activate
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101003069
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetCondition
(
c101003069
.
spcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c101003069
.
sptg
)
e2
:
SetOperation
(
c101003069
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003069
.
cfilter1
(
c
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c101003069
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
and
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
Duel
.
IsExistingMatchingCard
(
c101003069
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
function
c101003069
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
101003045
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003069
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetAttacker
()
if
chk
==
0
then
return
tg
:
IsOnField
()
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c101003069
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetTargetCard
(
tg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c101003069
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToBattle
()
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101003069
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c101003069
.
cfilter2
(
c
)
return
c
:
GetSequence
()
>=
5
end
function
c101003069
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c101003069
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c101003069
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x20b
)
and
c
:
IsCanBeEffectTarget
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
end
function
c101003069
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c101003069
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
2
and
g
:
GetClassCount
(
Card
.
GetCode
)
>
2
end
local
tg
=
Group
.
CreateGroup
()
for
i
=
1
,
3
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
tg
:
Merge
(
sg
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
():
GetCode
())
end
Duel
.
SetTargetCard
(
tg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
tg
,
tg
:
GetCount
(),
0
,
0
)
end
function
c101003069
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
ft
<=
0
or
g
:
GetCount
()
==
0
or
(
g
:
GetCount
()
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
then
return
end
if
g
:
GetCount
()
<=
ft
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
ft
,
ft
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
expansions/script/c101003070.lua
0 → 100644
View file @
a205fcdd
--オルターガイスト・マテリアリゼーション
--Altergeist Materialization
--Scripted by Eerie Code
function
c101003070
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c101003070
.
target
)
e1
:
SetOperation
(
c101003070
.
operation
)
c
:
RegisterEffect
(
e1
)
--Destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetOperation
(
c101003070
.
desop
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
101003070
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetTarget
(
c101003070
.
thtg
)
e3
:
SetOperation
(
c101003070
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c101003070
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x103
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
function
c101003070
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c101003070
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c101003070
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003070
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c101003070
.
eqlimit
(
e
,
c
)
return
e
:
GetLabelObject
()
==
c
end
function
c101003070
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
==
0
then
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
c
:
CancelToGrave
()
--Add Equip limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c101003070
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e1
)
end
end
function
c101003070
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetFirstCardTarget
()
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c101003070
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x103
)
and
c
:
IsAbleToHand
()
end
function
c101003070
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c101003070
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c101003070
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003070
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c101003070
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c101003071.lua
0 → 100644
View file @
a205fcdd
--星遺物の囁き
--Whisper of the World Legacy
--Script by nekrozar
function
c101003071
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetTarget
(
c101003071
.
target
)
c
:
RegisterEffect
(
e1
)
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c101003071
.
discon
)
e2
:
SetOperation
(
c101003071
.
disop
)
c
:
RegisterEffect
(
e2
)
end
function
c101003071
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
6
)
end
function
c101003071
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c101003071
.
atkfilter
(
chkc
)
end
if
chk
==
0
then
if
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE
then
return
Duel
.
IsExistingTarget
(
c101003071
.
atkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
return
true
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_DAMAGE
or
(
Duel
.
IsExistingTarget
(
c101003071
.
atkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003071
,
0
)))
then
e
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
)
e
:
SetOperation
(
c101003071
.
activate
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c101003071
.
atkfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
else
e
:
SetCategory
(
0
)
e
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e
:
SetOperation
(
nil
)
end
end
function
c101003071
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c101003071
.
cfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
end
function
c101003071
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
GetHandler
():
GetColumnGroup
():
FilterCount
(
c101003071
.
cfilter
,
nil
,
tp
)
>
0
end
function
c101003071
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
expansions/script/c101003072.lua
0 → 100644
View file @
a205fcdd
--星遺物に眠る深層
--Deep Depths of the World Legacy's Slumber
--Script by nekrozar
function
c101003072
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c101003072
.
target
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e2
:
SetOperation
(
c101003072
.
checkop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetOperation
(
c101003072
.
desop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
--disable
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCondition
(
c101003072
.
discon
)
e4
:
SetOperation
(
c101003072
.
disop
)
c
:
RegisterEffect
(
e4
)
end
function
c101003072
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c101003072
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c101003072
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
true
end
if
Duel
.
IsExistingTarget
(
c101003072
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
101003072
,
0
))
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetOperation
(
c101003072
.
activate
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c101003072
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
else
e
:
SetCategory
(
0
)
e
:
SetProperty
(
0
)
e
:
SetOperation
(
nil
)
end
end
function
c101003072
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
then
c
:
SetCardTarget
(
tc
)
Duel
.
SpecialSummonComplete
()
end
end
function
c101003072
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsDisabled
()
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
end
function
c101003072
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c101003072
.
cfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x20c
)
end
function
c101003072
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
GetColumnGroup
():
FilterCount
(
c101003072
.
cfilter
,
nil
,
tp
)
>
0
end
function
c101003072
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
expansions/script/c12171659.lua
deleted
100644 → 0
View file @
7dcb2cff
--天空の使者 ゼラディアス
function
c12171659
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12171659
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c12171659
.
cost
)
e1
:
SetTarget
(
c12171659
.
target
)
e1
:
SetOperation
(
c12171659
.
operation
)
c
:
RegisterEffect
(
e1
)
--self destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2
:
SetCondition
(
c12171659
.
descon
)
c
:
RegisterEffect
(
e2
)
end
function
c12171659
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
c12171659
.
filter
(
c
)
return
c
:
IsCode
(
56433456
)
and
c
:
IsAbleToHand
()
end
function
c12171659
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12171659
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12171659
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetFirstMatchingCard
(
c12171659
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tg
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
function
c12171659
.
descon
(
e
)
return
not
(
Duel
.
IsExistingMatchingCard
(
c12171659
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
end
function
c12171659
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
expansions/script/c12510878.lua
deleted
100644 → 0
View file @
7dcb2cff
--天空勇士ネオパーシアス
function
c12510878
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c12510878
.
spcon
)
e1
:
SetOperation
(
c12510878
.
spop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12510878
,
0
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c12510878
.
condition
)
e2
:
SetTarget
(
c12510878
.
target
)
e2
:
SetOperation
(
c12510878
.
operation
)
c
:
RegisterEffect
(
e2
)
--pierce
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e3
)
--update atk,def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c12510878
.
val
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e5
)
end
function
c12510878
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c12510878
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
CheckReleaseGroup
(
c
:
GetControler
(),
Card
.
IsCode
,
1
,
nil
,
18036057
)
end
function
c12510878
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
SelectReleaseGroup
(
c
:
GetControler
(),
Card
.
IsCode
,
1
,
1
,
nil
,
18036057
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c12510878
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
function
c12510878
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c12510878
.
operation
(
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
c12510878
.
val
(
e
,
c
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c12510878
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
0
end
local
v
=
Duel
.
GetLP
(
c
:
GetControler
())
-
Duel
.
GetLP
(
1
-
c
:
GetControler
())
if
v
>
0
then
return
v
else
return
0
end
end
expansions/script/c15327215.lua
deleted
100644 → 0
View file @
7dcb2cff
--六武衆の真影
--Legendary Shadow of the Six Samurai
--Script by nekrozar
function
c15327215
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
15327215
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
15327215
)
e1
:
SetCondition
(
c15327215
.
spcon
)
e1
:
SetTarget
(
c15327215
.
sptg
)
e1
:
SetOperation
(
c15327215
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
15327215
,
1
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c15327215
.
cost
)
e3
:
SetOperation
(
c15327215
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c15327215
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsSetCard
(
0x103d
)
end
function
c15327215
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c15327215
.
cfilter
,
1
,
nil
,
tp
)
end
function
c15327215
.
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
c15327215
.
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
c15327215
.
filter
(
c
,
mc
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x3d
)
and
c
:
IsAbleToRemoveAsCost
()
and
not
(
c
:
GetLevel
()
==
mc
:
GetLevel
()
and
c
:
IsAttribute
(
mc
:
GetAttribute
())
and
c
:
GetAttack
()
==
mc
:
GetAttack
()
and
c
:
GetDefense
()
==
mc
:
GetDefense
())
end
function
c15327215
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c15327215
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c15327215
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
c15327215
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
lv
=
tc
:
GetLevel
()
local
att
=
tc
:
GetAttribute
()
local
atk
=
tc
:
GetAttack
()
local
def
=
tc
:
GetDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL_FINAL
)
e1
:
SetValue
(
lv
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CHANGE_ATTRIBUTE
)
e2
:
SetValue
(
att
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e3
:
SetValue
(
atk
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e4
:
SetValue
(
def
)
c
:
RegisterEffect
(
e4
)
end
end
expansions/script/c18378582.lua
deleted
100644 → 0
View file @
7dcb2cff
--大天使ゼラート
function
c18378582
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--cannot special summon
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
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c18378582
.
spcon
)
e2
:
SetOperation
(
c18378582
.
spop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
18378582
,
0
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c18378582
.
descost
)
e3
:
SetTarget
(
c18378582
.
destg
)
e3
:
SetOperation
(
c18378582
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c18378582
.
rfilter
(
c
,
code
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
code
)
end
function
c18378582
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c18378582
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
c18378582
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
return
Duel
.
CheckReleaseGroup
(
c
:
GetControler
(),
c18378582
.
rfilter
,
1
,
nil
,
66073051
)
end
function
c18378582
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c18378582
.
rfilter
,
1
,
1
,
nil
,
66073051
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c18378582
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
end
function
c18378582
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c18378582
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c18378582
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c18378582
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c18378582
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c18378582
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
then
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c28573958.lua
deleted
100644 → 0
View file @
7dcb2cff
--奇跡の代行者 ジュピター
function
c28573958
.
initial_effect
(
c
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
28573958
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c28573958
.
atcost
)
e1
:
SetTarget
(
c28573958
.
attg
)
e1
:
SetOperation
(
c28573958
.
atop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
28573958
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c28573958
.
spcon
)
e2
:
SetCost
(
c28573958
.
spcost
)
e2
:
SetTarget
(
c28573958
.
sptg
)
e2
:
SetOperation
(
c28573958
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c28573958
.
cfilter1
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c28573958
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c28573958
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c28573958
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c28573958
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
end
function
c28573958
.
attg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c28573958
.
filter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c28573958
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c28573958
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c28573958
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
800
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c28573958
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c28573958
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c28573958
.
envfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
function
c28573958
.
cfilter2
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsDiscardable
()
end
function
c28573958
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c28573958
.
cfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c28573958
.
cfilter2
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c28573958
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c28573958
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c28573958
.
filter2
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c28573958
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c28573958
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c28573958
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c28573958
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c30907810.lua
View file @
a205fcdd
...
...
@@ -12,9 +12,6 @@ function c30907810.initial_effect(c)
e1
:
SetOperation
(
c30907810
.
otop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e2
)
--activate from hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
expansions/script/c44595286.lua
deleted
100644 → 0
View file @
7dcb2cff
--裁きの光
function
c44595286
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetHintTiming
(
0
,
TIMING_TOHAND
+
0x1e0
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c44595286
.
condition
)
e1
:
SetCost
(
c44595286
.
cost
)
e1
:
SetTarget
(
c44595286
.
target
)
e1
:
SetOperation
(
c44595286
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c44595286
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c44595286
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c44595286
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
function
c44595286
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
end
function
c44595286
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c44595286
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c44595286
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c44595286
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
>
0
end
end
function
c44595286
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_ONFIELD
)
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
local
opt
=
0
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
44595286
,
0
),
aux
.
Stringid
(
44595286
,
1
))
+
1
elseif
g1
:
GetCount
()
>
0
then
opt
=
1
elseif
g2
:
GetCount
()
>
0
then
opt
=
2
end
if
opt
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
elseif
opt
==
2
then
Duel
.
ConfirmCards
(
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
1
-
tp
)
end
end
expansions/script/c48783998.lua
deleted
100644 → 0
View file @
7dcb2cff
--コーリング・ノヴァ
function
c48783998
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
48783998
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCondition
(
c48783998
.
condition
)
e1
:
SetTarget
(
c48783998
.
target
)
e1
:
SetOperation
(
c48783998
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c48783998
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
end
function
c48783998
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsAttackBelow
(
1500
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c48783998
.
filter2
(
c
,
e
,
tp
)
return
(
c
:
IsCode
(
18036057
)
or
(
c
:
IsAttackBelow
(
1500
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c48783998
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c48783998
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
if
not
(
Duel
.
IsExistingMatchingCard
(
c48783998
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
Duel
.
IsExistingMatchingCard
(
c48783998
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
else
return
Duel
.
IsExistingMatchingCard
(
c48783998
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c48783998
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c91188343
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c48783998
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
else
g
=
Duel
.
SelectMatchingCard
(
tp
,
c48783998
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c49905576.lua
deleted
100644 → 0
View file @
7dcb2cff
--天空聖者メルティウス
function
c49905576
.
initial_effect
(
c
)
--recover&destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetOperation
(
c49905576
.
drop
)
c
:
RegisterEffect
(
e1
)
end
function
c49905576
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c49905576
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
re
:
GetHandler
():
IsType
(
TYPE_COUNTER
)
or
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
not
c
:
IsFaceup
()
then
return
end
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c49905576
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
expansions/script/c55794644.lua
deleted
100644 → 0
View file @
7dcb2cff
--マスター・ヒュペリオン
function
c55794644
.
initial_effect
(
c
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c55794644
.
hspcon
)
e1
:
SetOperation
(
c55794644
.
hspop
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
55794644
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c55794644
.
condition
)
e2
:
SetCost
(
c55794644
.
cost
)
e2
:
SetTarget
(
c55794644
.
target
)
e2
:
SetOperation
(
c55794644
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c55794644
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
IsAbleToRemoveAsCost
()
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFaceup
())
end
function
c55794644
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=-
1
then
return
false
end
if
ft
<=
0
then
return
Duel
.
IsExistingMatchingCard
(
c55794644
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
else
return
Duel
.
IsExistingMatchingCard
(
c55794644
.
spfilter
,
tp
,
0x16
,
0
,
1
,
nil
)
end
end
function
c55794644
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c55794644
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c55794644
.
spfilter
,
tp
,
0x16
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c55794644
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c55794644
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
(
Duel
.
IsExistingMatchingCard
(
c55794644
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
e
:
GetHandler
():
GetFlagEffect
(
55794644
)
<
2
else
return
e
:
GetHandler
():
GetFlagEffect
(
55794644
)
<
1
end
end
function
c55794644
.
costfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c55794644
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c55794644
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c55794644
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c55794644
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
e
:
GetHandler
():
RegisterFlagEffect
(
55794644
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c55794644
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c5645210.lua
0 → 100644
View file @
a205fcdd
--The splendid VENUS
function
c5645210
.
initial_effect
(
c
)
--atk,def
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
c5645210
.
target
)
e1
:
SetValue
(
-
500
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
c5645210
.
target
)
e1
:
SetValue
(
-
500
)
c
:
RegisterEffect
(
e1
)
--inactivatable
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c5645210
.
effectfilter
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_CANNOT_DISEFFECT
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetValue
(
c5645210
.
effectfilter
)
c
:
RegisterEffect
(
e5
)
end
function
c5645210
.
target
(
e
,
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsRace
(
RACE_FAIRY
)
end
function
c5645210
.
effectfilter
(
e
,
ct
)
local
p
=
e
:
GetHandler
():
GetControler
()
local
te
,
tp
,
loc
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_PLAYER
,
CHAININFO_TRIGGERING_LOCATION
)
return
p
==
tp
and
te
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
bit
.
band
(
loc
,
LOCATION_ONFIELD
)
~=
0
end
function
c5645210
.
distarget
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
expansions/script/c63519819.lua
0 → 100644
View file @
a205fcdd
--サウザンド・アイズ・サクリファイス
function
c63519819
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCode2
(
c
,
64631466
,
27125110
,
true
,
true
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
63519819
,
0
))
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c63519819
.
eqcon
)
e1
:
SetTarget
(
c63519819
.
eqtg
)
e1
:
SetOperation
(
c63519819
.
eqop
)
c
:
RegisterEffect
(
e1
)
--cannot attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
c63519819
.
antarget
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
c
:
RegisterEffect
(
e3
)
--atk/def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_SET_ATTACK
)
e4
:
SetCondition
(
c63519819
.
adcon
)
e4
:
SetValue
(
c63519819
.
atkval
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EFFECT_SET_DEFENSE
)
e5
:
SetCondition
(
c63519819
.
adcon
)
e5
:
SetValue
(
c63519819
.
defval
)
c
:
RegisterEffect
(
e5
)
end
function
c63519819
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c63519819
.
CanEquipMonster
(
c
)
end
function
c63519819
.
eqfilter
(
c
)
return
c
:
GetFlagEffect
(
63519819
)
~=
0
end
function
c63519819
.
CanEquipMonster
(
c
)
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
return
g
:
GetCount
()
==
0
end
function
c63519819
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToChangeControler
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
function
c63519819
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
end
function
c63519819
.
EquipMonster
(
c
,
tp
,
tc
)
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
--Add Equip limit
tc
:
RegisterFlagEffect
(
63519819
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
e
:
SetLabelObject
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c63519819
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
--substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
c63519819
.
repval
)
tc
:
RegisterEffect
(
e2
)
end
function
c63519819
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
c63519819
.
EquipMonster
(
c
,
tp
,
tc
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
function
c63519819
.
repval
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
function
c63519819
.
antarget
(
e
,
c
)
return
c
~=
e
:
GetHandler
()
end
function
c63519819
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
return
g
:
GetCount
()
>
0
end
function
c63519819
.
atkval
(
e
,
c
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
atk
<
0
then
return
0
else
return
atk
end
end
function
c63519819
.
defval
(
e
,
c
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c63519819
.
eqfilter
,
nil
)
local
def
=
g
:
GetFirst
():
GetTextDefense
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
def
<
0
then
return
0
else
return
def
end
end
expansions/script/c64631466.lua
0 → 100644
View file @
a205fcdd
--サクリファイス
function
c64631466
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
64631466
,
0
))
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c64631466
.
eqcon
)
e1
:
SetTarget
(
c64631466
.
eqtg
)
e1
:
SetOperation
(
c64631466
.
eqop
)
c
:
RegisterEffect
(
e1
)
--atk/def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_SET_ATTACK
)
e2
:
SetCondition
(
c64631466
.
adcon
)
e2
:
SetValue
(
c64631466
.
atkval
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_SET_DEFENSE
)
e3
:
SetCondition
(
c64631466
.
adcon
)
e3
:
SetValue
(
c64631466
.
defval
)
c
:
RegisterEffect
(
e3
)
--damage
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_AVAILABLE_BD
)
e4
:
SetCode
(
EVENT_DAMAGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c64631466
.
damcon
)
e4
:
SetOperation
(
c64631466
.
damop
)
c
:
RegisterEffect
(
e4
)
end
function
c64631466
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c64631466
.
CanEquipMonster
(
c
)
end
function
c64631466
.
eqfilter
(
c
)
return
c
:
GetFlagEffect
(
64631466
)
~=
0
end
function
c64631466
.
CanEquipMonster
(
c
)
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
return
g
:
GetCount
()
==
0
end
function
c64631466
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToChangeControler
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToChangeControler
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
function
c64631466
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
end
function
c64631466
.
EquipMonster
(
c
,
tp
,
tc
)
if
not
Duel
.
Equip
(
tp
,
tc
,
c
,
false
)
then
return
end
--Add Equip limit
tc
:
RegisterFlagEffect
(
64631466
,
RESET_EVENT
+
0x1fe0000
,
0
,
0
)
-- e:SetLabelObject(tc)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c64631466
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
--substitute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_DESTROY_SUBSTITUTE
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
c64631466
.
repval
)
tc
:
RegisterEffect
(
e2
)
end
function
c64631466
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
c64631466
.
EquipMonster
(
c
,
tp
,
tc
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
function
c64631466
.
repval
(
e
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
end
function
c64631466
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
return
g
:
GetCount
()
>
0
and
ep
==
tp
and
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
and
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
())
end
function
c64631466
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
1
-
tp
,
ev
,
REASON_EFFECT
)
end
function
c64631466
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
return
g
:
GetCount
()
>
0
end
function
c64631466
.
atkval
(
e
,
c
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
atk
<
0
then
return
0
else
return
atk
end
end
function
c64631466
.
defval
(
e
,
c
)
local
c
=
e
:
GetHandler
()
local
g
=
c
:
GetEquipGroup
():
Filter
(
c64631466
.
eqfilter
,
nil
)
local
def
=
g
:
GetFirst
():
GetTextDefense
()
if
g
:
GetFirst
():
IsFacedown
()
or
bit
.
band
(
g
:
GetFirst
():
GetOriginalType
(),
TYPE_MONSTER
)
==
0
or
def
<
0
then
return
0
else
return
def
end
end
expansions/script/c84177693.lua
deleted
100644 → 0
View file @
7dcb2cff
--ホーリー・ジェラル
function
c84177693
.
initial_effect
(
c
)
--recover
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
84177693
,
0
))
e1
:
SetCategory
(
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c84177693
.
reccon
)
e1
:
SetTarget
(
c84177693
.
rectg
)
e1
:
SetOperation
(
c84177693
.
recop
)
c
:
RegisterEffect
(
e1
)
end
function
c84177693
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c84177693
.
reccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_BATTLE
)
and
(
Duel
.
IsExistingMatchingCard
(
c84177693
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
end
function
c84177693
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
end
function
c84177693
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c91123920.lua
deleted
100644 → 0
View file @
7dcb2cff
--力の代行者 マーズ
function
c91123920
.
initial_effect
(
c
)
--immune spell
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c91123920
.
efilter
)
c
:
RegisterEffect
(
e1
)
--update atk,def
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c91123920
.
val
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
end
function
c91123920
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_SPELL
)
end
function
c91123920
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c91123920
.
val
(
e
,
c
)
local
tp
=
c
:
GetControler
()
if
not
(
Duel
.
IsExistingMatchingCard
(
c91123920
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
,
tp
))
then
return
0
end
local
v
=
Duel
.
GetLP
(
tp
)
-
Duel
.
GetLP
(
1
-
tp
)
if
v
>
0
then
return
v
else
return
0
end
end
expansions/script/c91188343.lua
deleted
100644 → 0
View file @
7dcb2cff
--神秘の代行者 アース
function
c91188343
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91188343
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c91188343
.
tg
)
e1
:
SetOperation
(
c91188343
.
op
)
c
:
RegisterEffect
(
e1
)
end
function
c91188343
.
filter1
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
GetCode
()
~=
91188343
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c91188343
.
filter2
(
c
)
return
((
c
:
IsSetCard
(
0x44
)
and
c
:
GetCode
()
~=
91188343
and
c
:
IsType
(
TYPE_MONSTER
))
or
c
:
IsCode
(
55794644
))
and
c
:
IsAbleToHand
()
end
function
c91188343
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c91188343
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
not
(
Duel
.
IsExistingMatchingCard
(
c91188343
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
return
Duel
.
IsExistingMatchingCard
(
c91188343
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
return
Duel
.
IsExistingMatchingCard
(
c91188343
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c91188343
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c91188343
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
))
then
g
=
Duel
.
SelectMatchingCard
(
tp
,
c91188343
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
else
g
=
Duel
.
SelectMatchingCard
(
tp
,
c91188343
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c91345518.lua
deleted
100644 → 0
View file @
7dcb2cff
--裁きの代行者 サターン
function
c91345518
.
initial_effect
(
c
)
--damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91345518
,
0
))
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c91345518
.
damcost
)
e1
:
SetTarget
(
c91345518
.
damtg
)
e1
:
SetOperation
(
c91345518
.
damop
)
c
:
RegisterEffect
(
e1
)
end
function
c91345518
.
damcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCurrentPhase
()
~=
PHASE_MAIN2
and
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c91345518
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLP
(
tp
)
>
Duel
.
GetLP
(
1
-
tp
)
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
function
c91345518
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c91345518
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
IsExistingMatchingCard
(
c91345518
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
,
tp
))
then
return
end
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
val
=
Duel
.
GetLP
(
1
-
p
)
-
Duel
.
GetLP
(
p
)
if
val
>
0
then
Duel
.
Damage
(
p
,
val
,
REASON_EFFECT
)
end
end
expansions/script/c97750534.lua
deleted
100644 → 0
View file @
7dcb2cff
--死の代行者 ウラヌス
function
c97750534
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c97750534
.
spcon
)
c
:
RegisterEffect
(
e1
)
--tograve
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
97750534
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c97750534
.
tgtg
)
e2
:
SetOperation
(
c97750534
.
tgop
)
c
:
RegisterEffect
(
e2
)
end
function
c97750534
.
envfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
56433456
)
end
function
c97750534
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
Duel
.
IsExistingMatchingCard
(
c97750534
.
envfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsEnvironment
(
56433456
)
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
function
c97750534
.
filter
(
c
)
return
c
:
IsSetCard
(
0x44
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c97750534
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c97750534
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c97750534
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c97750534
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
local
lv
=
tc
:
GetLevel
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
lv
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment