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
c9e1a046
Commit
c9e1a046
authored
Dec 01, 2015
by
Tianchenglipu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update utility.lua
parent
9c72d0c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
utility.lua
utility.lua
+20
-20
No files found.
utility.lua
View file @
c9e1a046
...
...
@@ -1017,14 +1017,14 @@ 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
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
insf
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
return
function
(
e
,
e
g
,
gc
,
chkf
)
if
e
g
==
nil
then
return
insf
end
local
g
=
e
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
if
gc
then
return
(
gc
:
IsCode
(
code
)
or
sub
and
gc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
))
and
m
g
:
IsExists
(
f
,
minc
,
gc
)
and
g
:
IsExists
(
f
,
minc
,
gc
)
end
local
mg1
=
mg
:
Filter
(
aux
.
FConditionFilterCFR
,
nil
,
code
,
sub
,
f
,
m
g
,
minc
)
local
mg2
=
mg
:
Filter
(
f
,
nil
,
minc
)
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
...
...
@@ -1041,17 +1041,17 @@ function Auxiliary.FOperationCodeFunRep(code,f,minc,maxc,sub,insf)
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
=
false
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
=
true
offset
=
-
1
end
if
offset
and
(
maxc
-
1
<
1
or
minc
-
1
<
1
and
not
Duel
.
SelectYesNo
(
tp
,
93
))
then
return
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
-
1
,
maxc
-
1
,
nil
)
local
mg2
=
g2
:
Select
(
tp
,
minc
+
offset
,
maxc
+
offset
,
nil
)
mg1
:
Merge
(
mg2
)
Duel
.
SetFusionMaterial
(
mg1
)
end
...
...
@@ -1071,12 +1071,12 @@ 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
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
insf
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
if
gc
then
return
f1
(
gc
)
and
m
g
:
IsExists
(
f2
,
minc
,
gc
)
end
local
mg1
=
mg
:
Filter
(
aux
.
FConditionFilterFFR
,
nil
,
f1
,
f2
,
m
g
,
minc
)
local
mg2
=
mg
:
Filter
(
f2
,
nil
,
minc
)
return
function
(
e
,
e
g
,
gc
,
chkf
)
if
e
g
==
nil
then
return
insf
end
local
g
=
e
g
:
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
...
...
@@ -1093,17 +1093,17 @@ function Auxiliary.FOperationFunFunRep(f1,f2,minc,maxc,insf)
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
=
false
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
=
true
offset
=
-
1
end
if
offset
and
(
maxc
-
1
<
1
or
minc
-
1
<
1
and
not
Duel
.
SelectYesNo
(
tp
,
93
))
then
return
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
-
1
,
maxc
-
1
,
nil
)
local
mg2
=
g2
:
Select
(
tp
,
minc
+
offset
,
maxc
+
offset
,
nil
)
mg1
:
Merge
(
mg2
)
Duel
.
SetFusionMaterial
(
mg1
)
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