Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
5
Issues
5
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
MyCard
ygopro-rush-duel
Commits
6384ba05
Commit
6384ba05
authored
Dec 23, 2024
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/12/23 融合术逻辑修改
parent
d1de102a
Pipeline
#32020
passed with stages
in 9 minutes and 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
167 additions
and
162 deletions
+167
-162
script/RDFusion.lua
script/RDFusion.lua
+167
-162
No files found.
script/RDFusion.lua
View file @
6384ba05
...
@@ -2,62 +2,76 @@
...
@@ -2,62 +2,76 @@
RushDuel
=
RushDuel
or
{}
RushDuel
=
RushDuel
or
{}
-- 当前的融合效果
-- 当前的融合效果
RushDuel
.
CurrentFusionEffect
=
nil
RushDuel
.
CurrentFusionEffect
=
nil
-- 额外的融合检测
RushDuel
.
FusionExtraChecker
=
nil
-- 内部方法: 生成融合素材的函数
-- 生成融合素材
function
RushDuel
.
_private_make_fusion_material
(
card
,
sub
,
insf
,
mat
,
codes
,
...
)
function
RushDuel
.
MakeFusionMaterial
(
card
,
...
)
local
fun
=
{}
local
codes
=
{}
local
funcs
=
{}
local
unspecified
=
false
local
unspecified
=
false
for
_
,
val
in
ipairs
{
...
}
do
for
_
,
val
in
ipairs
{
...
}
do
local
val_type
=
type
(
val
)
local
val_type
=
type
(
val
)
if
val_type
==
"number"
then
if
val_type
==
"number"
then
table.insert
(
fun
,
RushDuel
.
_private_make_fusion_material_code
(
val
))
RushDuel
.
AddCodeFusionMaterial
(
codes
,
funcs
,
val
)
if
not
mat
[
val
]
then
mat
[
val
]
=
true
table.insert
(
codes
,
val
)
end
elseif
val_type
==
"function"
then
elseif
val_type
==
"function"
then
table.insert
(
fun
,
RushDuel
.
_private_make_fusion_material_func
(
val
))
unspecified
=
true
unspecified
=
true
RushDuel
.
AddFuncFusionMaterial
(
codes
,
funcs
,
val
)
elseif
val_type
==
"table"
then
elseif
val_type
==
"table"
then
local
funs
=
RushDuel
.
_private_make_fusion_material
(
card
,
sub
,
insf
,
mat
,
codes
,
table.unpack
(
val
)
)
local
res
=
RushDuel
.
AddMixFusionMaterial
(
codes
,
funcs
,
val
)
table.insert
(
fun
,
RushDuel
.
_private_make_fusion_material_mix
(
funs
))
unspecified
=
unspecified
or
res
end
end
end
end
return
fun
,
unspecified
return
codes
,
funcs
,
unspecified
end
end
-- 融合素材 - 卡名
-- 内部方法: 融合素材 - 卡名
function
RushDuel
.
AddCodeFusionMaterial
(
codes
,
funcs
,
code
)
function
RushDuel
.
_private_make_fusion_material_code
(
code
)
table.insert
(
codes
,
code
)
return
function
(
c
,
fc
,
sub
,
mg
,
sg
)
table.insert
(
funcs
,
function
(
c
,
fc
,
sub
,
mg
,
sg
)
return
c
:
IsFusionCode
(
code
)
or
(
sub
and
c
:
CheckFusionSubstitute
(
fc
))
return
c
:
IsFusionCode
(
code
)
or
(
sub
and
c
:
CheckFusionSubstitute
(
fc
))
end
end
)
end
end
-- 融合素材 - 条件
-- 内部方法: 融合素材 - 条件
function
RushDuel
.
AddFuncFusionMaterial
(
codes
,
funcs
,
func
)
function
RushDuel
.
_private_make_fusion_material_func
(
func
)
table.insert
(
funcs
,
function
(
c
,
fc
,
sub
,
mg
,
sg
)
return
function
(
c
,
fc
,
sub
,
mg
,
sg
)
return
func
(
c
,
fc
,
sub
,
mg
,
sg
)
and
not
c
:
IsHasEffect
(
6205579
)
return
func
(
c
,
fc
,
sub
,
mg
,
sg
)
and
not
c
:
IsHasEffect
(
6205579
)
end
end
)
end
end
-- 融合素材 - 混合
-- 内部方法: 融合素材 - 混合
function
RushDuel
.
AddMixFusionMaterial
(
codes
,
funcs
,
list
)
function
RushDuel
.
_private_make_fusion_material_mix
(
funs
)
local
mixs
=
{}
return
function
(
c
,
fc
,
sub
,
mg
,
sg
)
local
unspecified
=
true
for
_
,
fun
in
ipairs
(
funs
)
do
for
_
,
val
in
ipairs
(
list
)
do
if
fun
(
c
,
fc
,
sub
,
mg
,
sg
)
then
local
val_type
=
type
(
val
)
if
val_type
==
"number"
then
RushDuel
.
AddCodeFusionMaterial
(
codes
,
mixs
,
val
)
unspecified
=
false
elseif
val_type
==
"function"
then
RushDuel
.
AddFuncFusionMaterial
(
codes
,
mixs
,
val
)
end
end
table.insert
(
funcs
,
function
(
c
,
fc
,
sub
,
mg
,
sg
)
for
_
,
func
in
ipairs
(
mixs
)
do
if
func
(
c
,
fc
,
sub
,
mg
,
sg
)
then
return
true
return
true
end
end
end
end
return
false
return
false
end
end
)
return
unspecified
end
end
--
内部方法: 添加
融合素材数据
--
设置
融合素材数据
function
RushDuel
.
_private_set_fusion_material_data
(
card
,
mat
,
min
,
max
,
unspecified
,
codes
)
function
RushDuel
.
SetFusionMaterialData
(
card
,
codes
,
min
,
max
,
unspecified
)
local
mt
=
getmetatable
(
card
)
local
mt
=
getmetatable
(
card
)
-- 卡名记述的素材
-- 卡名记述的素材
if
mt
.
material
==
nil
then
if
codes
~=
nil
then
local
mat
=
{}
for
_
,
code
in
ipairs
(
codes
)
do
mat
[
code
]
=
true
end
mt
.
material
=
mat
mt
.
material
=
mat
mt
.
material_codes
=
codes
end
end
-- 素材的数量
-- 素材的数量
if
mt
.
material_count
==
nil
then
if
mt
.
material_count
==
nil
then
...
@@ -67,23 +81,112 @@ function RushDuel._private_set_fusion_material_data(card, mat, min, max, unspeci
...
@@ -67,23 +81,112 @@ function RushDuel._private_set_fusion_material_data(card, mat, min, max, unspeci
if
unspecified
~=
nil
then
if
unspecified
~=
nil
then
mt
.
unspecified_funsion
=
unspecified
mt
.
unspecified_funsion
=
unspecified
end
end
-- 素材的卡名
if
codes
~=
nil
then
mt
.
material_codes
=
codes
end
end
end
--
内部方法: 创建融合效果
--
创建融合手续
function
RushDuel
.
_private_create_fusion_effect
(
card
,
insf
,
sub
,
checker
,
min
,
max
,
...
)
function
RushDuel
.
CreateFusionProcedure
(
card
,
insf
,
sub
,
mats
,
extra
,
max
,
checker
)
local
e
=
Effect
.
CreateEffect
(
card
)
local
e
=
Effect
.
CreateEffect
(
card
)
e
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
:
SetType
(
EFFECT_TYPE_SINGLE
)
e
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e
:
SetCondition
(
RushDuel
.
FusionProcedureCondition
(
insf
,
sub
,
checker
,
min
,
max
,
...
))
e
:
SetCondition
(
RushDuel
.
FusionProcedureCondition
(
insf
,
sub
,
mats
,
extra
,
max
,
checker
))
e
:
SetOperation
(
RushDuel
.
FusionProcedureOperation
(
insf
,
sub
,
checker
,
min
,
max
,
...
))
e
:
SetOperation
(
RushDuel
.
FusionProcedureOperation
(
insf
,
sub
,
mats
,
extra
,
max
,
checker
))
card
:
RegisterEffect
(
e
)
card
:
RegisterEffect
(
e
)
return
e
return
e
end
end
-- 融合手续 - 条件
function
RushDuel
.
FusionProcedureCondition
(
insf
,
sub
,
mats
,
extra
,
max
,
checker
)
return
function
(
e
,
g
,
gc
,
chkfnf
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
if
g
==
nil
then
return
insf
and
Auxiliary
.
MustMaterialCheck
(
nil
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
end
local
mg
=
g
:
Filter
(
RushDuel
.
FusionProcedureMaterialFilter
,
c
,
c
,
sub
,
mats
)
if
gc
then
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
Duel
.
SetSelectedCard
(
gc
)
end
local
minc
,
maxc
=
#
mats
,
#
mats
+
max
return
mg
:
CheckSubGroup
(
RushDuel
.
FusionProcedureMaterialChecker
,
minc
,
maxc
,
tp
,
c
,
chkfnf
,
sub
,
mats
,
extra
,
max
,
checker
)
end
end
-- 融合手续 - 操作
function
RushDuel
.
FusionProcedureOperation
(
insf
,
sub
,
mats
,
extra
,
max
,
checker
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkfnf
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
mg
=
eg
:
Filter
(
RushDuel
.
FusionProcedureMaterialFilter
,
c
,
c
,
sub
,
mats
)
if
gc
then
Duel
.
SetSelectedCard
(
gc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
minc
,
maxc
=
#
mats
,
#
mats
+
max
local
sg
=
mg
:
SelectSubGroup
(
tp
,
RushDuel
.
FusionProcedureMaterialChecker
,
true
,
minc
,
maxc
,
tp
,
c
,
chkfnf
,
sub
,
mats
,
extra
,
max
,
checker
)
if
sg
==
nil
then
sg
=
Group
.
CreateGroup
()
end
Duel
.
SetFusionMaterial
(
sg
)
end
end
-- 融合手续 - 素材过滤
function
RushDuel
.
FusionProcedureMaterialFilter
(
c
,
fc
,
sub
,
funcs
)
if
not
c
:
IsCanBeFusionMaterial
(
fc
,
SUMMON_TYPE_FUSION
)
then
return
false
end
for
_
,
func
in
ipairs
(
funcs
)
do
if
func
(
c
,
fc
,
sub
)
then
return
true
end
end
return
false
end
-- 融合手续 - 素材选择
function
RushDuel
.
FusionProcedureMaterialChecker
(
mg
,
tp
,
fc
,
chkfnf
,
sub
,
mats
,
extra
,
max
,
checker
)
local
chkf
=
chkfnf
&
0xff
if
mg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
mg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
elseif
not
Auxiliary
.
MustMaterialCheck
(
mg
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
false
elseif
checker
and
not
checker
(
mg
,
tp
,
fc
,
chkf
)
then
return
false
elseif
RushDuel
.
FusionExtraChecker
and
not
RushDuel
.
FusionExtraChecker
(
mg
,
tp
,
fc
,
chkf
)
then
return
false
elseif
Auxiliary
.
FCheckAdditional
and
not
Auxiliary
.
FCheckAdditional
(
mg
,
tp
,
fc
,
chkf
)
then
return
false
elseif
Auxiliary
.
FGoalCheckAdditional
and
not
Auxiliary
.
FGoalCheckAdditional
(
mg
,
tp
,
fc
,
chkf
)
then
return
false
else
local
sg
=
Group
.
CreateGroup
()
return
mg
:
IsExists
(
RushDuel
.
FusionProcedureCheckStep
,
1
,
nil
,
mg
,
sg
,
fc
,
sub
,
extra
,
max
,
table.unpack
(
mats
))
end
end
-- 融合手续 - 素材组合
function
RushDuel
.
FusionProcedureCheckStep
(
c
,
mg
,
sg
,
fc
,
sub
,
extra
,
max
,
fun1
,
fun2
,
...
)
local
res
=
false
if
fun2
then
sg
:
AddCard
(
c
)
if
fun1
(
c
,
fc
,
false
,
mg
,
sg
)
then
res
=
mg
:
IsExists
(
RushDuel
.
FusionProcedureCheckStep
,
1
,
sg
,
mg
,
sg
,
fc
,
sub
,
extra
,
max
,
fun2
,
...
)
elseif
sub
and
fun1
(
c
,
fc
,
true
,
mg
,
sg
)
then
res
=
mg
:
IsExists
(
RushDuel
.
FusionProcedureCheckStep
,
1
,
sg
,
mg
,
sg
,
fc
,
false
,
extra
,
max
,
fun2
,
...
)
end
sg
:
RemoveCard
(
c
)
elseif
fun1
(
c
,
fc
,
sub
,
mg
,
sg
)
then
if
max
==
0
then
return
true
end
-- 额外的素材选择
local
eg
=
Group
.
CreateGroup
()
eg
:
Merge
(
mg
)
eg
:
Sub
(
sg
)
eg
:
RemoveCard
(
c
)
return
eg
:
FilterCount
(
extra
,
nil
,
fc
,
false
,
mg
,
sg
)
==
#
eg
end
return
res
end
-- 添加融合手续: 指定卡名/条件, 固定数量
-- 添加融合手续: 指定卡名/条件, 固定数量
function
RushDuel
.
AddFusionProcedure
(
card
,
sub
,
insf
,
...
)
function
RushDuel
.
AddFusionProcedure
(
card
,
sub
,
insf
,
...
)
...
@@ -101,33 +204,10 @@ function RushDuel.AddFusionProcedure(card, sub, insf, ...)
...
@@ -101,33 +204,10 @@ function RushDuel.AddFusionProcedure(card, sub, insf, ...)
table.insert
(
vals
,
1
,
sub
)
table.insert
(
vals
,
1
,
sub
)
sub
=
true
sub
=
true
end
end
-- 有卡名记述的融合素材
-- 融合素材
local
mat
=
{}
local
codes
,
funcs
,
unspecified
=
RushDuel
.
MakeFusionMaterial
(
card
,
table.unpack
(
vals
))
local
codes
=
{}
RushDuel
.
SetFusionMaterialData
(
card
,
codes
,
#
funcs
,
#
funcs
,
unspecified
)
local
funs
,
unspecified
=
RushDuel
.
_private_make_fusion_material
(
card
,
sub
,
insf
,
mat
,
codes
,
table.unpack
(
vals
))
return
RushDuel
.
CreateFusionProcedure
(
card
,
insf
,
sub
,
funcs
,
nil
,
0
,
nil
)
RushDuel
.
_private_set_fusion_material_data
(
card
,
mat
,
#
funs
,
#
funs
,
unspecified
,
codes
)
local
checker
=
RushDuel
.
FusionProcedureChecker
(
RushDuel
.
FusionProcedureCheckStart
,
nil
)
return
RushDuel
.
_private_create_fusion_effect
(
card
,
insf
,
sub
,
checker
,
#
funs
,
#
funs
,
table.unpack
(
funs
))
end
-- 融合手续 - 检测: 指定卡名/条件, 固定数量
function
RushDuel
.
FusionProcedureCheckStart
(
mg
,
fc
,
sub
,
...
)
local
sg
=
Group
.
CreateGroup
()
return
mg
:
IsExists
(
RushDuel
.
FusionProcedureCheckStep
,
1
,
nil
,
mg
,
sg
,
fc
,
sub
,
...
)
end
function
RushDuel
.
FusionProcedureCheckStep
(
c
,
mg
,
sg
,
fc
,
sub
,
fun1
,
fun2
,
...
)
if
fun2
then
sg
:
AddCard
(
c
)
local
res
=
false
if
fun1
(
c
,
fc
,
false
,
mg
,
sg
)
then
res
=
mg
:
IsExists
(
RushDuel
.
FusionProcedureCheckStep
,
1
,
sg
,
mg
,
sg
,
fc
,
sub
,
fun2
,
...
)
elseif
sub
and
fun1
(
c
,
fc
,
true
,
mg
,
sg
)
then
res
=
mg
:
IsExists
(
RushDuel
.
FusionProcedureCheckStep
,
1
,
sg
,
mg
,
sg
,
fc
,
false
,
fun2
,
...
)
end
sg
:
RemoveCard
(
c
)
return
res
else
return
fun1
(
c
,
fc
,
sub
,
mg
,
sg
)
end
end
end
-- 添加融合手续: 指定条件, 不固定数量
-- 添加融合手续: 指定条件, 不固定数量
...
@@ -137,17 +217,11 @@ function RushDuel.AddFusionProcedureSP(card, matfilter, matcheck, min, max, sub,
...
@@ -137,17 +217,11 @@ function RushDuel.AddFusionProcedureSP(card, matfilter, matcheck, min, max, sub,
end
end
local
insf
=
(
insf
~=
false
)
local
insf
=
(
insf
~=
false
)
local
sub
=
(
sub
~=
false
)
local
sub
=
(
sub
~=
false
)
local
checker
=
RushDuel
.
FusionProcedureChecker
(
RushDuel
.
FusionProcedureCheckSP
,
matcheck
)
local
funcs
=
{}
return
RushDuel
.
_private_create_fusion_effect
(
card
,
insf
,
sub
,
checker
,
min
,
max
,
matfilter
)
for
i
=
1
,
min
do
end
table.insert
(
funcs
,
matfilter
)
-- 融合手续 - 检测: 指定条件, 不固定数量
function
RushDuel
.
FusionProcedureCheckSP
(
mg
,
fc
,
sub
,
matfilter
)
local
ct
=
mg
:
FilterCount
(
matfilter
,
nil
,
fc
,
false
)
if
not
sub
then
return
ct
==
mg
:
GetCount
()
else
return
ct
>=
mg
:
GetCount
()
-
1
end
end
return
RushDuel
.
CreateFusionProcedure
(
card
,
insf
,
sub
,
funcs
,
matfilter
,
max
-
#
funcs
,
matcheck
)
end
end
-- 手动添加融合素材列表
-- 手动添加融合素材列表
...
@@ -155,11 +229,7 @@ function RushDuel.SetFusionMaterial(card, codes, min, max)
...
@@ -155,11 +229,7 @@ function RushDuel.SetFusionMaterial(card, codes, min, max)
if
card
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
if
card
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
return
end
end
local
mat
=
{}
RushDuel
.
SetFusionMaterialData
(
card
,
codes
,
min
,
max
)
for
_
,
code
in
ipairs
(
codes
)
do
mat
[
code
]
=
true
end
RushDuel
.
_private_set_fusion_material_data
(
card
,
mat
,
min
,
max
)
end
end
-- 手动添加传说卡融合素材列表
-- 手动添加传说卡融合素材列表
...
@@ -182,65 +252,6 @@ function RushDuel.GetFusionMaterialCodes(card)
...
@@ -182,65 +252,6 @@ function RushDuel.GetFusionMaterialCodes(card)
return
card
.
material_codes
or
{}
return
card
.
material_codes
or
{}
end
end
-- 融合手续 - 检测
function
RushDuel
.
FusionProcedureChecker
(
condition
,
checker
)
return
function
(
sg
,
tp
,
fc
,
sub
,
chkfnf
,
...
)
local
chkf
=
chkfnf
&
0xff
local
concat_fusion
=
chkfnf
&
0x200
>
0
if
not
concat_fusion
and
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
if
not
Auxiliary
.
MustMaterialCheck
(
sg
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
false
end
return
condition
(
sg
,
fc
,
sub
,
...
)
and
(
not
checker
or
checker
(
sg
,
tp
,
fc
,
chkf
))
and
(
not
Auxiliary
.
FCheckAdditional
or
Auxiliary
.
FCheckAdditional
(
tp
,
sg
,
fc
,
chkf
))
and
(
not
Auxiliary
.
FGoalCheckAdditional
or
Auxiliary
.
FGoalCheckAdditional
(
tp
,
sg
,
fc
))
end
end
-- 融合手续 - 条件
function
RushDuel
.
FusionProcedureCondition
(
insf
,
sub
,
checker
,
min
,
max
,
...
)
local
funs
=
{
...
}
return
function
(
e
,
g
,
gc
,
chkfnf
)
if
g
==
nil
then
return
insf
and
Auxiliary
.
MustMaterialCheck
(
nil
,
e
:
GetHandlerPlayer
(),
EFFECT_MUST_BE_FMATERIAL
)
end
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
notfusion
=
chkfnf
&
0x100
>
0
local
concat_fusion
=
chkfnf
&
0x200
>
0
local
sub
=
(
sub
or
notfusion
)
and
not
concat_fusion
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub
,
concat_fusion
,
table.unpack
(
funs
))
if
gc
then
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
Duel
.
SetSelectedCard
(
gc
)
end
return
mg
:
CheckSubGroup
(
checker
,
min
,
max
,
tp
,
c
,
sub
,
chkfnf
,
table.unpack
(
funs
))
end
end
-- 融合手续 - 操作
function
RushDuel
.
FusionProcedureOperation
(
insf
,
sub
,
checker
,
min
,
max
,
...
)
local
funs
=
{
...
}
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkfnf
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
notfusion
=
chkfnf
&
0x100
>
0
local
concat_fusion
=
chkfnf
&
0x200
>
0
local
sub
=
(
sub
or
notfusion
)
and
not
concat_fusion
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub
,
concat_fusion
,
table.unpack
(
funs
))
if
gc
then
Duel
.
SetSelectedCard
(
gc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
sg
=
mg
:
SelectSubGroup
(
tp
,
checker
,
true
,
min
,
max
,
tp
,
c
,
sub
,
chkfnf
,
table.unpack
(
funs
))
if
sg
==
nil
then
sg
=
Group
.
CreateGroup
()
end
Duel
.
SetFusionMaterial
(
sg
)
end
end
-- 创建效果: 融合术/结合 召唤
-- 创建效果: 融合术/结合 召唤
function
RushDuel
.
CreateFusionEffect
(
card
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
target_action
,
operation_action
,
limit_action
,
including_self
,
self_leave
)
function
RushDuel
.
CreateFusionEffect
(
card
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
target_action
,
operation_action
,
limit_action
,
including_self
,
self_leave
)
local
self_range
=
s_range
or
0
local
self_range
=
s_range
or
0
...
@@ -355,12 +366,14 @@ function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
...
@@ -355,12 +366,14 @@ function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
fc
:
CompleteProcedure
()
fc
:
CompleteProcedure
()
return
fc
,
mat
return
fc
,
mat
end
end
function
RushDuel
.
FusionCheckAdditional
(
e
,
self_leave
)
-- 判断条件: 怪兽区域判断
return
function
(
tp
,
sg
,
fc
,
chkf
)
function
RushDuel
.
FusionCheckLocation
(
e
,
self_leave
,
extra
)
if
chkf
==
PLAYER_NONE
then
return
function
(
sg
,
tp
,
fc
,
chkf
)
if
extra
and
not
extra
(
tp
,
sg
,
fc
,
chkf
)
then
return
false
elseif
chkf
==
PLAYER_NONE
then
return
true
return
true
end
elseif
self_leave
then
if
self_leave
then
local
mg
=
Group
.
FromCards
(
e
:
GetHandler
())
local
mg
=
Group
.
FromCards
(
e
:
GetHandler
())
mg
:
Merge
(
sg
)
mg
:
Merge
(
sg
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
fc
)
>
0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
fc
)
>
0
...
@@ -371,11 +384,9 @@ function RushDuel.FusionCheckAdditional(e, self_leave)
...
@@ -371,11 +384,9 @@ function RushDuel.FusionCheckAdditional(e, self_leave)
end
end
-- 判断条件: 是否可以进行融合召唤
-- 判断条件: 是否可以进行融合召唤
function
RushDuel
.
IsCanFusionSummon
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
including_self
,
self_leave
,
except
)
function
RushDuel
.
IsCanFusionSummon
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
including_self
,
self_leave
,
except
)
Auxiliary
.
FCheckAdditional
=
RushDuel
.
FusionCheckAdditional
(
e
,
self_leave
)
RushDuel
.
FusionExtraChecker
=
RushDuel
.
FusionCheckLocation
(
e
,
self_leave
,
mat_check
)
Auxiliary
.
FGoalCheckAdditional
=
mat_check
local
fusionable
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
including_self
,
self_leave
,
except
)
local
fusionable
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
including_self
,
self_leave
,
except
)
Auxiliary
.
FCheckAdditional
=
nil
RushDuel
.
FusionExtraChecker
=
nil
Auxiliary
.
FGoalCheckAdditional
=
nil
return
fusionable
return
fusionable
end
end
-- 融合效果 - 目标
-- 融合效果 - 目标
...
@@ -393,8 +404,7 @@ end
...
@@ -393,8 +404,7 @@ end
-- 融合效果 - 操作
-- 融合效果 - 操作
function
RushDuel
.
FusionOperation
(
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
including_self
,
self_leave
,
action
,
limit
)
function
RushDuel
.
FusionOperation
(
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
including_self
,
self_leave
,
action
,
limit
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Auxiliary
.
FCheckAdditional
=
RushDuel
.
FusionCheckAdditional
(
e
,
self_leave
)
RushDuel
.
FusionExtraChecker
=
RushDuel
.
FusionCheckLocation
(
e
,
self_leave
,
mat_check
)
Auxiliary
.
FGoalCheckAdditional
=
mat_check
local
fusionable
,
list
,
chkf
,
gc
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
including_self
,
self_leave
,
nil
,
e
)
local
fusionable
,
list
,
chkf
,
gc
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
including_self
,
self_leave
,
nil
,
e
)
if
fusionable
then
if
fusionable
then
local
fc
,
mat
=
RushDuel
.
ExecuteFusionSummon
(
e
,
tp
,
list
,
chkf
,
gc
,
mat_move
)
local
fc
,
mat
=
RushDuel
.
ExecuteFusionSummon
(
e
,
tp
,
list
,
chkf
,
gc
,
mat_move
)
...
@@ -402,8 +412,7 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
...
@@ -402,8 +412,7 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
action
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
mat
,
fc
)
action
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
mat
,
fc
)
end
end
end
end
Auxiliary
.
FCheckAdditional
=
nil
RushDuel
.
FusionExtraChecker
=
nil
Auxiliary
.
FGoalCheckAdditional
=
nil
if
limit
~=
nil
then
if
limit
~=
nil
then
limit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
limit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
...
@@ -414,8 +423,7 @@ end
...
@@ -414,8 +423,7 @@ end
function
RushDuel
.
FusionSummon
(
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
e
,
tp
,
break_effect
,
including_self
,
self_leave
)
function
RushDuel
.
FusionSummon
(
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
e
,
tp
,
break_effect
,
including_self
,
self_leave
)
local
include
=
including_self
or
false
local
include
=
including_self
or
false
local
leave
=
self_leave
or
false
local
leave
=
self_leave
or
false
Auxiliary
.
FCheckAdditional
=
RushDuel
.
FusionCheckAdditional
(
e
,
leave
)
RushDuel
.
FusionExtraChecker
=
RushDuel
.
FusionCheckLocation
(
e
,
self_leave
,
mat_check
)
Auxiliary
.
FGoalCheckAdditional
=
mat_check
local
fusionable
,
list
,
chkf
,
gc
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
include
,
leave
,
nil
,
e
)
local
fusionable
,
list
,
chkf
,
gc
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
include
,
leave
,
nil
,
e
)
local
fc
=
nil
local
fc
=
nil
if
fusionable
then
if
fusionable
then
...
@@ -424,8 +432,7 @@ function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range,
...
@@ -424,8 +432,7 @@ function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range,
end
end
fc
=
RushDuel
.
ExecuteFusionSummon
(
e
,
tp
,
list
,
chkf
,
gc
,
mat_move
)
fc
=
RushDuel
.
ExecuteFusionSummon
(
e
,
tp
,
list
,
chkf
,
gc
,
mat_move
)
end
end
Auxiliary
.
FCheckAdditional
=
nil
RushDuel
.
FusionExtraChecker
=
nil
Auxiliary
.
FGoalCheckAdditional
=
nil
return
fc
return
fc
end
end
...
@@ -433,8 +440,7 @@ end
...
@@ -433,8 +440,7 @@ end
function
RushDuel
.
CanFusionSummon
(
desc
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
e
,
tp
,
break_effect
,
including_self
,
self_leave
)
function
RushDuel
.
CanFusionSummon
(
desc
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
mat_check
,
mat_move
,
e
,
tp
,
break_effect
,
including_self
,
self_leave
)
local
include
=
including_self
or
false
local
include
=
including_self
or
false
local
leave
=
self_leave
or
false
local
leave
=
self_leave
or
false
Auxiliary
.
FCheckAdditional
=
RushDuel
.
FusionCheckAdditional
(
e
,
leave
)
RushDuel
.
FusionExtraChecker
=
RushDuel
.
FusionCheckLocation
(
e
,
self_leave
,
mat_check
)
Auxiliary
.
FGoalCheckAdditional
=
mat_check
local
fusionable
,
list
,
chkf
,
gc
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
include
,
leave
,
nil
,
e
)
local
fusionable
,
list
,
chkf
,
gc
=
RushDuel
.
GetFusionSummonData
(
e
,
tp
,
matfilter
,
spfilter
,
exfilter
,
s_range
,
o_range
,
include
,
leave
,
nil
,
e
)
local
fc
=
nil
local
fc
=
nil
if
fusionable
and
Duel
.
SelectYesNo
(
tp
,
desc
)
then
if
fusionable
and
Duel
.
SelectYesNo
(
tp
,
desc
)
then
...
@@ -443,8 +449,7 @@ function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range,
...
@@ -443,8 +449,7 @@ function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range,
end
end
fc
=
RushDuel
.
ExecuteFusionSummon
(
e
,
tp
,
list
,
chkf
,
gc
,
mat_move
)
fc
=
RushDuel
.
ExecuteFusionSummon
(
e
,
tp
,
list
,
chkf
,
gc
,
mat_move
)
end
end
Auxiliary
.
FCheckAdditional
=
nil
RushDuel
.
FusionExtraChecker
=
nil
Auxiliary
.
FGoalCheckAdditional
=
nil
return
fc
return
fc
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment