Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
f4404c6c
Commit
f4404c6c
authored
Nov 04, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
78fb9736
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
2482 additions
and
61 deletions
+2482
-61
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c10901000.lua
expansions/script/c10901000.lua
+73
-0
expansions/script/c10901001.lua
expansions/script/c10901001.lua
+66
-0
expansions/script/c10901002.lua
expansions/script/c10901002.lua
+71
-0
expansions/script/c10901003.lua
expansions/script/c10901003.lua
+106
-0
expansions/script/c10901004.lua
expansions/script/c10901004.lua
+58
-0
expansions/script/c10901005.lua
expansions/script/c10901005.lua
+93
-0
expansions/script/c10901006.lua
expansions/script/c10901006.lua
+81
-0
expansions/script/c10901007.lua
expansions/script/c10901007.lua
+61
-0
expansions/script/c10901008.lua
expansions/script/c10901008.lua
+131
-0
expansions/script/c10901009.lua
expansions/script/c10901009.lua
+47
-0
expansions/script/c10901010.lua
expansions/script/c10901010.lua
+51
-0
expansions/script/c10901012.lua
expansions/script/c10901012.lua
+51
-0
expansions/script/c10901013.lua
expansions/script/c10901013.lua
+52
-0
expansions/script/c10901111.lua
expansions/script/c10901111.lua
+88
-0
expansions/script/c10919000.lua
expansions/script/c10919000.lua
+65
-0
expansions/script/c10970003.lua
expansions/script/c10970003.lua
+1
-1
expansions/script/c10970010.lua
expansions/script/c10970010.lua
+39
-50
expansions/script/c10981040.lua
expansions/script/c10981040.lua
+172
-0
expansions/script/c1200003.lua
expansions/script/c1200003.lua
+11
-0
expansions/script/c1200013.lua
expansions/script/c1200013.lua
+23
-2
expansions/script/c1200056.lua
expansions/script/c1200056.lua
+11
-0
expansions/script/c14140011.lua
expansions/script/c14140011.lua
+2
-2
expansions/script/c17060909.lua
expansions/script/c17060909.lua
+149
-0
expansions/script/c17060910.lua
expansions/script/c17060910.lua
+82
-0
expansions/script/c17060911.lua
expansions/script/c17060911.lua
+36
-0
expansions/script/c17060912.lua
expansions/script/c17060912.lua
+42
-0
expansions/script/c17060913.lua
expansions/script/c17060913.lua
+46
-0
expansions/script/c33700187.lua
expansions/script/c33700187.lua
+86
-0
expansions/script/c33700188.lua
expansions/script/c33700188.lua
+77
-0
expansions/script/c33700189.lua
expansions/script/c33700189.lua
+87
-0
expansions/script/c33700190.lua
expansions/script/c33700190.lua
+134
-0
expansions/script/c37564012.lua
expansions/script/c37564012.lua
+1
-1
expansions/script/c37564339.lua
expansions/script/c37564339.lua
+62
-0
expansions/script/c37564560.lua
expansions/script/c37564560.lua
+1
-1
expansions/script/c37564702.lua
expansions/script/c37564702.lua
+56
-0
expansions/script/c37564919.lua
expansions/script/c37564919.lua
+1
-1
expansions/script/c50008000.lua
expansions/script/c50008000.lua
+84
-0
expansions/script/c50008001.lua
expansions/script/c50008001.lua
+112
-0
expansions/script/c50008002.lua
expansions/script/c50008002.lua
+68
-0
expansions/script/c57300025.lua
expansions/script/c57300025.lua
+3
-3
expansions/strings.conf
expansions/strings.conf
+1
-0
lflist.conf
lflist.conf
+1
-0
No files found.
expansions/222DIY.cdb
View file @
f4404c6c
No preview for this file type
expansions/script/c10901000.lua
0 → 100644
View file @
f4404c6c
--御原凛音
local
m
=
10901000
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--summon limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
sumcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e3
)
--flip
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_FLIP
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetTarget
(
cm
.
target
)
e4
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e5
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
cm
.
condition
)
e5
:
SetCountLimit
(
1
,
m
)
e5
:
SetTarget
(
cm
.
destg
)
e5
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
>
4
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
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
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901003
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c10901001.lua
0 → 100644
View file @
f4404c6c
--伽蓝堂纱罗
local
m
=
10901001
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
sumcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e4
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCondition
(
cm
.
spcon
)
c
:
RegisterEffect
(
e4
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e7
:
SetCategory
(
CATEGORY_DESTROY
)
e7
:
SetType
(
EFFECT_TYPE_IGNITION
)
e7
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
)
e7
:
SetCondition
(
cm
.
condition
)
e7
:
SetTarget
(
cm
.
destg
)
e7
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e7
)
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
>
4
end
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x234
)
end
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901003
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
cm
.
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
expansions/script/c10901002.lua
0 → 100644
View file @
f4404c6c
--枢都夏莲
local
m
=
10901002
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--summon limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
sumcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetTarget
(
cm
.
sptg
)
e4
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e4
:
Clone
()
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
21297224
,
0
))
e7
:
SetCategory
(
CATEGORY_RECOVER
)
e7
:
SetType
(
EFFECT_TYPE_IGNITION
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
)
e7
:
SetTarget
(
cm
.
target
)
e7
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e7
)
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
>
4
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c10901003.lua
0 → 100644
View file @
f4404c6c
--乐园之岛
local
m
=
10901003
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--disable
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_FZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
cm
.
drtg
)
e3
:
SetOperation
(
cm
.
drop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e4
:
SetTarget
(
cm
.
target
)
e4
:
SetValue
(
cm
.
indct
)
c
:
RegisterEffect
(
e4
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e5
=
e2
:
Clone
()
e5
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e2
:
Clone
()
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
>
4
end
function
cm
.
drfilter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
cm
.
drfilter
,
p
,
LOCATION_HAND
,
0
,
1
,
63
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
p
,
g
)
local
ct
=
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
p
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
p
,
ct
,
REASON_EFFECT
)
end
end
function
cm
.
target
(
e
,
c
)
return
c
:
IsSetCard
(
0x234
)
end
function
cm
.
indct
(
e
,
re
,
r
,
rp
)
if
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
then
return
1
else
return
0
end
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
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/c10901004.lua
0 → 100644
View file @
f4404c6c
--既视感
local
m
=
10901004
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--disable
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_SZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCost
(
cm
.
cost
)
e3
:
SetTarget
(
cm
.
target
)
e3
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
>
4
end
function
cm
.
descon
(
e
)
return
not
Duel
.
IsEnvironment
(
10901003
)
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
cm
.
target
(
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
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c10901005.lua
0 → 100644
View file @
f4404c6c
--玲奈·奥哈拉
local
m
=
10901005
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
--summon limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
sumcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
cm
.
condition
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetTarget
(
cm
.
thtg
)
e4
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetCountLimit
(
1
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCost
(
cm
.
spcost
)
e5
:
SetTarget
(
cm
.
sptg
)
e5
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsAbleToHand
()
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901008
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
cm
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsDiscardable
()
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
cm
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
expansions/script/c10901006.lua
0 → 100644
View file @
f4404c6c
--卡莲·克鲁兹
local
m
=
10901006
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--summon limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
sumcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetCondition
(
cm
.
damcon
)
e4
:
SetTarget
(
cm
.
sptg
)
e4
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e5
:
SetCategory
(
CATEGORY_DAMAGE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e5
:
SetCode
(
EVENT_TO_GRAVE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCondition
(
cm
.
damcon
)
e5
:
SetTarget
(
cm
.
damtg
)
e5
:
SetOperation
(
cm
.
damop
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901008
)
end
function
cm
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
desfilter
(
c
)
return
c
:
IsFaceup
()
end
function
cm
.
desfilter2
(
c
,
e
)
return
cm
.
desfilter
(
c
)
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
cm
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
tg
=
Duel
.
GetMatchingGroup
(
cm
.
desfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
desfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
3
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
PLAYER_ALL
,
1000
)
end
function
cm
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
,
true
)
Duel
.
Damage
(
tp
,
1000
,
REASON_EFFECT
,
true
)
Duel
.
RDComplete
()
end
expansions/script/c10901007.lua
0 → 100644
View file @
f4404c6c
--莎拉·加兰德
local
m
=
10901007
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
sumcon
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetValue
(
800
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
,
m
)
e5
:
SetCondition
(
cm
.
condition
)
e5
:
SetTarget
(
cm
.
target
)
e5
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901008
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
cm
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
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/c10901008.lua
0 → 100644
View file @
f4404c6c
--Never Island
local
m
=
10901008
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--disable
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_FZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e9
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e9
:
SetCode
(
EFFECT_SELF_DESTROY
)
e9
:
SetRange
(
LOCATION_FZONE
)
e9
:
SetCondition
(
cm
.
descon
)
c
:
RegisterEffect
(
e9
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
cm
.
drtg
)
e3
:
SetOperation
(
cm
.
drop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetCategory
(
CATEGORY_TOGRAVE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
cm
.
dscon
)
e4
:
SetTarget
(
cm
.
destg
)
e4
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e4
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e5
=
e2
:
Clone
()
e5
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e2
:
Clone
()
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
descon
(
e
)
return
Duel
.
GetTurnCount
()
>
9
end
function
cm
.
drfilter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsAbleToDeck
()
end
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
cm
.
drfilter
,
p
,
LOCATION_HAND
,
0
,
1
,
63
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
p
,
g
)
local
ct
=
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
p
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
p
,
ct
+
1
,
REASON_EFFECT
)
end
end
function
cm
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
2
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
expansions/script/c10901009.lua
0 → 100644
View file @
f4404c6c
--阿瓦隆的突袭
local
m
=
10901009
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--disable
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_SZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
chtg
)
e1
:
SetOperation
(
cm
.
chop
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901008
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
chtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
1
-
tp
,
0
,
LOCATION_HAND
)
>
0
end
end
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeChainOperation
(
ev
,
cm
.
repop
)
end
function
cm
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
expansions/script/c10901010.lua
0 → 100644
View file @
f4404c6c
--流放
local
m
=
10901010
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_SZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
5
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901008
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
filter
(
c
)
return
c
:
IsAbleToRemove
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
2
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
2
,
0
,
0
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
expansions/script/c10901012.lua
0 → 100644
View file @
f4404c6c
--万年的重逢
local
m
=
10901012
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--disable
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_SZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
10
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
10901000
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
,
POS_FACEDOWN_DEFENSE
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
posfilter
(
c
)
return
not
c
:
IsPosition
(
POS_FACEUP_DEFENSE
)
and
not
c
:
IsType
(
TYPE_LINK
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetTurnCount
()
<
10
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEDOWN_DEFENSE
)
~=
0
then
Duel
.
BreakEffect
()
local
g2
=
Duel
.
GetMatchingGroup
(
cm
.
posfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
ChangePosition
(
g2
,
POS_FACEUP_DEFENSE
)
end
end
expansions/script/c10901013.lua
0 → 100644
View file @
f4404c6c
--轮回的旅行
local
m
=
10901013
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_SZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
10
end
function
cm
.
drfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
10901003
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
drfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetTurnCount
()
<
10
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
,
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/c10901111.lua
0 → 100644
View file @
f4404c6c
--御原玖音
local
m
=
10901111
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e0
:
SetTarget
(
cm
.
disable
)
e0
:
SetCondition
(
cm
.
sumcon
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_DISABLE
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x234
))
e1
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetTarget
(
cm
.
distarget
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
cm
.
effectfilter
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_CANNOT_DISEFFECT
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetValue
(
cm
.
effectfilter
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e6
:
SetCategory
(
CATEGORY_DISABLE
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetCode
(
EVENT_CHAINING
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
cm
.
discon
)
e6
:
SetCost
(
cm
.
cost
)
e6
:
SetTarget
(
cm
.
distg
)
e6
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
disable
(
e
,
c
)
return
c
==
e
:
GetHandler
()
end
function
cm
.
sumcon
(
e
)
return
Duel
.
GetTurnCount
()
<
10
end
function
cm
.
effectfilter
(
e
,
ct
)
local
p
=
e
:
GetHandler
():
GetControler
()
local
te
,
tp
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_PLAYER
)
return
p
==
tp
and
te
:
IsActiveType
(
TYPE_SPELL
)
end
function
cm
.
distarget
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
)
end
function
cm
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0x234
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDiscardable
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
cm
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
Duel
.
IsChainDisablable
(
ev
)
end
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
NegateEffect
(
ev
)
end
expansions/script/c10919000.lua
0 → 100644
View file @
f4404c6c
--Traitorous Witch Honoka
function
c10919000
.
initial_effect
(
c
)
c
:
SetSPSummonOnce
(
10919000
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_GRAVE
)
e0
:
SetCondition
(
c10919000
.
spcon
)
e0
:
SetOperation
(
c10919000
.
spop
)
c
:
RegisterEffect
(
e0
)
local
e4
=
e0
:
Clone
()
e4
:
SetRange
(
LOCATION_HAND
)
e
:
SetCondition
(
c10919000
.
spcon2
)
c
:
RegisterEffect
(
e4
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10919000
,
0
))
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c10919000
.
damtg
)
e1
:
SetOperation
(
c10919000
.
damop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c10919000
.
spfilter
(
c
,
ft
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsLevelAbove
(
5
)
and
c
:
IsAbleToHandAsCost
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
function
c10919000
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
return
false
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c10919000
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
end
function
c10919000
.
spcon2
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c10919000
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
end
function
c10919000
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10919000
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
function
c10919000
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
800
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
800
)
end
function
c10919000
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c10970003.lua
View file @
f4404c6c
...
...
@@ -30,7 +30,7 @@ function c10970003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e
:
GetHandler
():
RegisterFlagEffect
(
10970003
,
RESET_CHAIN
,
0
,
1
)
end
function
c10970003
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
...
...
expansions/script/c10970010.lua
View file @
f4404c6c
--搜寻魔术
function
c10970010
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetCondition
(
c10970010
.
condition
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -12,18 +20,9 @@ function c10970010.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c10970010
.
cost
)
e2
:
SetCondition
(
c10970010
.
condition
)
e2
:
SetTarget
(
c10970010
.
target
)
e2
:
SetOperation
(
c10970010
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
10970010
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
)
e3
:
SetTarget
(
c10970010
.
damtg
)
e3
:
SetOperation
(
c10970010
.
damop
)
c
:
RegisterEffect
(
e3
)
end
function
c10970010
.
filter
(
c
)
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsDiscardable
()
...
...
@@ -39,7 +38,7 @@ function c10970010.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
c10970010
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c10970010
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x233
)
and
c
:
IsAbleToHand
()
end
function
c10970010
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10970010
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
...
...
@@ -55,13 +54,3 @@ function c10970010.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ShuffleDeck
(
tp
)
end
end
function
c10970010
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
0
,
0
,
tp
,
2000
)
end
function
c10970010
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c10981040.lua
0 → 100644
View file @
f4404c6c
--青鸟
function
c10981040
.
initial_effect
(
c
)
--atk/lv up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10981040
,
1
))
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCost
(
c10981040
.
cost
)
e2
:
SetOperation
(
c10981040
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
10981040
,
2
))
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetCost
(
c10981040
.
cost2
)
e3
:
SetOperation
(
c10981040
.
operation2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
10981040
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
10981040
+
EFFECT_COUNT_CODE_DUEL
)
e4
:
SetCondition
(
c10981040
.
condition
)
e4
:
SetTarget
(
c10981040
.
sptg
)
e4
:
SetOperation
(
c10981040
.
spop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCountLimit
(
1
,
10981041
+
EFFECT_COUNT_CODE_DUEL
)
e5
:
SetCondition
(
c10981040
.
condition2
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e4
:
Clone
()
e6
:
SetCountLimit
(
1
,
10981042
+
EFFECT_COUNT_CODE_DUEL
)
e6
:
SetCondition
(
c10981040
.
condition3
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e4
:
Clone
()
e7
:
SetCountLimit
(
1
,
10981043
+
EFFECT_COUNT_CODE_DUEL
)
e7
:
SetCondition
(
c10981040
.
condition4
)
c
:
RegisterEffect
(
e7
)
local
e8
=
e4
:
Clone
()
e8
:
SetCountLimit
(
1
,
10981044
+
EFFECT_COUNT_CODE_DUEL
)
e8
:
SetCondition
(
c10981040
.
condition5
)
c
:
RegisterEffect
(
e8
)
local
e9
=
e4
:
Clone
()
e9
:
SetCountLimit
(
1
,
10981045
+
EFFECT_COUNT_CODE_DUEL
)
e9
:
SetCondition
(
c10981040
.
condition6
)
c
:
RegisterEffect
(
e9
)
local
e10
=
e4
:
Clone
()
e10
:
SetCountLimit
(
1
,
10981046
+
EFFECT_COUNT_CODE_DUEL
)
e10
:
SetCondition
(
c10981040
.
condition7
)
c
:
RegisterEffect
(
e10
)
local
e11
=
e4
:
Clone
()
e11
:
SetCountLimit
(
1
,
10981047
+
EFFECT_COUNT_CODE_DUEL
)
e11
:
SetCondition
(
c10981040
.
condition8
)
c
:
RegisterEffect
(
e11
)
local
e12
=
e4
:
Clone
()
e12
:
SetCountLimit
(
1
,
10981048
+
EFFECT_COUNT_CODE_DUEL
)
e12
:
SetCondition
(
c10981040
.
condition9
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e4
:
Clone
()
e13
:
SetCountLimit
(
1
,
10981049
+
EFFECT_COUNT_CODE_DUEL
)
e13
:
SetCondition
(
c10981040
.
condition10
)
c
:
RegisterEffect
(
e13
)
local
e14
=
e4
:
Clone
()
e14
:
SetCountLimit
(
1
,
10981050
+
EFFECT_COUNT_CODE_DUEL
)
e14
:
SetCondition
(
c10981040
.
condition11
)
c
:
RegisterEffect
(
e14
)
local
e15
=
e4
:
Clone
()
e15
:
SetCountLimit
(
1
,
10981051
+
EFFECT_COUNT_CODE_DUEL
)
e15
:
SetCondition
(
c10981040
.
condition12
)
c
:
RegisterEffect
(
e15
)
end
function
c10981040
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c10981040
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_WINDBEAST
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c10981040
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c10981040
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10981040
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c10981040
.
filter
(
c
,
lv
,
e
,
tp
)
return
c
:
GetLevel
()
==
lv
and
c
:
IsRace
(
RACE_WINDBEAST
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c10981040
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10981040
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
:
GetHandler
():
GetLevel
(),
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c10981040
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10981040
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
:
GetHandler
():
GetLevel
(),
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c10981040
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
end
end
function
c10981040
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
e2
:
SetValue
(
2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c10981040
.
condition
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
1
end
function
c10981040
.
condition2
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
2
end
function
c10981040
.
condition3
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
3
end
function
c10981040
.
condition4
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
4
end
function
c10981040
.
condition5
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
5
end
function
c10981040
.
condition6
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
6
end
function
c10981040
.
condition7
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
7
end
function
c10981040
.
condition8
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
8
end
function
c10981040
.
condition9
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
9
end
function
c10981040
.
condition10
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
10
end
function
c10981040
.
condition11
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
11
end
function
c10981040
.
condition12
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
return
c
:
GetLevel
()
==
12
end
\ No newline at end of file
expansions/script/c1200003.lua
View file @
f4404c6c
...
...
@@ -71,4 +71,15 @@ function c1200003.spop(e,tp,eg,ep,ev,re,r,rp)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c1200003
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1200003
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xfba
)
end
\ No newline at end of file
expansions/script/c1200013.lua
View file @
f4404c6c
...
...
@@ -16,12 +16,22 @@ function c1200013.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
1200013
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
1200013
)
e2
:
SetCost
(
c1200013
.
cost
)
e2
:
SetTarget
(
c1200013
.
tgtg
)
e2
:
SetOperation
(
c1200013
.
tgop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1200013
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
1200113
)
e3
:
SetCost
(
c1200013
.
cost
)
e3
:
SetTarget
(
c1200013
.
tgtg
)
e3
:
SetOperation
(
c1200013
.
tgop
)
c
:
RegisterEffect
(
e3
)
end
function
c1200013
.
ccfilter
(
c
,
ft
)
return
(
ft
~=
0
and
c
:
IsSetCard
(
0xfba
))
or
(
ft
==
0
and
c
:
GetSequence
()
<
5
)
...
...
@@ -62,4 +72,15 @@ function c1200013.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
g
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c1200013
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c1200013
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0xfba
)
end
\ No newline at end of file
expansions/script/c1200056.lua
View file @
f4404c6c
...
...
@@ -11,9 +11,20 @@ function c1200056.initial_effect(c)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c1200056
.
drcost
)
e2
:
SetCondition
(
c1200056
.
drcon
)
e2
:
SetTarget
(
c1200056
.
sptg
)
e2
:
SetOperation
(
c1200056
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e3
:
SetValue
(
1
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e3
)
end
function
c1200056
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c1200056
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xfba
)
...
...
expansions/script/c14140011.lua
View file @
f4404c6c
...
...
@@ -4,7 +4,7 @@ function c14140011.initial_effect(c)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
14140011
,
0
))
e1
:
SetCategory
(
CATEGORY_
REMOVE
)
e1
:
SetCategory
(
CATEGORY_
SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
14140011
)
...
...
@@ -50,7 +50,7 @@ function c14140011.descon2(e,tp,eg,ep,ev,re,r,rp)
return
tc
and
eg
:
IsContains
(
tc
)
end
function
c14140011
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
...
...
expansions/script/c17060909.lua
0 → 100644
View file @
f4404c6c
--
function
c17060909
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060909
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_CONFIRM
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c17060909
.
atkcon
)
e1
:
SetOperation
(
c17060909
.
atkop
)
c
:
RegisterEffect
(
e1
)
--pendulum set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
17060909
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
17060909
+
100
)
e2
:
SetTarget
(
c17060909
.
pstg
)
e2
:
SetOperation
(
c17060909
.
psop
)
c
:
RegisterEffect
(
e2
)
local
e2b
=
e2
:
Clone
()
e2b
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2b
)
--activate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
17060909
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
17060909
+
200
)
e3
:
SetCost
(
c17060909
.
cost
)
e3
:
SetTarget
(
c17060909
.
target
)
e3
:
SetOperation
(
c17060909
.
activate
)
c
:
RegisterEffect
(
e3
)
end
c17060909
.
is_named_with_Opera_type
=
1
function
c17060909
.
IsOpera_type
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Opera_type
end
function
c17060909
.
atkfilter
(
c
)
return
c17060909
.
IsOpera_type
(
c
)
and
not
c
:
IsForbidden
()
end
function
c17060909
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
a
:
GetBattleTarget
()
if
a
:
IsControler
(
1
-
tp
)
then
a
,
d
=
d
,
a
end
return
a
and
d
and
a
:
IsFaceup
()
and
a
:
IsRelateToBattle
()
and
c17060909
.
IsOpera_type
(
a
)
and
d
:
IsFaceup
()
and
d
:
IsRelateToBattle
()
and
d
:
GetAttack
()
>
0
and
a
:
GetControler
()
~=
d
:
GetControler
()
end
function
c17060909
.
atkop
(
e
,
tp
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
a
:
GetBattleTarget
()
if
a
:
IsControler
(
1
-
tp
)
then
a
,
d
=
d
,
a
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
d
:
IsFaceup
()
and
d
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
a
:
GetAttack
())
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
d
:
RegisterEffect
(
e1
)
end
end
function
c17060909
.
psfilter
(
c
)
return
c
:
IsCode
(
17060910
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
function
c17060909
.
pstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
Duel
.
IsExistingMatchingCard
(
c17060909
.
psfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
c17060909
.
psop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_EXTRA
)
and
chkc
:
IsControler
(
tp
)
and
c17060909
.
psfilter
(
chkc
)
end
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
false
end
local
seq
=
e
:
GetHandler
():
GetSequence
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17060909
.
psfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
MoveToField
(
g
:
GetFirst
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
c17060909
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c17060909
.
mfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToRemove
()
end
function
c17060909
.
filter
(
c
,
e
,
tp
,
m1
,
m2
,
ft
)
if
not
c
:
IsCode
(
17060910
)
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
mg
:
Merge
(
m2
)
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
2
,
c
)
else
return
mg
:
IsExists
(
c17060909
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c17060909
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
2
,
rc
)
else
return
false
end
end
function
c17060909
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
mg1
:
RemoveCard
(
e
:
GetHandler
())
local
mg2
=
Duel
.
GetMatchingGroup
(
c17060909
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
then
ft
=
ft
+
1
end
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c17060909
.
filter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_PZONE
)
end
function
c17060909
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c17060909
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17060909
.
filter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
:
Merge
(
mg2
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
2
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
c17060909
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
2
,
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c17060910.lua
0 → 100644
View file @
f4404c6c
--シシララ・パピヨンソード
function
c17060910
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060910
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCondition
(
c17060910
.
splimcon
)
e1
:
SetTarget
(
c17060910
.
splimit
)
c
:
RegisterEffect
(
e1
)
--act limit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetCondition
(
c17060910
.
accon
)
e2
:
SetValue
(
c17060910
.
aclimit
)
c
:
RegisterEffect
(
e2
)
--destroy and atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
17060910
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_ATKCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetHintTiming
(
0
,
0x1e0
)
e3
:
SetTarget
(
c17060910
.
destg
)
e3
:
SetOperation
(
c17060910
.
desop
)
c
:
RegisterEffect
(
e3
)
end
c17060910
.
is_named_with_Opera_type
=
1
function
c17060910
.
IsOpera_type
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Opera_type
end
function
c17060910
.
splimcon
(
e
)
return
not
e
:
GetHandler
():
IsForbidden
()
end
function
c17060910
.
splimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
return
not
c
:
IsType
(
TYPE_PENDULUM
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
end
function
c17060910
.
accon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c17060910
.
aclimit
(
e
,
re
,
tp
)
local
atk
=
e
:
GetHandler
():
GetAttack
()
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
GetBaseAttack
()
<
atk
end
function
c17060910
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c17060910
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
atk
=
tc
:
GetTextAttack
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
c
:
GetAttack
()
*
2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
end
\ No newline at end of file
expansions/script/c17060911.lua
0 → 100644
View file @
f4404c6c
--あやと
function
c17060911
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060911
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
17060911
)
e1
:
SetTarget
(
c17060911
.
thtg
)
e1
:
SetOperation
(
c17060911
.
thop
)
c
:
RegisterEffect
(
e1
)
end
c17060911
.
is_named_with_Waves_Type
=
1
function
c17060911
.
IsWaves_Type
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Waves_Type
end
function
c17060911
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c17060911
.
IsWaves_Type
(
c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
c17060911
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c17060911
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c17060911
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17060911
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c17060912.lua
0 → 100644
View file @
f4404c6c
--真矢
function
c17060912
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060912
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCondition
(
c17060912
.
spcon
)
e1
:
SetTarget
(
c17060912
.
sptg
)
e1
:
SetOperation
(
c17060912
.
spop
)
c
:
RegisterEffect
(
e1
)
end
c17060912
.
is_named_with_Waves_Type
=
1
function
c17060912
.
IsWaves_Type
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Waves_Type
end
function
c17060912
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
17060911
)
end
function
c17060912
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c17060912
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c17060912
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
17060913
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c17060912
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c17060912
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c17060912
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17060912
.
filter
,
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
\ No newline at end of file
expansions/script/c17060913.lua
0 → 100644
View file @
f4404c6c
--アーリン
function
c17060913
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--pendulum set/spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
17060913
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
17060913
)
e1
:
SetTarget
(
c17060913
.
rptg
)
e1
:
SetOperation
(
c17060913
.
rpop
)
c
:
RegisterEffect
(
e1
)
end
c17060913
.
is_named_with_Waves_Type
=
1
function
c17060913
.
IsWaves_Type
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_Waves_Type
end
function
c17060913
.
rpfilter
(
c
,
e
,
tp
)
return
c17060913
.
IsWaves_Type
(
c
)
and
not
c
:
IsForbidden
()
end
function
c17060913
.
rptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c17060913
.
rpfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c17060913
.
rpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
17060913
,
6
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c17060913
.
rpfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
op
=
0
if
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
17060913
,
1
),
aux
.
Stringid
(
17060913
,
2
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
17060913
,
2
))
end
if
op
==
0
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
else
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c33700187.lua
0 → 100644
View file @
f4404c6c
--宇宙融合
local
m
=
33700187
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
function
(
e
,
tp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_GRAVE
,
0
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
ct
==
1
or
ct
==
g
:
GetCount
()
end
)
e1
:
SetTarget
(
c45906428
.
target
)
e1
:
SetOperation
(
c45906428
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c45906428
.
filter0
(
c
)
return
c
:
IsOnField
()
and
c
:
IsAbleToDeck
()
end
function
c45906428
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c45906428
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c45906428
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
end
function
c45906428
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c45906428
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c45906428
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c45906428
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c45906428
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c45906428
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c45906428
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c45906428
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c45906428
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c45906428
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoDeck
(
mat1
,
nil
,
2
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
\ No newline at end of file
expansions/script/c33700188.lua
0 → 100644
View file @
f4404c6c
--圣山的神像
local
m
=
33700188
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
cm
.
linkcon
)
e0
:
SetOperation
(
cm
.
linkop
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_FLAG_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
function
(
e
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
)
e1
:
SetTarget
(
cm
.
rmtg
)
e1
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetCondition
(
cm
.
splimcon
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
mfilter
(
c
,
lc
)
return
c
:
IsFaceup
()
and
c
:
IsLinkType
(
TYPE_RITUAL
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
end
function
cm
.
lcheck
(
g
,
tp
,
lc
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
lc
)
>
0
and
not
g
:
IsExists
(
cm
.
lfilter
,
1
,
nil
,
g
)
end
function
cm
.
lfilter
(
c
,
g
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
c
,
c
:
GetCode
())
end
function
cm
.
linkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
GetCount
()
>=
3
and
Senya
.
CheckGroup
(
g
,
cm
.
lcheck
,
nil
,
3
,
3
,
tp
,
c
)
end
function
cm
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_LMATERIAL
,
g
,
cm
.
lcheck
,
nil
,
3
,
3
,
tp
,
c
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
function
cm
.
rmfilter
(
c
,
e
,
tp
,
zone
)
return
zone
>
0
and
c
:
IsFacedown
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
,
POS_FACEUP
,
tp
,
zone
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
end
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
rmfilter
,
tp
,
0
,
LOCATION_EXTRA
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
rmfilter
,
tp
,
0
,
LOCATION_EXTRA
,
nil
,
e
,
tp
,
zone
)
if
g
:
GetCount
()
==
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
g
:
RandomSelect
(
tp
,
1
):
GetFirst
()
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
,
zone
)
then
e
:
GetHandler
():
SetCardTarget
(
tc
)
e
:
SetLabelObject
(
tc
)
Duel
.
SpecialSummonComplete
()
end
end
function
cm
.
splimcon
(
e
)
return
e
:
GetHandler
():
GetCardTarget
():
IsContains
(
e
:
GetLabelObject
())
end
expansions/script/c33700189.lua
0 → 100644
View file @
f4404c6c
--剧透警报!!
local
m
=
33700189
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e0
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e0
:
SetRange
(
LOCATION_SZONE
)
e0
:
SetCountLimit
(
1
)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
AnnounceCard
(
1
-
Duel
.
GetTurnPlayer
())
e
:
SetLabel
(
ac
)
e
:
GetHandler
():
SetHint
(
CHINT_CARD
,
ac
)
end
)
c
:
RegisterEffect
(
e0
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetLabelObject
(
e0
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tcode
=
e
:
GetLabelObject
():
GetLabel
()
for
_
,
code
in
ipairs
(
cm
.
check
[
Duel
.
GetTurnPlayer
()])
do
if
tcode
==
code
then
return
true
end
end
return
false
end
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EFFECT
)
local
p
=
1
-
Duel
.
GetTurnPlayer
()
local
op
=
0
if
Duel
.
IsPlayerCanDraw
(
p
,
1
)
then
op
=
Duel
.
SelectOption
(
p
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
else
op
=
1
end
e
:
SetLabel
(
op
)
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_DRAW
)
Duel
.
SetTargetPlayer
(
p
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
p
,
1
)
else
e
:
SetCategory
(
CATEGORY_DAMAGE
)
Duel
.
SetTargetPlayer
(
1
-
p
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
p
,
1000
)
end
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
e
:
GetLabel
()
==
0
then
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
else
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
end
end
)
c
:
RegisterEffect
(
e2
)
if
not
cm
.
check
then
cm
.
check
=
{
[
0
]
=
{}
[
1
]
=
{}
}
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_TO_HAND
)
ge1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
tc
in
aux
.
Next
(
eg
)
do
table.insert
(
cm
.
check
[
ep
],
tc
:
GetCode
())
end
end
)
Duel
.
RegisterEffect
(
ge1
)
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
.
check
[
0
]
=
{}
cm
.
check
[
1
]
=
{}
end
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
expansions/script/c33700190.lua
0 → 100644
View file @
f4404c6c
--世界纪录仪 ~那孩子背负着太阳~
local
m
=
33700190
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCondition
(
cm
.
slimit
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_MSET
)
e1
:
SetCondition
(
cm
.
slimit
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandler
():
GetSummonPlayer
(),
m
)
==
0
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
RegisterFlagEffect
(
e
:
GetHandler
():
GetSummonPlayer
(),
m
,
0
,
0
,
0
)
end
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37564765
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_TO_HAND
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
eg
:
GetCount
()
==
1
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsPreviousLocation
(
LOCATION_DECK
)
and
tc
:
IsPreviousControler
(
1
-
tp
)
and
(
not
tc
:
IsReason
(
REASON_DRAW
)
or
tc
:
IsPublic
())
end
)
e3
:
SetTarget
(
cm
.
SelfSpsummonTarget
)
e3
:
SetOperation
(
cm
.
SelfSpsummonTarget
)
c
:
RegisterEffect
(
e3
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
cm
.
copytg
)
e2
:
SetOperation
(
cm
.
copyop
)
c
:
RegisterEffect
(
e2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
function
(
e
)
local
c
=
e
:
GetHandler
()
return
c
:
GetBaseAttack
()
==
0
and
c
:
GetBaseDefense
()
==
0
and
c
:
IsAttackAbove
(
0
)
and
c
:
IsDefenseAbove
(
0
)
end
)
e4
:
SetValue
(
function
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
)
c
:
RegisterEffect
(
e4
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetCondition
(
function
(
e
)
local
c
=
e
:
GetHandler
()
return
c
:
GetBaseAttack
()
==
0
and
c
:
GetBaseDefense
()
==
0
and
c
:
IsAttackAbove
(
0
)
and
c
:
IsDefenseAbove
(
0
)
end
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
slimit
(
e
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
end
function
cm
.
Copy
(
c
,
tc
)
local
atk
=
tc
:
GetTextAttack
()
local
def
=
tc
:
GetTextDefense
()
local
code
=
tc
:
GetOriginalCode
()
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetReset
(
0x1fe1000
)
e3
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e3
:
SetValue
(
atk
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetReset
(
0x1fe1000
)
e4
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
e4
:
SetValue
(
def
)
c
:
RegisterEffect
(
e4
)
local
ccd
=
c
:
GetFlagEffectLabel
(
m
)
if
ccd
then
c
:
ResetFlagEffect
(
m
)
c
:
ResetEffect
(
ccd
,
RESET_COPY
)
end
local
ecd
=
c
:
CopyEffect
(
rcd
,
RESET_EVENT
+
0x1fe0000
,
1
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
,
ecd
)
end
function
cm
.
SelfSpsummonTarget
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
eg
:
GetFirst
():
IsType
(
TYPE_MONSTER
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
SelfSpsummonOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
eg
:
GetFirst
()
if
tc
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
cm
.
Copy
(
c
,
code
)
Duel
.
SpecialSummonComplete
()
end
end
function
cm
.
copyfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
cm
.
copytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
copyfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
copyfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
and
c
:
GetFlagEffect
(
m
-
700000
)
==
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
cm
.
copyfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
cm
.
copyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsType
(
TYPE_TOKEN
)
and
c
:
GetFlagEffect
(
m
-
700000
)
==
0
then
cm
.
Copy
(
c
,
code
)
c
:
RegisterFlagEffect
(
m
-
700000
,
RESET_EVENT
+
0x1fe0000
,
0
,
10
)
end
end
\ No newline at end of file
expansions/script/c37564012.lua
View file @
f4404c6c
...
...
@@ -72,7 +72,7 @@ function cm.filter(c,e,tp)
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
cm
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
(),
tp
)
>
0
and
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
tp
)
...
...
expansions/script/c37564339.lua
0 → 100644
View file @
f4404c6c
--恋色的幻象·Sherry
local
m
=
37564339
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
Senya
.
AddXyzProcedureCustom
(
c
,
function
(
c
,
xyzc
)
return
c
:
GetOwner
()
==
1
-
xyzc
:
GetControler
()
end
,
nil
,
2
,
2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
function
(
e
,
tp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
)
e4
:
SetTarget
(
cm
.
rmtg
)
e4
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e4
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_CONTROL
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetDescription
(
Senya
.
DescriptionCost
())
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
local
ex
=
e1
:
Clone
()
ex
:
SetType
(
EFFECT_TYPE_QUICK_O
)
ex
:
SetCode
(
EVENT_FREE_CHAIN
)
ex
:
SetHintTiming
(
0
,
0x1e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
function
(
e
,
c
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
and
c
:
GetOwner
()
==
1
-
e
:
GetHandlerPlayer
()
and
c
~=
e
:
GetHandler
()
end
)
e3
:
SetLabelObject
(
ex
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
chkc
:
GetControler
()
~=
tp
and
chkc
:
IsControlerCanBeChanged
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsControlerCanBeChanged
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONTROL
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsControlerCanBeChanged
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
GetControl
(
tc
,
tp
)
end
end
\ No newline at end of file
expansions/script/c37564560.lua
View file @
f4404c6c
...
...
@@ -70,7 +70,7 @@ function cm.linkcon(e,c)
end
function
cm
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
0
,
g
,
cm
.
lcheck
,
nil
,
2
,
2
,
tp
,
c
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_LMATERIAL
,
g
,
cm
.
lcheck
,
nil
,
2
,
2
,
tp
,
c
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
...
...
expansions/script/c37564702.lua
0 → 100644
View file @
f4404c6c
--月之国的公主-米露琪
local
m
=
37564702
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCondition
(
function
(
e
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
1000
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
filter
(
c
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
re
:
GetHandler
():
GetCode
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
re
:
GetHandler
():
GetCode
())
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
re
:
GetHandler
():
GetCode
())
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
\ No newline at end of file
expansions/script/c37564919.lua
View file @
f4404c6c
...
...
@@ -45,7 +45,7 @@ function cm.linkcon(e,c)
end
function
cm
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
0
,
g
,
cm
.
lcheck
,
nil
,
3
,
3
,
tp
,
c
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_LMATERIAL
,
g
,
cm
.
lcheck
,
nil
,
3
,
3
,
tp
,
c
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
...
...
expansions/script/c50008000.lua
0 → 100644
View file @
f4404c6c
--精灵传说 灰姑娘
local
m
=
50008000
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--effect gain
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetCondition
(
cm
.
efcon
)
e2
:
SetOperation
(
cm
.
efop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
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
cm
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
r
==
REASON_LINK
or
r
==
REASON_SYNCHRO
)
end
function
cm
.
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
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCondition
(
cm
.
discon
)
e1
:
SetTarget
(
cm
.
distg
)
e1
:
SetOperation
(
cm
.
disop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
cm
.
tfilter
(
c
,
tp
)
return
c
:
IsOnField
()
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
tg
and
tg
:
IsExists
(
cm
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
cm
.
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
cm
.
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
expansions/script/c50008001.lua
0 → 100644
View file @
f4404c6c
--妖精传奇-白姬
local
m
=
50008001
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
cm
.
spcon
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
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
:
SetCondition
(
cm
.
efcon
)
e2
:
SetOperation
(
cm
.
efop
)
c
:
RegisterEffect
(
e2
)
end
--1
function
cm
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetAttack
()
==
1850
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
--2
function
cm
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
r
==
REASON_LINK
or
r
==
REASON_SYNCHRO
)
end
function
cm
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
if
not
rc
:
IsRace
(
RACE_SPELLCASTER
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
cm
.
disfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsDisabled
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
aux
.
disfilter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
disfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
disfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
\ No newline at end of file
expansions/script/c50008002.lua
0 → 100644
View file @
f4404c6c
--妖精传说-辛德瑞拉
local
m
=
50008002
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--extra summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
cm
.
extg
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_EXTRA_SET_COUNT
)
c
:
RegisterEffect
(
e2
)
--effect gain
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCondition
(
cm
.
efcon
)
e3
:
SetOperation
(
cm
.
efop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
extg
(
e
,
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
--2
function
cm
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
r
==
REASON_LINK
or
r
==
REASON_SYNCHRO
)
end
function
cm
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
if
not
rc
:
IsRace
(
RACE_SPELLCASTER
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
cm
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
\ No newline at end of file
expansions/script/c57300025.lua
View file @
f4404c6c
...
...
@@ -141,11 +141,11 @@ function c57300025.spfilter(c,e,tp)
end
function
c57300025
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ft
=
1
if
e
:
GetLabel
()
==
1
then
ft
=
0
end
local
cc
=
nil
if
e
:
GetLabel
()
==
1
then
cc
=
e
:
GetHandler
()
end
e
:
SetLabel
(
0
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
false
end
return
Duel
.
GetMZoneCount
(
tp
)
>
ft
return
Duel
.
GetMZoneCount
(
tp
,
cc
,
tp
)
>
1
and
Duel
.
IsExistingMatchingCard
(
c57300025
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c57300025
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
...
...
expansions/strings.conf
View file @
f4404c6c
...
...
@@ -61,6 +61,7 @@
!
setname
0
x233
纸上
!
setname
0
x1233
纸上魔法使
!
setname
0
x2233
纸上台本
!
setname
0
x234
Island
#樱幕 111
...
...
lflist.conf
View file @
f4404c6c
...
...
@@ -73,6 +73,7 @@
37564321
0
--忘我画派
37564324
0
--残留的愿望·
Coconatsu
37564330
1
--源数网络
37564338
0
--恋色的舞姬·纱由里
37564505
1
--
Nanahira
&
Halozy
#Harunohi
#Koinomi
...
...
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