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
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
八宫一月
ygopro-scripts
Commits
3b735681
Commit
3b735681
authored
Dec 05, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion subgroup part 1
parent
c7d21f1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
23 deletions
+6
-23
utility.lua
utility.lua
+6
-23
No files found.
utility.lua
View file @
3b735681
...
@@ -991,11 +991,9 @@ function Auxiliary.FConditionMix(insf,sub,...)
...
@@ -991,11 +991,9 @@ function Auxiliary.FConditionMix(insf,sub,...)
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub
,
table.unpack
(
funs
))
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub
,
table.unpack
(
funs
))
if
gc
then
if
gc
then
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
local
sg
=
Group
.
CreateGroup
()
Duel
.
SetSelectedCard
(
Group
.
FromCards
(
gc
))
return
Auxiliary
.
FSelectMix
(
gc
,
tp
,
mg
,
sg
,
c
,
sub
,
chkf
,
table.unpack
(
funs
))
end
end
local
sg
=
Group
.
CreateGroup
()
return
mg
:
CheckSubGroup
(
Auxiliary
.
FCheckMixGoal
,
#
funs
,
#
funs
,
tp
,
fc
,
sub
,
chkf
,
...
)
return
mg
:
IsExists
(
Auxiliary
.
FSelectMix
,
1
,
nil
,
tp
,
mg
,
sg
,
c
,
sub
,
chkf
,
table.unpack
(
funs
))
end
end
end
end
function
Auxiliary
.
FOperationMix
(
insf
,
sub
,
...
)
function
Auxiliary
.
FOperationMix
(
insf
,
sub
,
...
)
...
@@ -1007,13 +1005,9 @@ function Auxiliary.FOperationMix(insf,sub,...)
...
@@ -1007,13 +1005,9 @@ function Auxiliary.FOperationMix(insf,sub,...)
local
notfusion
=
chkfnf
>>
8
~=
0
local
notfusion
=
chkfnf
>>
8
~=
0
local
sub
=
sub
or
notfusion
local
sub
=
sub
or
notfusion
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub
,
table.unpack
(
funs
))
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub
,
table.unpack
(
funs
))
local
sg
=
Group
.
CreateGroup
()
if
gc
then
Duel
.
SetSelectedCard
(
Group
.
FromCards
(
gc
))
end
if
gc
then
sg
:
AddCard
(
gc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
while
sg
:
GetCount
()
<#
funs
do
local
sg
=
mg
:
CheckSubGroup
(
tp
,
Auxiliary
.
FCheckMixGoal
,
false
,
#
funs
,
#
funs
,
tp
,
fc
,
sub
,
chkf
,
...
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
FSelectMix
,
1
,
1
,
sg
,
tp
,
mg
,
sg
,
c
,
sub
,
chkf
,
table.unpack
(
funs
))
sg
:
Merge
(
g
)
end
Duel
.
SetFusionMaterial
(
sg
)
Duel
.
SetFusionMaterial
(
sg
)
end
end
end
end
...
@@ -1041,24 +1035,13 @@ function Auxiliary.FCheckMix(c,mg,sg,fc,sub,fun1,fun2,...)
...
@@ -1041,24 +1035,13 @@ function Auxiliary.FCheckMix(c,mg,sg,fc,sub,fun1,fun2,...)
end
end
--if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc)
--if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
FCheckAdditional
=
nil
function
Auxiliary
.
FCheckMixGoal
(
tp
,
sg
,
fc
,
sub
,
chkf
,
...
)
function
Auxiliary
.
FCheckMixGoal
(
sg
,
tp
,
fc
,
sub
,
chkf
,
...
)
if
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
if
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
if
not
Auxiliary
.
MustMaterialCheck
(
sg
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
false
end
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
return
sg
:
IsExists
(
Auxiliary
.
FCheckMix
,
1
,
nil
,
sg
,
g
,
fc
,
sub
,
...
)
and
(
chkf
==
PLAYER_NONE
or
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
fc
)
>
0
)
return
sg
:
IsExists
(
Auxiliary
.
FCheckMix
,
1
,
nil
,
sg
,
g
,
fc
,
sub
,
...
)
and
(
chkf
==
PLAYER_NONE
or
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
fc
)
>
0
)
and
(
not
Auxiliary
.
FCheckAdditional
or
Auxiliary
.
FCheckAdditional
(
tp
,
sg
,
fc
))
and
(
not
Auxiliary
.
FCheckAdditional
or
Auxiliary
.
FCheckAdditional
(
tp
,
sg
,
fc
))
end
end
function
Auxiliary
.
FSelectMix
(
c
,
tp
,
mg
,
sg
,
fc
,
sub
,
chkf
,
...
)
sg
:
AddCard
(
c
)
local
res
if
sg
:
GetCount
()
<#
{
...
}
then
res
=
mg
:
IsExists
(
Auxiliary
.
FSelectMix
,
1
,
sg
,
tp
,
mg
,
sg
,
fc
,
sub
,
chkf
,
...
)
else
res
=
Auxiliary
.
FCheckMixGoal
(
tp
,
sg
,
fc
,
sub
,
chkf
,
...
)
end
sg
:
RemoveCard
(
c
)
return
res
end
--Fusion monster, mixed material * minc to maxc + material + ...
--Fusion monster, mixed material * minc to maxc + material + ...
function
Auxiliary
.
AddFusionProcMixRep
(
c
,
sub
,
insf
,
fun1
,
minc
,
maxc
,
...
)
function
Auxiliary
.
AddFusionProcMixRep
(
c
,
sub
,
insf
,
fun1
,
minc
,
maxc
,
...
)
if
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
end
if
c
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
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