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
8ce4c840
Commit
8ce4c840
authored
Jan 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loading
parent
0f14dda8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
2pick/card_pools/default/card_pool.cdb
2pick/card_pools/default/card_pool.cdb
+0
-0
2pick/card_pools/default/sqlite_cmd.txt
2pick/card_pools/default/sqlite_cmd.txt
+0
-0
2pick/pick.lua
2pick/pick.lua
+9
-3
No files found.
2pick/default/card_pool.cdb
→
2pick/
card_pools/
default/card_pool.cdb
View file @
8ce4c840
File moved
2pick/default/sqlite_cmd.txt
→
2pick/
card_pools/
default/sqlite_cmd.txt
View file @
8ce4c840
File moved
2pick/pick.lua
View file @
8ce4c840
...
...
@@ -26,7 +26,7 @@ function Auxiliary.SplitData(inputstr)
return
t
end
function
Auxiliary
.
LoadDB
(
p
,
pool
)
os.execute
(
"sqlite3 2pick/
"
..
pool
..
"/card_pool.cdb < 2pick
/"
..
pool
..
"/sqlite_cmd.txt"
)
os.execute
(
"sqlite3 2pick/
card_pools/"
..
pool
..
"/card_pool.cdb < 2pick/card_pools
/"
..
pool
..
"/sqlite_cmd.txt"
)
for
line
in
io.lines
(
"card_list_"
..
pool
..
".txt"
)
do
local
data
=
Auxiliary
.
SplitData
(
line
)
local
code
=
data
[
1
]
...
...
@@ -58,8 +58,14 @@ function Auxiliary.LoadDB(p,pool)
end
--to do: multi card pools
function
Auxiliary
.
LoadCardPools
()
local
pools
=
{}
local
file
=
io.popen
(
"ls 2pick/card_pools"
)
for
dirname
in
file
:
lines
()
do
table.insert
(
pools
,
dirname
)
end
file
:
close
()
for
p
=
0
,
1
do
Auxiliary
.
LoadDB
(
p
,
"default"
)
Auxiliary
.
LoadDB
(
p
,
pools
[
math.random
(
#
pools
)]
)
end
end
...
...
@@ -131,7 +137,6 @@ function Auxiliary.SinglePickForMain(p,list,count,ex_list,ex_count)
end
function
Auxiliary
.
StartPick
(
e
)
math.randomseed
(
os.time
())
for
p
=
0
,
1
do
if
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
local
g
=
Duel
.
GetFieldGroup
(
p
,
0xff
,
0
)
...
...
@@ -182,6 +187,7 @@ function Auxiliary.StartPick(e)
end
function
Auxiliary
.
Load2PickRule
()
math.randomseed
(
os.time
())
Auxiliary
.
LoadCardPools
()
local
e1
=
Effect
.
GlobalEffect
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
|
EFFECT_TYPE_CONTINUOUS
)
...
...
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