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
List
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
八宫一月
ygopro-scripts
Commits
e6ea98bc
Commit
e6ea98bc
authored
Sep 08, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update comments
parent
84907a06
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
2972 additions
and
2974 deletions
+2972
-2974
c1061200.lua
c1061200.lua
+62
-62
c13482075.lua
c13482075.lua
+78
-78
c14105623.lua
c14105623.lua
+41
-41
c2144946.lua
c2144946.lua
+82
-82
c2266498.lua
c2266498.lua
+83
-83
c2287848.lua
c2287848.lua
+79
-79
c32036866.lua
c32036866.lua
+78
-78
c33158448.lua
c33158448.lua
+93
-93
c33971095.lua
c33971095.lua
+86
-86
c34093683.lua
c34093683.lua
+61
-61
c38459905.lua
c38459905.lua
+73
-73
c38532954.lua
c38532954.lua
+69
-69
c3909436.lua
c3909436.lua
+98
-98
c39271553.lua
c39271553.lua
+79
-79
c39838559.lua
c39838559.lua
+83
-83
c40509732.lua
c40509732.lua
+88
-88
c40516623.lua
c40516623.lua
+56
-56
c41721210.lua
c41721210.lua
+30
-30
c44373896.lua
c44373896.lua
+45
-45
c49394035.lua
c49394035.lua
+76
-76
c49477180.lua
c49477180.lua
+91
-91
c49655592.lua
c49655592.lua
+103
-103
c5641251.lua
c5641251.lua
+107
-107
c60375194.lua
c60375194.lua
+38
-38
c64635042.lua
c64635042.lua
+0
-2
c6764709.lua
c6764709.lua
+102
-102
c69553552.lua
c69553552.lua
+75
-75
c70491682.lua
c70491682.lua
+77
-77
c71614230.lua
c71614230.lua
+53
-53
c71867500.lua
c71867500.lua
+64
-64
c72589042.lua
c72589042.lua
+43
-43
c75059201.lua
c75059201.lua
+109
-109
c75676192.lua
c75676192.lua
+97
-97
c76798740.lua
c76798740.lua
+38
-38
c76871889.lua
c76871889.lua
+78
-78
c77511331.lua
c77511331.lua
+56
-56
c77994337.lua
c77994337.lua
+37
-37
c7852509.lua
c7852509.lua
+50
-50
c7986397.lua
c7986397.lua
+122
-122
c8608979.lua
c8608979.lua
+67
-67
c87116928.lua
c87116928.lua
+82
-82
c8978197.lua
c8978197.lua
+43
-43
No files found.
c1061200.lua
View file @
e6ea98bc
--F.A.
City Grand Prix
--F.A.
シティGP
function
c1061200
.
initial_effect
(
c
)
function
c1061200
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lv up
--lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e2
:
SetValue
(
2
)
e2
:
SetValue
(
2
)
e2
:
SetCondition
(
c1061200
.
lvcon
)
e2
:
SetCondition
(
c1061200
.
lvcon
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--cannot be target
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e3
:
SetValue
(
aux
.
tgoval
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--to hand
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCountLimit
(
1
,
1061200
)
e4
:
SetCountLimit
(
1
,
1061200
)
e4
:
SetCondition
(
c1061200
.
thcon
)
e4
:
SetCondition
(
c1061200
.
thcon
)
e4
:
SetTarget
(
c1061200
.
thtg
)
e4
:
SetTarget
(
c1061200
.
thtg
)
e4
:
SetOperation
(
c1061200
.
thop
)
e4
:
SetOperation
(
c1061200
.
thop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c1061200
.
lvcon
(
e
)
function
c1061200
.
lvcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
end
end
function
c1061200
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1061200
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
c1061200
.
thfilter
(
c
)
function
c1061200
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x107
)
and
not
c
:
IsCode
(
1061200
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x107
)
and
not
c
:
IsCode
(
1061200
)
and
c
:
IsAbleToHand
()
end
end
function
c1061200
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c1061200
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1061200
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1061200
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c1061200
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1061200
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1061200
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1061200
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
c13482075.lua
View file @
e6ea98bc
--
Vendread Chimera
--
ヴェンデット・キマイラ
function
c13482075
.
initial_effect
(
c
)
function
c13482075
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--Negate
--Negate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
13482075
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
13482075
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
13482075
)
e1
:
SetCountLimit
(
1
,
13482075
)
e1
:
SetCondition
(
c13482075
.
condition
)
e1
:
SetCondition
(
c13482075
.
condition
)
e1
:
SetCost
(
c13482075
.
cost
)
e1
:
SetCost
(
c13482075
.
cost
)
e1
:
SetTarget
(
c13482075
.
target
)
e1
:
SetTarget
(
c13482075
.
target
)
e1
:
SetOperation
(
c13482075
.
operation
)
e1
:
SetOperation
(
c13482075
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--atk/def
--atk/def
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
13482075
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
13482075
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetCountLimit
(
1
,
13482076
)
e2
:
SetCountLimit
(
1
,
13482076
)
e2
:
SetCondition
(
c13482075
.
atkcon
)
e2
:
SetCondition
(
c13482075
.
atkcon
)
e2
:
SetOperation
(
c13482075
.
atkop
)
e2
:
SetOperation
(
c13482075
.
atkop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c13482075
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c13482075
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
or
not
Duel
.
IsChainNegatable
(
ev
)
then
return
false
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
or
not
Duel
.
IsChainNegatable
(
ev
)
then
return
false
end
if
re
:
IsHasCategory
(
CATEGORY_NEGATE
)
if
re
:
IsHasCategory
(
CATEGORY_NEGATE
)
and
Duel
.
GetChainInfo
(
ev
-
1
,
CHAININFO_TRIGGERING_EFFECT
):
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
false
end
and
Duel
.
GetChainInfo
(
ev
-
1
,
CHAININFO_TRIGGERING_EFFECT
):
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
false
end
local
ex
,
tg
,
tc
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_DESTROY
)
local
ex
,
tg
,
tc
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_DESTROY
)
return
ex
and
tg
~=
nil
and
tc
+
tg
:
FilterCount
(
Card
.
IsOnField
,
nil
)
-
tg
:
GetCount
()
>
0
return
ex
and
tg
~=
nil
and
tc
+
tg
:
FilterCount
(
Card
.
IsOnField
,
nil
)
-
tg
:
GetCount
()
>
0
end
end
function
c13482075
.
cfilter
(
c
)
function
c13482075
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c13482075
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c13482075
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c13482075
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c13482075
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c13482075
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c13482075
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c13482075
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c13482075
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
end
end
function
c13482075
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c13482075
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
end
end
function
c13482075
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c13482075
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_RITUAL
)
return
e
:
GetHandler
():
IsReason
(
REASON_RITUAL
)
end
end
function
c13482075
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c13482075
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
for
tc
in
aux
.
Next
(
g
)
do
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetValue
(
-
500
)
e1
:
SetValue
(
-
500
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
end
end
end
end
c14105623.lua
View file @
e6ea98bc
--
Odd-Eyes Arc Pendulum Dragon
--
オッドアイズ・アークペンデュラム・ドラゴン
function
c14105623
.
initial_effect
(
c
)
function
c14105623
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14105623
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
14105623
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
14105623
)
e1
:
SetCountLimit
(
1
,
14105623
)
e1
:
SetCondition
(
c14105623
.
spcon
)
e1
:
SetCondition
(
c14105623
.
spcon
)
e1
:
SetTarget
(
c14105623
.
sptg
)
e1
:
SetTarget
(
c14105623
.
sptg
)
e1
:
SetOperation
(
c14105623
.
spop
)
e1
:
SetOperation
(
c14105623
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c14105623
.
cfilter
(
c
,
tp
)
function
c14105623
.
cfilter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousSetCard
(
0x99
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousSetCard
(
0x99
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
c14105623
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14105623
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c14105623
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c14105623
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
c14105623
.
spfilter
(
c
,
e
,
tp
)
function
c14105623
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x99
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x99
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c14105623
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c14105623
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c14105623
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c14105623
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
c14105623
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14105623
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c14105623
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c14105623
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c2144946.lua
View file @
e6ea98bc
--F.A.
Off-Road Grand Prix
--F.A.
オフロードGP
function
c2144946
.
initial_effect
(
c
)
function
c2144946
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lv up
--lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e2
:
SetValue
(
2
)
e2
:
SetValue
(
2
)
e2
:
SetCondition
(
c2144946
.
lvcon
)
e2
:
SetCondition
(
c2144946
.
lvcon
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--destroy
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
2144946
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
2144946
,
0
))
e3
:
SetCategory
(
CATEGORY_HANDES
)
e3
:
SetCategory
(
CATEGORY_HANDES
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCountLimit
(
1
,
2144946
)
e3
:
SetCountLimit
(
1
,
2144946
)
e3
:
SetCondition
(
c2144946
.
descon
)
e3
:
SetCondition
(
c2144946
.
descon
)
e3
:
SetTarget
(
c2144946
.
destg
)
e3
:
SetTarget
(
c2144946
.
destg
)
e3
:
SetOperation
(
c2144946
.
desop
)
e3
:
SetOperation
(
c2144946
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--to hand
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
2144946
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
2144946
,
1
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCountLimit
(
1
,
2144947
)
e4
:
SetCountLimit
(
1
,
2144947
)
e4
:
SetCondition
(
c2144946
.
thcon2
)
e4
:
SetCondition
(
c2144946
.
thcon2
)
e4
:
SetTarget
(
c2144946
.
thtg2
)
e4
:
SetTarget
(
c2144946
.
thtg2
)
e4
:
SetOperation
(
c2144946
.
thop2
)
e4
:
SetOperation
(
c2144946
.
thop2
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c2144946
.
lvcon
(
e
)
function
c2144946
.
lvcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
end
function
c2144946
.
cfilter
(
c
,
tp
)
function
c2144946
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousSetCard
(
0x107
)
return
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousSetCard
(
0x107
)
end
end
function
c2144946
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2144946
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c2144946
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c2144946
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
c2144946
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c2144946
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
0
,
0
,
1
-
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
0
,
0
,
1
-
tp
,
1
)
end
end
function
c2144946
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2144946
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
,
nil
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_DISCARD
+
REASON_EFFECT
)
Duel
.
SendtoGrave
(
sg
,
REASON_DISCARD
+
REASON_EFFECT
)
end
end
function
c2144946
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2144946
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_EFFECT
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
c2144946
.
thfilter2
(
c
)
function
c2144946
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0x107
)
and
not
c
:
IsCode
(
2144946
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x107
)
and
not
c
:
IsCode
(
2144946
)
and
c
:
IsAbleToHand
()
end
end
function
c2144946
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c2144946
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c2144946
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c2144946
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c2144946
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2144946
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c2144946
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c2144946
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
c2266498.lua
View file @
e6ea98bc
--
Vendread Reunion
--
ヴェンデット・リユニオン
function
c2266498
.
initial_effect
(
c
)
function
c2266498
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c2266498
.
target
)
e1
:
SetTarget
(
c2266498
.
target
)
e1
:
SetOperation
(
c2266498
.
activate
)
e1
:
SetOperation
(
c2266498
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c2266498
.
cfilter
(
c
,
e
,
tp
,
m
,
ft
)
function
c2266498
.
cfilter
(
c
,
e
,
tp
,
m
,
ft
)
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsSetCard
(
0x106
)
or
c
:
IsPublic
()
if
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsSetCard
(
0x106
)
or
c
:
IsPublic
()
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
if
c
.
mat_filter
then
if
c
.
mat_filter
then
m
=
m
:
Filter
(
c
.
mat_filter
,
nil
)
m
=
m
:
Filter
(
c
.
mat_filter
,
nil
)
end
end
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
return
m
:
IsExists
(
c2266498
.
spselect
,
1
,
nil
,
c
,
0
,
ft
,
m
,
sg
)
return
m
:
IsExists
(
c2266498
.
spselect
,
1
,
nil
,
c
,
0
,
ft
,
m
,
sg
)
end
end
function
c2266498
.
spgoal
(
mc
,
ct
,
sg
)
function
c2266498
.
spgoal
(
mc
,
ct
,
sg
)
return
sg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
mc
:
GetLevel
(),
ct
,
ct
,
mc
)
and
sg
:
GetClassCount
(
Card
.
GetCode
)
==
ct
return
sg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
mc
:
GetLevel
(),
ct
,
ct
,
mc
)
and
sg
:
GetClassCount
(
Card
.
GetCode
)
==
ct
end
end
function
c2266498
.
spselect
(
c
,
mc
,
ct
,
ft
,
m
,
sg
)
function
c2266498
.
spselect
(
c
,
mc
,
ct
,
ft
,
m
,
sg
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
ct
=
ct
+
1
local
res
=
(
ft
>=
ct
and
c2266498
.
spgoal
(
mc
,
ct
,
sg
))
or
m
:
IsExists
(
c2266498
.
spselect
,
1
,
sg
,
mc
,
ct
,
ft
,
m
,
sg
)
local
res
=
(
ft
>=
ct
and
c2266498
.
spgoal
(
mc
,
ct
,
sg
))
or
m
:
IsExists
(
c2266498
.
spselect
,
1
,
sg
,
mc
,
ct
,
ft
,
m
,
sg
)
sg
:
RemoveCard
(
c
)
sg
:
RemoveCard
(
c
)
return
res
return
res
end
end
function
c2266498
.
filter
(
c
,
e
,
tp
)
function
c2266498
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x106
)
and
Duel
.
IsPlayerCanRelease
(
tp
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x106
)
and
Duel
.
IsPlayerCanRelease
(
tp
,
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
end
end
function
c2266498
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c2266498
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
then
return
false
end
if
ft
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
then
return
false
end
if
ft
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
ft
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
mg
=
Duel
.
GetMatchingGroup
(
c2266498
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c2266498
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
c2266498
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
return
Duel
.
IsExistingMatchingCard
(
c2266498
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_REMOVED
)
end
end
function
c2266498
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2266498
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
then
return
end
if
ft
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
then
return
end
if
ft
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
ft
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
mg
=
Duel
.
GetMatchingGroup
(
c2266498
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c2266498
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c2266498
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c2266498
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
if
tg
:
GetCount
()
>
0
then
if
tg
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
tc
.
mat_filter
then
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
end
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
for
i
=
0
,
98
do
for
i
=
0
,
98
do
local
cg
=
mg
:
Filter
(
c2266498
.
spselect
,
sg
,
tc
,
i
,
ft
,
mg
,
sg
)
local
cg
=
mg
:
Filter
(
c2266498
.
spselect
,
sg
,
tc
,
i
,
ft
,
mg
,
sg
)
if
cg
:
GetCount
()
==
0
then
break
end
if
cg
:
GetCount
()
==
0
then
break
end
local
min
=
1
local
min
=
1
if
c2266498
.
spgoal
(
tc
,
i
,
sg
)
then
if
c2266498
.
spgoal
(
tc
,
i
,
sg
)
then
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
min
=
0
min
=
0
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
cg
:
Select
(
tp
,
min
,
1
,
nil
)
local
g
=
cg
:
Select
(
tp
,
min
,
1
,
nil
)
if
g
:
GetCount
()
==
0
then
break
end
if
g
:
GetCount
()
==
0
then
break
end
sg
:
Merge
(
g
)
sg
:
Merge
(
g
)
end
end
if
sg
:
GetCount
()
==
0
then
return
end
if
sg
:
GetCount
()
==
0
then
return
end
if
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
==
sg
:
GetCount
()
then
if
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
==
sg
:
GetCount
()
then
local
og
=
Duel
.
GetOperatedGroup
()
local
og
=
Duel
.
GetOperatedGroup
()
Duel
.
ConfirmCards
(
1
-
tp
,
og
)
Duel
.
ConfirmCards
(
1
-
tp
,
og
)
tc
:
SetMaterial
(
og
)
tc
:
SetMaterial
(
og
)
Duel
.
Release
(
og
,
REASON_EFFECT
+
REASON_RITUAL
+
REASON_MATERIAL
)
Duel
.
Release
(
og
,
REASON_EFFECT
+
REASON_RITUAL
+
REASON_MATERIAL
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
tc
:
CompleteProcedure
()
end
end
end
end
end
end
c2287848.lua
View file @
e6ea98bc
--
Vendread Revolution
--
ヴェンデット・リバース
function
c2287848
.
initial_effect
(
c
)
function
c2287848
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
2287848
)
e1
:
SetCountLimit
(
1
,
2287848
)
e1
:
SetCost
(
c2287848
.
cost
)
e1
:
SetCost
(
c2287848
.
cost
)
e1
:
SetTarget
(
c2287848
.
target
)
e1
:
SetTarget
(
c2287848
.
target
)
e1
:
SetOperation
(
c2287848
.
activate
)
e1
:
SetOperation
(
c2287848
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--draw
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
2287849
)
e2
:
SetCountLimit
(
1
,
2287849
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c2287848
.
drtg
)
e2
:
SetTarget
(
c2287848
.
drtg
)
e2
:
SetOperation
(
c2287848
.
drop
)
e2
:
SetOperation
(
c2287848
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c2287848
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c2287848
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c2287848
.
spfilter
(
c
,
e
,
tp
)
function
c2287848
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c2287848
.
thfilter
(
c
)
function
c2287848
.
thfilter
(
c
)
return
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_RITUAL
and
c
:
IsAbleToHand
()
return
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_RITUAL
and
c
:
IsAbleToHand
()
end
end
function
c2287848
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c2287848
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c2287848
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c2287848
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsExistingTarget
(
c2287848
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c2287848
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c2287848
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c2287848
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
e
:
SetLabelObject
(
g1
:
GetFirst
())
e
:
SetLabelObject
(
g1
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c2287848
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c2287848
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g1
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g1
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g2
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g2
,
1
,
0
,
0
)
end
end
function
c2287848
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2287848
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
,
tc2
=
Duel
.
GetFirstTarget
()
local
tc1
,
tc2
=
Duel
.
GetFirstTarget
()
if
tc1
~=
e
:
GetLabelObject
()
then
tc1
,
tc2
=
tc2
,
tc1
end
if
tc1
~=
e
:
GetLabelObject
()
then
tc1
,
tc2
=
tc2
,
tc1
end
if
tc1
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc1
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
~=
0
and
tc2
:
IsRelateToEffect
(
e
)
then
if
tc1
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc1
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
~=
0
and
tc2
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc2
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
tc2
,
nil
,
REASON_EFFECT
)
end
end
end
end
function
c2287848
.
drfilter
(
c
)
function
c2287848
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAbleToDeck
()
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAbleToDeck
()
end
end
function
c2287848
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c2287848
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c2287848
.
drfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c2287848
.
drfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
c2287848
.
drfilter
,
tp
,
LOCATION_REMOVED
,
0
,
5
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c2287848
.
drfilter
,
tp
,
LOCATION_REMOVED
,
0
,
5
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c2287848
.
drfilter
,
tp
,
LOCATION_REMOVED
,
0
,
5
,
5
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c2287848
.
drfilter
,
tp
,
LOCATION_REMOVED
,
0
,
5
,
5
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
5
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
5
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c2287848
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c2287848
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
5
then
return
end
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
5
then
return
end
Duel
.
SendtoDeck
(
tg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
tg
,
nil
,
0
,
REASON_EFFECT
)
local
g
=
Duel
.
GetOperatedGroup
()
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
tp
)
end
if
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
tp
)
end
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
==
5
then
if
ct
==
5
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
c32036866.lua
View file @
e6ea98bc
--F.A.
Overheat
--F.A.
オーバー・ヒート
function
c32036866
.
initial_effect
(
c
)
function
c32036866
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c32036866
.
condition
)
e1
:
SetCondition
(
c32036866
.
condition
)
e1
:
SetTarget
(
c32036866
.
target
)
e1
:
SetTarget
(
c32036866
.
target
)
e1
:
SetOperation
(
c32036866
.
activate
)
e1
:
SetOperation
(
c32036866
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--activate Spell
--activate Spell
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c32036866
.
condition2
)
e2
:
SetCondition
(
c32036866
.
condition2
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c32036866
.
target2
)
e2
:
SetTarget
(
c32036866
.
target2
)
e2
:
SetOperation
(
c32036866
.
activate2
)
e2
:
SetOperation
(
c32036866
.
activate2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c32036866
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32036866
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
end
function
c32036866
.
filter
(
c
,
e
,
tp
)
function
c32036866
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c32036866
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c32036866
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c32036866
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c32036866
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c32036866
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32036866
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c32036866
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c32036866
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
3
)
e1
:
SetValue
(
3
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
c32036866
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32036866
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
==
nil
return
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
==
nil
end
end
function
c32036866
.
filter2
(
c
,
tp
)
function
c32036866
.
filter2
(
c
,
tp
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
end
end
function
c32036866
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c32036866
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c32036866
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c32036866
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
end
end
function
c32036866
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32036866
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c32036866
.
filter2
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c32036866
.
filter2
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
if
tc
then
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
fc
then
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
end
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
end
end
end
end
c33158448.lua
View file @
e6ea98bc
--F.A.
Dawn Dragster
--F.A.
ライトニングマスター
function
c33158448
.
initial_effect
(
c
)
function
c33158448
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
--atk up
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c33158448
.
atkval
)
e1
:
SetValue
(
c33158448
.
atkval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
aux
.
chainreg
)
e2
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33158448
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
33158448
,
0
))
e3
:
SetCategory
(
CATEGORY_LVCHANGE
)
e3
:
SetCategory
(
CATEGORY_LVCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c33158448
.
lvcon
)
e3
:
SetCondition
(
c33158448
.
lvcon
)
e3
:
SetOperation
(
c33158448
.
lvop
)
e3
:
SetOperation
(
c33158448
.
lvop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--pierce
--pierce
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_PIERCE
)
e4
:
SetCode
(
EFFECT_PIERCE
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--negate
--negate
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
33158448
,
1
))
e5
:
SetDescription
(
aux
.
Stringid
(
33158448
,
1
))
e5
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e5
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCountLimit
(
1
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c33158448
.
negcon
)
e5
:
SetCondition
(
c33158448
.
negcon
)
e5
:
SetTarget
(
c33158448
.
negtg
)
e5
:
SetTarget
(
c33158448
.
negtg
)
e5
:
SetOperation
(
c33158448
.
negop
)
e5
:
SetOperation
(
c33158448
.
negop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c33158448
.
atkval
(
e
,
c
)
function
c33158448
.
atkval
(
e
,
c
)
return
c
:
GetLevel
()
*
300
return
c
:
GetLevel
()
*
300
end
end
function
c33158448
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33158448
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
end
end
function
c33158448
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33158448
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
end
end
function
c33158448
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33158448
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
ep
==
tp
or
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
if
ep
==
tp
or
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsChainNegatable
(
ev
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsChainNegatable
(
ev
)
end
end
function
c33158448
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33158448
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsLevelAbove
(
3
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsLevelAbove
(
3
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
end
end
function
c33158448
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33158448
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
or
c
:
IsLevelBelow
(
2
)
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
or
c
:
IsLevelBelow
(
2
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
-
2
)
e1
:
SetValue
(
-
2
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
end
end
c33971095.lua
View file @
e6ea98bc
--
Vendread Nightmare
--
ヴェンデット・ナイトメア
function
c33971095
.
initial_effect
(
c
)
function
c33971095
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--increase lv
--increase lv
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_LVCHANGE
)
e2
:
SetCategory
(
CATEGORY_LVCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c33971095
.
lvcost
)
e2
:
SetCost
(
c33971095
.
lvcost
)
e2
:
SetTarget
(
c33971095
.
lvtg
)
e2
:
SetTarget
(
c33971095
.
lvtg
)
e2
:
SetOperation
(
c33971095
.
lvop
)
e2
:
SetOperation
(
c33971095
.
lvop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--increase atk
--increase atk
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
33971095
)
e3
:
SetCountLimit
(
1
,
33971095
)
e3
:
SetCondition
(
c33971095
.
atkcon
)
e3
:
SetCondition
(
c33971095
.
atkcon
)
e3
:
SetOperation
(
c33971095
.
atkop
)
e3
:
SetOperation
(
c33971095
.
atkop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c33971095
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33971095
.
lvcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
1
)
e
:
SetLabel
(
1
)
return
true
return
true
end
end
function
c33971095
.
cfilter
(
c
)
function
c33971095
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x106
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x106
)
end
end
function
c33971095
.
filter
(
c
,
tp
)
function
c33971095
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c33971095
.
cfilter
,
1
,
c
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c33971095
.
cfilter
,
1
,
c
,
c
)
end
end
function
c33971095
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33971095
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c33971095
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c33971095
.
filter
(
chkc
)
end
if
chk
==
0
then
if
chk
==
0
then
if
e
:
GetLabel
()
==
1
then
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
return
Duel
.
IsExistingTarget
(
c33971095
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
return
Duel
.
IsExistingTarget
(
c33971095
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
else
else
return
false
return
false
end
end
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
tc
=
Duel
.
SelectTarget
(
tp
,
c33971095
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
local
tc
=
Duel
.
SelectTarget
(
tp
,
c33971095
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
local
sg
=
Duel
.
SelectReleaseGroup
(
tp
,
c33971095
.
cfilter
,
1
,
1
,
tc
,
tc
)
local
sg
=
Duel
.
SelectReleaseGroup
(
tp
,
c33971095
.
cfilter
,
1
,
1
,
tc
,
tc
)
Duel
.
Release
(
sg
,
REASON_COST
)
Duel
.
Release
(
sg
,
REASON_COST
)
e
:
SetLabel
(
sg
:
GetCount
())
e
:
SetLabel
(
sg
:
GetCount
())
end
end
function
c33971095
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33971095
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
e
:
GetLabel
())
e1
:
SetValue
(
e
:
GetLabel
())
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
c33971095
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33971095
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
eg
:
GetFirst
()
local
rc
=
eg
:
GetFirst
()
return
rc
==
Duel
.
GetAttacker
()
and
rc
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
rc
:
IsFaceup
()
return
rc
==
Duel
.
GetAttacker
()
and
rc
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
rc
:
IsFaceup
()
and
bit
.
band
(
rc
:
GetType
(),
0x81
)
==
0x81
and
rc
:
IsSetCard
(
0x106
)
and
rc
:
IsControler
(
tp
)
and
bit
.
band
(
rc
:
GetType
(),
0x81
)
==
0x81
and
rc
:
IsSetCard
(
0x106
)
and
rc
:
IsControler
(
tp
)
end
end
function
c33971095
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33971095
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsFaceup
()
then
if
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1000
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
c34093683.lua
View file @
e6ea98bc
--
Revendread Executor
--
リヴェンデット・エグゼクター
function
c34093683
.
initial_effect
(
c
)
function
c34093683
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--change name
--change name
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
4388680
)
e1
:
SetValue
(
4388680
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--cannot be target
--cannot be target
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e2
:
SetCondition
(
c34093683
.
tgcon
)
e2
:
SetCondition
(
c34093683
.
tgcon
)
e2
:
SetTarget
(
c34093683
.
tgtg
)
e2
:
SetTarget
(
c34093683
.
tgtg
)
e2
:
SetValue
(
aux
.
tgoval
)
e2
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--search
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
34093683
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
34093683
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCountLimit
(
1
,
34093683
)
e3
:
SetCountLimit
(
1
,
34093683
)
e3
:
SetCondition
(
c34093683
.
thcon
)
e3
:
SetCondition
(
c34093683
.
thcon
)
e3
:
SetTarget
(
c34093683
.
thtg
)
e3
:
SetTarget
(
c34093683
.
thtg
)
e3
:
SetOperation
(
c34093683
.
thop
)
e3
:
SetOperation
(
c34093683
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c34093683
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c34093683
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
end
function
c34093683
.
tgtg
(
e
,
c
)
function
c34093683
.
tgtg
(
e
,
c
)
return
c
~=
e
:
GetHandler
()
return
c
~=
e
:
GetHandler
()
end
end
function
c34093683
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c34093683
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
(
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
))
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
(
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
))
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
end
function
c34093683
.
thfilter
(
c
)
function
c34093683
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToHand
()
end
end
function
c34093683
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c34093683
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c34093683
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c34093683
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c34093683
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c34093683
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c34093683
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c34093683
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
c38459905.lua
View file @
e6ea98bc
--F.A.
Test Run
--F.A.
シェイクダウン
function
c38459905
.
initial_effect
(
c
)
function
c38459905
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_POSITION
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_POSITION
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
38459905
)
e1
:
SetCountLimit
(
1
,
38459905
)
e1
:
SetTarget
(
c38459905
.
target
)
e1
:
SetTarget
(
c38459905
.
target
)
e1
:
SetOperation
(
c38459905
.
activate
)
e1
:
SetOperation
(
c38459905
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--destroy
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
38459906
)
e2
:
SetCountLimit
(
1
,
38459906
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c38459905
.
sptg
)
e2
:
SetTarget
(
c38459905
.
sptg
)
e2
:
SetOperation
(
c38459905
.
spop
)
e2
:
SetOperation
(
c38459905
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c38459905
.
filter
(
c
)
function
c38459905
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanChangePosition
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanChangePosition
()
end
end
function
c38459905
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c38459905
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c38459905
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c38459905
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c38459905
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c38459905
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c38459905
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c38459905
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
end
function
c38459905
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c38459905
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
,
POS_FACEDOWN_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
~=
0
then
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
,
POS_FACEDOWN_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
end
end
end
function
c38459905
.
desfilter
(
c
,
tp
)
function
c38459905
.
desfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
return
c
:
IsFaceup
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
end
function
c38459905
.
spfilter
(
c
,
e
,
tp
)
function
c38459905
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c38459905
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c38459905
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
tp
)
and
c38459905
.
desfilter
(
chkc
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
tp
)
and
c38459905
.
desfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c38459905
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c38459905
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c38459905
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c38459905
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c38459905
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c38459905
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c38459905
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c38459905
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c38459905
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c38459905
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
end
c38532954.lua
View file @
e6ea98bc
--F.A.
Pit Stop
--F.A.
ピットストップ
function
c38532954
.
initial_effect
(
c
)
function
c38532954
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_LVCHANGE
)
e1
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_LVCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
38532954
)
e1
:
SetCountLimit
(
1
,
38532954
)
e1
:
SetTarget
(
c38532954
.
target
)
e1
:
SetTarget
(
c38532954
.
target
)
e1
:
SetOperation
(
c38532954
.
activate
)
e1
:
SetOperation
(
c38532954
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
38532954
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
38532954
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
38532955
)
e2
:
SetCountLimit
(
1
,
38532955
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c38532954
.
sptg
)
e2
:
SetTarget
(
c38532954
.
sptg
)
e2
:
SetOperation
(
c38532954
.
spop
)
e2
:
SetOperation
(
c38532954
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c38532954
.
filter
(
c
)
function
c38532954
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
IsLevelAbove
(
3
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
IsLevelAbove
(
3
)
end
end
function
c38532954
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c38532954
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c38532954
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c38532954
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
c38532954
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c38532954
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SelectTarget
(
tp
,
c38532954
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c38532954
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
38532954
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
38532954
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
ct
+
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
ct
+
1
)
end
end
function
c38532954
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c38532954
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
d
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
p
,
LOCATION_GRAVE
,
0
,
nil
,
38532954
)
+
1
local
d
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsCode
,
p
,
LOCATION_GRAVE
,
0
,
nil
,
38532954
)
+
1
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsLevelAbove
(
3
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsLevelAbove
(
3
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
2
)
e1
:
SetValue
(
-
2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
end
end
function
c38532954
.
spfilter
(
c
,
e
,
tp
)
function
c38532954
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c38532954
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c38532954
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c38532954
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c38532954
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c38532954
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c38532954
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c38532954
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c38532954
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c38532954
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c38532954
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c3909436.lua
View file @
e6ea98bc
--
Vendread Battlelord
--
ヴェンデット・バスタード
function
c3909436
.
initial_effect
(
c
)
function
c3909436
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--act limit
--act limit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
3909436
)
e1
:
SetCountLimit
(
1
,
3909436
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c3909436
.
cost
)
e1
:
SetCost
(
c3909436
.
cost
)
e1
:
SetTarget
(
c3909436
.
target
)
e1
:
SetTarget
(
c3909436
.
target
)
e1
:
SetOperation
(
c3909436
.
operation
)
e1
:
SetOperation
(
c3909436
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
3909436
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
3909436
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
3909437
)
e2
:
SetCountLimit
(
1
,
3909437
)
e2
:
SetCondition
(
c3909436
.
thcon
)
e2
:
SetCondition
(
c3909436
.
thcon
)
e2
:
SetTarget
(
c3909436
.
thtg
)
e2
:
SetTarget
(
c3909436
.
thtg
)
e2
:
SetOperation
(
c3909436
.
thop
)
e2
:
SetOperation
(
c3909436
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c3909436
.
cfilter
(
c
)
function
c3909436
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c3909436
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c3909436
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c3909436
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c3909436
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c3909436
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c3909436
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c3909436
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c3909436
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
e
:
SetLabel
(
Duel
.
AnnounceType
(
tp
))
e
:
SetLabel
(
Duel
.
AnnounceType
(
tp
))
end
end
function
c3909436
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c3909436
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
if
e
:
GetLabel
()
==
0
then
if
e
:
GetLabel
()
==
0
then
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
2
))
e1
:
SetValue
(
c3909436
.
aclimit1
)
e1
:
SetValue
(
c3909436
.
aclimit1
)
elseif
e
:
GetLabel
()
==
1
then
elseif
e
:
GetLabel
()
==
1
then
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
3
))
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
3
))
e1
:
SetValue
(
c3909436
.
aclimit2
)
e1
:
SetValue
(
c3909436
.
aclimit2
)
else
else
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
4
))
e1
:
SetDescription
(
aux
.
Stringid
(
3909436
,
4
))
e1
:
SetValue
(
c3909436
.
aclimit3
)
e1
:
SetValue
(
c3909436
.
aclimit3
)
end
end
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c3909436
.
aclimit1
(
e
,
re
,
tp
)
function
c3909436
.
aclimit1
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
end
function
c3909436
.
aclimit2
(
e
,
re
,
tp
)
function
c3909436
.
aclimit2
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_SPELL
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
re
:
IsActiveType
(
TYPE_SPELL
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
end
function
c3909436
.
aclimit3
(
e
,
re
,
tp
)
function
c3909436
.
aclimit3
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_TRAP
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
re
:
IsActiveType
(
TYPE_TRAP
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
end
function
c3909436
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c3909436
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
end
function
c3909436
.
thfilter
(
c
,
tp
)
function
c3909436
.
thfilter
(
c
,
tp
)
return
bit
.
band
(
c
:
GetType
(),
TYPE_RITUAL
+
TYPE_MONSTER
)
==
TYPE_RITUAL
+
TYPE_MONSTER
and
c
:
IsAbleToHand
()
return
bit
.
band
(
c
:
GetType
(),
TYPE_RITUAL
+
TYPE_MONSTER
)
==
TYPE_RITUAL
+
TYPE_MONSTER
and
c
:
IsAbleToHand
()
and
Duel
.
IsExistingMatchingCard
(
c3909436
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
c
)
and
Duel
.
IsExistingMatchingCard
(
c3909436
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
c
)
end
end
function
c3909436
.
tgfilter
(
c
)
function
c3909436
.
tgfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToGrave
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToGrave
()
end
end
function
c3909436
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c3909436
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c3909436
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c3909436
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c3909436
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c3909436
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
hg
=
Duel
.
SelectMatchingCard
(
tp
,
c3909436
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
hg
=
Duel
.
SelectMatchingCard
(
tp
,
c3909436
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
if
hg
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
hg
,
tp
,
REASON_EFFECT
)
>
0
if
hg
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
hg
,
tp
,
REASON_EFFECT
)
>
0
and
hg
:
GetFirst
():
IsLocation
(
LOCATION_HAND
)
then
and
hg
:
GetFirst
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c3909436
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c3909436
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
end
end
end
c39271553.lua
View file @
e6ea98bc
--F.A.
Auto Navigator
--F.A.
カーナビゲーター
function
c39271553
.
initial_effect
(
c
)
function
c39271553
.
initial_effect
(
c
)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
39271553
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
39271553
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
39271553
)
e1
:
SetCountLimit
(
1
,
39271553
)
e1
:
SetTarget
(
c39271553
.
sptg
)
e1
:
SetTarget
(
c39271553
.
sptg
)
e1
:
SetOperation
(
c39271553
.
spop
)
e1
:
SetOperation
(
c39271553
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
39271553
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
39271553
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
39271554
)
e2
:
SetCountLimit
(
1
,
39271554
)
e2
:
SetTarget
(
c39271553
.
thtg
)
e2
:
SetTarget
(
c39271553
.
thtg
)
e2
:
SetOperation
(
c39271553
.
thop
)
e2
:
SetOperation
(
c39271553
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c39271553
.
filter
(
c
)
function
c39271553
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
GetLevel
()
>
c
:
GetOriginalLevel
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
GetLevel
()
>
c
:
GetOriginalLevel
()
end
end
function
c39271553
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c39271553
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c39271553
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c39271553
.
filter
(
chkc
)
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c39271553
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingTarget
(
c39271553
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c39271553
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c39271553
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c39271553
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39271553
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
local
lv
=
math.abs
(
tc
:
GetLevel
()
-
tc
:
GetOriginalLevel
())
local
lv
=
math.abs
(
tc
:
GetLevel
()
-
tc
:
GetOriginalLevel
())
if
lv
==
0
then
return
end
if
lv
==
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
lv
)
e1
:
SetValue
(
-
lv
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e2
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e2
:
SetValue
(
lv
)
e2
:
SetValue
(
lv
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
end
end
end
end
function
c39271553
.
thfilter
(
c
)
function
c39271553
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsAbleToHand
()
end
end
function
c39271553
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c39271553
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c39271553
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c39271553
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c39271553
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39271553
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c39271553
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c39271553
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
c39838559.lua
View file @
e6ea98bc
--F.A.サーキットGP
--F.A.サーキットGP
function
c39838559
.
initial_effect
(
c
)
function
c39838559
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lv up
--lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x107
))
e2
:
SetValue
(
2
)
e2
:
SetValue
(
2
)
e2
:
SetCondition
(
c39838559
.
lvcon
)
e2
:
SetCondition
(
c39838559
.
lvcon
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--draw
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
39838559
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
39838559
,
0
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCondition
(
c39838559
.
drcon
)
e3
:
SetCondition
(
c39838559
.
drcon
)
e3
:
SetTarget
(
c39838559
.
drtg
)
e3
:
SetTarget
(
c39838559
.
drtg
)
e3
:
SetOperation
(
c39838559
.
drop
)
e3
:
SetOperation
(
c39838559
.
drop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--to hand
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCountLimit
(
1
,
39838559
)
e4
:
SetCountLimit
(
1
,
39838559
)
e4
:
SetCondition
(
c39838559
.
thcon2
)
e4
:
SetCondition
(
c39838559
.
thcon2
)
e4
:
SetTarget
(
c39838559
.
thtg2
)
e4
:
SetTarget
(
c39838559
.
thtg2
)
e4
:
SetOperation
(
c39838559
.
thop2
)
e4
:
SetOperation
(
c39838559
.
thop2
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c39838559
.
lvcon
(
e
)
function
c39838559
.
lvcon
(
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
end
function
c39838559
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39838559
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
eg
:
GetFirst
()
local
rc
=
eg
:
GetFirst
()
return
rc
:
IsRelateToBattle
()
and
rc
:
IsStatus
(
STATUS_OPPO_BATTLE
)
return
rc
:
IsRelateToBattle
()
and
rc
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
rc
:
IsFaceup
()
and
rc
:
IsSetCard
(
0x107
)
and
rc
:
IsControler
(
tp
)
and
rc
:
IsFaceup
()
and
rc
:
IsSetCard
(
0x107
)
and
rc
:
IsControler
(
tp
)
end
end
function
c39838559
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c39838559
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c39838559
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39838559
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
function
c39838559
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39838559
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_EFFECT
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
end
function
c39838559
.
thfilter2
(
c
)
function
c39838559
.
thfilter2
(
c
)
return
c
:
IsSetCard
(
0x107
)
and
not
c
:
IsCode
(
39838559
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x107
)
and
not
c
:
IsCode
(
39838559
)
and
c
:
IsAbleToHand
()
end
end
function
c39838559
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c39838559
.
thtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c39838559
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c39838559
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c39838559
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c39838559
.
thop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c39838559
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c39838559
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
c40509732.lua
View file @
e6ea98bc
--
Samurai Destroyer
--
鬼動武者
function
c40509732
.
initial_effect
(
c
)
function
c40509732
.
initial_effect
(
c
)
--synchro summon
--synchro summon
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(),
1
)
--actlimit
--actlimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c40509732
.
aclimit
)
e1
:
SetValue
(
c40509732
.
aclimit
)
e1
:
SetCondition
(
c40509732
.
con
)
e1
:
SetCondition
(
c40509732
.
con
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--disable
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c40509732
.
con
)
e2
:
SetCondition
(
c40509732
.
con
)
e2
:
SetOperation
(
c40509732
.
disop
)
e2
:
SetOperation
(
c40509732
.
disop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--special summon
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
40509732
,
0
))
e4
:
SetDescription
(
aux
.
Stringid
(
40509732
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCondition
(
c40509732
.
spcon
)
e4
:
SetCondition
(
c40509732
.
spcon
)
e4
:
SetTarget
(
c40509732
.
sptg
)
e4
:
SetTarget
(
c40509732
.
sptg
)
e4
:
SetOperation
(
c40509732
.
spop
)
e4
:
SetOperation
(
c40509732
.
spop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c40509732
.
aclimit
(
e
,
re
,
tp
)
function
c40509732
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
end
function
c40509732
.
con
(
e
)
function
c40509732
.
con
(
e
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
Duel
.
GetAttacker
()
==
c
and
c
:
GetBattleTarget
())
or
Duel
.
GetAttackTarget
()
==
c
return
(
Duel
.
GetAttacker
()
==
c
and
c
:
GetBattleTarget
())
or
Duel
.
GetAttackTarget
()
==
c
end
end
function
c40509732
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40509732
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetAttackTarget
()
local
tc
=
Duel
.
GetAttackTarget
()
if
not
tc
then
return
end
if
not
tc
then
return
end
if
tc
:
IsControler
(
tp
)
then
tc
=
Duel
.
GetAttacker
()
end
if
tc
:
IsControler
(
tp
)
then
tc
=
Duel
.
GetAttacker
()
end
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
RESETS_STANDARD
)
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
RESETS_STANDARD
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetCondition
(
c40509732
.
discon2
)
e1
:
SetCondition
(
c40509732
.
discon2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetCondition
(
c40509732
.
discon2
)
e2
:
SetCondition
(
c40509732
.
discon2
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c40509732
.
discon2
(
e
)
function
c40509732
.
discon2
(
e
)
return
e
:
GetOwner
():
IsRelateToCard
(
e
:
GetHandler
())
return
e
:
GetOwner
():
IsRelateToCard
(
e
:
GetHandler
())
end
end
function
c40509732
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40509732
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
return
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
end
end
function
c40509732
.
filter
(
c
,
e
,
tp
)
function
c40509732
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c40509732
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c40509732
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c40509732
.
filter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c40509732
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c40509732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c40509732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c40509732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c40509732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c40509732
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40509732
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c40516623.lua
View file @
e6ea98bc
--
Yoko-Zuna Sumo Spirit
--
スモウ魂 YOKO-ZUNA
function
c40516623
.
initial_effect
(
c
)
function
c40516623
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--spirit return
--spirit return
aux
.
EnableSpiritReturn
(
c
,
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP
)
aux
.
EnableSpiritReturn
(
c
,
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP
)
--to hand
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCondition
(
c40516623
.
thcon
)
e1
:
SetCondition
(
c40516623
.
thcon
)
e1
:
SetTarget
(
c40516623
.
thtg
)
e1
:
SetTarget
(
c40516623
.
thtg
)
e1
:
SetOperation
(
c40516623
.
thop
)
e1
:
SetOperation
(
c40516623
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--gy
--gy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetTarget
(
c40516623
.
gytg
)
e2
:
SetTarget
(
c40516623
.
gytg
)
e2
:
SetOperation
(
c40516623
.
gyop
)
e2
:
SetOperation
(
c40516623
.
gyop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c40516623
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40516623
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_PENDULUM
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_PENDULUM
)
end
end
function
c40516623
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c40516623
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c40516623
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40516623
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
function
c40516623
.
tgfilter
(
c
,
tp
)
function
c40516623
.
tgfilter
(
c
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
c40516623
.
gyfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetColumnGroup
())
return
Duel
.
IsExistingMatchingCard
(
c40516623
.
gyfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetColumnGroup
())
end
end
function
c40516623
.
gyfilter
(
c
,
g
)
function
c40516623
.
gyfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
return
g
:
IsContains
(
c
)
end
end
function
c40516623
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c40516623
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40516623
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40516623
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
1
-
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
1
-
tp
,
LOCATION_MZONE
)
end
end
function
c40516623
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40516623
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
pg
=
Duel
.
GetMatchingGroup
(
c40516623
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
tp
)
local
pg
=
Duel
.
GetMatchingGroup
(
c40516623
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
tp
)
if
pg
:
GetCount
()
==
0
then
return
end
if
pg
:
GetCount
()
==
0
then
return
end
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
for
pc
in
aux
.
Next
(
pg
)
do
for
pc
in
aux
.
Next
(
pg
)
do
g
:
Merge
(
Duel
.
GetMatchingGroup
(
c40516623
.
gyfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
pc
:
GetColumnGroup
()))
g
:
Merge
(
Duel
.
GetMatchingGroup
(
c40516623
.
gyfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
pc
:
GetColumnGroup
()))
end
end
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
c41721210.lua
View file @
e6ea98bc
--
Dark Magician the Dragon Knight
--
竜騎士ブラック・マジシャン
function
c41721210
.
initial_effect
(
c
)
function
c41721210
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
46986414
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_DRAGON
),
1
,
true
,
true
)
aux
.
AddFusionProcCodeFun
(
c
,
46986414
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_DRAGON
),
1
,
true
,
true
)
--change name
--change name
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e1
:
SetValue
(
46986414
)
e1
:
SetValue
(
46986414
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--cannot be target
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e3
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_SPELL
+
TYPE_TRAP
))
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_SPELL
+
TYPE_TRAP
))
e3
:
SetValue
(
aux
.
indoval
)
e3
:
SetValue
(
aux
.
indoval
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--indes
--indes
local
e4
=
e3
:
Clone
()
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetValue
(
aux
.
tgoval
)
e4
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
c44373896.lua
View file @
e6ea98bc
--
Destruction Dragon
--
デストロイ・ドラゴン
function
c44373896
.
initial_effect
(
c
)
function
c44373896
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--spsummon condition
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--destroy & damage
--destroy & damage
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e2
:
SetDescription
(
aux
.
Stringid
(
44373896
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
44373896
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c44373896
.
target
)
e2
:
SetTarget
(
c44373896
.
target
)
e2
:
SetOperation
(
c44373896
.
operation
)
e2
:
SetOperation
(
c44373896
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
c44373896
.
material_trap
=
83555666
c44373896
.
material_trap
=
83555666
function
c44373896
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c44373896
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
end
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
if
g
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
then
if
g
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
then
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
local
atk
=
g
:
GetFirst
():
GetTextAttack
()
if
atk
<
0
then
atk
=
0
end
if
atk
<
0
then
atk
=
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
atk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
atk
)
end
end
end
end
function
c44373896
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c44373896
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
1
-
tp
)
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsControler
(
1
-
tp
)
then
local
atk
=
tc
:
GetTextAttack
()
local
atk
=
tc
:
GetTextAttack
()
if
atk
<
0
then
atk
=
0
end
if
atk
<
0
then
atk
=
0
end
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsType
(
TYPE_MONSTER
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsType
(
TYPE_MONSTER
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
atk
,
REASON_EFFECT
)
end
end
end
end
end
end
c49394035.lua
View file @
e6ea98bc
--
Vendread Core
--
ヴェンデット・コア
function
c49394035
.
initial_effect
(
c
)
function
c49394035
.
initial_effect
(
c
)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
49394035
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
49394035
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
49394035
)
e1
:
SetCountLimit
(
1
,
49394035
)
e1
:
SetCost
(
c49394035
.
spcost
)
e1
:
SetCost
(
c49394035
.
spcost
)
e1
:
SetTarget
(
c49394035
.
sptg
)
e1
:
SetTarget
(
c49394035
.
sptg
)
e1
:
SetOperation
(
c49394035
.
spop
)
e1
:
SetOperation
(
c49394035
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--gain
--gain
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCondition
(
c49394035
.
mtcon
)
e2
:
SetCondition
(
c49394035
.
mtcon
)
e2
:
SetOperation
(
c49394035
.
mtop
)
e2
:
SetOperation
(
c49394035
.
mtop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c49394035
.
cfilter
(
c
)
function
c49394035
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c49394035
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c49394035
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c49394035
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c49394035
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c49394035
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c49394035
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c49394035
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c49394035
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c49394035
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49394035
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e1
:
SetValue
(
LOCATION_REMOVED
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
,
true
)
c
:
RegisterEffect
(
e1
,
true
)
end
end
end
end
function
c49394035
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49394035
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_RITUAL
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_MZONE
)
return
r
==
REASON_RITUAL
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_MZONE
)
end
end
function
c49394035
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49394035
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
49394035
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
49394035
)
~=
0
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
eg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x106
)
local
g
=
eg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x106
)
local
rc
=
g
:
GetFirst
()
local
rc
=
g
:
GetFirst
()
if
not
rc
then
return
end
if
not
rc
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
aux
.
tgoval
)
e1
:
SetValue
(
aux
.
tgoval
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_ADD_TYPE
)
e3
:
SetCode
(
EFFECT_ADD_TYPE
)
e3
:
SetValue
(
TYPE_EFFECT
)
e3
:
SetValue
(
TYPE_EFFECT
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e3
,
true
)
rc
:
RegisterEffect
(
e3
,
true
)
end
end
rc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
49394035
,
1
))
rc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
49394035
,
1
))
Duel
.
RegisterFlagEffect
(
tp
,
49394035
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
49394035
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
c49477180.lua
View file @
e6ea98bc
--
Vendread Strix
--
ヴェンデット・ストリゲス
function
c49477180
.
initial_effect
(
c
)
function
c49477180
.
initial_effect
(
c
)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
49477180
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
49477180
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
49477180
)
e1
:
SetCountLimit
(
1
,
49477180
)
e1
:
SetCost
(
c49477180
.
spcost
)
e1
:
SetCost
(
c49477180
.
spcost
)
e1
:
SetTarget
(
c49477180
.
sptg
)
e1
:
SetTarget
(
c49477180
.
sptg
)
e1
:
SetOperation
(
c49477180
.
spop
)
e1
:
SetOperation
(
c49477180
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--gain
--gain
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCondition
(
c49477180
.
mtcon
)
e2
:
SetCondition
(
c49477180
.
mtcon
)
e2
:
SetOperation
(
c49477180
.
mtop
)
e2
:
SetOperation
(
c49477180
.
mtop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c49477180
.
spcfilter
(
c
)
function
c49477180
.
spcfilter
(
c
)
return
c
:
IsSetCard
(
0x106
)
and
not
c
:
IsPublic
()
return
c
:
IsSetCard
(
0x106
)
and
not
c
:
IsPublic
()
end
end
function
c49477180
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c49477180
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c49477180
.
spcfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c49477180
.
spcfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
cg
=
Duel
.
SelectMatchingCard
(
tp
,
c49477180
.
spcfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
cg
=
Duel
.
SelectMatchingCard
(
tp
,
c49477180
.
spcfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
end
end
function
c49477180
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c49477180
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c49477180
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49477180
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e1
:
SetValue
(
LOCATION_REMOVED
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
,
true
)
c
:
RegisterEffect
(
e1
,
true
)
end
end
end
end
function
c49477180
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49477180
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_RITUAL
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_MZONE
)
return
r
==
REASON_RITUAL
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_MZONE
)
end
end
function
c49477180
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49477180
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
49477180
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
49477180
)
~=
0
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
eg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x106
)
local
g
=
eg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x106
)
local
rc
=
g
:
GetFirst
()
local
rc
=
g
:
GetFirst
()
if
not
rc
then
return
end
if
not
rc
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
49477180
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
49477180
,
1
))
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_DRAW
)
e1
:
SetCategory
(
CATEGORY_HANDES
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetTarget
(
c49477180
.
drtg
)
e1
:
SetTarget
(
c49477180
.
drtg
)
e1
:
SetOperation
(
c49477180
.
drop
)
e1
:
SetOperation
(
c49477180
.
drop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_ADD_TYPE
)
e3
:
SetCode
(
EFFECT_ADD_TYPE
)
e3
:
SetValue
(
TYPE_EFFECT
)
e3
:
SetValue
(
TYPE_EFFECT
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e3
,
true
)
rc
:
RegisterEffect
(
e3
,
true
)
end
end
rc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
49477180
,
2
))
rc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
49477180
,
2
))
Duel
.
RegisterFlagEffect
(
tp
,
49477180
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
49477180
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c49477180
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c49477180
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetAttackTarget
()
~=
nil
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
chk
==
0
then
return
Duel
.
GetAttackTarget
()
~=
nil
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c49477180
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49477180
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
DiscardHand
(
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
)
end
end
end
end
c49655592.lua
View file @
e6ea98bc
--F.A.
Whip Crosser
--F.A.
ウィップクロッサー
function
c49655592
.
initial_effect
(
c
)
function
c49655592
.
initial_effect
(
c
)
--atk up
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c49655592
.
atkval
)
e1
:
SetValue
(
c49655592
.
atkval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--activate cost
--activate cost
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetCost
(
c49655592
.
costchk
)
e2
:
SetCost
(
c49655592
.
costchk
)
e2
:
SetTarget
(
c49655592
.
costtg
)
e2
:
SetTarget
(
c49655592
.
costtg
)
e2
:
SetOperation
(
c49655592
.
costop
)
e2
:
SetOperation
(
c49655592
.
costop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--accumulate
--accumulate
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
0x10000000
+
49655592
)
e3
:
SetCode
(
0x10000000
+
49655592
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetTargetRange
(
0
,
1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--lv up
--lv up
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e0
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
49655592
,
0
))
e4
:
SetDescription
(
aux
.
Stringid
(
49655592
,
0
))
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c49655592
.
lvcon
)
e4
:
SetCondition
(
c49655592
.
lvcon
)
e4
:
SetOperation
(
c49655592
.
lvop
)
e4
:
SetOperation
(
c49655592
.
lvop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--discard limit
--discard limit
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
0
,
1
)
e5
:
SetTargetRange
(
0
,
1
)
e5
:
SetCode
(
EFFECT_CANNOT_DISCARD_HAND
)
e5
:
SetCode
(
EFFECT_CANNOT_DISCARD_HAND
)
e5
:
SetCondition
(
c49655592
.
excon
)
e5
:
SetCondition
(
c49655592
.
excon
)
e5
:
SetValue
(
1
)
e5
:
SetValue
(
1
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_CANNOT_TO_GRAVE_AS_COST
)
e6
:
SetCode
(
EFFECT_CANNOT_TO_GRAVE_AS_COST
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetTargetRange
(
0
,
LOCATION_HAND
)
e6
:
SetTargetRange
(
0
,
LOCATION_HAND
)
e6
:
SetCondition
(
c49655592
.
excon
)
e6
:
SetCondition
(
c49655592
.
excon
)
e6
:
SetValue
(
1
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
end
end
function
c49655592
.
atkval
(
e
,
c
)
function
c49655592
.
atkval
(
e
,
c
)
return
c
:
GetLevel
()
*
300
return
c
:
GetLevel
()
*
300
end
end
function
c49655592
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49655592
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
end
end
function
c49655592
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49655592
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
1
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
function
c49655592
.
costchk
(
e
,
te_or_c
,
tp
)
function
c49655592
.
costchk
(
e
,
te_or_c
,
tp
)
local
ct
=
Duel
.
GetFlagEffect
(
tp
,
49655592
)
local
ct
=
Duel
.
GetFlagEffect
(
tp
,
49655592
)
return
Duel
.
CheckLPCost
(
tp
,
ct
*
300
)
return
Duel
.
CheckLPCost
(
tp
,
ct
*
300
)
end
end
function
c49655592
.
costtg
(
e
,
te
,
tp
)
function
c49655592
.
costtg
(
e
,
te
,
tp
)
if
not
te
:
IsActiveType
(
TYPE_MONSTER
)
then
return
false
end
if
not
te
:
IsActiveType
(
TYPE_MONSTER
)
then
return
false
end
local
tc
=
te
:
GetHandler
()
local
tc
=
te
:
GetHandler
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
if
tc
:
GetRank
()
>
0
then
if
tc
:
GetRank
()
>
0
then
return
tc
:
GetOriginalRank
()
<
lv
return
tc
:
GetOriginalRank
()
<
lv
elseif
tc
:
GetLevel
()
>
0
then
elseif
tc
:
GetLevel
()
>
0
then
return
tc
:
GetOriginalLevel
()
<
lv
return
tc
:
GetOriginalLevel
()
<
lv
else
return
false
end
else
return
false
end
end
end
function
c49655592
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49655592
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
PayLPCost
(
tp
,
300
)
Duel
.
PayLPCost
(
tp
,
300
)
end
end
function
c49655592
.
excon
(
e
)
function
c49655592
.
excon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
7
)
return
e
:
GetHandler
():
IsLevelAbove
(
7
)
end
end
c5641251.lua
View file @
e6ea98bc
--F.A.
Dead Heat
--F.A.
デッド・ヒート
function
c5641251
.
initial_effect
(
c
)
function
c5641251
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_ATTACK
)
e1
:
SetHintTiming
(
TIMING_ATTACK
)
e1
:
SetTarget
(
c5641251
.
acttg
)
e1
:
SetTarget
(
c5641251
.
acttg
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
5641251
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
5641251
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
5641251
)
e2
:
SetCountLimit
(
1
,
5641251
)
e2
:
SetCondition
(
c5641251
.
spcon
)
e2
:
SetCondition
(
c5641251
.
spcon
)
e2
:
SetCost
(
c5641251
.
spcost
)
e2
:
SetCost
(
c5641251
.
spcost
)
e2
:
SetTarget
(
c5641251
.
sptg
)
e2
:
SetTarget
(
c5641251
.
sptg
)
e2
:
SetOperation
(
c5641251
.
spop
)
e2
:
SetOperation
(
c5641251
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--atk up
--atk up
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
5641251
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
5641251
,
1
))
e3
:
SetCategory
(
CATEGORY_LVCHANGE
+
CATEGORY_DESTROY
)
e3
:
SetCategory
(
CATEGORY_LVCHANGE
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLE_CONFIRM
)
e3
:
SetCode
(
EVENT_BATTLE_CONFIRM
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCondition
(
c5641251
.
lvlcon
)
e3
:
SetCondition
(
c5641251
.
lvlcon
)
e3
:
SetOperation
(
c5641251
.
lvlop
)
e3
:
SetOperation
(
c5641251
.
lvlop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c5641251
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c5641251
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
if
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
then
if
Duel
.
CheckEvent
(
EVENT_ATTACK_ANNOUNCE
)
then
if
c5641251
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
c5641251
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
c5641251
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
c5641251
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
c5641251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
c5641251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetProperty
(
0
)
e
:
SetProperty
(
0
)
e
:
SetOperation
(
c5641251
.
spop
)
e
:
SetOperation
(
c5641251
.
spop
)
c5641251
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
c5641251
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
c5641251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
c5641251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
0
,
RESET_CHAIN
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
65
)
e
:
GetHandler
():
RegisterFlagEffect
(
0
,
RESET_CHAIN
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
65
)
return
return
end
end
end
end
e
:
SetCategory
(
0
)
e
:
SetCategory
(
0
)
e
:
SetProperty
(
0
)
e
:
SetProperty
(
0
)
e
:
SetOperation
(
nil
)
e
:
SetOperation
(
nil
)
end
end
function
c5641251
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c5641251
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
Duel
.
GetAttackTarget
()
==
nil
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
and
Duel
.
GetAttackTarget
()
==
nil
end
end
function
c5641251
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c5641251
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
5641251
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
5641251
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
5641251
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
5641251
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c5641251
.
spfilter
(
c
,
e
,
tp
)
function
c5641251
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c5641251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c5641251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c5641251
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c5641251
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c5641251
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c5641251
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c5641251
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c5641251
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c5641251
.
lvlcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c5641251
.
lvlcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttackTarget
()
local
bc
=
Duel
.
GetAttackTarget
()
if
not
bc
then
return
false
end
if
not
bc
then
return
false
end
if
tc
:
IsControler
(
1
-
tp
)
then
bc
,
tc
=
tc
,
bc
end
if
tc
:
IsControler
(
1
-
tp
)
then
bc
,
tc
=
tc
,
bc
end
return
bc
:
IsFaceup
()
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x107
)
return
bc
:
IsFaceup
()
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x107
)
end
end
function
c5641251
.
lvlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c5641251
.
lvlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttacker
()
local
bc
=
Duel
.
GetAttackTarget
()
local
bc
=
Duel
.
GetAttackTarget
()
if
not
bc
then
return
false
end
if
not
bc
then
return
false
end
if
tc
:
IsControler
(
1
-
tp
)
then
bc
,
tc
=
tc
,
bc
end
if
tc
:
IsControler
(
1
-
tp
)
then
bc
,
tc
=
tc
,
bc
end
local
d1
=
0
local
d1
=
0
local
d2
=
0
local
d2
=
0
while
d1
==
d2
do
while
d1
==
d2
do
d1
,
d2
=
Duel
.
TossDice
(
tp
,
1
,
1
)
d1
,
d2
=
Duel
.
TossDice
(
tp
,
1
,
1
)
end
end
if
d1
>
d2
then
if
d1
>
d2
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
4
)
e1
:
SetValue
(
4
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
else
else
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
end
c60375194.lua
View file @
e6ea98bc
--
Vendread Daybreak
--
ヴェンデット・デイブレイク
function
c60375194
.
initial_effect
(
c
)
function
c60375194
.
initial_effect
(
c
)
--destroy
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
60375194
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
60375194
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c60375194
.
condition
)
e1
:
SetCondition
(
c60375194
.
condition
)
e1
:
SetTarget
(
c60375194
.
target
)
e1
:
SetTarget
(
c60375194
.
target
)
e1
:
SetOperation
(
c60375194
.
activate
)
e1
:
SetOperation
(
c60375194
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c60375194
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60375194
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
)
>
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
)
>
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
end
end
function
c60375194
.
filter
(
c
)
function
c60375194
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x106
)
and
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x106
)
and
c
:
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
end
function
c60375194
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60375194
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60375194
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60375194
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
()
-
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
()
-
1
,
0
,
0
)
end
end
function
c60375194
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60375194
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c60375194
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c60375194
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
not
tc
then
return
end
if
not
tc
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
tc
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
tc
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
c64635042.lua
View file @
e6ea98bc
--デーモンの招来
--デーモンの招来
--Beckoned Skull Archfiend
--Scripted by Eerie Code
function
c64635042
.
initial_effect
(
c
)
function
c64635042
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
...
...
c6764709.lua
View file @
e6ea98bc
--F.A.
Dark Dragster
--F.A.
ダークネスマスター
function
c6764709
.
initial_effect
(
c
)
function
c6764709
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c6764709
.
spcon
)
e1
:
SetCondition
(
c6764709
.
spcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--atk up
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c6764709
.
atkval
)
e2
:
SetValue
(
c6764709
.
atkval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetOperation
(
aux
.
chainreg
)
e3
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
6764709
,
0
))
e4
:
SetDescription
(
aux
.
Stringid
(
6764709
,
0
))
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c6764709
.
lvcon
)
e4
:
SetCondition
(
c6764709
.
lvcon
)
e4
:
SetOperation
(
c6764709
.
lvop
)
e4
:
SetOperation
(
c6764709
.
lvop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--destroy
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
6764709
,
1
))
e5
:
SetDescription
(
aux
.
Stringid
(
6764709
,
1
))
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCountLimit
(
1
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTarget
(
c6764709
.
rdtg
)
e5
:
SetTarget
(
c6764709
.
rdtg
)
e5
:
SetOperation
(
c6764709
.
rdop
)
e5
:
SetOperation
(
c6764709
.
rdop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c6764709
.
spfilter1
(
c
)
function
c6764709
.
spfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
6764709
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
6764709
)
end
end
function
c6764709
.
spfilter2
(
c
)
function
c6764709
.
spfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
IsLevelAbove
(
7
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
and
c
:
IsLevelAbove
(
7
)
end
end
function
c6764709
.
spcon
(
e
,
c
)
function
c6764709
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
Duel
.
IsExistingMatchingCard
(
c6764709
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
return
false
end
or
Duel
.
IsExistingMatchingCard
(
c6764709
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
return
false
end
return
Duel
.
IsExistingMatchingCard
(
c6764709
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c6764709
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c6764709
.
atkval
(
e
,
c
)
function
c6764709
.
atkval
(
e
,
c
)
return
c
:
GetLevel
()
*
300
return
c
:
GetLevel
()
*
300
end
end
function
c6764709
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6764709
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
end
end
function
c6764709
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6764709
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
end
end
function
c6764709
.
rdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c6764709
.
rdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
e
:
GetHandler
():
IsLevelAbove
(
4
)
end
and
e
:
GetHandler
():
IsLevelAbove
(
4
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
function
c6764709
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6764709
.
rdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsLevelBelow
(
3
)
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsLevelBelow
(
3
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
-
3
)
e1
:
SetValue
(
-
3
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
end
c69553552.lua
View file @
e6ea98bc
--F.A.
Winners
--F.A.
ウィナーズ
function
c69553552
.
initial_effect
(
c
)
function
c69553552
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--indes
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c69553552
.
indcon
)
e2
:
SetCondition
(
c69553552
.
indcon
)
e2
:
SetValue
(
aux
.
indoval
)
e2
:
SetValue
(
aux
.
indoval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--banish
--banish
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e3
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
69553552
)
e3
:
SetCountLimit
(
1
,
69553552
)
e3
:
SetCondition
(
c69553552
.
rmcon
)
e3
:
SetCondition
(
c69553552
.
rmcon
)
e3
:
SetTarget
(
c69553552
.
rmtg
)
e3
:
SetTarget
(
c69553552
.
rmtg
)
e3
:
SetOperation
(
c69553552
.
rmop
)
e3
:
SetOperation
(
c69553552
.
rmop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--win
--win
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetOperation
(
c69553552
.
winop
)
e4
:
SetOperation
(
c69553552
.
winop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c69553552
.
cfilter
(
c
)
function
c69553552
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107
)
end
end
function
c69553552
.
indcon
(
e
)
function
c69553552
.
indcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c69553552
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c69553552
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c69553552
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c69553552
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
local
d
=
a
:
GetBattleTarget
()
local
d
=
a
:
GetBattleTarget
()
if
not
d
then
return
false
end
if
not
d
then
return
false
end
if
not
a
:
IsControler
(
tp
)
then
a
,
d
=
d
,
a
end
if
not
a
:
IsControler
(
tp
)
then
a
,
d
=
d
,
a
end
return
a
:
IsControler
(
tp
)
and
a
:
IsSetCard
(
0x107
)
return
a
:
IsControler
(
tp
)
and
a
:
IsSetCard
(
0x107
)
and
a
:
GetLevel
()
-
a
:
GetOriginalLevel
()
>=
5
and
a
:
GetLevel
()
-
a
:
GetOriginalLevel
()
>=
5
and
ep
~=
tp
and
ep
~=
tp
end
end
function
c69553552
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c69553552
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
end
function
c69553552
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c69553552
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
if
tc
and
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
tc
:
IsSetCard
(
0x107
)
and
tc
:
IsType
(
TYPE_FIELD
)
then
and
tc
:
IsSetCard
(
0x107
)
and
tc
:
IsType
(
TYPE_FIELD
)
then
tc
:
RegisterFlagEffect
(
69553552
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
tc
:
RegisterFlagEffect
(
69553552
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
end
end
end
end
function
c69553552
.
winfilter
(
c
)
function
c69553552
.
winfilter
(
c
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetFlagEffect
(
69553552
)
~=
0
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetFlagEffect
(
69553552
)
~=
0
end
end
function
c69553552
.
winop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c69553552
.
winop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
WIN_REASON_FA_WINNERS
=
0x1d
local
WIN_REASON_FA_WINNERS
=
0x1d
local
g
=
Duel
.
GetMatchingGroup
(
c69553552
.
winfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c69553552
.
winfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
==
3
then
if
g
:
GetClassCount
(
Card
.
GetCode
)
==
3
then
Duel
.
Win
(
tp
,
WIN_REASON_FA_WINNERS
)
Duel
.
Win
(
tp
,
WIN_REASON_FA_WINNERS
)
end
end
end
end
c70491682.lua
View file @
e6ea98bc
--
Vendread Anima
--
ヴェンデット・アニマ
function
c70491682
.
initial_effect
(
c
)
function
c70491682
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
70491682
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
70491682
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
70491682
)
e1
:
SetCountLimit
(
1
,
70491682
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c70491682
.
sptg
)
e1
:
SetTarget
(
c70491682
.
sptg
)
e1
:
SetOperation
(
c70491682
.
spop
)
e1
:
SetOperation
(
c70491682
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--gain
--gain
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCondition
(
c70491682
.
mtcon
)
e2
:
SetCondition
(
c70491682
.
mtcon
)
e2
:
SetOperation
(
c70491682
.
mtop
)
e2
:
SetOperation
(
c70491682
.
mtop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c70491682
.
spfilter
(
c
,
e
,
tp
)
function
c70491682
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x106
)
and
not
c
:
IsCode
(
70491682
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x106
)
and
not
c
:
IsCode
(
70491682
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c70491682
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c70491682
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c70491682
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c70491682
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c70491682
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c70491682
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c70491682
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c70491682
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c70491682
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c70491682
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c70491682
.
splimit
)
e1
:
SetTarget
(
c70491682
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c70491682
.
splimit
(
e
,
c
)
function
c70491682
.
splimit
(
e
,
c
)
return
c
:
GetRace
()
~=
RACE_ZOMBIE
return
c
:
GetRace
()
~=
RACE_ZOMBIE
end
end
function
c70491682
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c70491682
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_RITUAL
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_MZONE
)
return
r
==
REASON_RITUAL
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_MZONE
)
end
end
function
c70491682
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c70491682
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
70491682
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
70491682
)
~=
0
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
eg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x106
)
local
g
=
eg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x106
)
local
rc
=
g
:
GetFirst
()
local
rc
=
g
:
GetFirst
()
if
not
rc
then
return
end
if
not
rc
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_BATTLE_DESTROY_REDIRECT
)
e1
:
SetCode
(
EFFECT_BATTLE_DESTROY_REDIRECT
)
e1
:
SetValue
(
LOCATION_REMOVED
)
e1
:
SetValue
(
LOCATION_REMOVED
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e2
,
true
)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
rc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
70491682
,
1
))
rc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
70491682
,
1
))
Duel
.
RegisterFlagEffect
(
tp
,
70491682
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
70491682
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
c71614230.lua
View file @
e6ea98bc
--
Kai-Den Kendo Spirit
--
ケンドウ魂 KAI-DEN
function
c71614230
.
initial_effect
(
c
)
function
c71614230
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--spirit return
--spirit return
aux
.
EnableSpiritReturn
(
c
,
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP
)
aux
.
EnableSpiritReturn
(
c
,
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP
)
--to hand
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCondition
(
c71614230
.
thcon
)
e1
:
SetCondition
(
c71614230
.
thcon
)
e1
:
SetTarget
(
c71614230
.
thtg
)
e1
:
SetTarget
(
c71614230
.
thtg
)
e1
:
SetOperation
(
c71614230
.
thop
)
e1
:
SetOperation
(
c71614230
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to grave
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetTarget
(
c71614230
.
gytg
)
e2
:
SetTarget
(
c71614230
.
gytg
)
e2
:
SetOperation
(
c71614230
.
gyop
)
e2
:
SetOperation
(
c71614230
.
gyop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c71614230
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71614230
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_PENDULUM
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_PENDULUM
)
end
end
function
c71614230
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71614230
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c71614230
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71614230
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
function
c71614230
.
tgfilter
(
c
,
tp
)
function
c71614230
.
tgfilter
(
c
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
c71614230
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
c
:
GetColumnGroup
())
return
Duel
.
IsExistingMatchingCard
(
c71614230
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
c
:
GetColumnGroup
())
end
end
function
c71614230
.
gyfilter
(
c
,
g
)
function
c71614230
.
gyfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
return
g
:
IsContains
(
c
)
end
end
function
c71614230
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71614230
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71614230
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71614230
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
1
-
tp
,
LOCATION_ONFIELD
)
end
end
function
c71614230
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71614230
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
pg
=
Duel
.
SelectMatchingCard
(
tp
,
c71614230
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
pg
=
Duel
.
SelectMatchingCard
(
tp
,
c71614230
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
,
tp
)
if
pg
:
GetCount
()
==
0
then
return
end
if
pg
:
GetCount
()
==
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c71614230
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
pg
:
GetFirst
():
GetColumnGroup
())
local
g
=
Duel
.
GetMatchingGroup
(
c71614230
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
pg
:
GetFirst
():
GetColumnGroup
())
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
c71867500.lua
View file @
e6ea98bc
--
Dragon Revival Rhapsody
--
ドラゴン・復活の狂奏
function
c71867500
.
initial_effect
(
c
)
function
c71867500
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
71867500
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
71867500
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c71867500
.
condition
)
e1
:
SetCondition
(
c71867500
.
condition
)
e1
:
SetTarget
(
c71867500
.
target
)
e1
:
SetTarget
(
c71867500
.
target
)
e1
:
SetOperation
(
c71867500
.
activate
)
e1
:
SetOperation
(
c71867500
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c71867500
.
cfilter
(
c
)
function
c71867500
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SPELLCASTER
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SPELLCASTER
)
end
end
function
c71867500
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71867500
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c71867500
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c71867500
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c71867500
.
filter
(
c
,
e
,
tp
)
function
c71867500
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c71867500
.
nfilter
(
c
,
e
,
tp
)
function
c71867500
.
nfilter
(
c
,
e
,
tp
)
return
c71867500
.
filter
(
c
,
e
,
tp
)
and
c
:
IsType
(
TYPE_NORMAL
)
return
c71867500
.
filter
(
c
,
e
,
tp
)
and
c
:
IsType
(
TYPE_NORMAL
)
end
end
function
c71867500
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c71867500
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chkc
then
return
false
end
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsExistingTarget
(
c71867500
.
nfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsExistingTarget
(
c71867500
.
nfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c71867500
.
nfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c71867500
.
nfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
ct
>
1
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
if
ct
>
1
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
IsExistingTarget
(
c71867500
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
g1
,
e
,
tp
)
and
Duel
.
IsExistingTarget
(
c71867500
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
g1
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71867500
,
0
))
then
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71867500
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c71867500
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
g1
,
e
,
tp
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c71867500
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
g1
,
e
,
tp
)
g1
:
Merge
(
g2
)
g1
:
Merge
(
g2
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g1
,
g1
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g1
,
g1
:
GetCount
(),
0
,
0
)
end
end
function
c71867500
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71867500
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
0
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_NO_EFFECT_DAMAGE
)
e2
:
SetCode
(
EFFECT_NO_EFFECT_DAMAGE
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ct
<
1
then
return
end
if
ct
<
1
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
>
ct
or
(
g
:
GetCount
()
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
then
if
g
:
GetCount
()
>
ct
or
(
g
:
GetCount
()
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
end
end
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c72589042.lua
View file @
e6ea98bc
--
Goddess of Sweet Revenge
--
煌々たる逆転の女神
function
c72589042
.
initial_effect
(
c
)
function
c72589042
.
initial_effect
(
c
)
--destroy
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
72589042
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
72589042
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCondition
(
c72589042
.
condition
)
e1
:
SetCondition
(
c72589042
.
condition
)
e1
:
SetCost
(
c72589042
.
cost
)
e1
:
SetCost
(
c72589042
.
cost
)
e1
:
SetTarget
(
c72589042
.
target
)
e1
:
SetTarget
(
c72589042
.
target
)
e1
:
SetOperation
(
c72589042
.
operation
)
e1
:
SetOperation
(
c72589042
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c72589042
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c72589042
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
and
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
e
:
GetHandler
())
==
0
return
tp
~=
Duel
.
GetTurnPlayer
()
and
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
e
:
GetHandler
())
==
0
end
end
function
c72589042
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c72589042
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c72589042
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c72589042
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
if
sg
:
FilterCount
(
Card
.
IsDestructable
,
nil
,
e
)
>
0
then
if
sg
:
FilterCount
(
Card
.
IsDestructable
,
nil
,
e
)
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
end
end
function
c72589042
.
filter
(
c
,
e
,
tp
)
function
c72589042
.
filter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c72589042
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c72589042
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c72589042
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c72589042
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
72589042
,
1
))
then
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
72589042
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c72589042
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c72589042
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c75059201.lua
View file @
e6ea98bc
--F.A.
Turbo Charger
--F.A.
ターボチャージャー
function
c75059201
.
initial_effect
(
c
)
function
c75059201
.
initial_effect
(
c
)
--atk up
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c75059201
.
atkval
)
e1
:
SetValue
(
c75059201
.
atkval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--untargetable
--untargetable
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetTarget
(
c75059201
.
atglimit
)
e2
:
SetTarget
(
c75059201
.
atglimit
)
e2
:
SetValue
(
c75059201
.
atlimit
)
e2
:
SetValue
(
c75059201
.
atlimit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c75059201
.
tglimit
)
e3
:
SetTarget
(
c75059201
.
tglimit
)
e3
:
SetValue
(
c75059201
.
tgval
)
e3
:
SetValue
(
c75059201
.
tgval
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--lv up
--lv up
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e0
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetOperation
(
aux
.
chainreg
)
e0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
75059201
,
0
))
e4
:
SetDescription
(
aux
.
Stringid
(
75059201
,
0
))
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetCategory
(
CATEGORY_LVCHANGE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
c75059201
.
lvcon
)
e4
:
SetCondition
(
c75059201
.
lvcon
)
e4
:
SetOperation
(
c75059201
.
lvop
)
e4
:
SetOperation
(
c75059201
.
lvop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--actlimit
--actlimit
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e5
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetTargetRange
(
0
,
1
)
e5
:
SetTargetRange
(
0
,
1
)
e5
:
SetValue
(
c75059201
.
aclimit
)
e5
:
SetValue
(
c75059201
.
aclimit
)
e5
:
SetCondition
(
c75059201
.
actcon
)
e5
:
SetCondition
(
c75059201
.
actcon
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c75059201
.
atkval
(
e
,
c
)
function
c75059201
.
atkval
(
e
,
c
)
return
c
:
GetLevel
()
*
300
return
c
:
GetLevel
()
*
300
end
end
function
c75059201
.
atglimit
(
e
,
c
)
function
c75059201
.
atglimit
(
e
,
c
)
local
lv
=
e
:
GetHandler
():
GetLevel
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
if
c
:
GetRank
()
>
0
then
if
c
:
GetRank
()
>
0
then
return
c
:
GetOriginalRank
()
<
lv
return
c
:
GetOriginalRank
()
<
lv
elseif
c
:
GetLevel
()
>
0
then
elseif
c
:
GetLevel
()
>
0
then
return
c
:
GetOriginalLevel
()
<
lv
return
c
:
GetOriginalLevel
()
<
lv
else
return
false
end
else
return
false
end
end
end
function
c75059201
.
atlimit
(
e
,
c
)
function
c75059201
.
atlimit
(
e
,
c
)
return
c
~=
e
:
GetHandler
()
return
c
~=
e
:
GetHandler
()
end
end
function
c75059201
.
tglimit
(
e
,
c
)
function
c75059201
.
tglimit
(
e
,
c
)
return
c
~=
e
:
GetHandler
()
return
c
~=
e
:
GetHandler
()
end
end
function
c75059201
.
tgval
(
e
,
re
,
rp
)
function
c75059201
.
tgval
(
e
,
re
,
rp
)
if
not
aux
.
tgoval
(
e
,
re
,
rp
)
then
return
false
end
if
not
aux
.
tgoval
(
e
,
re
,
rp
)
then
return
false
end
local
c
=
re
:
GetHandler
()
local
c
=
re
:
GetHandler
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
if
c
:
GetRank
()
>
0
then
if
c
:
GetRank
()
>
0
then
return
c
:
GetOriginalRank
()
<
lv
return
c
:
GetOriginalRank
()
<
lv
elseif
c
:
GetLevel
()
>
0
then
elseif
c
:
GetLevel
()
>
0
then
return
c
:
GetOriginalLevel
()
<
lv
return
c
:
GetOriginalLevel
()
<
lv
else
return
false
end
else
return
false
end
end
end
function
c75059201
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75059201
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
end
end
function
c75059201
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75059201
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
1
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
function
c75059201
.
aclimit
(
e
,
re
,
tp
)
function
c75059201
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
end
function
c75059201
.
actcon
(
e
)
function
c75059201
.
actcon
(
e
)
if
not
e
:
GetHandler
():
IsLevelAbove
(
7
)
then
return
false
end
if
not
e
:
GetHandler
():
IsLevelAbove
(
7
)
then
return
false
end
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
if
not
a
then
return
false
end
if
not
a
then
return
false
end
local
d
=
a
:
GetBattleTarget
()
local
d
=
a
:
GetBattleTarget
()
if
a
:
IsControler
(
1
-
e
:
GetHandler
():
GetControler
())
then
a
,
d
=
d
,
a
end
if
a
:
IsControler
(
1
-
e
:
GetHandler
():
GetControler
())
then
a
,
d
=
d
,
a
end
return
a
and
a
:
IsSetCard
(
0x107
)
return
a
and
a
:
IsSetCard
(
0x107
)
end
end
c75676192.lua
View file @
e6ea98bc
--F.A.
Motorhome Transport
--F.A.
ホームトランスポーター
function
c75676192
.
initial_effect
(
c
)
function
c75676192
.
initial_effect
(
c
)
--synchro summon
--synchro summon
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
--atk up
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c75676192
.
atkval
)
e1
:
SetValue
(
c75676192
.
atkval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
aux
.
chainreg
)
e2
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
75676192
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
75676192
,
0
))
e3
:
SetCategory
(
CATEGORY_LVCHANGE
)
e3
:
SetCategory
(
CATEGORY_LVCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c75676192
.
lvcon
)
e3
:
SetCondition
(
c75676192
.
lvcon
)
e3
:
SetOperation
(
c75676192
.
lvop
)
e3
:
SetOperation
(
c75676192
.
lvop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--indes
--indes
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e4
:
SetCondition
(
c75676192
.
indcon
)
e4
:
SetCondition
(
c75676192
.
indcon
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--special summon
--special summon
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
75676192
,
1
))
e6
:
SetDescription
(
aux
.
Stringid
(
75676192
,
1
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCountLimit
(
1
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c75676192
.
spcon
)
e6
:
SetCondition
(
c75676192
.
spcon
)
e6
:
SetTarget
(
c75676192
.
sptg
)
e6
:
SetTarget
(
c75676192
.
sptg
)
e6
:
SetOperation
(
c75676192
.
spop
)
e6
:
SetOperation
(
c75676192
.
spop
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
end
end
function
c75676192
.
atkval
(
e
,
c
)
function
c75676192
.
atkval
(
e
,
c
)
return
c
:
GetLevel
()
*
300
return
c
:
GetLevel
()
*
300
end
end
function
c75676192
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75676192
.
lvcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
GetHandler
():
IsSetCard
(
0x107
)
and
e
:
GetHandler
():
GetFlagEffect
(
1
)
>
0
end
end
function
c75676192
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75676192
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e4
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
end
end
function
c75676192
.
indcon
(
e
)
function
c75676192
.
indcon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
11
)
return
e
:
GetHandler
():
IsLevelAbove
(
11
)
end
end
function
c75676192
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75676192
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsLevelAbove
(
13
)
return
e
:
GetHandler
():
IsLevelAbove
(
13
)
end
end
function
c75676192
.
filter
(
c
,
e
,
tp
)
function
c75676192
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x107
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c75676192
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c75676192
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c75676192
.
filter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c75676192
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c75676192
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c75676192
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c75676192
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c75676192
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c75676192
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75676192
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c76798740.lua
View file @
e6ea98bc
--
Vendread Charge
--
ヴェンデット・チャージ
function
c76798740
.
initial_effect
(
c
)
function
c76798740
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
76798740
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
76798740
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c76798740
.
cost
)
e1
:
SetCost
(
c76798740
.
cost
)
e1
:
SetTarget
(
c76798740
.
target
)
e1
:
SetTarget
(
c76798740
.
target
)
e1
:
SetOperation
(
c76798740
.
activate
)
e1
:
SetOperation
(
c76798740
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c76798740
.
cfilter
(
c
,
tp
)
function
c76798740
.
cfilter
(
c
,
tp
)
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsRace
(
RACE_ZOMBIE
)
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
end
function
c76798740
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c76798740
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76798740
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76798740
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76798740
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76798740
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c76798740
.
filter
(
c
,
e
,
tp
)
function
c76798740
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c76798740
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c76798740
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76798740
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76798740
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c76798740
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c76798740
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76798740
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76798740
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c76871889.lua
View file @
e6ea98bc
--
Vendread Nights
--
ヴェンデット・ナイト
function
c76871889
.
initial_effect
(
c
)
function
c76871889
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
76871889
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
76871889
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
76871889
)
e2
:
SetCountLimit
(
1
,
76871889
)
e2
:
SetCost
(
c76871889
.
thcost
)
e2
:
SetCost
(
c76871889
.
thcost
)
e2
:
SetTarget
(
c76871889
.
thtg
)
e2
:
SetTarget
(
c76871889
.
thtg
)
e2
:
SetOperation
(
c76871889
.
thop
)
e2
:
SetOperation
(
c76871889
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--chain attack
--chain attack
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
76871889
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
76871889
,
1
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e3
:
SetCondition
(
c76871889
.
atcon
)
e3
:
SetCondition
(
c76871889
.
atcon
)
e3
:
SetCost
(
c76871889
.
atcost
)
e3
:
SetCost
(
c76871889
.
atcost
)
e3
:
SetOperation
(
c76871889
.
atop
)
e3
:
SetOperation
(
c76871889
.
atop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c76871889
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c76871889
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c76871889
.
thfilter
(
c
)
function
c76871889
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
c76871889
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c76871889
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76871889
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76871889
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c76871889
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c76871889
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76871889
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76871889
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c76871889
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c76871889
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
eg
:
GetFirst
()
local
ec
=
eg
:
GetFirst
()
local
bc
=
ec
:
GetBattleTarget
()
local
bc
=
ec
:
GetBattleTarget
()
e
:
SetLabelObject
(
ec
)
e
:
SetLabelObject
(
ec
)
return
ec
:
IsControler
(
tp
)
and
ec
:
IsSetCard
(
0x106
)
and
bc
and
bc
:
IsType
(
TYPE_MONSTER
)
return
ec
:
IsControler
(
tp
)
and
ec
:
IsSetCard
(
0x106
)
and
bc
and
bc
:
IsType
(
TYPE_MONSTER
)
and
ec
:
IsChainAttackable
(
0
,
true
)
and
ec
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
ec
:
IsChainAttackable
(
0
,
true
)
and
ec
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
end
function
c76871889
.
atcfilter
(
c
)
function
c76871889
.
atcfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x106
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c76871889
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c76871889
.
atcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76871889
.
atcfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c76871889
.
atcfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76871889
.
atcfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c76871889
.
atcfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c76871889
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c76871889
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ec
=
e
:
GetLabelObject
()
local
ec
=
e
:
GetLabelObject
()
if
not
ec
or
not
ec
:
IsRelateToBattle
()
then
return
end
if
not
ec
or
not
ec
:
IsRelateToBattle
()
then
return
end
Duel
.
ChainAttack
()
Duel
.
ChainAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
ec
:
RegisterEffect
(
e1
)
ec
:
RegisterEffect
(
e1
)
end
end
c77511331.lua
View file @
e6ea98bc
--
Kuro-Obi Karate Spirit
--
カラテ魂 KURO-OBI
function
c77511331
.
initial_effect
(
c
)
function
c77511331
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--spirit return
--spirit return
aux
.
EnableSpiritReturn
(
c
,
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP
)
aux
.
EnableSpiritReturn
(
c
,
EVENT_SUMMON_SUCCESS
,
EVENT_FLIP
)
--to hand
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCondition
(
c77511331
.
thcon
)
e1
:
SetCondition
(
c77511331
.
thcon
)
e1
:
SetTarget
(
c77511331
.
thtg
)
e1
:
SetTarget
(
c77511331
.
thtg
)
e1
:
SetOperation
(
c77511331
.
thop
)
e1
:
SetOperation
(
c77511331
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--gy
--gy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetTarget
(
c77511331
.
gytg
)
e2
:
SetTarget
(
c77511331
.
gytg
)
e2
:
SetOperation
(
c77511331
.
gyop
)
e2
:
SetOperation
(
c77511331
.
gyop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c77511331
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c77511331
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_PENDULUM
)
return
eg
:
IsExists
(
Card
.
IsSummonType
,
1
,
nil
,
SUMMON_TYPE_PENDULUM
)
end
end
function
c77511331
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c77511331
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c77511331
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c77511331
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
function
c77511331
.
tgfilter
(
c
,
tp
)
function
c77511331
.
tgfilter
(
c
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
c77511331
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
c
:
GetColumnGroup
())
return
Duel
.
IsExistingMatchingCard
(
c77511331
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
c
:
GetColumnGroup
())
end
end
function
c77511331
.
gyfilter
(
c
,
g
)
function
c77511331
.
gyfilter
(
c
,
g
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
g
:
IsContains
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
g
:
IsContains
(
c
)
end
end
function
c77511331
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c77511331
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c77511331
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c77511331
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
1
-
tp
,
LOCATION_ONFIELD
)
end
end
function
c77511331
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c77511331
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
pg
=
Duel
.
GetMatchingGroup
(
c77511331
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
tp
)
local
pg
=
Duel
.
GetMatchingGroup
(
c77511331
.
tgfilter
,
tp
,
LOCATION_PZONE
,
0
,
nil
,
tp
)
if
pg
:
GetCount
()
==
0
then
return
end
if
pg
:
GetCount
()
==
0
then
return
end
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
for
pc
in
aux
.
Next
(
pg
)
do
for
pc
in
aux
.
Next
(
pg
)
do
g
:
Merge
(
Duel
.
GetMatchingGroup
(
c77511331
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
pc
:
GetColumnGroup
()))
g
:
Merge
(
Duel
.
GetMatchingGroup
(
c77511331
.
gyfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
pc
:
GetColumnGroup
()))
end
end
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
c77994337.lua
View file @
e6ea98bc
--
Hallowhallow
--
ハロハロ
function
c77994337
.
initial_effect
(
c
)
function
c77994337
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--level
--level
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
77994337
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
77994337
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c77994337
.
lvtg
)
e1
:
SetTarget
(
c77994337
.
lvtg
)
e1
:
SetOperation
(
c77994337
.
lvop
)
e1
:
SetOperation
(
c77994337
.
lvop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c77994337
.
lvfilter
(
c
)
function
c77994337
.
lvfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
>
0
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
>
0
end
end
function
c77994337
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c77994337
.
lvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c77994337
.
lvfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c77994337
.
lvfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c77994337
.
lvfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c77994337
.
lvfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c77994337
.
lvfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c77994337
.
lvfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
end
function
c77994337
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c77994337
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e1
:
SetValue
(
dc
)
e1
:
SetValue
(
dc
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
c7852509.lua
View file @
e6ea98bc
--
Loop of Destruction
--
破壊輪廻
function
c7852509
.
initial_effect
(
c
)
function
c7852509
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--change code
--change code
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_CHANGE_CODE
)
e2
:
SetCode
(
EFFECT_CHANGE_CODE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetValue
(
83555666
)
e2
:
SetValue
(
83555666
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--destroy
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c7852509
.
descon
)
e3
:
SetCondition
(
c7852509
.
descon
)
e3
:
SetTarget
(
c7852509
.
destg
)
e3
:
SetTarget
(
c7852509
.
destg
)
e3
:
SetOperation
(
c7852509
.
desop
)
e3
:
SetOperation
(
c7852509
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c7852509
.
cfilter
(
c
)
function
c7852509
.
cfilter
(
c
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
end
end
function
c7852509
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7852509
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c7852509
.
cfilter
,
1
,
nil
)
return
eg
:
IsExists
(
c7852509
.
cfilter
,
1
,
nil
)
end
end
function
c7852509
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c7852509
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
PLAYER_ALL
,
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
PLAYER_ALL
,
500
)
end
end
function
c7852509
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7852509
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
Damage
(
tp
,
500
,
REASON_EFFECT
,
true
)
Duel
.
Damage
(
tp
,
500
,
REASON_EFFECT
,
true
)
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
,
true
)
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
,
true
)
Duel
.
RDComplete
()
Duel
.
RDComplete
()
end
end
end
end
c7986397.lua
View file @
e6ea98bc
--
Revendread Evolution
--
リヴェンデット・バース
function
c7986397
.
initial_effect
(
c
)
function
c7986397
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
7986397
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
7986397
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c7986397
.
target
)
e1
:
SetTarget
(
c7986397
.
target
)
e1
:
SetOperation
(
c7986397
.
activate
)
e1
:
SetOperation
(
c7986397
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c7986397
.
dfilter
(
c
)
function
c7986397
.
dfilter
(
c
)
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x106
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsAbleToGrave
()
end
end
function
c7986397
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
function
c7986397
.
filter
(
c
,
e
,
tp
,
m
,
ft
)
if
not
c
:
IsSetCard
(
0x106
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
if
not
c
:
IsSetCard
(
0x106
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
local
dg
=
Duel
.
GetMatchingGroup
(
c7986397
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
c7986397
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
ft
>
0
then
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
or
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
c
)
or
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
c
)
else
else
return
ft
>-
1
and
mg
:
IsExists
(
c7986397
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
dg
,
c
)
return
ft
>-
1
and
mg
:
IsExists
(
c7986397
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
dg
,
c
)
end
end
end
end
function
c7986397
.
mfilterf
(
c
,
tp
,
mg
,
dg
,
rc
)
function
c7986397
.
mfilterf
(
c
,
tp
,
mg
,
dg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
or
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
rc
,
c
)
or
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
rc
,
c
)
else
return
false
end
else
return
false
end
end
end
function
c7986397
.
dlvfilter
(
c
,
tp
,
mg
,
rc
,
mc
)
function
c7986397
.
dlvfilter
(
c
,
tp
,
mg
,
rc
,
mc
)
Duel
.
SetSelectedCard
(
Group
.
FromCards
(
c
,
mc
))
Duel
.
SetSelectedCard
(
Group
.
FromCards
(
c
,
mc
))
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
end
end
function
c7986397
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c7986397
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
Duel
.
IsExistingMatchingCard
(
c7986397
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
return
Duel
.
IsExistingMatchingCard
(
c7986397
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
ft
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
end
function
c7986397
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7986397
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
m
=
Duel
.
GetRitualMaterial
(
tp
)
local
m
=
Duel
.
GetRitualMaterial
(
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c7986397
.
filter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
m
,
ft
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c7986397
.
filter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
m
,
ft
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
tc
then
if
tc
then
local
mat
,
dmat
local
mat
,
dmat
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
mg
=
m
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
local
dg
=
Duel
.
GetMatchingGroup
(
c7986397
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
dg
=
Duel
.
GetMatchingGroup
(
c7986397
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
ft
>
0
then
if
ft
>
0
then
local
b1
=
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
tc
)
local
b1
=
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
tc
)
local
b2
=
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
local
b2
=
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
if
b1
and
(
not
b2
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
7986397
,
0
)))
then
if
b1
and
(
not
b2
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
7986397
,
0
)))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
dmat
=
dg
:
FilterSelect
(
tp
,
c7986397
.
dlvfilter
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
dmat
=
dg
:
FilterSelect
(
tp
,
c7986397
.
dlvfilter
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
dmat
)
Duel
.
SetSelectedCard
(
dmat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
dmat
)
mat
:
Merge
(
dmat
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
end
end
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c7986397
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
dg
,
tc
)
mat
=
mg
:
FilterSelect
(
tp
,
c7986397
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
dg
,
tc
)
local
b1
=
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
tc
,
mat
:
GetFirst
())
local
b1
=
dg
:
IsExists
(
c7986397
.
dlvfilter
,
1
,
nil
,
tp
,
mg
,
tc
,
mat
:
GetFirst
())
Duel
.
SetSelectedCard
(
mat
)
Duel
.
SetSelectedCard
(
mat
)
local
b2
=
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
local
b2
=
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
if
b1
and
(
not
b2
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
7986397
,
0
)))
then
if
b1
and
(
not
b2
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
7986397
,
0
)))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
dmat
=
dg
:
FilterSelect
(
tp
,
c7986397
.
dlvfilter
,
1
,
1
,
nil
,
tp
,
mg
,
tc
,
mat
:
GetFirst
())
dmat
=
dg
:
FilterSelect
(
tp
,
c7986397
.
dlvfilter
,
1
,
1
,
nil
,
tp
,
mg
,
tc
,
mat
:
GetFirst
())
mat
:
Merge
(
dmat
)
mat
:
Merge
(
dmat
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
mat
:
Merge
(
mat2
)
else
else
Duel
.
SetSelectedCard
(
mat
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
mat
:
Merge
(
mat2
)
end
end
end
end
tc
:
SetMaterial
(
mat
)
tc
:
SetMaterial
(
mat
)
if
dmat
then
if
dmat
then
mat
:
Sub
(
dmat
)
mat
:
Sub
(
dmat
)
Duel
.
SendtoGrave
(
dmat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
SendtoGrave
(
dmat
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
end
end
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
tc
:
CompleteProcedure
()
tc
:
RegisterFlagEffect
(
7986397
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
tc
:
RegisterFlagEffect
(
7986397
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCondition
(
c7986397
.
descon
)
e1
:
SetCondition
(
c7986397
.
descon
)
e1
:
SetOperation
(
c7986397
.
desop
)
e1
:
SetOperation
(
c7986397
.
desop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabelObject
(
tc
)
e1
:
SetLabelObject
(
tc
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
c7986397
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7986397
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
tc
:
GetFlagEffect
(
7986397
)
~=
0
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
tc
:
GetFlagEffect
(
7986397
)
~=
0
end
end
function
c7986397
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7986397
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
c8608979.lua
View file @
e6ea98bc
--
Super Team Buddy Force Unite!
--
一族の結集
function
c8608979
.
initial_effect
(
c
)
function
c8608979
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c8608979
.
target
)
e1
:
SetTarget
(
c8608979
.
target
)
e1
:
SetOperation
(
c8608979
.
operation
)
e1
:
SetOperation
(
c8608979
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--set
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
8608979
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
8608979
,
0
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c8608979
.
setcon
)
e2
:
SetCondition
(
c8608979
.
setcon
)
e2
:
SetTarget
(
c8608979
.
settg
)
e2
:
SetTarget
(
c8608979
.
settg
)
e2
:
SetOperation
(
c8608979
.
setop
)
e2
:
SetOperation
(
c8608979
.
setop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c8608979
.
filter1
(
c
,
e
,
tp
)
function
c8608979
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c8608979
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c8608979
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
c
,
e
,
tp
)
end
end
function
c8608979
.
filter2
(
c
,
tc
,
e
,
tp
)
function
c8608979
.
filter2
(
c
,
tc
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
GetOriginalRace
()
==
tc
:
GetOriginalRace
()
and
c
:
GetOriginalRace
()
==
tc
:
GetOriginalRace
()
and
c
:
GetOriginalCode
()
~=
tc
:
GetOriginalCode
()
and
c
:
GetOriginalCode
()
~=
tc
:
GetOriginalCode
()
end
end
function
c8608979
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c8608979
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c8608979
.
filter1
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsFaceup
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c8608979
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c8608979
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c8608979
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c8608979
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c8608979
.
filter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
end
function
c8608979
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c8608979
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c8608979
.
filter2
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tc
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c8608979
.
filter2
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tc
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c8608979
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c8608979
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
return
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
end
function
c8608979
.
setfilter
(
c
)
function
c8608979
.
setfilter
(
c
)
return
c
:
IsCode
(
8608979
)
and
c
:
IsSSetable
()
return
c
:
IsCode
(
8608979
)
and
c
:
IsSSetable
()
end
end
function
c8608979
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c8608979
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c8608979
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c8608979
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
end
function
c8608979
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c8608979
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c8608979
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c8608979
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
c87116928.lua
View file @
e6ea98bc
--
Chimeratech Megafleet Dragon
--
キメラテック・メガフリート・ドラゴン
function
c87116928
.
initial_effect
(
c
)
function
c87116928
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x1093
),
c87116928
.
matfilter
,
1
,
63
,
true
)
aux
.
AddFusionProcFunFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x1093
),
c87116928
.
matfilter
,
1
,
63
,
true
)
--spsummon condition
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c87116928
.
splimit
)
e1
:
SetValue
(
c87116928
.
splimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon rule
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
c87116928
.
sprcon
)
e2
:
SetCondition
(
c87116928
.
sprcon
)
e2
:
SetOperation
(
c87116928
.
sprop
)
e2
:
SetOperation
(
c87116928
.
sprop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--cannot be fusion material
--cannot be fusion material
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetValue
(
1
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
c87116928
.
material_setcode
=
0x1093
c87116928
.
material_setcode
=
0x1093
function
c87116928
.
matfilter
(
c
)
function
c87116928
.
matfilter
(
c
)
return
c
:
GetSequence
()
>
4
return
c
:
GetSequence
()
>
4
end
end
function
c87116928
.
splimit
(
e
,
se
,
sp
,
st
)
function
c87116928
.
splimit
(
e
,
se
,
sp
,
st
)
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
end
end
function
c87116928
.
cfilter
(
c
,
tp
)
function
c87116928
.
cfilter
(
c
,
tp
)
return
(
c
:
IsFusionSetCard
(
0x1093
)
or
c
:
GetSequence
()
>
4
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
(
c
:
IsFusionSetCard
(
0x1093
)
or
c
:
GetSequence
()
>
4
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
end
function
c87116928
.
fcheck
(
c
,
sg
)
function
c87116928
.
fcheck
(
c
,
sg
)
return
c
:
IsFusionSetCard
(
0x1093
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
sg
:
FilterCount
(
c87116928
.
fcheck2
,
c
)
+
1
==
sg
:
GetCount
()
return
c
:
IsFusionSetCard
(
0x1093
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
sg
:
FilterCount
(
c87116928
.
fcheck2
,
c
)
+
1
==
sg
:
GetCount
()
end
end
function
c87116928
.
fcheck2
(
c
)
function
c87116928
.
fcheck2
(
c
)
return
c
:
GetSequence
()
>
4
return
c
:
GetSequence
()
>
4
end
end
function
c87116928
.
fgoal
(
c
,
tp
,
sg
)
function
c87116928
.
fgoal
(
c
,
tp
,
sg
)
return
sg
:
GetCount
()
>
1
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
)
>
0
and
sg
:
IsExists
(
c87116928
.
fcheck
,
1
,
nil
,
sg
)
return
sg
:
GetCount
()
>
1
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
)
>
0
and
sg
:
IsExists
(
c87116928
.
fcheck
,
1
,
nil
,
sg
)
end
end
function
c87116928
.
fselect
(
c
,
tp
,
mg
,
sg
)
function
c87116928
.
fselect
(
c
,
tp
,
mg
,
sg
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
local
res
=
c87116928
.
fgoal
(
c
,
tp
,
sg
)
or
mg
:
IsExists
(
c87116928
.
fselect
,
1
,
sg
,
tp
,
mg
,
sg
)
local
res
=
c87116928
.
fgoal
(
c
,
tp
,
sg
)
or
mg
:
IsExists
(
c87116928
.
fselect
,
1
,
sg
,
tp
,
mg
,
sg
)
sg
:
RemoveCard
(
c
)
sg
:
RemoveCard
(
c
)
return
res
return
res
end
end
function
c87116928
.
sprcon
(
e
,
c
)
function
c87116928
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c87116928
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c87116928
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
return
mg
:
IsExists
(
c87116928
.
fselect
,
1
,
nil
,
tp
,
mg
,
sg
)
return
mg
:
IsExists
(
c87116928
.
fselect
,
1
,
nil
,
tp
,
mg
,
sg
)
end
end
function
c87116928
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c87116928
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c87116928
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c87116928
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
while
true
do
while
true
do
local
cg
=
mg
:
Filter
(
c87116928
.
fselect
,
sg
,
tp
,
mg
,
sg
)
local
cg
=
mg
:
Filter
(
c87116928
.
fselect
,
sg
,
tp
,
mg
,
sg
)
if
cg
:
GetCount
()
==
0
if
cg
:
GetCount
()
==
0
or
(
c87116928
.
fgoal
(
c
,
tp
,
sg
)
and
not
Duel
.
SelectYesNo
(
tp
,
210
))
then
break
end
or
(
c87116928
.
fgoal
(
c
,
tp
,
sg
)
and
not
Duel
.
SelectYesNo
(
tp
,
210
))
then
break
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
cg
:
Select
(
tp
,
1
,
1
,
nil
)
local
g
=
cg
:
Select
(
tp
,
1
,
1
,
nil
)
sg
:
Merge
(
g
)
sg
:
Merge
(
g
)
end
end
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
--spsummon condition
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
e1
:
SetValue
(
sg
:
GetCount
()
*
1200
)
e1
:
SetValue
(
sg
:
GetCount
()
*
1200
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
c8978197.lua
View file @
e6ea98bc
--
The King of D.
--
ロード・オブ・ドラゴン-ドラゴンの統制者-
function
c8978197
.
initial_effect
(
c
)
function
c8978197
.
initial_effect
(
c
)
--change name
--change name
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
17985575
)
e1
:
SetValue
(
17985575
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
8978197
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
8978197
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCost
(
c8978197
.
thcost
)
e2
:
SetCost
(
c8978197
.
thcost
)
e2
:
SetTarget
(
c8978197
.
thtg
)
e2
:
SetTarget
(
c8978197
.
thtg
)
e2
:
SetOperation
(
c8978197
.
thop
)
e2
:
SetOperation
(
c8978197
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c8978197
.
cfilter
(
c
)
function
c8978197
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDiscardable
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDiscardable
()
end
end
function
c8978197
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c8978197
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c8978197
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c8978197
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c8978197
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
c8978197
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c8978197
.
thfilter
(
c
)
function
c8978197
.
thfilter
(
c
)
return
c
:
IsCode
(
71867500
,
43973174
,
48800175
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
71867500
,
43973174
,
48800175
)
and
c
:
IsAbleToHand
()
end
end
function
c8978197
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c8978197
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c8978197
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c8978197
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c8978197
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c8978197
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c8978197
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c8978197
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
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