Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
1
Merge Requests
1
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
nanahira
ygopro
Commits
e6cd98fa
Commit
e6cd98fa
authored
Jun 18, 2021
by
kamijyoeast
Committed by
GitHub
Jun 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fh update 20210525 (#51)
parent
74092e49
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
2763 additions
and
0 deletions
+2763
-0
expansions/script/c10182251.lua
expansions/script/c10182251.lua
+86
-0
expansions/script/c10204849.lua
expansions/script/c10204849.lua
+128
-0
expansions/script/c11426487.lua
expansions/script/c11426487.lua
+52
-0
expansions/script/c1157683.lua
expansions/script/c1157683.lua
+103
-0
expansions/script/c12148078.lua
expansions/script/c12148078.lua
+72
-0
expansions/script/c15862758.lua
expansions/script/c15862758.lua
+103
-0
expansions/script/c19369609.lua
expansions/script/c19369609.lua
+84
-0
expansions/script/c23361526.lua
expansions/script/c23361526.lua
+114
-0
expansions/script/c32768230.lua
expansions/script/c32768230.lua
+61
-0
expansions/script/c37542782.lua
expansions/script/c37542782.lua
+99
-0
expansions/script/c41850466.lua
expansions/script/c41850466.lua
+116
-0
expansions/script/c45354718.lua
expansions/script/c45354718.lua
+47
-0
expansions/script/c46576366.lua
expansions/script/c46576366.lua
+57
-0
expansions/script/c47699948.lua
expansions/script/c47699948.lua
+83
-0
expansions/script/c48421595.lua
expansions/script/c48421595.lua
+66
-0
expansions/script/c4991081.lua
expansions/script/c4991081.lua
+70
-0
expansions/script/c50482813.lua
expansions/script/c50482813.lua
+80
-0
expansions/script/c5370235.lua
expansions/script/c5370235.lua
+115
-0
expansions/script/c58543073.lua
expansions/script/c58543073.lua
+83
-0
expansions/script/c59765225.lua
expansions/script/c59765225.lua
+107
-0
expansions/script/c63031396.lua
expansions/script/c63031396.lua
+71
-0
expansions/script/c64753988.lua
expansions/script/c64753988.lua
+57
-0
expansions/script/c72859417.lua
expansions/script/c72859417.lua
+80
-0
expansions/script/c72971064.lua
expansions/script/c72971064.lua
+87
-0
expansions/script/c73193552.lua
expansions/script/c73193552.lua
+115
-0
expansions/script/c79875526.lua
expansions/script/c79875526.lua
+86
-0
expansions/script/c8243121.lua
expansions/script/c8243121.lua
+96
-0
expansions/script/c84815190.lua
expansions/script/c84815190.lua
+89
-0
expansions/script/c85032782.lua
expansions/script/c85032782.lua
+80
-0
expansions/script/c86154370.lua
expansions/script/c86154370.lua
+94
-0
expansions/script/c86976918.lua
expansions/script/c86976918.lua
+76
-0
expansions/script/c89477759.lua
expansions/script/c89477759.lua
+106
-0
No files found.
expansions/script/c10182251.lua
0 → 100644
View file @
e6cd98fa
--LL-ベリル・カナリー
function
c10182251
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10182251
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
10182251
)
e1
:
SetTarget
(
c10182251
.
sptg
)
e1
:
SetOperation
(
c10182251
.
spop
)
c
:
RegisterEffect
(
e1
)
--effect gain
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetProperty
(
EFFECT_FLAG_EVENT_PLAYER
)
e2
:
SetCondition
(
c10182251
.
efcon
)
e2
:
SetOperation
(
c10182251
.
efop
)
c
:
RegisterEffect
(
e2
)
end
function
c10182251
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xf7
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10182251
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c10182251
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
c10182251
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c10182251
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
g
:
AddCard
(
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
2
,
0
,
0
)
end
function
c10182251
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
then
local
g
=
Group
.
FromCards
(
c
,
tc
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
c10182251
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c10182251
.
splimit
(
e
,
c
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
not
c
:
IsType
(
TYPE_XYZ
)
end
function
c10182251
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
r
==
REASON_XYZ
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetReasonCard
():
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c10182251
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
aux
.
Stringid
(
10182251
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetValue
(
200
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
rc
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_CHANGE_CONTROL
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e2
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_ADD_TYPE
)
e3
:
SetValue
(
TYPE_EFFECT
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e3
,
true
)
end
end
expansions/script/c10204849.lua
0 → 100644
View file @
e6cd98fa
--フルール・ド・フルーレ
function
c10204849
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
10204849
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c10204849
.
target
)
e1
:
SetOperation
(
c10204849
.
operation
)
c
:
RegisterEffect
(
e1
)
--atk up
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetValue
(
700
)
c
:
RegisterEffect
(
e3
)
--equip
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_EQUIP
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCountLimit
(
1
,
10204849
)
e4
:
SetCondition
(
c10204849
.
eqcon
)
e4
:
SetTarget
(
c10204849
.
eqtg
)
e4
:
SetOperation
(
c10204849
.
eqop
)
c
:
RegisterEffect
(
e4
)
end
function
c10204849
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10204849
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c10204849
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c10204849
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c10204849
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c10204849
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
Duel
.
Equip
(
tp
,
c
,
tc
)
--equip limit
local
e3
=
Effect
.
CreateEffect
(
tc
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e3
:
SetValue
(
c10204849
.
eqlimit
)
c
:
RegisterEffect
(
e3
)
--Destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e4
:
SetOperation
(
c10204849
.
checkop
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
e5
:
SetOperation
(
c10204849
.
desop
)
e5
:
SetReset
(
RESET_EVENT
+
RESET_OVERLAY
+
RESET_TOFIELD
)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
end
Duel
.
SpecialSummonComplete
()
end
function
c10204849
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
end
function
c10204849
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsDisabled
()
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
end
function
c10204849
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
Reset
()
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c10204849
.
eqcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c10204849
.
eqfilter
(
c
)
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsFaceup
()
end
function
c10204849
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10204849
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c10204849
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10204849
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
tc
:
IsFaceup
()
and
c
:
CheckUniqueOnField
(
tp
)
then
Duel
.
Equip
(
tp
,
c
,
tc
)
--equip limit
local
e1
=
Effect
.
CreateEffect
(
tc
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c10204849
.
eqlimit
)
c
:
RegisterEffect
(
e1
)
end
end
expansions/script/c11426487.lua
0 → 100644
View file @
e6cd98fa
--花騎士団の白馬
function
c11426487
.
initial_effect
(
c
)
--special summon rule
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_DEFENSE
,
0
)
e1
:
SetCountLimit
(
1
,
11426487
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c11426487
.
spcon
)
c
:
RegisterEffect
(
e1
)
--negate attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
11426487
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
11426487
)
e2
:
SetCondition
(
c11426487
.
negcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c11426487
.
negtg
)
e2
:
SetOperation
(
c11426487
.
negop
)
c
:
RegisterEffect
(
e2
)
end
function
c11426487
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
2
)
end
function
c11426487
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
IsExistingMatchingCard
(
c11426487
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c11426487
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttacker
()
return
at
:
GetControler
()
~=
tp
end
function
c11426487
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c11426487
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
NegateAttack
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
expansions/script/c1157683.lua
0 → 100644
View file @
e6cd98fa
--サイバーダーク・インヴェイジョン
function
c1157683
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1157683
,
0
))
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c1157683
.
eqtg
)
e1
:
SetOperation
(
c1157683
.
eqop
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1157683
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e2
:
SetCost
(
c1157683
.
descost
)
e2
:
SetTarget
(
c1157683
.
destg
)
e2
:
SetOperation
(
c1157683
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c1157683
.
eqfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x4093
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
Duel
.
IsExistingMatchingCard
(
c1157683
.
eqfilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
end
function
c1157683
.
eqfilter2
(
c
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_MACHINE
)
and
not
c
:
IsForbidden
()
end
function
c1157683
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c1157683
.
eqfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
1157683
)
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1157683
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
RegisterFlagEffect
(
tp
,
1157683
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c1157683
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
nil
,
1
,
tp
,
0
)
end
function
c1157683
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c1157683
.
eqfilter2
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
ec
,
tp
)
local
ec
=
g
:
GetFirst
()
if
not
ec
or
not
Duel
.
Equip
(
tp
,
ec
,
tc
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c1157683
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
ec
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
1000
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
ec
:
RegisterEffect
(
e2
)
end
end
function
c1157683
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
c1157683
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetEquipTarget
()
and
c
:
GetEquipTarget
():
IsRace
(
RACE_MACHINE
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c1157683
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1157683
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1157683
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c1157683
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
1157684
)
==
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
RegisterFlagEffect
(
tp
,
1157684
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c1157683
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c12148078.lua
0 → 100644
View file @
e6cd98fa
--SRルーレット
function
c12148078
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DICE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
12148078
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c12148078
.
cost
)
e1
:
SetTarget
(
c12148078
.
target
)
e1
:
SetOperation
(
c12148078
.
activate
)
c
:
RegisterEffect
(
e1
)
end
c12148078
.
toss_dice
=
true
function
c12148078
.
cfilter
(
c
,
e
,
tp
)
return
c
:
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
c12148078
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
c
,
e
,
tp
,
6
)
end
function
c12148078
.
spfilter
(
c
,
e
,
tp
,
lv
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsLevelBelow
(
lv
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12148078
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
100
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12148078
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12148078
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
function
c12148078
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
res
=
e
:
GetLabel
()
==
100
e
:
SetLabel
(
0
)
return
res
or
Duel
.
IsExistingMatchingCard
(
c12148078
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
6
)
end
e
:
SetLabel
(
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
function
c12148078
.
fselect
(
g
,
lv
)
return
g
:
GetSum
(
Card
.
GetLevel
)
==
lv
end
function
c12148078
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
local
res
=
false
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
>
0
then
if
ft
>
2
then
ft
=
2
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
local
g
=
Duel
.
GetMatchingGroup
(
c12148078
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
nil
,
e
,
tp
,
dc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c12148078
.
fselect
,
false
,
1
,
ft
,
dc
)
if
sg
then
for
tc
in
aux
.
Next
(
sg
)
do
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
end
Duel
.
SpecialSummonComplete
()
res
=
true
end
end
if
not
res
then
local
lp
=
Duel
.
GetLP
(
tp
)
Duel
.
SetLP
(
tp
,
lp
-
dc
*
500
)
end
end
expansions/script/c15862758.lua
0 → 100644
View file @
e6cd98fa
--CiNo.1000 夢幻虚光神ヌメロニアス・ヌメロニア
function
c15862758
.
initial_effect
(
c
)
--Xyz Summon
aux
.
AddXyzProcedure
(
c
,
nil
,
13
,
5
)
c
:
EnableReviveLimit
()
--Gains the following effects
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c15862758
.
condition
)
e1
:
SetOperation
(
c15862758
.
operation
)
c
:
RegisterEffect
(
e1
)
--Negate Attack/Gains LP
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
15862758
,
0
))
e2
:
SetCategory
(
CATEGORY_RECOVER
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c15862758
.
nacon
)
e2
:
SetCost
(
c15862758
.
nacost
)
e2
:
SetTarget
(
c15862758
.
natg
)
e2
:
SetOperation
(
c15862758
.
naop
)
c
:
RegisterEffect
(
e2
)
end
c15862758
.
xyz_number
=
1000
function
c15862758
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsCode
(
89477759
)
end
function
c15862758
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
--100,000 ATK
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c15862758
.
atkcon
)
e1
:
SetValue
(
100000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--Must attack this card
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_MUST_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetCondition
(
c15862758
.
effcon
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_MUST_ATTACK_MONSTER
)
e3
:
SetValue
(
c15862758
.
atklimit
)
c
:
RegisterEffect
(
e3
)
--Win Condition
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCondition
(
c15862758
.
wincon
)
e4
:
SetOperation
(
c15862758
.
winop
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e4
)
end
function
c15862758
.
atkcon
(
e
)
return
Duel
.
GetTurnPlayer
()
==
1
-
e
:
GetHandlerPlayer
()
end
function
c15862758
.
effcon
(
e
)
return
Duel
.
GetTurnCount
()
>=
e
:
GetHandler
():
GetTurnID
()
+
1
end
function
c15862758
.
atklimit
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
c15862758
.
wincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
e
:
GetHandler
():
GetBattledGroupCount
()
==
0
and
c15862758
.
effcon
(
e
)
end
function
c15862758
.
winop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
WIN_REASON_NUMERONIUS_NUMERONIA
=
0x21
Duel
.
Win
(
tp
,
WIN_REASON_NUMERONIUS_NUMERONIA
)
end
function
c15862758
.
nacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
function
c15862758
.
nacost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c15862758
.
natg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b
=
Duel
.
GetAttacker
()
if
chk
==
0
then
return
b
and
b
:
IsRelateToBattle
()
and
b
:
IsFaceup
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
b
:
GetAttack
())
end
function
c15862758
.
naop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
b
=
Duel
.
GetAttacker
()
if
Duel
.
NegateAttack
()
and
b
and
b
:
IsRelateToBattle
()
and
b
:
IsFaceup
()
then
Duel
.
Recover
(
tp
,
b
:
GetAttack
(),
REASON_EFFECT
)
end
end
expansions/script/c19369609.lua
0 → 100644
View file @
e6cd98fa
--LL-プロム・スラッシュ
function
c19369609
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
nil
,
1
,
2
,
nil
,
nil
,
99
)
--ATK Up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c19369609
.
atkval
)
c
:
RegisterEffect
(
e1
)
--to deck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
19369609
,
0
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c19369609
.
descost
)
e2
:
SetTarget
(
c19369609
.
destg
)
e2
:
SetOperation
(
c19369609
.
desop
)
c
:
RegisterEffect
(
e2
)
--attack up
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
19369609
,
1
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLE_START
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c19369609
.
condition
)
e3
:
SetCost
(
c19369609
.
cost
)
e3
:
SetOperation
(
c19369609
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c19369609
.
atkval
(
e
,
c
)
return
c
:
GetOverlayCount
()
*
500
end
function
c19369609
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c19369609
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToDeck
()
end
function
c19369609
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
c19369609
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c19369609
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c19369609
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
c19369609
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c19369609
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetBattleMonster
(
tp
)
return
tc
:
IsFaceup
()
and
tc
~=
e
:
GetHandler
()
and
tc
:
IsRelateToBattle
()
end
function
c19369609
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
local
rt
=
c
:
GetOverlayCount
()
local
ct
=
c
:
RemoveOverlayCard
(
tp
,
1
,
rt
,
REASON_COST
)
e
:
SetLabel
(
ct
)
end
function
c19369609
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetBattleMonster
(
tp
)
if
not
tc
or
tc
==
c
then
return
end
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToBattle
()
and
tc
:
IsControler
(
tp
)
then
local
ct
=
e
:
GetLabel
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
ct
*
300
)
tc
:
RegisterEffect
(
e1
)
end
end
expansions/script/c23361526.lua
0 → 100644
View file @
e6cd98fa
--HSRコルクー10
function
c23361526
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--choose effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
23361526
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
23361526
)
e1
:
SetCondition
(
c23361526
.
condition
)
e1
:
SetCost
(
c23361526
.
cost
)
e1
:
SetTarget
(
c23361526
.
target
)
e1
:
SetOperation
(
c23361526
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetValue
(
c23361526
.
valcheck
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
Duel
.
AddCustomActivityCounter
(
23361526
,
ACTIVITY_SPSUMMON
,
c23361526
.
counterfilter
)
end
function
c23361526
.
counterfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c23361526
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c23361526
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
23361526
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c23361526
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c23361526
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c23361526
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c23361526
.
spfilter
(
c
,
e
,
tp
,
sync
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
bit
.
band
(
c
:
GetReason
(),
0x80008
)
==
0x80008
and
c
:
GetReasonCard
()
==
sync
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c23361526
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
mg
=
c
:
GetMaterial
()
local
ct
=
mg
:
GetCount
()
local
b1
=
Duel
.
IsExistingMatchingCard
(
c23361526
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
e
:
GetLabel
()
==
1
and
ct
>
0
and
mg
:
FilterCount
(
c23361526
.
spfilter
,
nil
,
e
,
tp
,
c
)
==
ct
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>=
ct
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
if
chk
==
0
then
return
b1
or
b2
end
local
off
=
1
local
ops
,
opval
=
{},{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
23361526
,
1
)
opval
[
off
]
=
0
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
23361526
,
2
)
opval
[
off
]
=
1
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
+
1
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
if
sel
==
0
then
e
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetTargetCard
(
mg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
mg
,
ct
,
0
,
0
)
end
end
function
c23361526
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
if
sel
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c23361526
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
else
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
local
mg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
g
=
mg
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
<
mg
:
GetCount
()
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
g
:
GetCount
()
then
return
end
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c23361526
.
mfilter
(
c
)
return
not
c
:
IsSetCard
(
0x2016
)
end
function
c23361526
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
GetCount
()
>
0
and
not
g
:
IsExists
(
c23361526
.
mfilter
,
1
,
nil
)
then
e
:
GetLabelObject
():
SetLabel
(
1
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
expansions/script/c32768230.lua
0 → 100644
View file @
e6cd98fa
--エターナル・サイバー
function
c32768230
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOEXTRA
+
CATEGORY_GRAVE_ACTION
+
CATEGORY_GRAVE_SPSUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
32768230
)
e1
:
SetTarget
(
c32768230
.
target
)
e1
:
SetOperation
(
c32768230
.
activate
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
32768231
)
e2
:
SetTarget
(
c32768230
.
reptg
)
e2
:
SetValue
(
c32768230
.
repval
)
e2
:
SetOperation
(
c32768230
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c32768230
.
spfilter
(
c
,
e
,
tp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
c
:
IsSetCard
(
0x93
)
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsType
(
TYPE_FUSION
)
and
(
c
:
IsAbleToExtra
()
or
(
ft
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)))
end
function
c32768230
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c32768230
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c32768230
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c32768230
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
function
c32768230
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
tc
:
IsRelateToEffect
(
e
)
then
if
aux
.
NecroValleyNegateCheck
(
tc
)
then
return
end
if
ft
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
and
(
not
tc
:
IsAbleToExtra
()
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
32768230
,
0
),
1152
)
==
1
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
function
c32768230
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x93
)
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
c32768230
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c32768230
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c32768230
.
repval
(
e
,
c
)
return
c32768230
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c32768230
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c37542782.lua
0 → 100644
View file @
e6cd98fa
--鎧皇竜-サイバー・ダーク・エンド・ドラゴン
function
c37542782
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCode2
(
c
,
40418351
,
1546123
,
true
,
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
fuslimit
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
c37542782
.
hspcon
)
e2
:
SetOperation
(
c37542782
.
hspop
)
c
:
RegisterEffect
(
e2
)
--immune
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
c37542782
.
efilter
)
c
:
RegisterEffect
(
e3
)
--equip
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
37542782
,
0
))
e4
:
SetCategory
(
CATEGORY_EQUIP
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetTarget
(
c37542782
.
eqtg
)
e4
:
SetOperation
(
c37542782
.
eqop
)
c
:
RegisterEffect
(
e4
)
--multi attack
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e5
:
SetValue
(
c37542782
.
atkval
)
c
:
RegisterEffect
(
e5
)
end
function
c37542782
.
eqspfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
1546123
)
end
function
c37542782
.
hspfilter
(
c
,
tp
,
sc
)
return
c
:
IsLevelBelow
(
10
)
and
c
:
IsSetCard
(
0x4093
)
and
c
:
IsFusionType
(
TYPE_FUSION
)
and
c
:
IsControler
(
tp
)
and
c
:
GetEquipGroup
():
IsExists
(
c37542782
.
eqspfilter
,
1
,
nil
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
sc
)
>
0
and
c
:
IsCanBeFusionMaterial
(
sc
,
SUMMON_TYPE_SPECIAL
)
end
function
c37542782
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
CheckReleaseGroup
(
c
:
GetControler
(),
c37542782
.
hspfilter
,
1
,
nil
,
c
:
GetControler
(),
c
)
end
function
c37542782
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c37542782
.
hspfilter
,
1
,
1
,
nil
,
tp
,
c
)
c
:
SetMaterial
(
g
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c37542782
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetHandlerPlayer
()
and
re
:
IsActivated
()
end
function
c37542782
.
eqfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsAbleToChangeControler
())
end
function
c37542782
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c37542782
.
eqfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
1
,
0
,
0
)
end
function
c37542782
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
(
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
))
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c37542782
.
eqfilter
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
not
Duel
.
Equip
(
tp
,
tc
,
c
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetLabelObject
(
c
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c37542782
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c37542782
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
c37542782
.
atkval
(
e
,
c
)
return
e
:
GetHandler
():
GetEquipCount
()
-
1
end
expansions/script/c41850466.lua
0 → 100644
View file @
e6cd98fa
--ヌメロン・カオス・リチューアル
function
c41850466
.
initial_effect
(
c
)
--Activate/Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c41850466
.
xyzcon
)
e1
:
SetTarget
(
c41850466
.
xyztg
)
e1
:
SetOperation
(
c41850466
.
xyzop
)
c
:
RegisterEffect
(
e1
)
if
not
c41850466
.
global_check
then
c41850466
.
global_check
=
true
local
ge1
=
Effect
.
GlobalEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_DESTROYED
)
ge1
:
SetOperation
(
c41850466
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c41850466
.
cfilter
(
c
)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousCodeOnField
()
==
79747096
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetReasonEffect
():
IsActiveType
(
TYPE_MONSTER
)
end
function
c41850466
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
c41850466
.
cfilter
,
nil
)
for
tc
in
aux
.
Next
(
g
)
do
Duel
.
RegisterFlagEffect
(
tc
:
GetPreviousControler
(),
41850466
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c41850466
.
xyzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
41850466
)
>
0
end
function
c41850466
.
xyzfilter1
(
c
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x114a
)
and
c
:
IsCanOverlay
()
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
c41850466
.
xyzfilter2
(
c
)
return
c
:
IsCode
(
41418852
)
and
c
:
IsCanOverlay
()
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
c41850466
.
xyzfilter3
(
c
,
e
,
tp
)
return
c
:
IsCode
(
89477759
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
function
c41850466
.
xyztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c41850466
.
xyzfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
c41850466
.
xyzfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
4
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c41850466
.
xyzfilter3
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
sg1
=
Duel
.
SelectTarget
(
tp
,
c41850466
.
xyzfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
sg2
=
Duel
.
SelectTarget
(
tp
,
c41850466
.
xyzfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
4
,
4
,
nil
)
sg1
:
Merge
(
sg2
)
local
g
=
sg1
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
if
#
g
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
#
g
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c41850466
.
mtfilter
(
c
,
e
)
return
c
:
IsRelateToEffect
(
e
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c41850466
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c41850466
.
xyzfilter3
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
sg
:
GetFirst
()
if
sc
and
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
10000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
sc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetValue
(
1000
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
sc
:
RegisterEffect
(
e2
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
g
=
tg
:
Filter
(
c41850466
.
mtfilter
,
nil
,
e
)
if
#
g
==
5
then
Duel
.
Overlay
(
sc
,
g
)
end
end
Duel
.
SpecialSummonComplete
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetLabel
(
c41850466
.
getsummoncount
(
tp
))
e1
:
SetTarget
(
c41850466
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_LEFT_SPSUMMON_COUNT
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetLabel
(
c41850466
.
getsummoncount
(
tp
))
e3
:
SetValue
(
c41850466
.
countval
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
c41850466
.
getsummoncount
(
tp
)
return
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
)
+
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SPSUMMON
)
end
function
c41850466
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c41850466
.
getsummoncount
(
sump
)
>
e
:
GetLabel
()
end
function
c41850466
.
countval
(
e
,
re
,
tp
)
if
c41850466
.
getsummoncount
(
tp
)
>
e
:
GetLabel
()
then
return
0
else
return
1
end
end
expansions/script/c45354718.lua
0 → 100644
View file @
e6cd98fa
--LL-バード・コール
function
c45354718
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
45354718
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
45354718
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c45354718
.
target
)
e1
:
SetOperation
(
c45354718
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c45354718
.
filter
(
c
)
return
c
:
IsSetCard
(
0xf7
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsAbleToGrave
())
end
function
c45354718
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c45354718
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c45354718
.
spfilter
(
c
,
e
,
tp
,
code
)
return
c
:
IsSetCard
(
0xf7
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c45354718
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c45354718
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
<=
0
then
return
end
local
tc
=
g
:
GetFirst
()
local
res
=
false
if
tc
:
IsAbleToHand
()
and
(
not
tc
:
IsAbleToGrave
()
or
Duel
.
SelectOption
(
tp
,
1190
,
1191
)
==
0
)
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
and
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
res
=
true
end
else
if
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
>
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
res
=
true
end
end
if
res
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c45354718
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
tc
:
GetCode
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
45354718
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c45354718
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
:
GetCode
())
Duel
.
SpecialSummon
(
g2
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c46576366.lua
0 → 100644
View file @
e6cd98fa
--LL-セレスト・ワグテイル
function
c46576366
.
initial_effect
(
c
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
46576366
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
46576366
)
e1
:
SetTarget
(
c46576366
.
thtg
)
e1
:
SetOperation
(
c46576366
.
thop
)
c
:
RegisterEffect
(
e1
)
--overlay
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
46576366
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
46576367
)
e2
:
SetTarget
(
c46576366
.
ovtg
)
e2
:
SetOperation
(
c46576366
.
ovop
)
c
:
RegisterEffect
(
e2
)
end
function
c46576366
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xf7
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c46576366
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c46576366
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c46576366
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c46576366
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c46576366
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf7
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c46576366
.
ovtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c46576366
.
ovfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c46576366
.
ovfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanOverlay
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c46576366
.
ovfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c46576366
.
ovop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
not
c
:
IsImmuneToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
c
))
end
end
expansions/script/c47699948.lua
0 → 100644
View file @
e6cd98fa
--シンクロ・ディレンマ
function
c47699948
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47699948
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
47699948
)
e1
:
SetCost
(
c47699948
.
spcost
)
e1
:
SetTarget
(
c47699948
.
sptg1
)
e1
:
SetOperation
(
c47699948
.
spop1
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47699948
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
47699948
)
e2
:
SetTarget
(
c47699948
.
sptg2
)
e2
:
SetOperation
(
c47699948
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c47699948
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x1017
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsFaceup
()
or
not
c
:
IsLocation
(
LOCATION_MZONE
))
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c47699948
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
,
e
,
tp
)
end
function
c47699948
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c47699948
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c47699948
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47699948
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c47699948
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c47699948
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47699948
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c47699948
.
desfilter
(
c
,
e
,
tp
)
local
code
=
c
:
GetOriginalCode
()
return
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c47699948
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
code
,
e
,
tp
)
end
function
c47699948
.
spfilter2
(
c
,
code
,
e
,
tp
)
return
not
c
:
IsCode
(
code
)
and
c
:
IsSetCard
(
0x1017
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c47699948
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
c47699948
.
desfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c47699948
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c47699948
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c47699948
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c47699948
.
spfilter2
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tc
:
GetOriginalCode
(),
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c48421595.lua
0 → 100644
View file @
e6cd98fa
--ネクロ・シンクロン
function
c48421595
.
initial_effect
(
c
)
--code
aux
.
EnableChangeCode
(
c
,
19642774
,
LOCATION_MZONE
+
LOCATION_GRAVE
)
--lv up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
48421595
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
48421595
)
e1
:
SetTarget
(
c48421595
.
lvltg
)
e1
:
SetOperation
(
c48421595
.
lvlop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
48421595
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCountLimit
(
1
,
48421596
)
e2
:
SetCondition
(
c48421595
.
spcon
)
e2
:
SetTarget
(
c48421595
.
sptg
)
e2
:
SetOperation
(
c48421595
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c48421595
.
lvltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
end
function
c48421595
.
lvlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
2
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c48421595
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
r
==
REASON_SYNCHRO
and
c
:
GetReasonCard
():
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c48421595
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
1
)
and
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c48421595
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c48421595
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c48421595
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c48421595
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c4991081.lua
0 → 100644
View file @
e6cd98fa
--ハーピィズペット竜-セイント・ファイアー・ギガ
function
c4991081
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
4991081
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
4991081
)
e1
:
SetCondition
(
c4991081
.
spcon
)
e1
:
SetTarget
(
c4991081
.
sptg
)
e1
:
SetOperation
(
c4991081
.
spop
)
c
:
RegisterEffect
(
e1
)
--cannot be target for attacks
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetValue
(
c4991081
.
atlimit
)
c
:
RegisterEffect
(
e2
)
--burial
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
4991081
,
1
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
4991082
)
e3
:
SetCondition
(
c4991081
.
tgcon
)
e3
:
SetTarget
(
c4991081
.
tgtg
)
e3
:
SetOperation
(
c4991081
.
tgop
)
c
:
RegisterEffect
(
e3
)
end
function
c4991081
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsLevelBelow
(
6
)
end
function
c4991081
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c4991081
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c4991081
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c4991081
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c4991081
.
atlimit
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsSetCard
(
0x64
)
end
function
c4991081
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c4991081
.
tgfilter
(
c
)
return
c
:
IsRace
(
RACE_WINDBEAST
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsAbleToGrave
()
end
function
c4991081
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c4991081
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c4991081
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c4991081
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c50482813.lua
0 → 100644
View file @
e6cd98fa
--SR吹持童子
function
c50482813
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50482813
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
50482813
)
e1
:
SetTarget
(
c50482813
.
thtg
)
e1
:
SetOperation
(
c50482813
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--decrease level
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
50482813
,
1
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
,
50482814
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetTarget
(
c50482813
.
target
)
e3
:
SetOperation
(
c50482813
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c50482813
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c50482813
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c50482813
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
ct
and
Duel
.
GetDecktopGroup
(
tp
,
ct
):
IsExists
(
Card
.
IsAbleToHand
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c50482813
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
c50482813
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
aux
.
ExceptThisCard
(
e
))
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
ct
)
if
#
g
>
0
then
Duel
.
DisableShuffleCheck
()
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_ATOHAND
)
local
sc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
sc
:
IsAbleToHand
()
then
Duel
.
SendtoHand
(
sc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
Duel
.
ShuffleHand
(
tp
)
else
Duel
.
SendtoGrave
(
sc
,
REASON_RULE
)
end
end
if
#
g
>
1
then
Duel
.
SortDecktop
(
tp
,
tp
,
#
g
-
1
)
for
i
=
1
,
#
g
-
1
do
local
dg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
Duel
.
MoveSequence
(
dg
:
GetFirst
(),
1
)
end
end
end
function
c50482813
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
3
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
end
function
c50482813
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c50482813
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c50482813
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50482813
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
end
function
c50482813
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
end
end
expansions/script/c5370235.lua
0 → 100644
View file @
e6cd98fa
--サイバー・ダーク・キメラ
--not fully implemented
function
c5370235
.
initial_effect
(
c
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
5370235
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
5370235
)
e1
:
SetCost
(
c5370235
.
thcost
)
e1
:
SetTarget
(
c5370235
.
thtg
)
e1
:
SetOperation
(
c5370235
.
thop
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
5370235
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
5370236
)
e2
:
SetTarget
(
c5370235
.
tgtg
)
e2
:
SetOperation
(
c5370235
.
tgop
)
c
:
RegisterEffect
(
e2
)
--
if
not
aux
.
fus_mat_hack_check
then
aux
.
fus_mat_hack_check
=
true
function
aux
.
fus_mat_hack_exmat_filter
(
c
)
return
c
:
IsHasEffect
(
EFFECT_EXTRA_FUSION_MATERIAL
,
c
:
GetControler
())
end
_SendtoGrave
=
Duel
.
SendtoGrave
function
Duel
.
SendtoGrave
(
tg
,
reason
)
if
reason
~=
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
or
aux
.
GetValueType
(
tg
)
~=
"Group"
then
return
_SendtoGrave
(
tg
,
reason
)
end
local
rg
=
tg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
tg
:
Sub
(
rg
)
local
tc
=
rg
:
Filter
(
aux
.
fus_mat_hack_exmat_filter
,
nil
):
GetFirst
()
if
tc
then
local
te
=
tc
:
IsHasEffect
(
EFFECT_EXTRA_FUSION_MATERIAL
,
tc
:
GetControler
())
te
:
UseCountLimit
(
tc
:
GetControler
())
end
local
ct1
=
_SendtoGrave
(
tg
,
reason
)
local
ct2
=
Duel
.
Remove
(
rg
,
POS_FACEUP
,
reason
)
return
ct1
+
ct2
end
end
end
function
c5370235
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDiscardable
()
end
function
c5370235
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c5370235
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
c5370235
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
end
function
c5370235
.
thfilter
(
c
)
return
c
:
IsCode
(
37630732
)
and
c
:
IsAbleToHand
()
end
function
c5370235
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c5370235
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c5370235
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c5370235
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
0xff
,
0xff
)
e1
:
SetTarget
(
c5370235
.
limittg
)
e1
:
SetValue
(
c5370235
.
fuslimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetDescription
(
aux
.
Stringid
(
5370235
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_EXTRA_FUSION_MATERIAL
)
e2
:
SetTargetRange
(
LOCATION_GRAVE
,
0
)
--e2:SetCountLimit(1,5370237)
e2
:
SetTarget
(
c5370235
.
mttg
)
e2
:
SetValue
(
c5370235
.
fuslimit
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c5370235
.
limittg
(
e
,
c
)
return
not
(
c
:
IsRace
(
RACE_DRAGON
+
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x93
))
end
function
c5370235
.
fuslimit
(
e
,
c
,
sumtype
)
if
not
c
then
return
false
end
return
c
:
IsControler
(
e
:
GetHandlerPlayer
())
end
function
c5370235
.
mttg
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
end
function
c5370235
.
tgfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x4093
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
c
:
GetCode
())
and
c
:
IsAbleToGrave
()
end
function
c5370235
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c5370235
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c5370235
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c5370235
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c58543073.lua
0 → 100644
View file @
e6cd98fa
--SRデュプリゲート
function
c58543073
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
58543073
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCost
(
c58543073
.
cost
)
e1
:
SetTarget
(
c58543073
.
target
)
e1
:
SetOperation
(
c58543073
.
activate
)
c
:
RegisterEffect
(
e1
)
--substitute as a monster
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
58543073
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
58543073
+
EFFECT_COUNT_CODE_DUEL
)
e2
:
SetCondition
(
c58543073
.
spcon
)
e2
:
SetTarget
(
c58543073
.
sptg
)
e2
:
SetOperation
(
c58543073
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c58543073
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c58543073
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c58543073
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c58543073
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c58543073
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c58543073
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c58543073
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
and
Duel
.
GetTurnPlayer
()
==
tp
end
function
c58543073
.
lvfilter
(
c
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
GetLevel
()
>
1
and
c
:
IsFaceup
()
end
function
c58543073
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c58543073
.
lvfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
58543073
,
0x2016
,
TYPES_NORMAL_TRAP_MONSTER
+
TYPE_TUNER
,
0
,
0
,
1
,
RACE_MACHINE
,
ATTRIBUTE_WIND
)
and
Duel
.
IsExistingTarget
(
c58543073
.
lvfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c58543073
.
lvfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c58543073
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
-
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
58543073
,
0x2016
,
TYPES_NORMAL_TRAP_MONSTER
+
TYPE_TUNER
,
0
,
0
,
1
,
RACE_MACHINE
,
ATTRIBUTE_WIND
)
~=
0
then
c
:
AddMonsterAttribute
(
TYPE_NORMAL
+
TYPE_TUNER
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
end
expansions/script/c59765225.lua
0 → 100644
View file @
e6cd98fa
--クリスタルクリアウィング・シンクロ・ドラゴン
function
c59765225
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSynchroType
,
TYPE_SYNCHRO
),
aux
.
NonTuner
(
Card
.
IsSetCard
,
0xff
),
1
,
1
)
c
:
EnableReviveLimit
()
--immue
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
59765225
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
c59765225
.
imcon
)
e1
:
SetOperation
(
c59765225
.
imop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
59765225
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c59765225
.
discon
)
e2
:
SetTarget
(
c59765225
.
distg
)
e2
:
SetOperation
(
c59765225
.
disop
)
c
:
RegisterEffect
(
e2
)
--to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
59765225
,
2
))
e3
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c59765225
.
thcon
)
e3
:
SetTarget
(
c59765225
.
thtg
)
e3
:
SetOperation
(
c59765225
.
thop
)
c
:
RegisterEffect
(
e3
)
end
c59765225
.
material_type
=
TYPE_SYNCHRO
function
c59765225
.
imcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c59765225
.
imop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
rc
:
IsRelateToEffect
(
re
)
and
rc
:
IsControler
(
1
-
tp
)
and
rc
:
GetBaseAttack
()
>
0
then
local
atk
=
rc
:
GetBaseAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
59765225
,
3
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
c59765225
.
efilter
)
c
:
RegisterEffect
(
e2
)
end
end
function
c59765225
.
efilter
(
e
,
te
)
return
te
:
IsActivated
()
and
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
function
c59765225
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c59765225
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c59765225
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c59765225
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
and
rp
==
1
-
tp
and
c
:
IsPreviousControler
(
tp
)
end
function
c59765225
.
thfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsAbleToHand
()
end
function
c59765225
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c59765225
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c59765225
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c59765225
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c63031396.lua
0 → 100644
View file @
e6cd98fa
--サイバネティック・ホライゾン
function
c63031396
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
63031396
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c63031396
.
cost
)
e1
:
SetTarget
(
c63031396
.
target
)
e1
:
SetOperation
(
c63031396
.
activate
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
63031396
,
ACTIVITY_SPSUMMON
,
c63031396
.
counterfilter
)
end
function
c63031396
.
counterfilter
(
c
)
return
not
c
:
IsSummonLocation
(
LOCATION_EXTRA
)
or
c
:
IsRace
(
RACE_MACHINE
)
end
function
c63031396
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x93
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c63031396
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x93
)
and
c
:
IsAbleToHand
()
end
function
c63031396
.
fselect
(
g
,
tp
)
local
sg
=
g
:
Clone
()
local
res
=
true
for
c
in
aux
.
Next
(
sg
)
do
res
=
res
and
not
sg
:
IsExists
(
Card
.
IsAttribute
,
1
,
c
,
c
:
GetAttribute
())
end
return
g
:
GetClassCount
(
Card
.
GetLocation
)
==
g
:
GetCount
()
and
res
and
Duel
.
IsExistingMatchingCard
(
c63031396
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
g
)
end
function
c63031396
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c63031396
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
nil
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
63031396
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
and
g
:
CheckSubGroup
(
c63031396
.
fselect
,
2
,
2
,
tp
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c63031396
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
c63031396
.
fselect
,
false
,
2
,
2
,
tp
)
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
function
c63031396
.
splimit
(
e
,
c
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c63031396
.
tgfilter
(
c
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x93
)
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAbleToGrave
()
end
function
c63031396
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c63031396
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c63031396
.
tgfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c63031396
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c63031396
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c63031396
.
tgfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
expansions/script/c64753988.lua
0 → 100644
View file @
e6cd98fa
--サイバーダーク・ワールド
function
c64753988
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
64753988
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c64753988
.
activate
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
64753988
,
0
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
64753989
)
e2
:
SetTarget
(
c64753988
.
sumtg
)
e2
:
SetOperation
(
c64753988
.
sumop
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCode
(
64753988
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
1
,
0
)
c
:
RegisterEffect
(
e3
)
end
function
c64753988
.
filter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x4093
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
c
:
GetCode
())
end
function
c64753988
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c64753988
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
64753988
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
c64753988
.
sumfilter
(
c
)
return
c
:
IsSetCard
(
0x4093
)
and
c
:
IsSummonable
(
true
,
nil
)
end
function
c64753988
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c64753988
.
sumfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c64753988
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64753988
.
sumfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
end
end
expansions/script/c72859417.lua
0 → 100644
View file @
e6cd98fa
--LL-バード・サンクチュアリ
function
c72859417
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--overlay
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
72859417
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
72859417
)
e1
:
SetTarget
(
c72859417
.
target
)
e1
:
SetOperation
(
c72859417
.
activate
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
72859417
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
72859418
)
e2
:
SetCondition
(
c72859417
.
drcon
)
e2
:
SetTarget
(
c72859417
.
drtg
)
e2
:
SetOperation
(
c72859417
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c72859417
.
ovfilter
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WINDBEAST
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c72859417
.
fselect
(
g
)
return
g
:
IsExists
(
Card
.
IsCanOverlay
,
1
,
nil
)
end
function
c72859417
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
Duel
.
GetMatchingGroup
(
c72859417
.
ovfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c72859417
.
fselect
,
2
,
2
)
end
local
sg
=
g
:
SelectSubGroup
(
tp
,
c72859417
.
fselect
,
false
,
2
,
2
)
Duel
.
SetTargetCard
(
sg
)
end
function
c72859417
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
c1
=
g
:
GetFirst
()
local
c2
=
g
:
GetNext
()
if
not
c1
:
IsRelateToEffect
(
e
)
or
not
c2
:
IsRelateToEffect
(
e
)
then
return
end
if
c1
:
IsImmuneToEffect
(
e
)
or
c2
:
IsImmuneToEffect
(
e
)
then
return
end
local
b1
=
c1
:
IsCanOverlay
()
local
b2
=
c2
:
IsCanOverlay
()
if
not
b1
and
not
b2
then
return
end
if
not
(
b1
and
b2
)
then
if
not
b1
and
b2
then
c1
,
c2
=
c2
,
c1
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
c1
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
c2
=
g
:
Filter
(
aux
.
TRUE
,
c1
):
GetFirst
()
end
local
mg
=
c1
:
GetOverlayGroup
()
if
mg
:
GetCount
()
>
0
then
Duel
.
Overlay
(
c2
,
mg
)
end
Duel
.
Overlay
(
c2
,
Group
.
FromCards
(
c1
))
end
function
c72859417
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetOverlayCount
()
>=
3
end
function
c72859417
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c72859417
.
drfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c72859417
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c72859417
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c72971064.lua
0 → 100644
View file @
e6cd98fa
--LL-アンサンブルー・ロビン
function
c72971064
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
nil
,
1
,
2
,
nil
,
nil
,
99
)
--ATK Up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c72971064
.
atkval
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
72971064
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c72971064
.
thcon
)
e2
:
SetCost
(
c72971064
.
thcost
)
e2
:
SetTarget
(
c72971064
.
thtg
)
e2
:
SetOperation
(
c72971064
.
thop
)
c
:
RegisterEffect
(
e2
)
--recover
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
72971064
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
c72971064
.
recon
)
e3
:
SetTarget
(
c72971064
.
retg
)
e3
:
SetOperation
(
c72971064
.
reop
)
c
:
RegisterEffect
(
e3
)
end
function
c72971064
.
atkval
(
e
,
c
)
return
c
:
GetOverlayCount
()
*
500
end
function
c72971064
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsSummonPlayer
,
1
,
nil
,
1
-
tp
)
end
function
c72971064
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c72971064
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
eg
:
Filter
(
Card
.
IsAbleToHand
,
nil
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_MZONE
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
aux
.
IsInGroup
(
chkc
,
g
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
IsInGroup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
g
)
end
local
sg
if
g
:
GetCount
()
==
1
then
sg
=
g
:
Clone
()
Duel
.
SetTargetCard
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
sg
=
Duel
.
SelectTarget
(
tp
,
aux
.
IsInGroup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
g
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
1
,
0
,
0
)
end
function
c72971064
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
function
c72971064
.
recon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
rp
==
1
-
tp
and
c
:
IsPreviousControler
(
tp
)
end
function
c72971064
.
filter2
(
c
)
return
c
:
IsSetCard
(
0xf7
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c72971064
.
retg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c72971064
.
filter2
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c72971064
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c72971064
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c72971064
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c73193552.lua
0 → 100644
View file @
e6cd98fa
--革命の御旗
function
c73193552
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
73193552
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_CUSTOM
+
73193552
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
73193552
)
e2
:
SetCondition
(
c73193552
.
condition
)
e2
:
SetTarget
(
c73193552
.
target
)
e2
:
SetOperation
(
c73193552
.
operation
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
73193552
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BATTLE_START
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
73193553
)
e3
:
SetTarget
(
c73193552
.
atktg
)
e3
:
SetOperation
(
c73193552
.
atkop
)
c
:
RegisterEffect
(
e3
)
--destroy replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
,
73193554
)
e4
:
SetTarget
(
c73193552
.
desreptg
)
e4
:
SetOperation
(
c73193552
.
desrepop
)
c
:
RegisterEffect
(
e4
)
if
not
c73193552
.
global_check
then
c73193552
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_DESTROYED
)
ge1
:
SetCondition
(
c73193552
.
regcon
)
ge1
:
SetOperation
(
c73193552
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c73193552
.
cfilter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c73193552
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
v
=
0
if
eg
:
IsExists
(
c73193552
.
cfilter
,
1
,
nil
,
0
)
then
v
=
v
+
1
end
if
eg
:
IsExists
(
c73193552
.
cfilter
,
1
,
nil
,
1
)
then
v
=
v
+
2
end
if
v
==
0
then
return
false
end
e
:
SetLabel
(({
0
,
1
,
PLAYER_ALL
})[
v
])
return
true
end
function
c73193552
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
73193552
,
re
,
r
,
rp
,
ep
,
e
:
GetLabel
())
end
function
c73193552
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ev
==
tp
or
ev
==
PLAYER_ALL
end
function
c73193552
.
thfilter
(
c
)
return
c
:
IsCode
(
72022087
)
and
c
:
IsAbleToHand
()
end
function
c73193552
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c73193552
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c73193552
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c73193552
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c73193552
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
a
,
d
=
Duel
.
GetBattleMonster
(
tp
)
if
chk
==
0
then
return
a
and
d
and
(
a
:
IsFaceup
()
and
a
:
IsType
(
TYPE_SYNCHRO
)
or
d
:
IsFaceup
()
and
d
:
IsType
(
TYPE_SYNCHRO
))
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
d
,
1
,
0
,
0
)
end
function
c73193552
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
,
d
=
Duel
.
GetBattleMonster
(
tp
)
if
d
and
d
:
IsRelateToBattle
()
then
Duel
.
Destroy
(
d
,
REASON_EFFECT
)
end
end
function
c73193552
.
repfilter
(
c
,
e
)
return
c
:
IsDestructable
(
e
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
+
STATUS_BATTLE_DESTROYED
)
end
function
c73193552
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
c
:
IsReason
(
REASON_REPLACE
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
c73193552
.
repfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c73193552
.
repfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
)
e
:
SetLabelObject
(
g
:
GetFirst
())
Duel
.
HintSelection
(
g
)
g
:
GetFirst
():
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
true
)
return
true
else
return
false
end
end
function
c73193552
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
tc
:
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
false
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
+
REASON_REPLACE
)
end
expansions/script/c79875526.lua
0 → 100644
View file @
e6cd98fa
--アタッチメント・サイバーン
function
c79875526
.
initial_effect
(
c
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
79875526
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_MZONE
)
e1
:
SetTarget
(
c79875526
.
eqtg
)
e1
:
SetOperation
(
c79875526
.
eqop
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
600
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
79875526
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
79875526
)
e3
:
SetCondition
(
c79875526
.
spcon
)
e3
:
SetTarget
(
c79875526
.
sptg
)
e3
:
SetOperation
(
c79875526
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c79875526
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_DRAGON
+
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x93
)
end
function
c79875526
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c79875526
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
e
:
GetHandler
():
CheckUniqueOnField
(
tp
)
and
Duel
.
IsExistingTarget
(
c79875526
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c79875526
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
end
function
c79875526
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFacedown
()
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
GetControler
()
~=
tp
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
not
c
:
CheckUniqueOnField
(
tp
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
if
not
Duel
.
Equip
(
tp
,
c
,
tc
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c79875526
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e1
)
end
function
c79875526
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
c79875526
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
not
c
:
IsReason
(
REASON_LOST_TARGET
)
end
function
c79875526
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x93
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c79875526
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c79875526
.
spfilter
(
chkc
,
e
,
tp
)
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c79875526
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
c
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c79875526
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
c
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c79875526
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c8243121.lua
0 → 100644
View file @
e6cd98fa
--LL-比翼の麗鳥
function
c8243121
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
8243121
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
8243121
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetTarget
(
c8243121
.
target
)
e1
:
SetOperation
(
c8243121
.
activate
)
c
:
RegisterEffect
(
e1
)
--change attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
8243121
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
8243122
)
e2
:
SetCondition
(
c8243121
.
atkcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c8243121
.
atktg
)
e2
:
SetOperation
(
c8243121
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c8243121
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf7
)
and
(
Duel
.
IsExistingMatchingCard
(
c8243121
.
atkfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetAttack
())
or
Duel
.
IsExistingMatchingCard
(
c8243121
.
lvfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
))
end
function
c8243121
.
atkfilter
(
c
,
atk
)
return
c
:
IsFaceup
()
and
not
c
:
IsAttack
(
atk
)
end
function
c8243121
.
lvfilter
(
c
)
return
c
:
IsFaceup
()
and
(
c
:
IsLevelAbove
(
2
)
or
c
:
IsRankAbove
(
2
))
end
function
c8243121
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c8243121
.
cfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c8243121
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c8243121
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
end
function
c8243121
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
atk
=
tc
:
GetAttack
()
local
g
=
Duel
.
GetMatchingGroup
(
c8243121
.
atkfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
atk
)
local
cc
=
g
:
GetFirst
()
while
cc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
cc
:
RegisterEffect
(
e1
)
cc
=
g
:
GetNext
()
end
end
local
lg
=
Duel
.
GetMatchingGroup
(
c8243121
.
lvfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
lc
=
lg
:
GetFirst
()
while
lc
do
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
lc
:
IsLevelAbove
(
2
)
then
e2
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
end
if
lc
:
IsRankAbove
(
2
)
then
e2
:
SetCode
(
EFFECT_CHANGE_RANK
)
end
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
lc
:
RegisterEffect
(
e2
)
lc
=
lg
:
GetNext
()
end
end
function
c8243121
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
,
d
=
Duel
.
GetBattleMonster
(
1
-
tp
)
if
not
(
a
and
d
)
then
return
false
end
return
d
:
IsFaceup
()
and
d
:
IsSetCard
(
0xf7
)
end
function
c8243121
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
a
,
d
=
Duel
.
GetBattleMonster
(
1
-
tp
)
if
chk
==
0
then
return
d
:
GetAttack
()
~=
a
:
GetAttack
()
end
end
function
c8243121
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
,
d
=
Duel
.
GetBattleMonster
(
1
-
tp
)
if
d
:
IsRelateToBattle
()
and
a
:
IsRelateToBattle
()
and
d
:
IsFaceup
()
and
a
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
a
:
GetAttack
())
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
d
:
RegisterEffect
(
e1
)
end
end
expansions/script/c84815190.lua
0 → 100644
View file @
e6cd98fa
--フルール・ド・バロネス
function
c84815190
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
84815190
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c84815190
.
destg
)
e1
:
SetOperation
(
c84815190
.
desop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
84815190
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_NO_TURN_RESET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
84815190
)
e2
:
SetCondition
(
c84815190
.
discon
)
e2
:
SetTarget
(
c84815190
.
distg
)
e2
:
SetOperation
(
c84815190
.
disop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOEXTRA
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c84815190
.
sptg
)
e3
:
SetOperation
(
c84815190
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c84815190
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c84815190
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c84815190
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c84815190
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c84815190
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c84815190
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
9
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c84815190
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c84815190
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingTarget
(
c84815190
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
e
:
GetHandler
():
IsAbleToExtra
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c84815190
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOEXTRA
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c84815190
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
c
:
IsLocation
(
LOCATION_EXTRA
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c85032782.lua
0 → 100644
View file @
e6cd98fa
--時花の賢者-フルール・ド・サージュ
function
c85032782
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
85032782
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
85032782
)
e1
:
SetTarget
(
c85032782
.
destg
)
e1
:
SetOperation
(
c85032782
.
desop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
85032782
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
85032783
)
e2
:
SetCondition
(
c85032782
.
thcon
)
e2
:
SetTarget
(
c85032782
.
thtg
)
e2
:
SetOperation
(
c85032782
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c85032782
.
tgfilter
(
c
,
tp
)
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
function
c85032782
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c85032782
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c85032782
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
g1
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
g1
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c85032782
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c85032782
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c85032782
.
thfilter
(
c
)
return
c
:
IsLevel
(
1
)
and
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsAbleToHand
()
end
function
c85032782
.
tdfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
c85032782
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c85032782
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c85032782
.
tdfilter
(
chkc
,
tp
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c85032782
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c85032782
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
(),
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
c85032782
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c85032782
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
expansions/script/c86154370.lua
0 → 100644
View file @
e6cd98fa
--HSR/CWライダー
function
c86154370
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_WIND
),
aux
.
NonTuner
(
c86154370
.
sfilter
),
1
,
1
)
--Dice Popboost
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
86154370
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DICE
+
CATEGORY_DESTROY
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c86154370
.
destg
)
e1
:
SetOperation
(
c86154370
.
desop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
86154370
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c86154370
.
spcon
)
e2
:
SetCost
(
c86154370
.
spcost
)
e2
:
SetTarget
(
c86154370
.
sptg
)
e2
:
SetOperation
(
c86154370
.
spop
)
c
:
RegisterEffect
(
e2
)
end
c86154370
.
toss_dice
=
true
c86154370
.
material_type
=
TYPE_SYNCHRO
function
c86154370
.
sfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
end
function
c86154370
.
gyfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsAbleToDeck
()
end
function
c86154370
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c86154370
.
gyfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c86154370
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
gy
=
Duel
.
SelectMatchingCard
(
tp
,
c86154370
.
gyfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
dc
,
nil
)
if
#
gy
==
0
then
return
end
local
yc
=
Duel
.
SendtoDeck
(
gy
,
nil
,
2
,
REASON_EFFECT
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
yc
>
0
and
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
86154370
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
dg
=
g
:
Select
(
tp
,
1
,
yc
,
nil
)
Duel
.
HintSelection
(
dg
)
local
ct
=
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
if
ct
>
0
and
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
ct
*
500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
end
function
c86154370
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
and
Duel
.
GetTurnPlayer
()
~=
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
function
c86154370
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c86154370
.
spfilter
(
c
,
e
,
tp
,
mc
)
return
c
:
IsLevel
(
7
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mc
,
c
)
>
0
end
function
c86154370
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c86154370
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c86154370
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
TYPE_SYNCHRO
)
local
ect
=
(
c29724053
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
29724053
)
and
c29724053
[
tp
])
or
ft
local
ct
=
math.min
(
ft
,
ect
,
2
)
if
ct
<=
0
then
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
local
g
=
Duel
.
GetMatchingGroup
(
c86154370
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
ct
)
if
sg
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c86976918.lua
0 → 100644
View file @
e6cd98fa
--SRマジックハウンド
function
c86976918
.
initial_effect
(
c
)
--to grave
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
86976918
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c86976918
.
tgtg
)
e1
:
SetOperation
(
c86976918
.
tgop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
86976918
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
86976918
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c86976918
.
sptg
)
e2
:
SetOperation
(
c86976918
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c86976918
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsAbleToGrave
()
end
function
c86976918
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c86976918
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c86976918
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c86976918
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c86976918
.
tdfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
c86976918
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetLevel
(),
c
:
GetCode
())
end
function
c86976918
.
spfilter
(
c
,
e
,
tp
,
lv
,
code
)
return
c
:
IsLevel
(
lv
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsSetCard
(
0x2016
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
function
c86976918
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c86976918
.
tdfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c86976918
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c86976918
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c86976918
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
local
lv
,
code
=
tc
:
GetLevel
(),
tc
:
GetCode
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c86976918
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
lv
,
code
)
local
sc
=
g
:
GetFirst
()
if
sc
and
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
sc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
sc
:
RegisterEffect
(
e2
)
end
Duel
.
SpecialSummonComplete
()
end
end
expansions/script/c89477759.lua
0 → 100644
View file @
e6cd98fa
--CNo.1000 夢幻虚神ヌメロニアス
function
c89477759
.
initial_effect
(
c
)
--Xyz Summon
aux
.
AddXyzProcedure
(
c
,
nil
,
12
,
5
)
c
:
EnableReviveLimit
()
--Destroy 1 other monster
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
89477759
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCost
(
c89477759
.
descost1
)
e1
:
SetTarget
(
c89477759
.
destg1
)
e1
:
SetOperation
(
c89477759
.
desop1
)
c
:
RegisterEffect
(
e1
)
--Destroy all/Special Summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
+
CATEGORY_GRAVE_SPSUMMON
)
e2
:
SetDescription
(
aux
.
Stringid
(
89477759
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c89477759
.
destg2
)
e2
:
SetOperation
(
c89477759
.
desop2
)
c
:
RegisterEffect
(
e2
)
--Xyz Summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
89477759
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c89477759
.
spcon
)
e3
:
SetTarget
(
c89477759
.
sptg
)
e3
:
SetOperation
(
c89477759
.
spop
)
c
:
RegisterEffect
(
e3
)
end
c89477759
.
xyz_number
=
1000
function
c89477759
.
descost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c89477759
.
destg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c89477759
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c89477759
.
destg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
sg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
c89477759
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c89477759
.
desop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
dg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
aux
.
ExceptThisCard
(
e
))
if
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c89477759
.
spfilter2
,
tp
,
0
,
LOCATION_GRAVE
,
nil
,
e
,
tp
)
if
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
89477759
,
3
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
end
function
c89477759
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetOverlayCount
()
>
0
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousControler
(
tp
)
end
function
c89477759
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
15862758
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
function
c89477759
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c89477759
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
e
:
GetHandler
():
IsCanOverlay
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c89477759
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c89477759
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
tc
,
Group
.
FromCards
(
c
))
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