Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Huangnan
no81cards
Commits
6e0e5330
Commit
6e0e5330
authored
May 15, 2022
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upd
parent
02f2f863
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
36 additions
and
1567 deletions
+36
-1567
expansions/lflist.conf
expansions/lflist.conf
+36
-2
expansions/no81.cdb
expansions/no81.cdb
+0
-0
expansions/pics/15000760.jpg
expansions/pics/15000760.jpg
+0
-0
expansions/pics/15000762.jpg
expansions/pics/15000762.jpg
+0
-0
expansions/pics/15000764.jpg
expansions/pics/15000764.jpg
+0
-0
expansions/pics/15000766.jpg
expansions/pics/15000766.jpg
+0
-0
expansions/pics/15000768.jpg
expansions/pics/15000768.jpg
+0
-0
expansions/pics/15000770.jpg
expansions/pics/15000770.jpg
+0
-0
expansions/pics/15000772.jpg
expansions/pics/15000772.jpg
+0
-0
expansions/pics/15000810.jpg
expansions/pics/15000810.jpg
+0
-0
expansions/pics/15000811.jpg
expansions/pics/15000811.jpg
+0
-0
expansions/pics/15000813.jpg
expansions/pics/15000813.jpg
+0
-0
expansions/pics/15000814.jpg
expansions/pics/15000814.jpg
+0
-0
expansions/script/c15000760.lua
expansions/script/c15000760.lua
+0
-135
expansions/script/c15000762.lua
expansions/script/c15000762.lua
+0
-128
expansions/script/c15000764.lua
expansions/script/c15000764.lua
+0
-187
expansions/script/c15000766.lua
expansions/script/c15000766.lua
+0
-191
expansions/script/c15000768.lua
expansions/script/c15000768.lua
+0
-203
expansions/script/c15000770.lua
expansions/script/c15000770.lua
+0
-192
expansions/script/c15000772.lua
expansions/script/c15000772.lua
+0
-169
expansions/script/c15000810.lua
expansions/script/c15000810.lua
+0
-155
expansions/script/c15000811.lua
expansions/script/c15000811.lua
+0
-41
expansions/script/c15000813.lua
expansions/script/c15000813.lua
+0
-101
expansions/script/c15000814.lua
expansions/script/c15000814.lua
+0
-63
No files found.
expansions/lflist.conf
View file @
6e0e5330
...
@@ -758,6 +758,33 @@
...
@@ -758,6 +758,33 @@
30002065
0
30002065
0
30010000
0
30010000
0
30012000
0
30012000
0
#220515
12057609
0
12057613
0
12057801
0
12057807
0
12057809
0
12057816
0
12057820
0
12057822
0
12057823
0
12057826
0
12057832
0
25000007
0
25000060
0
30015025
0
30015100
0
35300137
0
35300153
0
35300189
0
35300195
0
35300197
0
35300209
0
35399003
0
35399016
0
33700374
1
33720058
1
35300141
1
#220508
#220508
60000056
0
60000056
0
60000063
0
60000063
0
...
@@ -784,7 +811,6 @@
...
@@ -784,7 +811,6 @@
12057607
1
12057607
1
14000210
1
14000210
1
15000071
1
15000071
1
35300209
1
35399009
1
35399009
1
82204231
1
82204231
1
82207032
2
82207032
2
...
@@ -853,7 +879,6 @@
...
@@ -853,7 +879,6 @@
14000278
0
14000278
0
31407007
0
31407007
0
31400058
1
31400058
1
35300137
1
#220108
#220108
15000180
0
15000180
0
33700902
0
33700902
0
...
@@ -3435,6 +3460,15 @@
...
@@ -3435,6 +3460,15 @@
11450000
0
11450000
0
25000000
0
25000000
0
25000403
0
25000403
0
90700065
0
90700066
0
90700067
0
90700068
0
90700069
0
25000000
0
25000001
0
25000049
0
25000403
0
#永劫复归 善哉善哉
#永劫复归 善哉善哉
90700056
0
90700056
0
90700057
0
90700057
0
...
...
expansions/no81.cdb
View file @
6e0e5330
No preview for this file type
expansions/pics/15000760.jpg
deleted
100644 → 0
View file @
02f2f863
66.4 KB
expansions/pics/15000762.jpg
deleted
100644 → 0
View file @
02f2f863
64.6 KB
expansions/pics/15000764.jpg
deleted
100644 → 0
View file @
02f2f863
68.7 KB
expansions/pics/15000766.jpg
deleted
100644 → 0
View file @
02f2f863
68.9 KB
expansions/pics/15000768.jpg
deleted
100644 → 0
View file @
02f2f863
66.9 KB
expansions/pics/15000770.jpg
deleted
100644 → 0
View file @
02f2f863
58.8 KB
expansions/pics/15000772.jpg
deleted
100644 → 0
View file @
02f2f863
61.2 KB
expansions/pics/15000810.jpg
deleted
100644 → 0
View file @
02f2f863
52.8 KB
expansions/pics/15000811.jpg
deleted
100644 → 0
View file @
02f2f863
43.2 KB
expansions/pics/15000813.jpg
deleted
100644 → 0
View file @
02f2f863
63 KB
expansions/pics/15000814.jpg
deleted
100644 → 0
View file @
02f2f863
62 KB
expansions/script/c15000760.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000760
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·钴之安娜"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
cm
.
mocon
)
e1
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_CUSTOM
+
15000760
)
e2
:
SetCountLimit
(
1
,
15000760
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetTarget
(
cm
.
sptg1
)
e2
:
SetOperation
(
cm
.
spop1
)
c
:
RegisterEffect
(
e2
)
--?
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
15000761
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
con
)
e3
:
SetTarget
(
cm
.
tg
)
e3
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e3
)
if
not
c15000760
.
global_check
then
c15000760
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCondition
(
cm
.
regcon
)
ge1
:
SetOperation
(
cm
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
)
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
15000760
,
re
,
r
,
rp
,
ep
,
ev
)
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
return
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
cm
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
and
not
c
:
IsCode
(
15000760
)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b1
=
(
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
)
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
GetMatchingGroupCount
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
>
0
)
local
b3
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
return
b1
and
(
b2
or
b3
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
end
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
GetMatchingGroupCount
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
>
0
)
local
b3
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
if
b2
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
GetMatchingGroupCount
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
>
0
)
local
b3
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
if
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
0
then
return
end
local
op
=
0
if
b2
and
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
elseif
b2
and
not
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
))
elseif
b3
and
not
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
+
1
else
return
end
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
if
op
==
1
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetTargetRange
(
LOCATION_MZONE
+
LOCATION_PZONE
,
0
)
e1
:
SetTarget
(
cm
.
indtg
)
e1
:
SetValue
(
aux
.
tgoval
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
indtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSetCard
(
0x3f3c
)
end
\ No newline at end of file
expansions/script/c15000762.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000762
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·铜之奈勒"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
cm
.
mocon
)
e1
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_CUSTOM
+
15000762
)
e2
:
SetCountLimit
(
1
,
15000762
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetTarget
(
cm
.
sptg1
)
e2
:
SetOperation
(
cm
.
spop1
)
c
:
RegisterEffect
(
e2
)
--?
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
15000763
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
con
)
e3
:
SetTarget
(
cm
.
tg
)
e3
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e3
)
if
not
c15000762
.
global_check
then
c15000762
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCondition
(
cm
.
regcon
)
ge1
:
SetOperation
(
cm
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
)
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
15000762
,
re
,
r
,
rp
,
ep
,
ev
)
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
return
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
cm
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
sr1filter
(
c
)
return
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
15000762
)
and
c
:
IsAbleToHand
()
end
function
cm
.
sr2filter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsCanHaveCounter
(
0xf3c
,
1
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b1
=
(
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
)
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sr1filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sr2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
))
return
b1
and
(
b2
or
b3
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
end
e
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sr1filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sr2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
))
if
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
0
then
return
end
local
op
=
0
if
b2
and
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
elseif
b2
and
not
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
))
elseif
b3
and
not
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
+
1
else
return
end
local
tc
=
nil
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sr1filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
end
if
op
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sr2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
end
if
tc
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
\ No newline at end of file
expansions/script/c15000764.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000764
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·铅之安洁拉"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e1
:
SetCondition
(
cm
.
mocon
)
e1
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
--SpecialSummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
+
CATEGORY_TOEXTRA
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_CUSTOM
+
15000764
)
e3
:
SetCountLimit
(
1
,
15000764
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetTarget
(
cm
.
sptg1
)
e3
:
SetOperation
(
cm
.
spop1
)
c
:
RegisterEffect
(
e3
)
--?
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
15000765
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
con
)
e3
:
SetTarget
(
cm
.
tg
)
e3
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e3
)
if
not
c15000764
.
global_check
then
c15000764
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCondition
(
cm
.
regcon
)
ge1
:
SetOperation
(
cm
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
)
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
15000764
,
re
,
r
,
rp
,
ep
,
ev
)
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
return
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
15000764
)
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
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
return
end
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
cm
.
spfilter
(
c
,
e
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
((
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsDestructable
(
e
))
or
(
c
:
IsLocation
(
LOCATION_HAND
)
and
c
:
IsAbleToExtra
()))
end
function
cm
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
c
,
e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOEXTRA
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
c
,
e
):
GetFirst
()
local
x
=
0
if
tc
then
if
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
elseif
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
SendtoExtraP
(
tc
,
nil
,
REASON_EFFECT
)
end
end
local
ag
=
Duel
.
GetOperatedGroup
()
if
ag
:
GetCount
()
~=
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b1
=
(
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
)
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
>
0
)
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
))
return
b1
and
(
b2
or
b3
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
end
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
>
0
)
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
))
if
b2
then
e
:
SetCategory
(
CATEGORY_DESTROY
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
if
b3
then
e
:
SetCategory
(
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
>
0
)
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
))
if
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
0
then
return
end
local
op
=
0
if
b2
and
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
),
aux
.
Stringid
(
m
,
4
))
elseif
b2
and
not
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
))
elseif
b3
and
not
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
4
))
+
1
else
return
end
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
if
op
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
end
\ No newline at end of file
expansions/script/c15000766.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000766
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·金之格雷斯"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e1
:
SetCondition
(
cm
.
mocon
)
e1
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
--SpecialSummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
+
CATEGORY_TOEXTRA
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_CUSTOM
+
15000766
)
e3
:
SetCountLimit
(
1
,
15000766
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetTarget
(
cm
.
sptg1
)
e3
:
SetOperation
(
cm
.
spop1
)
c
:
RegisterEffect
(
e3
)
--?
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
15000767
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
con
)
e3
:
SetTarget
(
cm
.
tg
)
e3
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e3
)
if
not
c15000766
.
global_check
then
c15000766
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCondition
(
cm
.
regcon
)
ge1
:
SetOperation
(
cm
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
)
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
15000766
,
re
,
r
,
rp
,
ep
,
ev
)
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
return
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
filter
(
c
)
return
c
:
IsAbleToHand
()
and
c
:
IsCanHaveCounter
(
0xf3c
,
1
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
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
return
end
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
cm
.
spfilter
(
c
,
e
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
((
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsDestructable
(
e
))
or
(
c
:
IsLocation
(
LOCATION_HAND
)
and
c
:
IsAbleToExtra
()))
end
function
cm
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
c
,
e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOEXTRA
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
c
,
e
):
GetFirst
()
local
x
=
0
if
tc
then
if
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
elseif
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
SendtoExtraP
(
tc
,
nil
,
REASON_EFFECT
)
end
end
local
ag
=
Duel
.
GetOperatedGroup
()
if
ag
:
GetCount
()
~=
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b1
=
(
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
)
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
))
return
b1
and
(
b2
or
b3
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
end
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
))
if
b2
then
e
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
if
b3
then
e
:
SetCategory
(
CATEGORY_ATKCHANGE
)
end
end
function
cm
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3f3c
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
))
if
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
0
then
return
end
local
op
=
0
if
b2
and
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
),
aux
.
Stringid
(
m
,
4
))
elseif
b2
and
not
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
))
elseif
b3
and
not
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
4
))
+
1
else
return
end
if
op
==
0
then
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
if
tc
then
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
end
end
end
if
op
==
1
then
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
800
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
end
end
end
\ No newline at end of file
expansions/script/c15000768.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000768
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·汞之克莱门蒂亚"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e1
:
SetCondition
(
cm
.
mocon
)
e1
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_SINGLE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
--SpecialSummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
+
CATEGORY_TOEXTRA
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_CUSTOM
+
15000768
)
e3
:
SetCountLimit
(
1
,
15000768
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetTarget
(
cm
.
sptg1
)
e3
:
SetOperation
(
cm
.
spop1
)
c
:
RegisterEffect
(
e3
)
--?
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetCountLimit
(
1
,
15000769
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
cm
.
con
)
e4
:
SetTarget
(
cm
.
tg
)
e4
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e4
)
if
not
c15000768
.
global_check
then
c15000768
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_MOVE
)
ge1
:
SetCondition
(
cm
.
regcon
)
ge1
:
SetOperation
(
cm
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
)
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
15000768
,
re
,
r
,
rp
,
ep
,
ev
)
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
return
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
filter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsCode
(
15000810
)
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
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
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
not
Duel
.
CheckPhaseActivity
()
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
if
e
:
GetLabel
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
15248873
,
RESET_CHAIN
,
0
,
1
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
ResetFlagEffect
(
tp
,
15248873
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
te
=
tc
:
GetActivateEffect
()
local
b1
=
tc
:
IsAbleToHand
()
if
e
:
GetLabel
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
15248873
,
RESET_CHAIN
,
0
,
1
)
end
local
b2
=
te
:
IsActivatable
(
tp
,
true
,
true
)
Duel
.
ResetFlagEffect
(
tp
,
15248873
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_FZONE
,
0
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
)
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
end
function
cm
.
spfilter
(
c
,
e
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
((
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsDestructable
(
e
))
or
(
c
:
IsLocation
(
LOCATION_HAND
)
and
c
:
IsAbleToExtra
()))
end
function
cm
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
c
,
e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOEXTRA
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
c
,
e
):
GetFirst
()
local
x
=
0
if
tc
then
if
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
elseif
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
SendtoExtraP
(
tc
,
nil
,
REASON_EFFECT
)
end
end
local
ag
=
Duel
.
GetOperatedGroup
()
if
ag
:
GetCount
()
~=
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
sp2filter
(
c
,
tc
,
e
,
tp
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
tc
:
GetCode
())
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b1
=
(
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
)
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
):
IsDestructable
(
e
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sp2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
),
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
~=
0
)
return
b1
and
(
b2
or
b3
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
1
end
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
):
IsDestructable
(
e
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sp2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
),
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
~=
0
)
if
b3
then
e
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_PZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
b2
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
))
local
b3
=
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
and
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
):
IsDestructable
(
e
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sp2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
),
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
~=
0
)
if
Duel
.
GetMatchingGroupCount
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
nil
)
==
0
then
return
end
local
op
=
0
if
b2
and
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
),
aux
.
Stringid
(
m
,
4
))
elseif
b2
and
not
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
3
))
elseif
b3
and
not
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
4
))
+
1
else
return
end
if
op
==
0
then
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
tc
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
tc
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
tc
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
tc
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
tc
,
0
)
end
end
if
op
==
1
then
local
tc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sp2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tc
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
ag
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sp2filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tc
,
e
,
tp
)
if
ag
:
GetCount
()
~=
0
then
Duel
.
SpecialSummon
(
ag
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c15000770.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000770
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·锂之薇拉"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
,
false
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
cm
.
sprcon
)
e2
:
SetOperation
(
cm
.
sprop
)
c
:
RegisterEffect
(
e2
)
--move
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetCondition
(
cm
.
mocon
)
e3
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e3
)
--Immune
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
:
SetValue
(
cm
.
efilter
)
c
:
RegisterEffect
(
e4
)
--place
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_CUSTOM
+
15000770
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
,
15000770
)
e5
:
SetCondition
(
cm
.
plcon
)
e5
:
SetTarget
(
cm
.
pltg
)
e5
:
SetOperation
(
cm
.
plop
)
c
:
RegisterEffect
(
e5
)
--pendulum
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e6
:
SetCategory
(
CATEGORY_DESTROY
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e6
:
SetCode
(
EVENT_DESTROYED
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetCondition
(
cm
.
pencon
)
e6
:
SetTarget
(
cm
.
pentg
)
e6
:
SetOperation
(
cm
.
penop
)
c
:
RegisterEffect
(
e6
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_DESTROYED
)
ge2
:
SetCondition
(
cm
.
regcon
)
ge2
:
SetOperation
(
cm
.
regop
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
cm
.
spcfilter
(
c
,
tp
)
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
v
=
0
if
eg
:
IsExists
(
cm
.
spcfilter
,
1
,
nil
,
0
)
then
v
=
v
+
1
end
if
eg
:
IsExists
(
cm
.
spcfilter
,
1
,
nil
,
1
)
then
v
=
v
+
2
end
if
v
==
0
then
return
false
end
e
:
SetLabel
(({
0
,
1
,
PLAYER_ALL
})[
v
])
return
true
end
function
cm
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
15000770
,
re
,
r
,
rp
,
ep
,
e
:
GetLabel
())
end
function
cm
.
tgrfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
4
)
and
c
:
IsReleasable
()
end
function
cm
.
tgrfilter1
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsLevelAbove
(
4
)
end
function
cm
.
tgrfilter2
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsLevelAbove
(
4
)
end
function
cm
.
mnfilter
(
c
,
g
)
return
g
:
IsExists
(
cm
.
mnfilter2
,
1
,
c
,
c
)
end
function
cm
.
mnfilter2
(
c
,
mc
)
return
c
:
GetLevel
()
-
mc
:
GetLevel
()
==
2
end
function
cm
.
fselect
(
g
,
tp
,
sc
)
return
g
:
GetCount
()
==
2
and
g
:
IsExists
(
cm
.
tgrfilter1
,
1
,
nil
)
and
g
:
IsExists
(
cm
.
tgrfilter2
,
1
,
nil
)
and
g
:
IsExists
(
cm
.
mnfilter
,
1
,
nil
,
g
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
sc
)
>
0
end
function
cm
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgrfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
2
,
2
,
tp
,
c
)
end
function
cm
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgrfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
tg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
false
,
2
,
2
,
tp
,
c
)
Duel
.
Release
(
tg
,
REASON_COST
)
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
re
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TRIGGERING_EFFECT
)
return
(
not
re
)
or
(
not
re
:
GetHandler
():
IsCode
(
15000770
))
and
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
efilter
(
e
,
te
)
return
e
:
GetHandlerPlayer
()
~=
te
:
GetOwnerPlayer
()
end
function
cm
.
plcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
return
(
ev
==
tp
or
ev
==
PLAYER_ALL
)
and
eg
:
IsExists
(
cm
.
spcfilter
,
1
,
nil
,
tp
)
end
function
cm
.
plfilter
(
c
)
return
((
not
(
c
:
IsLocation
(
LOCATION_EXTRA
)
or
c
:
IsLocation
(
LOCATION_REMOVED
))
or
(
c
:
IsFaceup
()
and
(
c
:
IsLocation
(
LOCATION_EXTRA
)
or
c
:
IsLocation
(
LOCATION_REMOVED
)))))
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
not
c
:
IsForbidden
()
end
function
cm
.
pltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
eg
:
IsExists
(
cm
.
plfilter
,
1
,
nil
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
end
end
function
cm
.
plop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
eg
:
FilterSelect
(
tp
,
cm
.
plfilter
,
1
,
1
,
nil
):
GetFirst
()
if
tc
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
function
cm
.
pencon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
end
function
cm
.
pentg
(
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
)
end
end
function
cm
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
and
not
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c15000772.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000772
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"幻象骑士·锇之艾希"
function
cm
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
,
false
)
--xyz summon
c
:
SetSPSummonOnce
(
15000772
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedureLevelFree
(
c
,
cm
.
mfilter
,
cm
.
xyzcheck
,
2
,
5
)
--move
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCondition
(
cm
.
mocon
)
e1
:
SetOperation
(
cm
.
moop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
discon
)
e2
:
SetCost
(
cm
.
discost
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e2
)
--Xyz material
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e3
:
SetTarget
(
cm
.
attg
)
e3
:
SetOperation
(
cm
.
atop
)
c
:
RegisterEffect
(
e3
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD_P
)
e4
:
SetOperation
(
cm
.
ovcheck
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_LEAVE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetCondition
(
cm
.
spcon
)
e5
:
SetTarget
(
cm
.
sptg
)
e5
:
SetOperation
(
cm
.
spop
)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
mfilter
(
c
,
xyzc
)
return
c
:
IsSetCard
(
0x3f3c
)
end
function
cm
.
xyzcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetLevel
)
==
1
end
function
cm
.
mocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
re
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TRIGGERING_EFFECT
)
return
(
not
re
)
or
(
not
re
:
GetHandler
():
IsCode
(
15000772
))
and
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
end
function
cm
.
moop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
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
function
cm
.
atfilter
(
c
)
return
c
:
IsSetCard
(
0x3f3c
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
(
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsFaceup
()))
and
c
:
IsCanOverlay
()
end
function
cm
.
attg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
chk
==
0
then
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsRelateToBattle
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
atfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
cm
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
atfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
end
function
cm
.
ovcheck
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
()
then
e
:
GetLabelObject
():
DeleteGroup
()
end
local
g
=
e
:
GetHandler
():
GetOverlayGroup
()
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
(
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)))
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsControler
(
tp
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
g
=
e
:
GetLabelObject
():
GetLabelObject
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
g
:
IsExists
(
cm
.
spfilter
,
1
,
nil
,
e
,
tp
)
end
local
sg
=
g
:
Filter
(
cm
.
spfilter
,
nil
,
e
,
tp
)
Duel
.
SetTargetCard
(
sg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
sg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
sg
:
GetCount
()
>
ft
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
sg
=
sg
:
Select
(
tp
,
ft
,
ft
,
nil
)
end
if
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
then
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c15000810.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000810
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"空中都市 赛德尼纲"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf3c
)
c
:
SetCounterLimit
(
0xf3c
,
8
)
--activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--change effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
15000810
)
e1
:
SetRange
(
LOCATION_FZONE
)
c
:
RegisterEffect
(
e1
)
--Add Counter
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_MOVE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCondition
(
cm
.
countercon
)
e3
:
SetOperation
(
cm
.
counterop
)
c
:
RegisterEffect
(
e3
)
--Remove counter replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_RCOUNTER_REPLACE
+
0xf3c
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
cm
.
rcon
)
e4
:
SetOperation
(
cm
.
rop
)
c
:
RegisterEffect
(
e4
)
--spsummon
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_IGNITION
)
e6
:
SetRange
(
LOCATION_FZONE
)
e6
:
SetCountLimit
(
1
,
15000810
)
e6
:
SetTarget
(
cm
.
sptg
)
e6
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e6
)
if
not
cm
.
global_effect
then
cm
.
global_effect
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
ge1
:
SetCondition
(
cm
.
chcon
)
ge1
:
SetOperation
(
cm
.
chop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
countercon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
counterfilter
,
1
,
nil
)
end
function
cm
.
counterop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf3c
,
1
)
end
function
cm
.
rcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActivated
()
and
bit
.
band
(
r
,
REASON_COST
)
~=
0
and
ep
==
e
:
GetOwnerPlayer
()
and
e
:
GetHandler
():
GetCounter
(
0xf3c
)
>=
ev
end
function
cm
.
rop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RemoveCounter
(
ep
,
0xf3c
,
ev
,
REASON_EFFECT
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
((
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsFaceup
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
~=
0
)
or
(
c
:
IsLocation
(
LOCATION_HAND
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
~=
0
))
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
return
rc
:
IsType
(
TYPE_PENDULUM
)
and
rc
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
re
:
GetOperation
()
and
re
:
IsActivated
()
end
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetOwner
()
local
op
=
re
:
GetOperation
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
15000810
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetOperation
(
op
)
e1
:
SetLabelObject
(
re
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
0
)
Duel
.
ChangeChainOperation
(
ev
,
cm
.
repop
)
end
function
cm
.
selfilter
(
c
)
return
c
:
GetEffectCount
(
15000810
)
~=
0
and
not
c
:
IsDisabled
()
end
function
cm
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
se
=
Duel
.
IsPlayerAffectedByEffect
(
0
,
15000810
)
if
not
se
then
se
=
Duel
.
IsPlayerAffectedByEffect
(
1
,
15000810
)
end
local
op
=
nil
if
se
then
local
x
=
1
for
_
,
i
in
ipairs
{
Duel
.
IsPlayerAffectedByEffect
(
0
,
15000810
)}
do
if
i
:
GetLabelObject
()
==
e
and
x
~=
0
then
op
=
i
:
GetOperation
()
i
:
Reset
()
x
=
0
end
end
end
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
ag
=
Duel
.
GetMatchingGroup
(
cm
.
selfilter
,
tp
,
LOCATION_FZONE
,
LOCATION_FZONE
,
nil
)
if
ag
:
GetCount
()
==
0
then
return
end
local
seq
=
c
:
GetSequence
()
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
seq
<=
4
and
((
seq
>
0
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
-
1
))
or
(
seq
<
4
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
+
1
)))
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
15000810
,
0
))
then
Duel
.
BreakEffect
()
if
(
seq
>
0
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
-
1
))
or
(
seq
<
4
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
+
1
))
then
local
flag
=
0
if
seq
>
0
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
-
1
)
then
flag
=
bit
.
replace
(
flag
,
0x1
,
seq
-
1
)
end
if
seq
<
4
and
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
seq
+
1
)
then
flag
=
bit
.
replace
(
flag
,
0x1
,
seq
+
1
)
end
flag
=
bit
.
bxor
(
flag
,
0xff
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
flag
)
local
nseq
=
0
if
s
==
1
then
nseq
=
0
elseif
s
==
2
then
nseq
=
1
elseif
s
==
4
then
nseq
=
2
elseif
s
==
8
then
nseq
=
3
else
nseq
=
4
end
Duel
.
MoveSequence
(
c
,
nseq
)
end
end
if
c
:
IsLocation
(
LOCATION_PZONE
)
and
c
:
IsFaceup
()
and
((
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
or
(
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
))
and
not
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
))
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
15000810
,
0
))
then
Duel
.
BreakEffect
()
if
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
c
)
then
return
end
if
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
0
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
then
Duel
.
MoveSequence
(
c
,
4
)
elseif
Duel
.
GetFieldCard
(
tp
,
LOCATION_PZONE
,
1
)
==
c
and
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
then
Duel
.
MoveSequence
(
c
,
0
)
end
end
end
\ No newline at end of file
expansions/script/c15000811.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000811
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"往终局的风暴"
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
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
.
spfilter
(
c
,
e
,
tp
,
code
)
return
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
(
c
:
IsLocation
(
LOCATION_EXTRA
)
and
c
:
IsFaceup
()))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
code
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
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
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
IsEnvironment
(
15000810
,
tp
,
LOCATION_FZONE
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
g
:
GetFirst
():
GetCode
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
g
:
GetFirst
():
GetCode
())
Duel
.
SpecialSummon
(
g2
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
\ No newline at end of file
expansions/script/c15000813.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000813
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"非幻象的骑士"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf3c
)
c
:
SetCounterLimit
(
0xf3c
,
8
)
--activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--Add Counter
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EVENT_MOVE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCondition
(
cm
.
countercon
)
e1
:
SetOperation
(
cm
.
counterop
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x3f3c
))
e2
:
SetValue
(
cm
.
atkval
)
c
:
RegisterEffect
(
e2
)
--destroy replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTarget
(
cm
.
desreptg
)
e3
:
SetValue
(
cm
.
desrepval
)
e3
:
SetOperation
(
cm
.
desrepop
)
c
:
RegisterEffect
(
e3
)
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCost
(
cm
.
thcost
)
e4
:
SetTarget
(
cm
.
thtg
)
e4
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
countercon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
counterfilter
,
1
,
nil
)
end
function
cm
.
counterop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf3c
,
1
)
end
function
cm
.
atkval
(
e
,
c
)
return
e
:
GetHandler
():
GetCounter
(
0xf3c
)
*
200
end
function
cm
.
repfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
cm
.
desreptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tp
=
e
:
GetHandler
():
GetControler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
eg
:
IsExists
(
cm
.
repfilter
,
1
,
nil
,
tp
)
and
c
:
IsCanRemoveCounter
(
tp
,
0xf3c
,
1
,
REASON_EFFECT
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
end
function
cm
.
desrepval
(
e
,
c
)
local
tp
=
e
:
GetHandler
():
GetControler
()
return
cm
.
repfilter
(
c
,
tp
)
end
function
cm
.
desrepop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandler
():
GetControler
()
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf3c
,
1
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
end
function
cm
.
thfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x3f3c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tp
=
e
:
GetHandler
():
GetControler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf3c
,
2
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf3c
,
2
,
REASON_COST
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tp
=
e
:
GetHandler
():
GetControler
()
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
)
local
tp
=
e
:
GetHandler
():
GetControler
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
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/c15000814.lua
deleted
100644 → 0
View file @
02f2f863
local
m
=
15000814
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"再临的蜃景"
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0xf3c
)
c
:
SetCounterLimit
(
0xf3c
,
8
)
--activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--Add Counter
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_MOVE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCondition
(
cm
.
countercon
)
e3
:
SetOperation
(
cm
.
counterop
)
c
:
RegisterEffect
(
e3
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
cm
.
discon
)
e2
:
SetCost
(
cm
.
discost
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
countercon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
counterfilter
,
1
,
nil
)
end
function
cm
.
counterop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
AddCounter
(
0xf3c
,
1
)
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tp
=
e
:
GetHandler
():
GetControler
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xf3c
,
3
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xf3c
,
3
,
REASON_COST
)
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
\ No newline at end of file
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