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
942fcd92
Commit
942fcd92
authored
Apr 14, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update aux base functions
parent
891444b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
24 deletions
+42
-24
utility.lua
utility.lua
+42
-24
No files found.
utility.lua
View file @
942fcd92
...
...
@@ -58,20 +58,32 @@ end
function
Auxiliary
.
FALSE
()
return
false
end
function
Auxiliary
.
AND
(
f1
,
f2
)
return
function
(
a
,
b
,
c
)
return
f1
(
a
,
b
,
c
)
and
f2
(
a
,
b
,
c
)
end
function
Auxiliary
.
AND
(
...
)
local
function_list
=
{
...
}
return
function
(
...
)
local
res
=
false
for
i
,
f
in
ipairs
(
function_list
)
do
res
=
f
(
...
)
if
not
res
then
return
res
end
end
return
res
end
end
function
Auxiliary
.
OR
(
f1
,
f2
)
return
function
(
a
,
b
,
c
)
return
f1
(
a
,
b
,
c
)
or
f2
(
a
,
b
,
c
)
end
function
Auxiliary
.
OR
(
...
)
local
function_list
=
{
...
}
return
function
(
...
)
local
res
=
false
for
i
,
f
in
ipairs
(
function_list
)
do
res
=
f
(
...
)
if
res
then
return
res
end
end
return
res
end
end
function
Auxiliary
.
NOT
(
f
)
return
function
(
a
,
b
,
c
)
return
not
f
(
a
,
b
,
c
)
end
return
function
(
...
)
return
not
f
(
...
)
end
end
function
Auxiliary
.
BeginPuzzle
(
effect
)
local
e1
=
Effect
.
GlobalEffect
()
...
...
@@ -101,7 +113,7 @@ function Auxiliary.IsDualState(effect)
return
not
c
:
IsDisabled
()
and
c
:
IsDualState
()
end
function
Auxiliary
.
IsNotDualState
(
effect
)
local
c
=
effect
:
GetHandle
()
local
c
=
effect
:
GetHandle
r
()
return
c
:
IsDisabled
()
or
not
c
:
IsDualState
()
end
function
Auxiliary
.
DualNormalCondition
(
effect
)
...
...
@@ -197,34 +209,40 @@ function Auxiliary.CheckUnionEquip(uc,tc)
if
uc
.
old_union
then
return
ct1
==
0
else
return
ct2
==
0
end
end
function
Auxiliary
.
TargetEqualFunction
(
f
,
value
,
a
,
b
,
c
)
function
Auxiliary
.
TargetEqualFunction
(
f
,
value
,
...
)
local
ext_params
=
{
...
}
return
function
(
effect
,
target
)
return
f
(
target
,
a
,
b
,
c
)
==
value
return
f
(
target
,
table.unpack
(
ext_params
)
)
==
value
end
end
function
Auxiliary
.
TargetBoolFunction
(
f
,
a
,
b
,
c
)
function
Auxiliary
.
TargetBoolFunction
(
f
,
...
)
local
ext_params
=
{
...
}
return
function
(
effect
,
target
)
return
f
(
target
,
a
,
b
,
c
)
return
f
(
target
,
table.unpack
(
ext_params
)
)
end
end
function
Auxiliary
.
FilterEqualFunction
(
f
,
value
,
a
,
b
,
c
)
function
Auxiliary
.
FilterEqualFunction
(
f
,
value
,
...
)
local
ext_params
=
{
...
}
return
function
(
target
)
return
f
(
target
,
a
,
b
,
c
)
==
value
return
f
(
target
,
table.unpack
(
ext_params
)
)
==
value
end
end
function
Auxiliary
.
FilterBoolFunction
(
f
,
a
,
b
,
c
)
function
Auxiliary
.
FilterBoolFunction
(
f
,
...
)
local
ext_params
=
{
...
}
return
function
(
target
)
return
f
(
target
,
a
,
b
,
c
)
return
f
(
target
,
table.unpack
(
ext_params
)
)
end
end
function
Auxiliary
.
Tuner
(
f
,
a
,
b
,
c
)
function
Auxiliary
.
Tuner
(
f
,
...
)
local
ext_params
=
{
...
}
return
function
(
target
)
return
target
:
IsType
(
TYPE_TUNER
)
and
(
not
f
or
f
(
target
,
a
,
b
,
c
))
return
target
:
IsType
(
TYPE_TUNER
)
and
(
not
f
or
f
(
target
,
table.unpack
(
ext_params
)
))
end
end
function
Auxiliary
.
NonTuner
(
f
,
a
,
b
,
c
)
function
Auxiliary
.
NonTuner
(
f
,
...
)
local
ext_params
=
{
...
}
return
function
(
target
)
return
target
:
IsNotTuner
()
and
(
not
f
or
f
(
target
,
a
,
b
,
c
))
return
target
:
IsNotTuner
()
and
(
not
f
or
f
(
target
,
table.unpack
(
ext_params
)
))
end
end
function
Auxiliary
.
GetValueType
(
v
)
...
...
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