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
aa10ee12
Commit
aa10ee12
authored
Apr 30, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4f31dc31
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
471 additions
and
202 deletions
+471
-202
expansions/script/c15000048.lua
expansions/script/c15000048.lua
+1
-1
expansions/script/c20000000.lua
expansions/script/c20000000.lua
+87
-116
expansions/script/c20099999.lua
expansions/script/c20099999.lua
+243
-78
expansions/script/c60001248.lua
expansions/script/c60001248.lua
+97
-0
expansions/script/c60002030.lua
expansions/script/c60002030.lua
+1
-1
expansions/script/c60002031.lua
expansions/script/c60002031.lua
+1
-1
expansions/script/c60002098.lua
expansions/script/c60002098.lua
+1
-0
expansions/script/c60002099.lua
expansions/script/c60002099.lua
+1
-0
expansions/script/c60002102.lua
expansions/script/c60002102.lua
+32
-1
expansions/script/c60002103.lua
expansions/script/c60002103.lua
+1
-0
expansions/script/c60002104.lua
expansions/script/c60002104.lua
+1
-1
expansions/script/c60002110.lua
expansions/script/c60002110.lua
+1
-0
expansions/script/c60002111.lua
expansions/script/c60002111.lua
+1
-0
expansions/script/c6100022.lua
expansions/script/c6100022.lua
+1
-1
expansions/script/c67282577.lua
expansions/script/c67282577.lua
+2
-2
No files found.
expansions/script/c15000048.lua
View file @
aa10ee12
...
...
@@ -68,7 +68,7 @@ function cm.tgfilter(c,e,tp,ft)
return
c
:
IsFaceup
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetCode
(),
c
:
GetLeftScale
(),
c
:
GetRightScale
(),
c
:
GetRace
())
end
function
cm
.
spfilter
(
c
,
e
,
tp
,
code
,
lse
,
rse
,
rac
)
return
c
:
IsRace
(
rac
)
and
c
:
GetLeftScale
()
==
lse
and
c
:
GetRightScale
()
==
rse
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
not
c
:
IsCode
(
code
)
return
c
:
IsRace
(
rac
)
and
c
:
GetLeftScale
()
==
lse
and
c
:
GetRightScale
()
==
rse
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsCode
(
code
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tp
=
e
:
GetHandlerPlayer
()
...
...
expansions/script/c20000000.lua
View file @
aa10ee12
--fucg_lib
local
m
=
20000000
--fucgcg_lib
if
not
pcall
(
function
()
require
(
"expansions/script/c20099999"
)
end
)
then
require
(
"script/c20099999"
)
end
local
fu
=
fucg
if
fu
.
lib
then
return
end
fu
.
lib
=
true
--------------------------------------------------------------------------"Effect
F
unction"
function
fu
.
ef
.
Creat
(
c
,
f
,
v
,
rc
)
local
m
=
20000000
if
fu
cg
.
lib
then
return
end
fu
cg
.
lib
=
true
--------------------------------------------------------------------------"Effect
f
unction"
function
fu
ef
.
Creat
(
owner
,
handler
,
...
)
--Creat Effect
--Delete nil
local
s
=
{}
for
i
,
F
in
pairs
(
f
)
do
if
type
(
F
)
==
"string"
and
not
v
[
i
]
then
table.insert
(
s
,
i
)
end
end
for
i
,
S
in
pairs
(
s
)
do
for
j
=
S
-
i
+
1
,(
math.max
(
#
f
,
#
v
))
do
f
[
j
]
=
f
[
j
+
1
]
or
nil
v
[
j
]
=
v
[
j
+
1
]
or
nil
end
end
--Check clone
s
=
{}
local
t
=
1
for
i
,
V
in
pairs
(
v
)
do
if
type
(
V
)
==
"table"
and
not
(
f
[
i
]
==
"PRO"
or
f
[
i
]
==
"RAN"
or
f
[
i
]
==
"CTL"
or
f
[
i
]
==
"RES"
or
f
[
i
]
==
"TRAN"
)
then
t
=
#
v
[
i
]
>
t
and
#
v
[
i
]
or
t
table.insert
(
s
,
i
)
end
end
if
#
s
==
1
and
f
[
s
[
1
]
]
==
"DES"
then
s
=
{};
t
=
1
end
local
e
=
{}
local
V
=
table
.
move
(
v
,
1
,
#
v
,
1
,{})
local
list
=
{
...
}
local
setlist
=
fusf
.
DeleteNil
(
list
)
--Set and Register effect
for
i
=
1
,
t
do
for
_
,
S
in
ipairs
(
s
)
do
V
[
S
]
=
v
[
S
][
i
]
end
e
[
i
]
=
fu
.
ef
.
Set
(
fu
.
eff
.
CRE
(
fu
.
sf
.
GetCardTable
(
c
)[
1
]),
f
,
V
)
end
if
rc
then
fu
.
ef
.
Register
(
e
,
rc
)
end
return
table.unpack
(
e
)
local
e
=
fuef
.
Set
(
fucg
.
eff
.
CRE
(
fusf
.
GetCardTable
(
owner
)[
1
]),
table.unpack
(
setlist
))
if
handler
then
fuef
.
Register
(
e
,
handler
)
end
return
e
end
function
fu
.
ef
.
Set
(
e
,
f
,
v
)
function
fuef
.
Clone
(
e
,
handler
,
...
)
--Clone Effect
--Delete nil
local
list
=
{
...
}
local
setlist
=
fusf
.
DeleteNil
(
list
)
--Set and Register effect
local
e
=
fuef
.
Set
(
fucg
.
eff
.
CLO
(
e
),
table.unpack
(
setlist
))
if
handler
then
fuef
.
Register
(
e
,
handler
)
end
return
e
end
function
fuef
.
Set
(
e
,
...
)
--Set Effect detail
e
=
type
(
e
)
==
"table"
and
e
or
{
e
}
f
=
type
(
f
)
==
"table"
and
f
or
{
f
}
v
=
type
(
v
)
==
"table"
and
v
or
{
v
}
for
_
,
E
in
pairs
(
e
)
do
if
#
f
==
1
then
(
type
(
f
[
1
])
==
"string"
and
fu
.
eff
[
f
[
1
]
]
or
f
[
1
])(
E
,
table.unpack
(
v
))
else
for
i
,
F
in
pairs
(
f
)
do
v
[
i
]
=
type
(
v
[
i
])
==
"table"
and
v
[
i
]
or
{
v
[
i
]
}
(
type
(
F
)
==
"string"
and
fu
.
eff
[
F
]
or
F
)(
E
,
table.unpack
(
v
[
i
]))
end
local
setlist
=
{
...
}
setlist
=
fusf
.
DeleteNil
(
setlist
)
if
#
setlist
==
0
then
return
table.unpack
(
e
)
end
if
type
(
setlist
[
1
])
~=
"table"
then
setlist
=
{
setlist
}
end
for
_
,
E
in
ipairs
(
e
)
do
for
_
,
set
in
ipairs
(
setlist
)
do
local
f
=
type
(
set
[
1
])
==
"string"
and
fucg
.
eff
[
set
[
1
]
]
or
set
[
1
]
table.remove
(
set
,
1
)
f
(
E
,
table.unpack
(
set
))
end
end
return
table.unpack
(
e
)
end
function
fu
.
ef
.
Register
(
e
,
c
)
function
fu
ef
.
Register
(
e
,
handler
)
--Register Effect
c
=
type
(
c
)
==
"table"
and
c
or
{
c
}
local
Handler
=
type
(
c
[
1
])
==
"number"
and
c
[
1
]
or
fu
.
sf
.
GetCardTable
(
c
[
1
])
local
Ignore
=
c
[
2
]
or
false
handler
=
type
(
handler
)
==
"table"
and
handler
or
{
handler
}
local
Ignore
=
handler
[
2
]
or
false
local
Handler
=
type
(
handler
[
1
])
==
"number"
and
handler
[
1
]
or
fusf
.
GetCardTable
(
handler
[
1
])
for
_
,
E
in
ipairs
(
type
(
e
)
==
"table"
and
e
or
{
e
})
do
if
type
(
Handler
)
==
"number"
then
Duel
.
RegisterEffect
(
E
,
Handler
)
else
for
i
,
C
in
ipairs
(
Handler
)
do
for
_
,
C
in
ipairs
(
Handler
)
do
C
:
RegisterEffect
(
E
,
Ignore
)
end
end
end
end
--------------------------------------------------------------------------"Effect_Action"
--Action Effect: Base set
function
fuef
.
Act
(
c
,
des
,
cat
,
typ
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Creat
(
c
,
rc
,{
"DES"
,
des
},{
"CAT"
,
cat
},{
"TYP"
,
typ
},{
"COD"
,
cod
},{
"PRO"
,
pro
},{
"RAN"
,
ran
},
{
"CTL"
,
ctl
},{
"CON"
,
con
},{
"COS"
,
cos
},{
"TG"
,
tg
},{
"OP"
,
op
},{
"RES"
,
res
},{
"LAB"
,
lab
},{
"LABOBJ"
,
obj
})
end
--------------------------------------------------------------------------"Effect_Activate"
--Activate Effect: Base set
function
fu
.
ef
.
A
(
c
,
des
,
cat
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
cod
=
cod
or
EVENT_FREE_CHAIN
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"CAT"
,
"TYP"
,
"COD"
,
"PRO"
,
"CTL"
,
"CON"
,
"COS"
,
"TG"
,
"OP"
,
"RES"
,
"LAB"
,
"LABOBJ"
},
{
des
,
cat
,
EFFECT_TYPE_ACTIVATE
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
res
,
lab
,
obj
},
rc
)
function
fuef
.
B_A
(
c
,
des
,
cat
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_ACTIVATE
,
cod
or
"FC"
,
pro
,
nil
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_Single"
--Single Effect: Base set
function
fu
.
ef
.
S
(
c
,
des
,
cod
,
pro
,
ran
,
val
,
ctl
,
con
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"TYP"
,
"COD"
,
"PRO"
,
"RAN"
,
"VAL"
,
"CTL"
,
"CON"
,
"RES"
,
"LAB"
,
"LABOBJ"
},{
des
,
EFFECT_TYPE_SINGLE
,
cod
,
pro
,
ran
,
val
,
ctl
,
con
,
res
,
lab
,
obj
},
rc
)
end
--------------------------------------------------------------------------"Effect_Field"
--Field Effect: Base set
function
fu
.
ef
.
B_F
(
c
,
des
,
typ
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
rc
,
res
,
lab
,
obj
)
typ
=
EFFECT_TYPE_FIELD
|
(
typ
or
0
)
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"TYP"
,
"COD"
,
"PRO"
,
"RAN"
,
"TRAN"
,
"VAL"
,
"CTL"
,
"CON"
,
"TG"
,
"RES"
,
"LAB"
,
"LABOBJ"
},
{
des
,
typ
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
res
,
lab
,
obj
},
rc
)
function
fuef
.
A
(
c
,
cod
,
rc
)
return
fuef
.
B_A
(
c
,
nil
,
nil
,
cod
,
nil
,
nil
,
nil
,
nil
,
nil
,
nil
,
rc
or
c
)
end
function
fu
.
ef
.
F
(
c
,
des
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_F
(
c
,
des
,
nil
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
rc
,
res
,
lab
,
obj
)
--------------------------------------------------------------------------"Effect_Ignition"
--Ignition Effect: Base set
function
fuef
.
I
(
c
,
des
,
cat
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_IGNITION
,
nil
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_Qucik"
--Quick Effect : Base set
function
fu
.
ef
.
B_Q
(
c
,
des
,
cat
,
typ
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
cod
=
cod
or
EVENT_FREE_CHAIN
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"CAT"
,
"TYP"
,
"COD"
,
"PRO"
,
"RAN"
,
"CTL"
,
"CON"
,
"COS"
,
"TG"
,
"OP"
,
"RES"
,
"LAB"
,
"LABOBJ"
},
{
des
,
cat
,
typ
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
res
,
lab
,
obj
},
rc
)
end
--Quick Effect No Force: Base set
function
fu
.
ef
.
QO
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
cod
=
cod
or
EVENT_FREE_CHAIN
return
fu
.
ef
.
B_Q
(
c
,
des
,
cat
,
EFFECT_TYPE_QUICK_O
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
function
fuef
.
QO
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_QUICK_O
,
cod
or
"FC"
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--Quick Effect Force: Base set
function
fu
.
ef
.
QF
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_Q
(
c
,
des
,
cat
,
EFFECT_TYPE_QUICK_F
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_Continuous"
--Continues: Base set
function
fu
.
ef
.
B_C
(
c
,
des
,
typ
,
cod
,
pro
,
ran
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
typ
=
EFFECT_TYPE_CONTINUOUS
|
(
typ
or
0
)
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"TYP"
,
"COD"
,
"PRO"
,
"RAN"
,
"CTL"
,
"CON"
,
"OP"
,
"RES"
,
"LAB"
,
"LABOBJ"
},{
des
,
typ
,
cod
,
pro
,
ran
,
ctl
,
con
,
op
,
res
,
lab
,
obj
},
rc
)
end
--Single Continues: Base set
function
fu
.
ef
.
SC
(
c
,
des
,
cod
,
pro
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_C
(
c
,
des
,
1
,
cod
,
pro
,
nil
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
end
--Field Continues: Base set
function
fu
.
ef
.
FC
(
c
,
des
,
cod
,
pro
,
ran
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_C
(
c
,
des
,
2
,
cod
,
pro
,
ran
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_Ignition"
--Ignition Effect: Base set
function
fu
.
ef
.
I
(
c
,
des
,
cat
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"CAT"
,
"TYP"
,
"PRO"
,
"RAN"
,
"CTL"
,
"CON"
,
"COS"
,
"TG"
,
"OP"
,
"RES"
,
"LAB"
,
"LABOBJ"
},
{
des
,
cat
,
EFFECT_TYPE_IGNITION
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
res
,
lab
,
obj
},
rc
)
function
fuef
.
QF
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_QUICK_F
,
cod
or
"FC"
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_Tigger"
--Tigger Effect: Base set
function
fu
.
ef
.
B_T
(
c
,
des
,
typ
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
Creat
(
c
,{
"DES"
,
"CAT"
,
"TYP"
,
"COD"
,
"PRO"
,
"RAN"
,
"CTL"
,
"CON"
,
"COS"
,
"TG"
,
"OP"
,
"RES"
,
"LAB"
,
"LABOBJ"
},
{
des
,
cat
,
typ
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
res
,
lab
,
obj
},
rc
)
end
--Field Tigger Effect No Force: Base set
function
fu
.
ef
.
FTO
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_T
(
c
,
des
,
258
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
function
fuef
.
FTO
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
ef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
,
cod
or
"FC"
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--Field Tigger Effect Force: Base set
function
fu
.
ef
.
FTF
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_T
(
c
,
des
,
1026
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
function
fuef
.
FTF
(
c
,
des
,
cat
,
cod
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
ef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
,
cod
or
"FC"
,
pro
,
ran
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--Self Tigger Effect No Force: Base set
function
fu
.
ef
.
STO
(
c
,
des
,
cat
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_T
(
c
,
des
,
257
,
cat
,
cod
,
pro
,
nil
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
function
fuef
.
STO
(
c
,
des
,
cat
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
ef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
,
cod
or
"FC"
,
pro
,
nil
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--Self Tigger Effect Force: Base set
function
fu
.
ef
.
STF
(
c
,
des
,
cat
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fu
.
ef
.
B_T
(
c
,
des
,
1025
,
cat
,
cod
,
pro
,
nil
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
function
fuef
.
STF
(
c
,
des
,
cat
,
cod
,
pro
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Act
(
c
,
des
,
cat
,
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
,
cod
or
"FC"
,
pro
,
nil
,
ctl
,
con
,
cos
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_NoAction"
--NoAction Effect: Base set
function
fuef
.
NoAct
(
c
,
des
,
typ
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
Creat
(
c
,
rc
,{
"DES"
,
des
},{
"TYP"
,
typ
},{
"COD"
,
cod
},{
"PRO"
,
pro
},{
"RAN"
,
ran
},{
"TRAN"
,
tran
},{
"VAL"
,
val
},
{
"CTL"
,
ctl
},{
"CON"
,
con
},{
"TG"
,
tg
},{
"OP"
,
op
},{
"RES"
,
res
},{
"LAB"
,
lab
},{
"LABOBJ"
,
obj
})
end
--------------------------------------------------------------------------"Effect_Single"
--Single Effect: Base set
function
fuef
.
S
(
c
,
des
,
cod
,
pro
,
ran
,
val
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
NoAct
(
c
,
des
,
EFFECT_TYPE_SINGLE
,
cod
,
pro
,
ran
,
nil
,
val
,
ctl
,
con
,
nil
,
op
,
rc
,
res
,
lab
,
obj
)
end
function
fuef
.
SC
(
c
,
des
,
cod
,
pro
,
ran
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
NoAct
(
c
,
des
,
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
,
cod
,
pro
,
nil
,
nil
,
nil
,
ctl
,
con
,
nil
,
op
,
rc
,
res
,
lab
,
obj
)
end
--------------------------------------------------------------------------"Effect_Field"
--Field Effect: Base set
function
fuef
.
F
(
c
,
des
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
NoAct
(
c
,
des
,
EFFECT_TYPE_FIELD
,
cod
,
pro
,
ran
,
tran
,
val
,
ctl
,
con
,
tg
,
op
,
rc
,
res
,
lab
,
obj
)
end
function
fuef
.
FC
(
c
,
des
,
cod
,
pro
,
ran
,
ctl
,
con
,
op
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
NoAct
(
c
,
des
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
,
cod
,
pro
,
ran
,
nil
,
nil
,
ctl
,
con
,
nil
,
op
,
rc
,
res
,
lab
,
obj
)
end
function
fuef
.
FG
(
c
,
ran
,
tran
,
con
,
tg
,
rc
,
res
,
lab
,
obj
)
return
fuef
.
NoAct
(
c
,
nil
,
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
,
nil
,
nil
,
ran
,
tran
,
nil
,
nil
,
con
,
tg
,
nil
,
rc
,
res
,
lab
,
obj
)
end
\ No newline at end of file
expansions/script/c20099999.lua
View file @
aa10ee12
fucg
=
fucg
or
{}
local
fu
=
fucg
if
fu
.
var
then
return
end
fu
.
var
=
true
fu
.
ef
=
{
}
--"Effect Function"
fu
.
sf
=
{
}
--"Support Function"
fu
.
df
=
{
}
--"Duel Function"
fu
.
gf
=
{
}
--"Group Function"
if
fucg
then
return
end
fucg
=
{
}
fucf
=
{
}
--"Card function"
fuef
=
{
}
--"Effect function"
fusf
=
{
}
--"Support function"
fugf
=
{
}
--"Group function"
--Hint Variable
fu
.
des
=
{
fu
cg
.
des
=
{
[
"TH"
]
=
1190
,
--加入手卡
[
"TG"
]
=
1191
,
--送去墓地
[
"RE"
]
=
1192
,
--除外
[
"SP"
]
=
1152
,
--特殊召唤
[
"DES"
]
=
20099999
*
16
,
--破坏
}
--category Variable
fu
.
cat
=
{
fu
cg
.
cat
=
{
[
"SH"
]
=
0x20008
,
--CATEGORY_SEARCH+CATEGORY_TOHAND
--
[
"S"
]
=
CATEGORY_SUMMON
,
[
"SP"
]
=
CATEGORY_SPECIAL_SUMMON
,
[
"TD"
]
=
CATEGORY_TODECK
,
[
"TG"
]
=
CATEGORY_TOGRAVE
,
[
"TH"
]
=
CATEGORY_TOHAND
,
[
"RE"
]
=
CATEGORY_TOREMOVE
,
[
"DES"
]
=
CATEGORY_DESTROY
,
}
--code Variable
fu
.
cod
=
{
fu
cg
.
cod
=
{
--other
[
"FC"
]
=
EVENT_FREE_CHAIN
,
[
"ADJ"
]
=
EVENT_ADJUST
,
...
...
@@ -34,29 +40,38 @@ fu.cod = {
[
"SP"
]
=
EVENT_SPSUMMON_SUCCESS
,
}
--property Variable
fu
.
pro
=
{
fu
cg
.
pro
=
{
[
"TG"
]
=
EFFECT_FLAG_CARD_TARGET
,
[
"PTG"
]
=
EFFECT_FLAG_PLAYER_TARGET
,
[
"DE"
]
=
EFFECT_FLAG_DELAY
,
[
"SR"
]
=
EFFECT_FLAG_SINGLE_RANGE
,
[
"HINT"
]
=
EFFECT_FLAG_CLIENT_HINT
,
[
"OA"
]
=
EFFECT_FLAG_OATH
,
[
"AR"
]
=
EFFECT_FLAG_IGNORE_RANGE
,
[
"IG"
]
=
EFFECT_FLAG_IGNORE_IMMUNE
,
[
"CD"
]
=
EFFECT_FLAG_CANNOT_DISABLE
,
[
"CN"
]
=
EFFECT_FLAG_CANNOT_NEGATE
,
[
"SET"
]
=
EFFECT_FLAG_SET_AVAILABLE
,
[
"OE"
]
=
17408
,
--EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE(out effect)
}
--Location Variable
fu
.
ran
=
{
fucg
.
ran
=
{
[
"1"
]
=
1
,
[
"0"
]
=
0
,
[
"H"
]
=
LOCATION_HAND
,
[
"D"
]
=
LOCATION_DECK
,
[
"G"
]
=
LOCATION_GRAVE
,
[
"R"
]
=
LOCATION_REMOVED
,
[
"R"
]
=
LOCATION_REMOVED
,
[
"E"
]
=
LOCATION_EXTRA
,
[
"M"
]
=
LOCATION_MZONE
,
[
"S"
]
=
LOCATION_SZONE
,
[
"F"
]
=
LOCATION_FZONE
,
[
"O
F"
]
=
LOCATION_OVERLAY
,
[
"
O"
]
=
LOCATION_OVERLAY
,
[
"
P"
]
=
LOCATION_PZONE
[
"O
"
]
=
LOCATION_OVERLAY
,
[
"
P"
]
=
LOCATION_PZONE
,
[
"
A"
]
=
0xff
}
--Phase Variable
fu
.
pha
=
{
fu
cg
.
pha
=
{
[
"DP"
]
=
PHASE_DRAW
,
--抽卡阶段
[
"SP"
]
=
PHASE_STANDBY
,
--准备阶段
[
"M1"
]
=
PHASE_MAIN1
,
--主要阶段1
...
...
@@ -69,43 +84,159 @@ fu.pha = {
[
"ED"
]
=
PHASE_END
,
--结束阶段
}
--count limit Variable
fu
.
ctl
=
{
fu
cg
.
ctl
=
{
O
=
EFFECT_COUNT_CODE_OATH
,
--发动次数
D
=
EFFECT_COUNT_CODE_DUEL
,
--决斗次数
S
=
EFFECT_COUNT_CODE_SINGLE
,
--公共次数
}
--reason Variable
fucg
.
rea
=
{
[
"DES"
]
=
REASON_DESTROY
,
--破坏
[
"MAT"
]
=
REASON_MATERIAL
,
--作为融合/同调/超量素材或用於儀式/升級召喚
[
"REL"
]
=
REASON_RELEASE
,
--解放
[
"BAT"
]
=
REASON_BATTLE
,
--战斗破坏
[
"EFF"
]
=
REASON_EFFECT
,
--战斗破坏
[
"COS"
]
=
REASON_COST
,
--用於代價或無法支付代價而破壞
[
"REP"
]
=
REASON_REPLACE
,
--代替
[
"FU"
]
=
REASON_FUSION
,
--用於融合召喚
[
"SY"
]
=
REASON_SYNCHRO
,
--用於同调召喚
[
"RI"
]
=
REASON_RITUAL
,
--用於仪式召喚
[
"XYZ"
]
=
REASON_XYZ
,
--用於超量召喚
}
--Card type Variable
fucg
.
typ
=
{
[
"M"
]
=
TYPE_MONSTER
,
--怪兽卡
[
"S"
]
=
TYPE_SPELL
,
--魔法卡
[
"T"
]
=
TYPE_TRAP
,
--陷阱卡
[
"NO"
]
=
TYPE_NORMAL
,
--通常怪兽
[
"EF"
]
=
TYPE_EFFECT
,
--效果
[
"FU"
]
=
TYPE_FUSION
,
--融合
[
"RI"
]
=
TYPE_RITUAL
,
--仪式
[
"TR"
]
=
TYPE_TRAPMONSTER
,
--陷阱怪兽
[
"SPI"
]
=
TYPE_SPIRIT
,
--灵魂
[
"UN"
]
=
TYPE_UNION
,
--同盟
[
"DU"
]
=
TYPE_DUAL
,
--二重
[
"TU"
]
=
TYPE_TUNER
,
--调整
[
"SY"
]
=
TYPE_SYNCHRO
,
--同调
[
"TO"
]
=
TYPE_TOKEN
,
--衍生物
[
"QU"
]
=
TYPE_QUICKPLAY
,
--速攻
[
"CON"
]
=
TYPE_CONTINUOUS
,
--永续
[
"EQ"
]
=
TYPE_EQUIP
,
--装备
[
"FI"
]
=
TYPE_FIELD
,
--场地
[
"COU"
]
=
TYPE_COUNTER
,
--反击
[
"FL"
]
=
TYPE_FLIP
,
--翻转
[
"XY"
]
=
TYPE_XYZ
,
--超量
[
"PE"
]
=
TYPE_PENDULUM
,
--灵摆
[
"SP"
]
=
TYPE_SPSUMMON
,
--特殊召唤
[
"LI"
]
=
TYPE_LINK
,
--连接
}
--Effect Variable
fu
.
eff
=
{
fu
cg
.
eff
=
{
CRE
=
Effect
.
CreateEffect
,
DES
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetDescription
(
fu
.
sf
.
des
(
e
,{
...
}))
end
end
,
CAT
=
function
(
e
,
v
)
if
v
then
Effect
.
SetCategory
(
e
,
fu
.
sf
.
cat
(
v
))
end
end
,
TYP
=
function
(
e
,
v
)
if
v
then
Effect
.
SetType
(
e
,
v
)
end
end
,
COD
=
function
(
e
,
v
)
if
v
then
Effect
.
SetCode
(
e
,
fu
.
sf
.
cod
(
v
))
end
end
,
CTL
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetCountLimit
(
fu
.
sf
.
ctl
(
e
,{
...
}))
end
end
,
PRO
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetProperty
(
e
,
fu
.
sf
.
pro
({
...
}
))
end
end
,
RAN
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetRange
(
e
,
fu
.
sf
.
ran
({
...
}
))
end
end
,
CON
=
function
(
e
,
v
)
if
v
then
Effect
.
SetCondition
(
e
,
v
)
end
end
,
COS
=
function
(
e
,
v
)
if
v
then
Effect
.
SetCost
(
e
,
v
)
end
end
,
TG
=
function
(
e
,
v
)
if
v
then
Effect
.
SetTarget
(
e
,
v
)
end
end
,
OP
=
function
(
e
,
v
)
if
v
then
Effect
.
SetOperation
(
e
,
v
)
end
end
,
VAL
=
function
(
e
,
v
)
if
v
then
Effect
.
SetValue
(
e
,
v
)
end
end
,
RES
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetReset
(
e
,
fu
.
sf
.
res
({
...
}))
end
end
,
TRAN
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetTargetRange
(
e
,
fu
.
sf
.
tran
({
...
}
))
end
end
,
LAB
=
function
(
e
,
...
)
if
fu
.
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetLabel
(
e
,
...
)
end
end
,
LABOBJ
=
function
(
e
,
v
)
if
v
then
Effect
.
SetLabelObject
(
e
,
v
)
end
end
,
DES
=
function
(
e
,
...
)
if
fu
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetDescription
(
fu
sf
.
des
(
e
,{
...
}))
end
end
,
CAT
=
function
(
e
,
v
)
if
v
then
Effect
.
SetCategory
(
e
,
fusf
.
cat
(
v
))
end
end
,
TYP
=
Effect
.
SetType
,
COD
=
function
(
e
,
v
)
if
v
then
Effect
.
SetCode
(
e
,
fusf
.
cod
(
v
))
end
end
,
CTL
=
function
(
e
,
...
)
if
fu
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetCountLimit
(
fu
sf
.
ctl
(
e
,{
...
}))
end
end
,
PRO
=
function
(
e
,
s
,
v
)
if
s
then
Effect
.
SetProperty
(
e
,
fusf
.
pro
(
s
,
v
))
end
end
,
RAN
=
function
(
e
,
v
)
if
v
then
Effect
.
SetRange
(
e
,
fusf
.
Loc
(
v
,
1
))
end
end
,
CON
=
Effect
.
SetCondition
,
COS
=
Effect
.
SetCost
,
TG
=
Effect
.
SetTarget
,
OP
=
Effect
.
SetOperation
,
VAL
=
Effect
.
SetValue
,
RES
=
function
(
e
,
...
)
if
fu
sf
.
Not_All_nil
(
...
)
then
Effect
.
SetReset
(
e
,
fu
sf
.
res
({
...
}))
end
end
,
TRAN
=
function
(
e
,
v
)
if
v
then
Effect
.
SetTargetRange
(
e
,
fusf
.
Loc
(
v
))
end
end
,
LAB
=
function
(
e
,
...
)
if
fusf
.
Not_All_nil
(
...
)
then
Effect
.
SetLabel
(
e
,
...
)
end
end
,
LABOBJ
=
Effect
.
SetLabelObject
,
CLO
=
Effect
.
Clone
,
}
--------------------------------------"Duel Function"
function
fu
.
df
.
GG
(
tp
,
loc1
,
loc2
)
return
Duel
.
GetFieldGroup
(
tp
,
fu
.
sf
.
ran
(
loc1
),
fu
.
sf
.
ran
(
loc2
))
--------------------------------------"Card function"
function
fucf
.
Filter
(
c
,
f
,
...
)
local
v
=
{
...
}
v
=
#
v
==
1
and
v
[
1
]
or
v
return
fugf
.
Filter
(
Group
.
FromCards
(
c
),
f
,
v
,
nil
,
1
)
end
function
fucf
.
Compare
(
c
,
f
,
n
,
meth
,
...
)
if
type
(
f
)
==
"string"
then
f
=
fucf
[
f
]
or
Card
[
f
]
or
aux
[
f
]
end
local
v
=
{
...
}
v
=
type
(
v
[
1
])
==
"table"
and
#
v
==
1
and
v
[
1
]
or
v
if
meth
==
"A"
then
return
f
(
c
,
table.unpack
(
v
))
>=
n
elseif
meth
==
"B"
then
return
f
(
c
,
table.unpack
(
v
))
<=
n
end
return
f
(
c
,
table.unpack
(
v
))
==
n
end
function
fucf
.
IsReason
(
c
,
rea
)
local
rea
=
{}
if
rea
and
type
(
rea
)
~=
"string"
then
return
c
:
IsReason
(
rea
)
end
for
i
,
r1
in
ipairs
(
fusf
.
CutString
(
rea
,
"-"
))
do
for
_
,
r2
in
ipairs
(
fusf
.
CutString
(
r1
,
"+"
))
do
rea
[
i
]
=
rea
[
i
]
+
fucg
.
rea
[
string.upper
(
r2
)]
end
end
return
(
not
rea
[
1
]
or
c
:
IsReason
(
rea
[
1
]))
and
not
(
rea
[
2
]
and
c
:
IsReason
(
REASON_REPLACE
))
end
function
fucf
.
IsLoc
(
c
,
loc
)
return
c
:
IsLocation
(
fusf
.
Loc
(
loc
))
end
--------------------------------------"Group Function"
function
fu
.
gf
.
GF
(
g
,
f
,
v
,
c
,
n
)
--(group, filter, filter value, not c, is more than n)
function
fucf
.
TgChk
(
c
,
e
)
return
c
:
IsCanBeEffectTarget
(
e
)
end
function
fucf
.
GChk
(
c
)
return
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
end
function
fucf
.
AbleTo
(
c
,
loc
)
local
func
=
{
[
"H"
]
=
"Hand"
,
[
"D"
]
=
"Deck"
,
[
"G"
]
=
"Grave"
,
[
"R"
]
=
"Remove"
,
[
"E"
]
=
"Extra"
,
}
local
iscos
=
string.sub
(
loc
,
1
,
1
)
==
"+"
if
iscos
then
loc
=
string.sub
(
loc
,
2
)
end
func
=
"IsAbleTo"
..
func
[
loc
]
if
iscos
then
func
=
func
..
"AsCost"
end
return
Card
[
func
](
c
)
end
function
fucf
.
IsTyp
(
c
,
typ
)
if
typ
and
type
(
typ
)
~=
"string"
then
return
c
:
GetType
()
&
typ
==
typ
end
for
_
,
t1
in
ipairs
(
fusf
.
CutString
(
typ
,
"|"
))
do
local
Typ
=
0
for
_
,
t2
in
ipairs
(
fusf
.
CutString
(
t1
,
"+"
))
do
Typ
=
Typ
+
fucg
.
typ
[
string.upper
(
t2
)]
end
if
Typ
>
0
and
c
:
GetType
()
&
Typ
==
Typ
then
return
true
end
end
return
false
end
--------------------------------------"Group function"
function
fugf
.
Get
(
p
,
loc
)
return
Duel
.
GetFieldGroup
(
p
,
fusf
.
Loc
(
loc
))
end
function
fugf
.
Filter
(
g
,
f
,
v
,
c
,
n
)
if
c
then
g
=
g
:
Filter
(
aux
.
TRUE
,
c
)
end
local
func
=
{}
f
=
type
(
f
)
==
"table"
and
f
or
{
f
}
v
=
type
(
v
)
==
"table"
and
v
or
{
v
}
for
i
,
F
in
pairs
(
f
)
do
if
F
then
for
_
,
F
in
ipairs
(
f
)
do
if
type
(
F
)
==
"string"
then
for
i
,
f1
in
ipairs
(
fusf
.
CutString
(
F
,
"-"
))
do
for
j
,
f2
in
ipairs
(
fusf
.
CutString
(
f1
,
"+"
))
do
func
[
#
func
+
1
]
=
fucf
[
f2
]
or
Card
[
f2
]
or
aux
[
f2
]
if
i
>
1
and
j
==
1
then
func
[
#
func
]
=
aux
.
NOT
(
func
[
#
func
])
end
end
end
else
func
[
#
func
+
1
]
=
F
end
end
if
#
func
==
1
then
g
=
g
:
Filter
(
func
[
1
],
nil
,
table.unpack
(
v
))
else
for
i
,
F
in
pairs
(
func
)
do
local
V
=
v
[
i
]
and
(
type
(
v
[
i
])
==
"table"
and
v
[
i
]
or
{
v
[
i
]})
or
{}
g
=
g
:
Filter
(
F
,
nil
,
table.unpack
(
V
))
end
...
...
@@ -113,11 +244,57 @@ function fu.gf.GF(g,f,v,c,n) --(group, filter, filter value, not c, is more than
if
n
then
return
#
g
>=
n
end
return
g
end
function
fu
.
gf
.
GGF
(
tp
,
loc1
,
loc2
,
f
,
v
,
c
,
n
)
return
fu
.
gf
.
GF
(
fu
.
df
.
GG
(
tp
,
loc1
,
loc2
),
f
,
v
,
c
,
n
)
function
fugf
.
GetFilter
(
p
,
loc
,
f
,
v
,
c
,
n
)
return
fugf
.
Filter
(
fugf
.
Get
(
p
,
loc
),
f
,
v
,
c
,
n
)
end
function
fugf
.
SelectFilter
(
p
,
loc
,
f
,
v
,
c
,
min
,
max
,
sp
)
return
fugf
.
GetFilter
(
p
,
loc
,
f
,
v
):
Select
(
sp
or
p
,
min
,
max
or
min
,
c
)
end
function
fugf
.
SelectTg
(
p
,
loc
,
f
,
v
,
c
,
min
,
max
,
sp
)
local
g
=
fugf
.
GetFilter
(
p
,
loc
,
f
,
v
):
Select
(
sp
or
p
,
min
,
max
or
min
,
c
)
Duel
.
SetTargetCard
(
g
)
return
g
end
--------------------------------------"Support function"
function
fusf
.
CutString
(
s
,
cut
)
local
slist
=
{}
local
mark
=
1
while
mark
<=
string.len
(
s
)
do
local
chk
=
{
string.find
(
s
,
cut
,
mark
)}
local
str
=
string.sub
(
s
,
mark
,
chk
[
1
]
and
chk
[
1
]
-
1
or
nil
)
slist
[
#
slist
+
1
]
=
str
mark
=
1
+
(
chk
[
1
]
or
string.len
(
s
))
end
return
slist
end
--------------------------------------"Support Function"
function
fu
.
sf
.
Not_All_nil
(
...
)
function
fusf
.
DeleteNil
(
list
)
local
setlist
=
{}
for
_
,
set
in
ipairs
(
list
)
do
if
not
(
type
(
set
)
==
"table"
and
#
set
==
1
)
then
table.insert
(
setlist
,
set
)
end
end
return
setlist
end
function
fusf
.
Loc
(
locs
,
chk
)
if
string.len
(
locs
)
==
0
then
Debug
.
Message
(
"fusf.Loc() wrong value"
)
return
0
end
local
loctable
=
{
0
,
0
}
local
locmark
=
1
for
i
=
1
,
string.len
(
locs
)
do
local
loc
=
string.sub
(
locs
,
i
,
i
)
if
loc
==
"+"
then
locmark
=
locmark
+
1
else
loctable
[
locmark
]
=
loctable
[
locmark
]
+
fucg
.
ran
[
string.upper
(
loc
)]
end
end
if
chk
then
loctable
=
{
loctable
[
1
]}
end
return
table.unpack
(
loctable
)
end
function
fusf
.
Not_All_nil
(
...
)
local
v
=
{
...
}
v
=
type
(
v
)
==
"table"
and
type
(
v
[
1
])
==
"table"
and
v
[
1
]
or
v
for
_
,
l
in
pairs
(
v
)
do
...
...
@@ -125,7 +302,7 @@ function fu.sf.Not_All_nil(...)
end
return
false
end
function
fu
.
sf
.
GetCardTable
(
c
)
function
fusf
.
GetCardTable
(
c
)
--return Card Table
local
C
=
{}
if
aux
.
GetValueType
(
c
)
==
"Effect"
then
...
...
@@ -139,43 +316,37 @@ function fu.sf.GetCardTable(c)
end
return
C
end
function
fu
.
sf
.
des
(
e
,
v
)
function
fusf
.
des
(
e
,
v
)
--return des
v
=
type
(
v
)
==
"table"
and
#
v
==
1
and
v
[
1
]
or
v
v
=
#
v
==
1
and
v
[
1
]
or
v
if
type
(
v
)
==
"table"
then
v
=
aux
.
Stringid
(
table.unpack
(
v
))
elseif
type
(
v
)
==
"string"
then
v
=
fu
.
des
[
v
]
v
=
fu
cg
.
des
[
v
]
elseif
type
(
v
)
==
"number"
then
v
=
v
<
17
and
aux
.
Stringid
(
e
:
GetOwner
():
GetOriginalCode
(),
v
)
or
v
end
return
e
,
v
end
function
fu
.
sf
.
cat
(
v
)
function
fusf
.
cat
(
v
)
--return category
return
type
(
v
)
==
"string"
and
fu
.
cat
[
v
]
or
v
return
type
(
v
)
==
"string"
and
fu
cg
.
cat
[
v
]
or
v
end
function
fu
.
sf
.
cod
(
v
)
function
fusf
.
cod
(
v
)
--return code
return
type
(
v
)
==
"string"
and
fu
.
cod
[
v
]
or
v
return
type
(
v
)
==
"string"
and
fu
cg
.
cod
[
v
]
or
v
end
function
fu
.
sf
.
pro
(
v
)
function
fu
sf
.
pro
(
s
,
v
)
--return property
v
=
{
0
,
table.unpack
(
type
(
v
)
==
"table"
and
v
or
{
v
})
}
for
_
,
l
in
ipairs
(
v
)
do
v
[
1
]
=
v
[
1
]
+
(
type
(
l
)
==
"string"
and
fu
.
pro
[
l
]
or
l
)
if
s
and
type
(
s
)
~=
"string"
then
return
s
end
local
pro
=
0
for
_
,
S
in
ipairs
(
fusf
.
CutString
(
s
,
"+"
))
do
pro
=
pro
+
fucg
.
pro
[
string.upper
(
S
)]
end
return
v
[
1
]
if
v
then
pro
=
pro
+
v
end
return
pro
end
function
fu
.
sf
.
ran
(
v
)
--return range
v
=
{
0
,
table.unpack
(
type
(
v
)
==
"table"
and
v
or
{
v
})
}
for
_
,
l
in
ipairs
(
v
)
do
v
[
1
]
=
v
[
1
]
+
(
type
(
l
)
==
"string"
and
fu
.
ran
[
l
]
or
l
)
end
return
v
[
1
]
end
function
fu
.
sf
.
ctl
(
e
,
v
)
function
fusf
.
ctl
(
e
,
v
)
--return count limit
v
=
type
(
v
)
==
"table"
and
v
or
{
v
}
local
V
=
{
nil
,
nil
,
nil
}
...
...
@@ -185,18 +356,12 @@ function fu.sf.ctl(e,v)
V
[
1
]
=
type
(
v
[
i
])
==
"number"
and
v
[
i
]
<
99
and
v
[
i
]
or
V
[
1
]
end
if
V
[
3
]
and
not
V
[
2
]
then
V
[
2
]
=
e
:
GetOwner
():
GetOriginalCode
()
end
if
V
[
3
]
then
V
[
2
]
=
V
[
2
]
+
fu
.
ctl
[
V
[
3
]
]
end
if
V
[
3
]
then
V
[
2
]
=
V
[
2
]
+
fu
cg
.
ctl
[
V
[
3
]
]
end
V
[
1
]
=
V
[
1
]
or
1
return
e
,
table.unpack
(
V
)
end
function
fu
.
sf
.
res
(
v
)
function
fusf
.
res
(
v
)
--return Reset
v
=
type
(
v
)
==
"table"
and
v
or
{
v
}
return
table.unpack
(
v
)
end
\ No newline at end of file
function
fu
.
sf
.
tran
(
v
)
--return target range
v
=
type
(
v
)
==
"table"
and
(
#
v
==
2
and
v
or
{
v
[
1
],
v
[
1
]
}
)
or
{
v
,
v
}
return
table.unpack
(
v
)
end
expansions/script/c60001248.lua
0 → 100644
View file @
aa10ee12
--《力量》·索菲娜
local
m
=
60001248
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--draw
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
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--effect
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e5
:
SetCategory
(
CATEGORY_DESTROY
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e5
:
SetCondition
(
aux
.
bdocon
)
e5
:
SetTarget
(
cm
.
efftg
)
e5
:
SetOperation
(
cm
.
effop
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetValue
(
-
10000000
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
cm
.
efftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
b2
=
c
:
GetFlagEffect
(
m
)
==
0
local
b3
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
if
chk
==
0
then
return
true
end
local
op
=
0
if
b2
and
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
elseif
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
elseif
b3
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
3
))
*
2
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
end
e
:
SetLabel
(
op
)
end
function
cm
.
effop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
op
=
e
:
GetLabel
()
if
op
==
0
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1500
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e1
)
end
elseif
op
==
1
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
tct
=
0
if
Duel
.
GetTurnPlayer
()
==
tp
then
tct
=
1
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetCondition
(
cm
.
eacon
)
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
,
1
+
tct
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
,
0
,
1
+
tct
)
end
else
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
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
end
function
cm
.
eacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
end
\ No newline at end of file
expansions/script/c60002030.lua
View file @
aa10ee12
...
...
@@ -45,7 +45,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
penfilter
(
c
)
return
c
:
IsSetCard
(
0x62c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
return
c
:
IsSetCard
(
0x62c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
and
not
c
:
IsCode
(
m
)
end
function
cm
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
...
...
expansions/script/c60002031.lua
View file @
aa10ee12
...
...
@@ -24,7 +24,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
penfilter
(
c
)
return
c
:
IsSetCard
(
0x62c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
return
c
:
IsSetCard
(
0x62c
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
and
not
c
:
IsCode
(
m
)
end
function
cm
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
...
...
expansions/script/c60002098.lua
View file @
aa10ee12
...
...
@@ -3,6 +3,7 @@ local m=60002098
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"卡通暗黑人偶 妮可罗菲娅"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
15259703
)
c
:
EnableReviveLimit
()
--cannot attack
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c60002099.lua
View file @
aa10ee12
...
...
@@ -3,6 +3,7 @@ local m=60002099
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"卡通英雄 羽翼侠"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
15259703
)
--cannot attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
...
...
expansions/script/c60002102.lua
View file @
aa10ee12
...
...
@@ -3,6 +3,7 @@ local m=60002102
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"卡通英雄 新宇侠"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
15259703
)
--cannot attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
...
...
@@ -33,6 +34,16 @@ function cm.initial_effect(c)
e3
:
SetTarget
(
cm
.
sptg
)
e3
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e3
)
--search
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_HAND
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
atklimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
@@ -78,3 +89,23 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e1
,
true
)
end
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
filter
(
c
)
return
c
:
IsCode
(
24094653
)
and
c
:
IsAbleToHand
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c60002103.lua
View file @
aa10ee12
...
...
@@ -3,6 +3,7 @@ local m=60002103
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"卡通英雄 新宇侠"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
15259703
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x62
),
aux
.
FilterBoolFunction
(
Card
.
IsCode
,
60002099
),
true
)
--cannot attack
...
...
expansions/script/c60002104.lua
View file @
aa10ee12
...
...
@@ -77,7 +77,7 @@ function cm.imcon(e)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
cm
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_TRAP
)
return
te
:
IsActiveType
(
TYPE_TRAP
)
or
te
:
IsActiveType
(
TYPE_SPELL
)
end
function
cm
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
...
...
expansions/script/c60002110.lua
View file @
aa10ee12
...
...
@@ -3,6 +3,7 @@ local m=60002110
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"卡通城市"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
15259703
)
--code
aux
.
EnableChangeCode
(
c
,
15259703
,
LOCATION_FZONE
)
--Activate
...
...
expansions/script/c60002111.lua
View file @
aa10ee12
...
...
@@ -3,6 +3,7 @@ local m=60002111
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"卡通防火墙龙"
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
15259703
)
--link summon
aux
.
AddLinkProcedure
(
c
,
cm
.
fil
,
2
)
c
:
EnableReviveLimit
()
...
...
expansions/script/c6100022.lua
View file @
aa10ee12
...
...
@@ -9,7 +9,7 @@ function cm.initial_effect(c)
--To Hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_
TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_
REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
m
)
...
...
expansions/script/c67282577.lua
View file @
aa10ee12
...
...
@@ -37,8 +37,8 @@ function s.cfilter2(c,ec,tp)
return
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
and
Duel
.
CheckReleaseGroupEx
(
tp
,
Card
.
IsSetCard
,
1
,
Group
.
FromCards
(
c
,
ec
),
0x2b
)
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroupEx
(
tp
,
s
.
cfilter
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectReleaseGroupEx
(
tp
,
s
.
cfilter
,
1
,
1
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
CheckReleaseGroupEx
(
tp
,
s
.
cfilter
,
1
,
e
:
GetHandler
()
,
tp
)
end
local
g
=
Duel
.
SelectReleaseGroupEx
(
tp
,
s
.
cfilter
,
1
,
1
,
e
:
GetHandler
()
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
filter
(
c
)
...
...
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