Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
bb56ef70
Commit
bb56ef70
authored
Jan 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
read level
parent
b4c4e361
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
44 deletions
+5
-44
2pick/pick.lua
2pick/pick.lua
+4
-43
2pick/sqlite_cmd.txt
2pick/sqlite_cmd.txt
+1
-1
No files found.
2pick/pick.lua
View file @
bb56ef70
...
...
@@ -15,46 +15,15 @@ local extra_sp={
[
TYPE_LINK
]
=
{},
}
local
forbidden_check
=
{}
local
limited_check
=
{}
local
semi_limited_check
=
{}
local
forbidden
=
{}
local
limited
=
{}
local
semi_limited
=
{}
function
Auxiliary
.
LoadLFList
()
local
started
=
false
for
line
in
io.lines
(
"lflist.conf"
)
do
if
line
:
find
(
"!"
)
then
if
started
then
break
else
started
=
true
end
elseif
started
then
local
fstart
=
line
:
find
(
" 0"
)
local
lstart
=
line
:
find
(
" 1"
)
local
sstart
=
line
:
find
(
" 2"
)
if
fstart
then
local
code
=
tonumber
(
line
:
sub
(
1
,
fstart
-
1
))
if
code
then
forbidden_check
[
code
]
=
true
end
elseif
lstart
then
local
code
=
tonumber
(
line
:
sub
(
1
,
lstart
-
1
))
if
code
then
limited_check
[
code
]
=
true
end
elseif
sstart
then
local
code
=
tonumber
(
line
:
sub
(
1
,
sstart
-
1
))
if
code
then
semi_limited_check
[
code
]
=
true
end
end
end
end
end
function
Auxiliary
.
LoadDB
()
os.execute
(
"sqlite3 2pick/2pick.cdb < 2pick/sqlite_cmd.txt"
)
for
line
in
io.lines
(
"card_list.txt"
)
do
local
col
=
line
:
find
(
"|"
)
local
code
=
tonumber
(
line
:
sub
(
1
,
col
-
1
))
local
cat
=
tonumber
(
line
:
sub
(
col
+
1
,
#
line
))
local
rest_line
=
line
:
sub
(
col
+
1
,
#
line
)
local
rest_col
=
rest_line
:
find
(
"|"
)
local
cat
=
tonumber
(
rest_line
:
sub
(
1
,
col
-
1
))
local
lv
=
tonumber
(
rest_line
:
sub
(
col
+
1
,
#
line
))
if
(
cat
&
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
>
0
then
table.insert
(
extra
,
code
)
for
tp
,
list
in
pairs
(
extra_sp
)
do
...
...
@@ -71,13 +40,6 @@ function Auxiliary.LoadDB()
table.insert
(
main_trap
,
code
)
end
table.insert
(
main
,
code
)
if
forbidden_check
[
code
]
then
table.insert
(
forbidden
,
code
)
elseif
limited_check
[
code
]
then
table.insert
(
limited
,
code
)
elseif
semi_limited_check
[
code
]
then
table.insert
(
semi_limited
,
code
)
end
end
end
end
...
...
@@ -180,7 +142,6 @@ function Auxiliary.StartPick(e)
end
function
Auxiliary
.
Load2PickRule
()
Auxiliary
.
LoadLFList
()
Auxiliary
.
LoadDB
()
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
|
EFFECT_TYPE_CONTINUOUS
)
...
...
2pick/sqlite_cmd.txt
View file @
bb56ef70
.output card_list.txt
select id,type from datas;
select id,type
,level
from datas;
.output stdout
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