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
Nemo Ma
no81cards
Commits
2111fddb
Commit
2111fddb
authored
Oct 18, 2023
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c1f2086d
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1222 additions
and
52 deletions
+1222
-52
expansions/script/c11410000.lua
expansions/script/c11410000.lua
+2
-1
expansions/script/c11450998.lua
expansions/script/c11450998.lua
+2
-1
expansions/script/c11451001.lua
expansions/script/c11451001.lua
+5
-0
expansions/script/c11451011.lua
expansions/script/c11451011.lua
+2
-2
expansions/script/c11451015.lua
expansions/script/c11451015.lua
+0
-1
expansions/script/c11451466.lua
expansions/script/c11451466.lua
+12
-22
expansions/script/c11451467.lua
expansions/script/c11451467.lua
+12
-22
expansions/script/c22020520.lua
expansions/script/c22020520.lua
+1
-1
expansions/script/c22021330.lua
expansions/script/c22021330.lua
+2
-2
expansions/script/c22022000.lua
expansions/script/c22022000.lua
+1
-0
expansions/script/c22022890.lua
expansions/script/c22022890.lua
+107
-0
expansions/script/c70052400.lua
expansions/script/c70052400.lua
+84
-0
expansions/script/c70052402.lua
expansions/script/c70052402.lua
+70
-0
expansions/script/c70052403.lua
expansions/script/c70052403.lua
+81
-0
expansions/script/c70052405.lua
expansions/script/c70052405.lua
+100
-0
expansions/script/c70052406.lua
expansions/script/c70052406.lua
+127
-0
expansions/script/c70052408.lua
expansions/script/c70052408.lua
+69
-0
expansions/script/c70052412.lua
expansions/script/c70052412.lua
+65
-0
expansions/script/c70052414.lua
expansions/script/c70052414.lua
+89
-0
expansions/script/c70052416.lua
expansions/script/c70052416.lua
+72
-0
expansions/script/c70052420.lua
expansions/script/c70052420.lua
+62
-0
expansions/script/c70052426.lua
expansions/script/c70052426.lua
+68
-0
expansions/script/c70052428.lua
expansions/script/c70052428.lua
+94
-0
expansions/script/c70052430.lua
expansions/script/c70052430.lua
+95
-0
No files found.
expansions/script/c11410000.lua
View file @
2111fddb
--杏花宵
--23.09.08
local
cm
,
m
=
GetID
()
local
m
=
11410000
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
...
expansions/script/c11450998.lua
View file @
2111fddb
...
...
@@ -114,8 +114,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
rp
,
HINTMSG_ATOHAND
)
local
tc
=
g
:
Select
(
rp
,
0
,
1
,
nil
):
GetFirst
()
if
not
tc
then
return
end
tc
:
SetStatus
(
STATUS_TO_HAND_WITHOUT_CONFIRM
,
true
)
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
then
Duel
.
ConfirmCards
(
1
-
rp
,
tc
)
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
...
...
expansions/script/c11451001.lua
View file @
2111fddb
...
...
@@ -24,6 +24,7 @@ function cm.initial_effect(c)
local
_CRemoveOverlayCard
=
Card
.
RemoveOverlayCard
local
_FilterSelect
=
Group
.
FilterSelect
local
_Select
=
Group
.
Select
local
_SelectUnselect
=
Group
.
SelectUnselect
local
function
Local_RandomSelect
(
g
,
tp
,
ct
)
local
cg
=
g
:
Clone
()
local
sg
=
Group
.
CreateGroup
()
...
...
@@ -154,6 +155,10 @@ function cm.initial_effect(c)
return
_Select
(
g
,
sp
,
min
,
max
,
nc
)
end
end
function
Group
.
SelectUnselect
(
cg
,
sg
,
sp
,
finish
,
cancel
,
...
)
if
Duel
.
GetFlagEffect
(
0
,
m
)
>
0
then
return
_SelectUnselect
(
cg
,
sg
,
sp
,
finish
,
false
,
...
)
end
return
_SelectUnselect
(
cg
,
sg
,
sp
,
finish
,
cancel
,
...
)
end
end
end
local
KOISHI_CHECK
=
false
...
...
expansions/script/c11451011.lua
View file @
2111fddb
...
...
@@ -243,11 +243,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
distg
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsType
(
TYPE_TRAPMONSTER
)
and
aux
.
GetColumn
(
c
,
tp
)
==
aux
.
GetColumn
(
e
:
GetHandler
(),
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsType
(
TYPE_TRAPMONSTER
)
and
aux
.
GetColumn
(
c
,
tp
)
==
aux
.
GetColumn
(
e
:
GetHandler
(),
tp
)
and
c
~=
e
:
GetHandler
()
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
if
loc
&
LOCATION_ONFIELD
~=
0
and
seq
<=
4
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
seq
==
aux
.
GetColumn
(
e
:
GetHandler
(),
rp
)
and
not
re
:
GetHandler
():
IsType
(
TYPE_TRAPMONSTER
)
then
if
loc
&
LOCATION_ONFIELD
~=
0
and
seq
<=
4
and
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
seq
==
aux
.
GetColumn
(
e
:
GetHandler
(),
rp
)
and
not
re
:
GetHandler
():
IsType
(
TYPE_TRAPMONSTER
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
then
Duel
.
NegateEffect
(
ev
)
end
end
...
...
expansions/script/c11451015.lua
View file @
2111fddb
...
...
@@ -276,7 +276,6 @@ function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToDeckOrExtraAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
...
...
expansions/script/c11451466.lua
View file @
2111fddb
...
...
@@ -84,32 +84,22 @@ function cm.fselect(g,ng,goal,tp)
return
true
end
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
local
tc
=
ng
:
CheckSubGroup
(
cm
.
hspcheck2
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
local
tc
=
ng
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
aux
.
GCheckAdditional
=
nil
return
tc
end
function
cm
.
fselect3
(
g
,
g1
,
lv
,
tp
)
return
g
:
GetSum
(
cm
.
lvplus
)
==
lv
and
Duel
.
GetMZoneCount
(
tp
,
g
+
g1
)
>
0
end
function
cm
.
hspcheck
(
g
,
ng
,
goal
,
tp
)
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
g
,
ng
,
goal
,
tp
)
end
function
cm
.
hspgcheck
(
g
,
c
,
mg
,
f
,
min
,
max
,
ext_params
)
local
ng
,
goal
,
tp
=
table.unpack
(
ext_params
)
if
g
:
GetSum
(
cm
.
lvplus
)
<=
goal
then
return
true
end
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
g
,
ng
,
goal
,
tp
)
end
function
cm
.
hspcheck2
(
g
,
g1
,
lv
,
tp
)
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
g
,
g1
,
lv
,
tp
)
return
cm
.
fselect
(
g
,
ng
,
goal
,
tp
)
end
function
cm
.
hspgcheck2
(
g
,
c
,
mg
,
f
,
min
,
max
,
ext_params
)
local
g1
,
lv
,
tp
=
table.unpack
(
ext_params
)
if
g
:
GetSum
(
cm
.
lvplus
)
<=
lv
then
return
true
end
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
g
,
g1
,
lv
,
tp
)
return
cm
.
fselect3
(
g
,
g1
,
lv
,
tp
)
end
function
cm
.
accost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -142,9 +132,9 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local
ng
=
mg
-
trg
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
aux
.
GCheckAdditional
=
cm
.
hspgcheck
--
aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
aux
.
GCheckAdditional
=
nil
--
aux.GCheckAdditional=nil
if
tc
then
return
true
end
end
return
false
...
...
@@ -160,9 +150,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local
ng
=
mg
-
trg
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
aux
.
GCheckAdditional
=
cm
.
hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
hspcheck
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
aux
.
GCheckAdditional
=
nil
--
aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
--
aux.GCheckAdditional=nil
if
tc
then
tg
:
AddCard
(
sc
)
end
end
if
not
tg
or
#
tg
==
0
then
return
end
...
...
@@ -173,12 +163,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
6
))
aux
.
GCheckAdditional
=
cm
.
hspgcheck
rg
=
trg
:
SelectSubGroup
(
tp
,
cm
.
hspcheck
,
true
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
tc
),
tp
)
--
aux.GCheckAdditional=cm.hspgcheck
rg
=
trg
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
tc
),
tp
)
if
rg
and
#
rg
>
0
and
rg
:
GetSum
(
cm
.
lvplus
)
>
cm
.
lvplus
(
tc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
7
))
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
rg2
=
ng
:
SelectSubGroup
(
tp
,
cm
.
hspcheck2
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
rg2
=
ng
:
SelectSubGroup
(
tp
,
cm
.
fselect3
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
if
rg2
and
#
rg2
>
0
then
res
=
true
rg
:
Merge
(
rg2
)
...
...
@@ -186,7 +177,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
elseif
rg
and
#
rg
>
0
and
rg
:
GetSum
(
cm
.
lvplus
)
==
cm
.
lvplus
(
tc
)
then
res
=
true
end
aux
.
GCheckAdditional
=
nil
end
local
tg
=
rg
:
Filter
(
cm
.
filter5
,
nil
)
if
not
tg
or
#
tg
==
0
then
...
...
expansions/script/c11451467.lua
View file @
2111fddb
...
...
@@ -87,32 +87,22 @@ function cm.fselect(g,ng,goal,tp)
return
true
end
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
local
tc
=
ng
:
CheckSubGroup
(
cm
.
hspcheck2
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
local
tc
=
ng
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
aux
.
GCheckAdditional
=
nil
return
tc
end
function
cm
.
fselect3
(
g
,
g1
,
lv
,
tp
)
return
g
:
GetSum
(
cm
.
lvplus
)
==
lv
and
Duel
.
GetMZoneCount
(
tp
,
g
+
g1
)
>
0
end
function
cm
.
hspcheck
(
g
,
ng
,
goal
,
tp
)
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
g
,
ng
,
goal
,
tp
)
end
function
cm
.
hspgcheck
(
g
,
c
,
mg
,
f
,
min
,
max
,
ext_params
)
local
ng
,
goal
,
tp
=
table.unpack
(
ext_params
)
if
g
:
GetSum
(
cm
.
lvplus
)
<=
goal
then
return
true
end
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
g
,
ng
,
goal
,
tp
)
end
function
cm
.
hspcheck2
(
g
,
g1
,
lv
,
tp
)
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
g
,
g1
,
lv
,
tp
)
return
cm
.
fselect
(
g
,
ng
,
goal
,
tp
)
end
function
cm
.
hspgcheck2
(
g
,
c
,
mg
,
f
,
min
,
max
,
ext_params
)
local
g1
,
lv
,
tp
=
table.unpack
(
ext_params
)
if
g
:
GetSum
(
cm
.
lvplus
)
<=
lv
then
return
true
end
Duel
.
SetSelectedCard
(
g
)
return
g
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
g
,
g1
,
lv
,
tp
)
return
cm
.
fselect3
(
g
,
g1
,
lv
,
tp
)
end
function
cm
.
chcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -171,9 +161,9 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local
ng
=
mg
-
trg
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
aux
.
GCheckAdditional
=
cm
.
hspgcheck
--
aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
aux
.
GCheckAdditional
=
nil
--
aux.GCheckAdditional=nil
if
tc
then
return
true
end
end
return
false
...
...
@@ -189,9 +179,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local
ng
=
mg
-
trg
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
aux
.
GCheckAdditional
=
cm
.
hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
hspcheck
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
aux
.
GCheckAdditional
=
nil
--
aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
--
aux.GCheckAdditional=nil
if
tc
then
tg
:
AddCard
(
sc
)
end
end
if
not
tg
or
#
tg
==
0
then
return
end
...
...
@@ -202,12 +192,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
6
))
aux
.
GCheckAdditional
=
cm
.
hspgcheck
rg
=
trg
:
SelectSubGroup
(
tp
,
cm
.
hspcheck
,
true
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
tc
),
tp
)
--
aux.GCheckAdditional=cm.hspgcheck
rg
=
trg
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
tc
),
tp
)
if
rg
and
#
rg
>
0
and
rg
:
GetSum
(
cm
.
lvplus
)
>
cm
.
lvplus
(
tc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
7
))
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
rg2
=
ng
:
SelectSubGroup
(
tp
,
cm
.
hspcheck2
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
rg2
=
ng
:
SelectSubGroup
(
tp
,
cm
.
fselect3
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
if
rg2
and
#
rg2
>
0
then
res
=
true
rg
:
Merge
(
rg2
)
...
...
@@ -215,7 +206,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
elseif
rg
and
#
rg
>
0
and
rg
:
GetSum
(
cm
.
lvplus
)
==
cm
.
lvplus
(
tc
)
then
res
=
true
end
aux
.
GCheckAdditional
=
nil
end
local
tg
=
rg
:
Filter
(
cm
.
filter5
,
nil
)
if
not
tg
or
#
tg
==
0
then
...
...
expansions/script/c22020520.lua
View file @
2111fddb
...
...
@@ -103,7 +103,7 @@ function c22020520.operation0(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c22020520
.
cost10
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x
1
,
10
,
REASON_COST
)
end
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x
fed
,
10
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0xfed
,
10
,
REASON_COST
)
end
function
c22020520
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
expansions/script/c22021330.lua
View file @
2111fddb
...
...
@@ -34,8 +34,8 @@ function c22021330.initial_effect(c)
e3
:
SetOperation
(
c22021330
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c22021330
.
lcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0xff9
)
function
c22021330
.
lcheck
(
g
,
lc
)
return
g
:
GetClassCount
(
Card
.
GetLinkCode
)
==
g
:
GetCount
(
)
end
function
c22021330
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
...
...
expansions/script/c22022000.lua
View file @
2111fddb
--人理之基 亚瑟·潘德拉贡
function
c22022000
.
initial_effect
(
c
)
local
e0
=
aux
.
AddThisCardInGraveAlreadyCheck
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22022000
,
0
))
...
...
expansions/script/c22022890.lua
0 → 100644
View file @
2111fddb
--白骸龙 阿尔比恩
function
c22022890
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_DARK
),
10
,
3
)
c
:
EnableReviveLimit
()
--limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
function
(
e
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
)
e1
:
SetOperation
(
c22022890
.
limop
)
c
:
RegisterEffect
(
e1
)
--multi attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c22022890
.
mtcon
)
e2
:
SetOperation
(
c22022890
.
mtop
)
c
:
RegisterEffect
(
e2
)
--SpecialSummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
22022890
)
e3
:
SetTarget
(
c22022890
.
sptg
)
e3
:
SetOperation
(
c22022890
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c22022890
.
limop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
function
(
e
,
re
,
tp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsAttackBelow
(
3900
)
end
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22022890
.
mtcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
5
end
function
c22022890
.
mtop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
ConfirmDecktop
(
tp
,
5
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
local
ct
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
):
FilterCount
(
Card
.
IsSetCard
,
nil
,
0xff1
)
Duel
.
ShuffleDeck
(
tp
)
if
ct
>
1
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
ct
-
1
)
c
:
RegisterEffect
(
e1
)
elseif
ct
==
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e2
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_BATTLE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
HALF_DAMAGE
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22022890
.
mgck
(
g
,
e
,
tp
)
if
g
:
GetCount
()
==
1
then
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
22022850
)
elseif
g
:
GetCount
()
==
2
then
return
g
:
FilterCount
(
Card
.
IsType
,
nil
,
TYPE_SYNCHRO
)
==
2
else
return
false
end
end
function
c22022890
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
function
(
c
,
e
)
return
c
:
IsFaceup
()
and
(
c
:
IsType
(
TYPE_SYNCHRO
)
or
c
:
IsCode
(
22022850
))
and
c
:
IsCanBeEffectTarget
(
e
)
end
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
c22022890
.
mgck
,
1
,
2
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
local
mg
=
g
:
SelectSubGroup
(
tp
,
c22022890
.
mgck
,
false
,
1
,
2
,
e
,
tp
)
Duel
.
SetTargetCard
(
mg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22022890
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
g
:
GetCount
()
>
0
then
Duel
.
Overlay
(
c
,
g
)
end
end
expansions/script/c70052400.lua
0 → 100644
View file @
2111fddb
--契灵·神眷之子
local
m
=
70052400
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_HAND
)
e0
:
SetCondition
(
cm
.
spcon
)
e0
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e0
)
--remove
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
rmcost
)
e1
:
SetTarget
(
cm
.
rmtg
)
e1
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCountLimit
(
1
,
70052401
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
end
--special summon
function
cm
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeckAsCost
()
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_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
())
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
end
--remove
function
cm
.
rmcost
(
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
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
--draw
function
cm
.
thtg
(
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
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c70052402.lua
0 → 100644
View file @
2111fddb
--契灵·衔环纹章
local
m
=
70052402
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--to deck and draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
e2
:
SetCountLimit
(
1
,
70052403
)
e2
:
SetCost
(
cm
.
tdcost
)
e2
:
SetTarget
(
cm
.
tdtg
)
e2
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
--Activate
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
not
c
:
IsPublic
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
p
,
cm
.
filter
,
p
,
LOCATION_HAND
,
0
,
1
,
63
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
p
,
g
)
local
ct
=
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
p
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
p
,
ct
+
1
,
REASON_EFFECT
)
end
end
--to deck and draw
function
cm
.
costfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDiscardable
()
end
function
cm
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
cm
.
costfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
c
,
nil
,
SEQ_DECKBOTTOM
,
REASON_EFFECT
)
~=
0
and
c
:
IsLocation
(
LOCATION_DECK
)
then
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c70052403.lua
0 → 100644
View file @
2111fddb
--契灵·胶果冻
local
m
=
70052403
local
set
=
0xee0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
--Activate
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_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_REMOVED
)
e2
:
SetCountLimit
(
1
,
70052404
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
--Activate
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
cm
.
damval
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
return
val
/
2
end
--spsummon
function
cm
.
effilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsPreviousControler
(
tp
)
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
effilter
,
1
,
nil
,
tp
)
and
aux
.
exccon
(
e
)
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
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
1000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
end
\ No newline at end of file
expansions/script/c70052405.lua
0 → 100644
View file @
2111fddb
--契灵·芳香法师
local
m
=
70052405
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_HAND
)
e0
:
SetCondition
(
cm
.
spcon
)
e0
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e0
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DICE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--special summon/to hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_DECK
)
e3
:
SetCountLimit
(
1
,
70052406
)
e3
:
SetTarget
(
cm
.
stptg
)
e3
:
SetOperation
(
cm
.
stpop
)
c
:
RegisterEffect
(
e3
)
end
--special summon
function
cm
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeckAsCost
()
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_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
())
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
end
--to hand
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
tp
,
1
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
==
0
then
return
end
local
dc
=
Duel
.
TossDice
(
tp
,
1
)
Duel
.
ConfirmDecktop
(
tp
,
dc
)
local
dg
=
Duel
.
GetDecktopGroup
(
tp
,
dc
)
local
g
=
dg
:
Filter
(
cm
.
filter
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
Duel
.
ShuffleDeck
(
tp
)
end
--special summon/to hand
function
cm
.
stpfilter
(
c
,
e
,
tp
,
ft
)
return
c
:
IsSetCard
(
0xff0
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
(
ft
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)))
end
function
cm
.
stptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
stpfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
ft
)
end
end
function
cm
.
stpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
stpfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
ft
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
ft
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
(
not
tc
:
IsAbleToHand
()
or
Duel
.
SelectOption
(
tp
,
1190
,
1152
)
==
1
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
\ No newline at end of file
expansions/script/c70052406.lua
0 → 100644
View file @
2111fddb
--契灵·荒川剑豪
local
m
=
70052406
local
set
=
0xee0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
--extra summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_ONFIELD
)
e2
:
SetCountLimit
(
1
,
70052407
)
e2
:
SetCondition
(
cm
.
con
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetTarget
(
cm
.
tg
)
e2
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e2
)
end
--special summon
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
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0xee0
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
m
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
spfilter
(
chkc
)
end
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
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
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
end
--extra Summon
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHandAsCost
()
end
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_COST
)
end
function
cm
.
tfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xee0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
tfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
--
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
)
e2_1
:
SetValue
(
1000
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2_1
,
true
)
Duel
.
BreakEffect
()
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
TYPE_MONSTER
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
local
gn
=
Group
.
CreateGroup
()
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
TYPE_MONSTER
)
while
g2
:
GetCount
()
>
0
do
local
tc2
=
g2
:
GetFirst
()
if
tc2
:
IsCanBeBattleTarget
(
tc
)
then
gn
:
AddCard
(
tc2
)
g2
:
RemoveCard
(
tc2
)
else
g2
:
RemoveCard
(
tc2
)
end
end
if
gn
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
m
,
1
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
local
g1
=
gn
:
FilterSelect
(
tp
,
Card
.
IsType
,
1
,
1
,
nil
,
TYPE_MONSTER
)
if
g1
:
GetCount
()
>
0
then
local
tc1
=
g1
:
GetFirst
()
if
tc1
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
not
tc1
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
Duel
.
ChangePosition
(
tc1
,
POS_FACEUP_ATTACK
)
end
if
not
tc
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_ATTACK
)
end
if
tc1
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
CalculateDamage
(
tc
,
tc1
)
end
end
end
end
end
end
end
expansions/script/c70052408.lua
0 → 100644
View file @
2111fddb
--契灵·精灵龙
local
m
=
70052408
local
set
=
0xee0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
--attack up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
cm
.
atktg
)
e1
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_RECOVER
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_MOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_REMOVED
)
e2
:
SetCountLimit
(
1
,
70052409
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
--attack up
function
cm
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xee0
)
and
c
:
GetBaseAttack
()
~=
c
:
GetAttack
()
end
function
cm
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
atkfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SelectTarget
(
tp
,
cm
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
diff
=
math.abs
(
tc
:
GetBaseAttack
()
-
tc
:
GetAttack
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
diff
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
--spsummon
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
1000
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c70052412.lua
0 → 100644
View file @
2111fddb
--契灵·金羽鹗
local
m
=
70052412
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
descost
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCountLimit
(
1
,
70052413
)
e2
:
SetTarget
(
cm
.
damtg
)
e2
:
SetOperation
(
cm
.
damop
)
c
:
RegisterEffect
(
e2
)
end
--negate
function
cm
.
descost
(
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
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
end
--damage
function
cm
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
>
0
end
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
ct
*
200
)
end
function
cm
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
Duel
.
Damage
(
p
,
ct
*
200
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c70052414.lua
0 → 100644
View file @
2111fddb
--契灵·药穗䍺
local
m
=
70052414
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
descost
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
--send to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCountLimit
(
1
,
70052415
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
end
--negate
function
cm
.
descost
(
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
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISABLE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
+
RESETS_STANDARD
+
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
+
RESETS_STANDARD
+
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
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
end
--send to grave
function
cm
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c70052416.lua
0 → 100644
View file @
2111fddb
--契灵·精灵龙
local
m
=
70052416
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--attack up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
atkcost
)
e1
:
SetTarget
(
cm
.
atktg
)
e1
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCountLimit
(
1
,
70052417
)
e2
:
SetTarget
(
cm
.
rthtg
)
e2
:
SetOperation
(
cm
.
rthop
)
c
:
RegisterEffect
(
e2
)
end
--attack up
function
cm
.
atkcost
(
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
cm
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xff0
)
and
c
:
GetBaseAttack
()
~=
c
:
GetAttack
()
end
function
cm
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
atkfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
SelectTarget
(
tp
,
cm
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
diff
=
math.abs
(
tc
:
GetBaseAttack
()
-
tc
:
GetAttack
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
diff
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
end
--tohand
function
cm
.
rthtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
function
cm
.
rthop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c70052420.lua
0 → 100644
View file @
2111fddb
--契灵·飞赢鱼
local
m
=
70052420
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--search S/T
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCountLimit
(
1
,
70052421
)
e2
:
SetTarget
(
cm
.
drtg
)
e2
:
SetOperation
(
cm
.
drop
)
c
:
RegisterEffect
(
e2
)
end
--search S/T
function
cm
.
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
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
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
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
tg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
function
cm
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
end
--draw
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsPlayerCanDraw
(
1
-
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
PLAYER_ALL
,
1
)
end
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c70052426.lua
0 → 100644
View file @
2111fddb
--契灵·念佛猪
local
m
=
70052426
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--control
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_CONTROL
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_SPSUMMON
,
cm
.
counterfilter
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_DECK
)
e2
:
SetCountLimit
(
1
,
70052427
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
--control
function
cm
.
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
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
function
cm
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
end
--special summon
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_VALUE_MONSTER_REBORN
,
tp
,
false
,
false
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
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
.
spfilter
,
tp
,
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
\ No newline at end of file
expansions/script/c70052428.lua
0 → 100644
View file @
2111fddb
--契灵·魔女仆
local
m
=
70052428
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_HAND
)
e0
:
SetCondition
(
cm
.
spcon
)
e0
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e0
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_HANDES
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_DECK
)
e3
:
SetCountLimit
(
1
,
70052429
)
e3
:
SetTarget
(
cm
.
chtg
)
e3
:
SetOperation
(
cm
.
chop
)
c
:
RegisterEffect
(
e3
)
end
--special summon
function
cm
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeckAsCost
()
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_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
())
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
end
--to hand
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
m
)
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
1
,
tp
,
1
)
end
function
cm
.
disfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
c
:
IsType
(
TYPE_MONSTER
)
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
return
end
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
Duel
.
DiscardHand
(
tp
,
cm
.
disfilter
,
1
,
1
,
REASON_EFFECT
)
end
--tohand
function
cm
.
chfilter
(
c
)
return
c
:
IsSetCard
(
0xff0
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
end
function
cm
.
chtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
chfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
chfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
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/c70052430.lua
0 → 100644
View file @
2111fddb
--契灵·血魔剑 霸王
local
m
=
70052430
local
set
=
0xff0
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
e0
:
SetCondition
(
cm
.
spcon
)
e0
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e0
)
--atk/def1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
cm
.
atkval1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e2
)
--atk/def2
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
cm
.
atkval2
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e4
)
--destroy
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_DELAY
)
e5
:
SetCode
(
EVENT_TO_DECK
)
e5
:
SetCountLimit
(
1
,
m
)
e5
:
SetTarget
(
cm
.
destg
)
e5
:
SetOperation
(
cm
.
desop
)
c
:
RegisterEffect
(
e5
)
end
--special summon
function
cm
.
spfilter
(
c
,
ft
,
tp
)
return
c
:
IsSetCard
(
0xff0
)
and
(
ft
>
0
or
(
c
:
IsControler
(
tp
)
and
c
:
GetSequence
()
<
5
))
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
function
cm
.
spcon
(
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
.
CheckReleaseGroup
(
tp
,
cm
.
spfilter
,
2
,
nil
,
ft
,
tp
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
spfilter
,
2
,
2
,
nil
,
ft
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
--disable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetTarget
(
cm
.
distg
)
c
:
RegisterEffect
(
e1
)
end
--disable
function
cm
.
distg
(
e
,
c
)
return
c
:
IsType
(
TYPE_RITUAL
+
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
end
--atk/def1
function
cm
.
atkval1
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_MONSTER
)
return
g
:
GetClassCount
(
Card
.
GetAttribute
)
*
500
end
--atk/def2
function
cm
.
atkval2
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsType
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
TYPE_MONSTER
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
*
500
end
--destroy
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
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