Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-scripts
Commits
052ca2bc
Commit
052ca2bc
authored
Dec 01, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #157 from Tianchenglipu/patch-2
move 1+N fusion procedure to Utility.lua
parents
b485cbd9
c9e1a046
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
109 deletions
+119
-109
c11039171.lua
c11039171.lua
+2
-29
c464362.lua
c464362.lua
+1
-32
c64599569.lua
c64599569.lua
+1
-26
c80889750.lua
c80889750.lua
+3
-22
utility.lua
utility.lua
+112
-0
No files found.
c11039171.lua
View file @
052ca2bc
...
@@ -2,19 +2,13 @@
...
@@ -2,19 +2,13 @@
function
c11039171
.
initial_effect
(
c
)
function
c11039171
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
aux
.
AddFusionProcCodeFunRep
(
c
,
30068120
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xa9
),
1
,
63
,
false
,
false
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
c11039171
.
fscon
)
e1
:
SetOperation
(
c11039171
.
fsop
)
c
:
RegisterEffect
(
e1
)
--spsummon condition
--spsummon condition
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e2
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e2
:
SetValue
(
c11039171
.
sp
limit
)
e2
:
SetValue
(
aux
.
fus
limit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--multi
--multi
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
...
@@ -23,27 +17,6 @@ function c11039171.initial_effect(c)
...
@@ -23,27 +17,6 @@ function c11039171.initial_effect(c)
e3
:
SetOperation
(
c11039171
.
atkop
)
e3
:
SetOperation
(
c11039171
.
atkop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
c11039171
.
material_count
=
1
c11039171
.
material
=
{
30068120
}
function
c11039171
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c11039171
.
mfilter
(
c
,
mg
)
return
c
:
IsCode
(
30068120
)
and
mg
:
IsExists
(
Card
.
IsSetCard
,
1
,
c
,
0xa9
)
end
function
c11039171
.
fscon
(
e
,
mg
,
gc
)
if
mg
==
nil
then
return
false
end
if
gc
then
return
false
end
return
mg
:
IsExists
(
c11039171
.
mfilter
,
1
,
nil
,
mg
)
end
function
c11039171
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
c11039171
.
mfilter
,
1
,
1
,
nil
,
eg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g2
=
eg
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
63
,
g1
:
GetFirst
(),
0xa9
)
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
end
function
c11039171
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c11039171
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
c464362.lua
View file @
052ca2bc
...
@@ -3,13 +3,7 @@ function c464362.initial_effect(c)
...
@@ -3,13 +3,7 @@ function c464362.initial_effect(c)
c
:
SetUniqueOnField
(
1
,
0
,
464362
)
c
:
SetUniqueOnField
(
1
,
0
,
464362
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
aux
.
AddFusionProcCodeFunRep
(
c
,
30068120
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xa9
),
1
,
63
,
true
,
true
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
c464362
.
fscon
)
e1
:
SetOperation
(
c464362
.
fsop
)
c
:
RegisterEffect
(
e1
)
--destroy
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
...
@@ -30,31 +24,6 @@ function c464362.initial_effect(c)
...
@@ -30,31 +24,6 @@ function c464362.initial_effect(c)
e3
:
SetValue
(
c464362
.
atkval
)
e3
:
SetValue
(
c464362
.
atkval
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
c464362
.
material_count
=
1
c464362
.
material
=
{
30068120
}
function
c464362
.
mfilter
(
c
,
mg
)
return
(
c
:
IsCode
(
30068120
)
or
c
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
))
and
mg
:
IsExists
(
Card
.
IsSetCard
,
1
,
c
,
0xa9
)
end
function
c464362
.
fscon
(
e
,
mg
,
gc
)
if
mg
==
nil
then
return
true
end
if
gc
then
return
(
gc
:
IsCode
(
30068120
)
or
gc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
))
and
mg
:
IsExists
(
Card
.
IsSetCard
,
1
,
gc
,
0xa9
)
end
return
mg
:
IsExists
(
c464362
.
mfilter
,
1
,
nil
,
mg
)
end
function
c464362
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
)
if
gc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
63
,
nil
,
0xa9
)
Duel
.
SetFusionMaterial
(
g1
)
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
c464362
.
mfilter
,
1
,
1
,
nil
,
eg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g2
=
eg
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
63
,
g1
:
GetFirst
(),
0xa9
)
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
end
function
c464362
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c464362
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
end
...
...
c64599569.lua
View file @
052ca2bc
...
@@ -2,13 +2,7 @@
...
@@ -2,13 +2,7 @@
function
c64599569
.
initial_effect
(
c
)
function
c64599569
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--fusion material
--fusion material
local
e1
=
Effect
.
CreateEffect
(
c
)
aux
.
AddFusionProcCodeFunRep
(
c
,
70095154
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
),
1
,
63
,
true
,
true
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
c64599569
.
fscondition
)
e1
:
SetOperation
(
c64599569
.
fsoperation
)
c
:
RegisterEffect
(
e1
)
--spsummon condition
--spsummon condition
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -28,25 +22,6 @@ function c64599569.initial_effect(c)
...
@@ -28,25 +22,6 @@ function c64599569.initial_effect(c)
e4
:
SetOperation
(
c64599569
.
tgop
)
e4
:
SetOperation
(
c64599569
.
tgop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
c64599569
.
material_count
=
1
c64599569
.
material
=
{
70095154
}
function
c64599569
.
spfilter
(
c
,
mg
)
return
(
c
:
IsCode
(
70095154
)
or
c
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
))
and
mg
:
IsExists
(
Card
.
IsRace
,
1
,
c
,
RACE_MACHINE
)
end
function
c64599569
.
fscondition
(
e
,
mg
,
gc
)
if
mg
==
nil
then
return
false
end
if
gc
then
return
false
end
return
mg
:
IsExists
(
c64599569
.
spfilter
,
1
,
nil
,
mg
)
end
function
c64599569
.
fsoperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
c64599569
.
spfilter
,
1
,
1
,
nil
,
eg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g2
=
eg
:
FilterSelect
(
tp
,
Card
.
IsRace
,
1
,
63
,
g1
:
GetFirst
(),
RACE_MACHINE
)
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
end
function
c64599569
.
sucop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c64599569
.
sucop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
c80889750.lua
View file @
052ca2bc
...
@@ -2,13 +2,7 @@
...
@@ -2,13 +2,7 @@
function
c80889750
.
initial_effect
(
c
)
function
c80889750
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
aux
.
AddFusionProcFunFunRep
(
c
,
c80889750
.
mfilter1
,
c80889750
.
mfilter2
,
1
,
63
,
true
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
c80889750
.
fscon
)
e1
:
SetOperation
(
c80889750
.
fsop
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
@@ -36,25 +30,12 @@ function c80889750.initial_effect(c)
...
@@ -36,25 +30,12 @@ function c80889750.initial_effect(c)
e4
:
SetOperation
(
c80889750
.
indop
)
e4
:
SetOperation
(
c80889750
.
indop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c80889750
.
mfilter1
(
c
,
mg
)
function
c80889750
.
mfilter1
(
c
)
return
c
:
IsSetCard
(
0xad
)
and
c
:
IsType
(
TYPE_FUSION
)
and
mg
:
IsExists
(
c80889750
.
mfilter2
,
1
,
c
)
return
c
:
IsSetCard
(
0xad
)
and
c
:
IsType
(
TYPE_FUSION
)
end
end
function
c80889750
.
mfilter2
(
c
)
function
c80889750
.
mfilter2
(
c
)
return
c
:
IsSetCard
(
0xa9
)
or
c
:
IsSetCard
(
0xc3
)
return
c
:
IsSetCard
(
0xa9
)
or
c
:
IsSetCard
(
0xc3
)
end
end
function
c80889750
.
fscon
(
e
,
mg
,
gc
)
if
mg
==
nil
then
return
true
end
if
gc
then
return
false
end
return
mg
:
IsExists
(
c80889750
.
mfilter1
,
1
,
nil
,
mg
)
end
function
c80889750
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
c80889750
.
mfilter1
,
1
,
1
,
nil
,
eg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g2
=
eg
:
FilterSelect
(
tp
,
c80889750
.
mfilter2
,
1
,
63
,
g1
:
GetFirst
())
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
end
function
c80889750
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c80889750
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
end
...
...
utility.lua
View file @
052ca2bc
...
@@ -996,6 +996,118 @@ function Auxiliary.FOperationFunRep(f,cc,insf)
...
@@ -996,6 +996,118 @@ function Auxiliary.FOperationFunRep(f,cc,insf)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g1
)
end
end
end
end
--Fusion monster, name + condition * minc to maxc
--may not be perfect for gc
function
Auxiliary
.
AddFusionProcCodeFunRep
(
c
,
code
,
f
,
minc
,
maxc
,
sub
,
insf
)
if
c
.
material_count
==
nil
then
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
mt
.
material_count
=
1
mt
.
material
=
{
code
}
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
Auxiliary
.
FConditionCodeFunRep
(
code
,
f
,
minc
,
maxc
,
sub
,
insf
))
e1
:
SetOperation
(
Auxiliary
.
FOperationCodeFunRep
(
code
,
f
,
minc
,
maxc
,
sub
,
insf
))
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
FConditionFilterCFR
(
c
,
code
,
sub
,
f
,
mg
,
minc
)
return
(
c
:
IsCode
(
code
)
or
(
sub
and
c
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)))
and
mg
:
IsExists
(
f
,
minc
,
c
)
end
function
Auxiliary
.
FConditionCodeFunRep
(
code
,
f
,
minc
,
maxc
,
sub
,
insf
)
return
function
(
e
,
eg
,
gc
,
chkf
)
if
eg
==
nil
then
return
insf
end
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
if
gc
then
return
(
gc
:
IsCode
(
code
)
or
sub
and
gc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
))
and
g
:
IsExists
(
f
,
minc
,
gc
)
end
local
mg1
=
g
:
Filter
(
aux
.
FConditionFilterCFR
,
nil
,
code
,
sub
,
f
,
g
,
minc
)
local
mg2
=
g
:
Filter
(
f
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
mg1
:
GetCount
()
>=
1
and
mg1
:
FilterCount
(
Card
.
IsOnField
,
nil
)
+
mg2
:
FilterCount
(
Card
.
IsOnField
,
nil
)
~=
0
else
return
mg1
:
GetCount
()
>=
1
end
end
end
function
Auxiliary
.
FOperationCodeFunRep
(
code
,
f
,
minc
,
maxc
,
sub
,
insf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
if
gc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
f
,
minc
,
maxc
,
nil
)
Duel
.
SetFusionMaterial
(
g1
)
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
mg1
=
eg
:
FilterSelect
(
tp
,
aux
.
FConditionFilterCFR
,
1
,
1
,
nil
,
code
,
sub
,
f
,
eg
,
minc
)
local
g2
=
eg
:
Filter
(
f
,
mg1
:
GetFirst
())
local
offset
=
0
if
chkf
~=
PLAYER_NONE
and
not
mg1
:
GetFirst
():
IsOnField
()
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
mg3
=
g2
:
FilterSelect
(
tp
,
Card
.
IsOnField
,
1
,
1
,
nil
)
mg1
:
Merge
(
mg3
)
g2
:
Sub
(
mg3
)
offset
=-
1
end
if
offset
~=
0
and
(
maxc
-
1
<
1
or
minc
-
1
<
1
and
not
Duel
.
SelectYesNo
(
tp
,
93
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
mg2
=
g2
:
Select
(
tp
,
minc
+
offset
,
maxc
+
offset
,
nil
)
mg1
:
Merge
(
mg2
)
Duel
.
SetFusionMaterial
(
mg1
)
end
end
--Fusion monster, condition1 + condition2 * minc to maxc
--may not be perfect for gc
function
Auxiliary
.
AddFusionProcFunFunRep
(
c
,
f1
,
f2
,
minc
,
maxc
,
insf
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e1
:
SetCondition
(
Auxiliary
.
FConditionFunFunRep
(
f1
,
f2
,
minc
,
maxc
,
insf
))
e1
:
SetOperation
(
Auxiliary
.
FOperationFunFunRep
(
f1
,
f2
,
minc
,
maxc
,
insf
))
c
:
RegisterEffect
(
e1
)
end
function
Auxiliary
.
FConditionFilterFFR
(
c
,
f1
,
f2
,
mg
,
minc
)
return
f1
(
c
)
and
mg
:
IsExists
(
f2
,
minc
,
c
)
end
function
Auxiliary
.
FConditionFunFunRep
(
f1
,
f2
,
minc
,
maxc
,
insf
)
return
function
(
e
,
eg
,
gc
,
chkf
)
if
eg
==
nil
then
return
insf
end
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
if
gc
then
return
f1
(
gc
)
and
g
:
IsExists
(
f2
,
minc
,
gc
)
end
local
mg1
=
g
:
Filter
(
aux
.
FConditionFilterFFR
,
nil
,
f1
,
f2
,
g
,
minc
)
local
mg2
=
g
:
Filter
(
f2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
mg1
:
GetCount
()
>=
1
and
mg1
:
FilterCount
(
Card
.
IsOnField
,
nil
)
+
mg2
:
FilterCount
(
Card
.
IsOnField
,
nil
)
~=
0
else
return
mg1
:
GetCount
()
>=
1
end
end
end
function
Auxiliary
.
FOperationFunFunRep
(
f1
,
f2
,
minc
,
maxc
,
insf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
if
gc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
eg
:
FilterSelect
(
tp
,
f2
,
minc
,
maxc
,
nil
)
Duel
.
SetFusionMaterial
(
g1
)
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
mg1
=
eg
:
FilterSelect
(
tp
,
aux
.
FConditionFilterFFR
,
1
,
1
,
nil
,
f1
,
f2
,
eg
,
minc
)
local
g2
=
eg
:
Filter
(
f2
,
mg1
:
GetFirst
())
local
offset
=
0
if
chkf
~=
PLAYER_NONE
and
not
mg1
:
GetFirst
():
IsOnField
()
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
mg3
=
g2
:
FilterSelect
(
tp
,
Card
.
IsOnField
,
1
,
1
,
nil
)
mg1
:
Merge
(
mg3
)
g2
:
Sub
(
mg3
)
offset
=-
1
end
if
offset
~=
0
and
(
maxc
-
1
<
1
or
minc
-
1
<
1
and
not
Duel
.
SelectYesNo
(
tp
,
93
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
mg2
=
g2
:
Select
(
tp
,
minc
+
offset
,
maxc
+
offset
,
nil
)
mg1
:
Merge
(
mg2
)
Duel
.
SetFusionMaterial
(
mg1
)
end
end
--Ritual Summon, geq fixed lv
--Ritual Summon, geq fixed lv
function
Auxiliary
.
AddRitualProcGreater
(
c
,
filter
)
function
Auxiliary
.
AddRitualProcGreater
(
c
,
filter
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
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