Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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-scripts
Commits
86a6ca03
Commit
86a6ca03
authored
Oct 20, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a36a378c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
192 additions
and
188 deletions
+192
-188
c16494704.lua
c16494704.lua
+43
-55
c16617334.lua
c16617334.lua
+10
-15
c17330916.lua
c17330916.lua
+17
-15
c21516908.lua
c21516908.lua
+12
-13
c22638495.lua
c22638495.lua
+40
-34
c23851033.lua
c23851033.lua
+4
-11
c24573625.lua
c24573625.lua
+7
-5
c25795273.lua
c25795273.lua
+2
-2
c2602411.lua
c2602411.lua
+22
-21
c3211439.lua
c3211439.lua
+35
-17
No files found.
c16494704.lua
View file @
86a6ca03
--
Odd-Eyes Advent
--
オッドアイズ・アドベント
function
c16494704
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
16494704
)
e1
:
SetTarget
(
c16494704
.
RPGTarget
(
filter
)
)
e1
:
SetOperation
(
c16494704
.
RPGOperation
(
filter
)
)
e1
:
SetCountLimit
(
1
,
16494704
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c16494704
.
target
)
e1
:
SetOperation
(
c16494704
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c16494704
.
pfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
function
c16494704
.
pfilter
(
c
,
rc
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeRitualMaterial
(
rc
)
end
function
c16494704
.
exfilter0
(
c
)
return
c
:
IsSetCard
(
0x99
)
and
c
:
GetLevel
()
>=
1
and
c
:
IsAbleToGrave
()
end
function
c16494704
.
RPGFilter
(
c
,
filter
,
e
,
tp
,
m
)
if
(
filter
and
not
filter
(
c
))
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
or
not
c
:
IsRace
(
RACE_DRAGON
)
or
not
c
:
IsType
(
TYPE_RITUAL
)
then
return
false
end
local
result
=
false
if
m
:
IsContains
(
c
)
then
m
:
RemoveCard
(
c
)
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
c
)
m
:
AddCard
(
c
)
else
result
=
m
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetOriginalLevel
(),
c
)
function
c16494704
.
filter
(
c
,
e
,
tp
,
m
)
if
not
c
:
IsRace
(
RACE_DRAGON
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
c16494704
.
pfilter
,
c
,
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
end
function
c16494704
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
1
then
local
sg
=
Duel
.
GetMatchingGroup
(
c16494704
.
exfilter0
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
mg
:
Merge
(
sg
)
end
return
Duel
.
IsExistingMatchingCard
(
c16494704
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
return
result
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c16494704
.
RPGTarget
(
filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetMatchingGroup
(
c16494704
.
pfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
1
then
local
sg
=
Duel
.
GetMatchingGroup
(
c16494704
.
exfilter0
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
mg
:
Merge
(
sg
)
end
return
Duel
.
IsExistingMatchingCard
(
c16494704
.
RPGFilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
filter
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c16494704
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
1
then
local
sg
=
Duel
.
GetMatchingGroup
(
c16494704
.
exfilter0
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
mg
:
Merge
(
sg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c16494704
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
mg
=
mg
:
Filter
(
c16494704
.
pfilter
,
tc
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
tc
:
SetMaterial
(
mat
)
local
mat2
=
mat
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_EXTRA
)
mat
:
Sub
(
mat2
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
SendtoGrave
(
mat2
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c16494704
.
RPGOperation
(
filter
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c16494704
.
pfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
1
then
local
sg
=
Duel
.
GetMatchingGroup
(
c16494704
.
exfilter0
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
mg
:
Merge
(
sg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c16494704
.
RPGFilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
filter
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetOriginalLevel
(),
tc
)
tc
:
SetMaterial
(
mat
)
if
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
ReleaseRitualMaterial
(
mat
)
else
Duel
.
SendtoGrave
(
mat
,
REASON_EFFECT
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
end
\ No newline at end of file
c16617334.lua
View file @
86a6ca03
--
Performapal Raingoat
--
EMレインゴート
function
c16617334
.
initial_effect
(
c
)
--n
egat
e
--n
o damag
e
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
16617334
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_NEGATE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_HAND
)
...
...
@@ -12,16 +11,15 @@ function c16617334.initial_effect(c)
e1
:
SetCost
(
c16617334
.
effcost
)
e1
:
SetOperation
(
c16617334
.
operation
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
16617334
,
1
))
e2
:
SetCategory
(
CATEGORY_DEFCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCost
(
c16617334
.
effcost
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCondition
(
c16617334
.
condition2
)
e2
:
SetCost
(
c16617334
.
effcost
)
e2
:
SetTarget
(
c16617334
.
target2
)
e2
:
SetOperation
(
c16617334
.
operation2
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -44,28 +42,27 @@ function c16617334.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetLabel
(
cid
)
e1
:
SetValue
(
c16617334
.
ref
con
)
e1
:
SetValue
(
c16617334
.
dam
con
)
e1
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c16617334
.
ref
con
(
e
,
re
,
val
,
r
,
rp
,
rc
)
function
c16617334
.
dam
con
(
e
,
re
,
val
,
r
,
rp
,
rc
)
local
cc
=
Duel
.
GetCurrentChain
()
if
cc
==
0
or
bit
.
band
(
r
,
REASON_EFFECT
)
==
0
then
return
end
local
cid
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
cid
==
e
:
GetLabel
()
then
return
0
end
return
val
end
function
c16617334
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
c16617334
.
filter
(
c
)
return
c
:
Is
SetCard
(
0x9f
)
or
c
:
IsSetCard
(
0x99
)
return
c
:
Is
Faceup
()
and
(
c
:
IsSetCard
(
0x9f
)
or
c
:
IsSetCard
(
0x99
)
)
end
function
c16617334
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
Is
Location
(
LOCATION_ONFIELD
)
and
c16617334
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
Is
OnField
(
)
and
c16617334
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c16617334
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
DEFENCE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c16617334
.
filter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
function
c16617334
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -73,8 +70,6 @@ function c16617334.operation2(e,tp,eg,ep,ev,re,r,rp)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_ONFIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
...
...
c17330916.lua
View file @
86a6ca03
--
Performapal Monkeyboard
--
EMモンキーボード
function
c17330916
.
initial_effect
(
c
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
...
...
@@ -21,12 +21,13 @@ function c17330916.initial_effect(c)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CHANGE_RSCALE
)
c
:
RegisterEffect
(
e3
)
--lvdown
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
17330916
,
1
))
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCost
(
c17330916
.
cost
)
e4
:
SetCost
(
c17330916
.
lv
cost
)
e4
:
SetTarget
(
c17330916
.
lvtg
)
e4
:
SetOperation
(
c17330916
.
lvop
)
c
:
RegisterEffect
(
e4
)
...
...
@@ -36,41 +37,39 @@ function c17330916.sccon(e)
local
tc
=
Duel
.
GetFieldCard
(
e
:
GetHandlerPlayer
(),
LOCATION_SZONE
,
13
-
seq
)
return
not
tc
or
not
tc
:
IsSetCard
(
0x9f
)
end
function
c17330916
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
17330916
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetTarget
(
c17330916
.
des
tg
)
e1
:
SetOperation
(
c17330916
.
des
op
)
e1
:
SetTarget
(
c17330916
.
th
tg
)
e1
:
SetOperation
(
c17330916
.
th
op
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
function
c17330916
.
filter1
(
c
)
function
c17330916
.
thfilter
(
c
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x9f
)
and
c
:
IsAbleToHand
()
end
function
c17330916
.
des
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c17330916
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c17330916
.
th
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c17330916
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c17330916
.
des
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c17330916
.
th
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17330916
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17330916
.
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
c17330916
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c17330916
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_DISCARD
)
end
function
c17330916
.
filter
(
c
)
return
c
:
IsSetCard
(
0x9f
)
or
c
:
IsSetCard
(
0x99
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
(
c
:
IsSetCard
(
0x9f
)
or
c
:
IsSetCard
(
0x99
)
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c17330916
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c17330916
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
...
...
@@ -80,8 +79,11 @@ function c17330916.afilter(c,code)
end
function
c17330916
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c17330916
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
hg
=
Duel
.
GetMatchingGroup
(
c17330916
.
afilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
tc
:
GetFirst
():
GetCode
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17330916
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
local
hg
=
Duel
.
GetMatchingGroup
(
c17330916
.
afilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
g
:
GetFirst
():
GetCode
())
local
tc
=
hg
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
c21516908.lua
View file @
86a6ca03
--
Hi-Speedroid Mach Hagoita
--
HSRマッハゴー・イータ
function
c21516908
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
...
...
@@ -9,9 +9,9 @@ function c21516908.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c21516908
.
lcost
)
e1
:
SetTarget
(
c21516908
.
ltg
)
e1
:
SetOperation
(
c21516908
.
l
p
op
)
e1
:
SetCost
(
c21516908
.
l
v
cost
)
e1
:
SetTarget
(
c21516908
.
l
v
tg
)
e1
:
SetOperation
(
c21516908
.
l
v
op
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -24,19 +24,18 @@ function c21516908.initial_effect(c)
e2
:
SetTarget
(
c21516908
.
sptg
)
e2
:
SetOperation
(
c21516908
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c21516908
.
lcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c21516908
.
l
v
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c21516908
.
filter
(
c
)
return
c
:
IsFaceup
()
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
>
0
end
function
c21516908
.
ltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21516908
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
function
c21516908
.
l
v
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21516908
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
e
:
GetHandler
()
)
end
end
function
c21516908
.
l
p
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c21516908
.
l
v
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c21516908
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
...
...
@@ -65,6 +64,9 @@ function c21516908.splimit(e,c,sump,sumtype,sumpos,targetp,se)
end
function
c21516908
.
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
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
...
...
@@ -73,7 +75,4 @@ function c21516908.spop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetTarget
(
c21516908
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c22638495.lua
View file @
86a6ca03
--
Dynaster Pendulum, the Powerful Dracoslayer
--
剛竜剣士ダイナスターP
function
c22638495
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
--sp
ecial summon rule
--sp
summon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c22638495
.
spcon
)
e1
:
SetOperation
(
c22638495
.
spop
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c22638495
.
splimit
)
c
:
RegisterEffect
(
e1
)
--
Other effects
--
special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
Set
Category
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
Set
Type
(
EFFECT_TYPE_IGNITION
)
e2
:
Set
Range
(
LOCATION_MZON
E
)
e2
:
Set
CountLimit
(
1
)
e2
:
Set
Target
(
c22638495
.
sptg
)
e2
:
SetOperation
(
c22638495
.
spop
2
)
e2
:
Set
Type
(
EFFECT_TYPE_FIELD
)
e2
:
Set
Code
(
EFFECT_SPSUMMON_PROC
)
e2
:
Set
Property
(
EFFECT_FLAG_UNCOPYABL
E
)
e2
:
Set
Range
(
LOCATION_EXTRA
)
e2
:
Set
Condition
(
c22638495
.
spcon
)
e2
:
SetOperation
(
c22638495
.
spop
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
Set
Type
(
EFFECT_TYPE_FIELD
)
e3
:
Set
Code
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e3
:
Set
Category
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
Set
Type
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
Set
TargetRange
(
LOCATION_MZONE
+
LOCATION_SZONE
,
0
)
e3
:
SetTarget
(
c22638495
.
ind
tg
)
e3
:
Set
Value
(
1
)
e3
:
Set
CountLimit
(
1
)
e3
:
SetTarget
(
c22638495
.
sp
tg
)
e3
:
Set
Operation
(
c22638495
.
spop2
)
c
:
RegisterEffect
(
e3
)
--indes
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_
EFFECT
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_
BATTLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_
MZONE
+
LOCATION_SZONE
,
0
)
e4
:
SetTargetRange
(
LOCATION_
ONFIELD
,
0
)
e4
:
SetTarget
(
c22638495
.
indtg
)
e4
:
SetValue
(
aux
.
tgoval
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e5
:
SetTarget
(
c22638495
.
indtg
)
e5
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e5
)
end
function
c22638495
.
splimit
(
e
,
se
,
sp
,
st
)
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
end
function
c22638495
.
spfilter1
(
c
,
tp
)
return
((
c
:
IsSetCard
(
0xc7
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeFusionMaterial
())
or
c
:
IsCode
(
92746535
)
)
return
c
:
IsSetCard
(
0xc7
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeFusionMaterial
(
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c22638495
.
spfilter2
,
1
,
c
)
end
function
c22638495
.
spfilter2
(
c
)
...
...
@@ -59,20 +68,18 @@ function c22638495.spop(e,tp,eg,ep,ev,re,r,rp,c)
c
:
SetMaterial
(
g1
)
Duel
.
Release
(
g1
,
REASON_COST
+
REASON_FUSION
+
REASON_MATERIAL
)
end
function
c22638495
.
pspfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc7
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c22638495
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xc7
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c22638495
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22638495
.
p
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c22638495
.
spfilter
,
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
c22638495
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22638495
.
p
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22638495
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
...
...
@@ -84,7 +91,6 @@ function c22638495.spop2(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
end
end
function
c22638495
.
indtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
(
c
:
Get
Location
(
LOCATION_MZONE
)
or
(
c
:
GetSequence
()
==
6
or
c
:
GetSequence
()
==
7
))
return
c
:
IsType
(
TYPE_PENDULUM
)
and
(
c
:
Is
Location
(
LOCATION_MZONE
)
or
(
c
:
GetSequence
()
==
6
or
c
:
GetSequence
()
==
7
))
end
c23851033.lua
View file @
86a6ca03
--
Odd-Eyes Gravity Dragon
--
オッドアイズ・グラビティ・ドラゴン
function
c23851033
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
81896370
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
23851033
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
...
@@ -17,7 +18,6 @@ function c23851033.initial_effect(c)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetTarget
(
c23851033
.
actarget
)
e2
:
SetCost
(
c23851033
.
costchk
)
e2
:
SetOperation
(
c23851033
.
costop
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -38,16 +38,9 @@ function c23851033.operation(e,tp,eg,ep,ev,re,r,rp)
local
sg
=
Duel
.
GetMatchingGroup
(
c23851033
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
end
function
c23851033
.
actarget
(
e
,
te
,
tp
)
return
te
:
GetHandler
():
GetControler
()
~=
e
:
GetHandler
():
GetControler
()
end
function
c23851033
.
costchk
(
e
,
te_or_c
,
tp
)
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
function
c23851033
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
PayLPCost
(
tp
,
500
)
end
\ No newline at end of file
end
c24573625.lua
View file @
86a6ca03
--
Deskbot
008
--
ブンボーグ
008
function
c24573625
.
initial_effect
(
c
)
--pendulum summon
aux
.
AddPendulumProcedure
(
c
)
...
...
@@ -17,6 +17,7 @@ function c24573625.initial_effect(c)
e2
:
SetCondition
(
c24573625
.
splimcon
)
e2
:
SetTarget
(
c24573625
.
splimit
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
...
...
@@ -24,17 +25,18 @@ function c24573625.initial_effect(c)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetValue
(
c24573625
.
value
)
c
:
RegisterEffect
(
e3
)
--attack twice
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetProperty
(
EFFECT_FLAG_
CANNOT_DISABL
E
)
e5
:
SetProperty
(
EFFECT_FLAG_
SINGLE_RANG
E
)
e5
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e5
:
SetCondition
(
c24573625
.
dircon
)
c
:
RegisterEffect
(
e5
)
...
...
@@ -42,6 +44,7 @@ function c24573625.initial_effect(c)
e6
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e6
:
SetCondition
(
c24573625
.
atkcon2
)
c
:
RegisterEffect
(
e6
)
--cannot be target
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetRange
(
LOCATION_MZONE
)
...
...
@@ -66,7 +69,6 @@ end
function
c24573625
.
atkcon2
(
e
)
return
e
:
GetHandler
():
IsDirectAttacked
()
end
function
c24573625
.
tglimit
(
e
,
re
,
c
)
return
c
:
Is
Controler
(
e
:
GetHandlerPlayer
())
and
c
:
Is
Location
(
LOCATION_MZONE
)
and
c
~=
e
:
GetHandler
()
and
c
:
IsSetCard
(
0xab
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
~=
e
:
GetHandler
()
and
c
:
IsSetCard
(
0xab
)
end
c25795273.lua
View file @
86a6ca03
--
Painful Decision
--
イルミラージュ
function
c25795273
.
initial_effect
(
c
)
--atk down
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -8,7 +8,7 @@ function c25795273.initial_effect(c)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetValue
(
c25795273
.
val
)
c
:
RegisterEffect
(
e1
)
--
atk
down
--
def
down
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
...
...
c2602411.lua
View file @
86a6ca03
--
Destruction Sword – Wizard Buster Blade
--
破壊剣-ウィザードバスターブレード
function
c2602411
.
initial_effect
(
c
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -9,6 +9,7 @@ function c2602411.initial_effect(c)
e1
:
SetTarget
(
c2602411
.
eqtg
)
e1
:
SetOperation
(
c2602411
.
eqop
)
c
:
RegisterEffect
(
e1
)
--cannot activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
...
...
@@ -17,9 +18,19 @@ function c2602411.initial_effect(c)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetValue
(
c2602411
.
aclimit
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCost
(
c2602411
.
thcost
)
e3
:
SetTarget
(
c2602411
.
thtg
)
e3
:
SetOperation
(
c2602411
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c2602411
.
filter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
GetCode
()
==
86240887
or
c
:
GetCode
()
==
3428069
or
c
:
GetCode
()
==
78193831
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
78193831
)
end
function
c2602411
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c2602411
.
filter
(
chkc
)
end
...
...
@@ -33,7 +44,7 @@ function c2602411.eqop(e,tp,eg,ep,ev,re,r,rp)
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
:
GetControler
()
~=
tp
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
not
c
:
CheckUniqueOnField
(
tp
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
GetControler
()
~=
tp
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
...
...
@@ -45,15 +56,6 @@ function c2602411.eqop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
c2602411
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCost
(
c2602411
.
descost
)
e1
:
SetTarget
(
c2602411
.
target
)
e1
:
SetOperation
(
c2602411
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c2602411
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
...
...
@@ -62,22 +64,21 @@ function c2602411.aclimit(e,re,tp)
local
loc
=
re
:
GetActivateLocation
()
return
loc
==
LOCATION_GRAVE
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c2602411
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c2602411
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c2602411
.
r
filter
(
c
)
return
(
c
:
IsSetCard
(
0x1e7
)
and
c
:
IsType
(
TYPE_MONSTER
)
)
and
c
:
IsAbleToHand
()
function
c2602411
.
th
filter
(
c
)
return
c
:
IsSetCard
(
0xd6
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
2602411
)
and
c
:
IsAbleToHand
()
end
function
c2602411
.
t
arget
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetControler
()
==
tp
and
chkc
:
GetLocation
()
==
LOCATION_GRAVE
and
c2602411
.
r
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c2602411
.
rfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
()
)
end
function
c2602411
.
t
htg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c2602411
.
th
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c2602411
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c2602411
.
rfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
()
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c2602411
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c2602411
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2602411
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
...
...
c3211439.lua
View file @
86a6ca03
--
Forbidden Tome
--
禁断の異本
function
c3211439
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c3211439
.
target
)
e1
:
SetOperation
(
c3211439
.
operation
)
e1
:
SetOperation
(
c3211439
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c3211439
.
filter
(
c
,
tpe
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
tpe
)
end
function
c3211439
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
,
TYPE_FUSION
)
or
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
,
TYPE_SYNCHRO
)
or
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
,
TYPE_XYZ
)
end
local
b1
=
Duel
.
IsExistingMatchingCard
(
c3211439
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
,
TYPE_FUSION
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
c3211439
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
,
TYPE_SYNCHRO
)
local
b3
=
Duel
.
IsExistingMatchingCard
(
c3211439
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
2
,
nil
,
TYPE_XYZ
)
if
chk
==
0
then
return
b1
or
b2
or
b3
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
3211439
,
0
)
opval
[
off
-
1
]
=
TYPE_FUSION
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
3211439
,
1
)
opval
[
off
-
1
]
=
TYPE_SYNCHRO
off
=
off
+
1
end
if
b3
then
ops
[
off
]
=
aux
.
Stringid
(
3211439
,
2
)
opval
[
off
-
1
]
=
TYPE_XYZ
off
=
off
+
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
local
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
73988674
,
0
),
aux
.
Stringid
(
73988674
,
1
),
aux
.
Stringid
(
73988674
,
2
))
e
:
SetLabel
(
op
)
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
e
:
SetLabel
(
op
val
[
op
]
)
end
function
c3211439
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
0
then
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_FUSION
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
elseif
e
:
GetLabel
()
==
1
then
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_SYNCHRO
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
else
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_XYZ
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
function
c3211439
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c3211439
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
e
:
GetLabel
())
if
g
:
GetCount
()
>
1
then
Duel
.
SendtoGrave
(
g
,
REASON_RULE
)
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