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
265f5b78
Commit
265f5b78
authored
Jan 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5d41fdfd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
2pick/pick.lua
2pick/pick.lua
+16
-4
No files found.
2pick/pick.lua
View file @
265f5b78
...
...
@@ -43,9 +43,9 @@ function Auxiliary.LoadDB()
if
(
cat
&
TYPE_MONSTER
)
>
0
then
table.insert
(
main_monster
,
code
)
if
lv
>
5
then
table.insert
(
main_plain
,
code
)
else
table.insert
(
main_adv
,
code
)
else
table.insert
(
main_plain
,
code
)
end
elseif
(
cat
&
TYPE_SPELL
)
>
0
then
table.insert
(
main_spell
,
code
)
...
...
@@ -63,7 +63,7 @@ function Auxiliary.SaveDeck()
Duel
.
SavePickDeck
(
p
,
g
)
end
end
function
Auxiliary
.
SinglePick
(
p
,
list
,
count
)
function
Auxiliary
.
SinglePick
(
p
,
list
,
count
,
ex_list
,
ex_count
)
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
...
...
@@ -72,6 +72,12 @@ function Auxiliary.SinglePick(p,list,count)
local
code
=
list
[
math.random
(
#
list
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
if
ex_list
and
ex_count
then
for
i
=
1
,
ex_count
do
local
code
=
ex_list
[
math.random
(
#
ex_list
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
end
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_RULE
)
end
local
sg
=
g1
:
Clone
()
...
...
@@ -83,7 +89,7 @@ function Auxiliary.SinglePick(p,list,count)
Duel
.
Exile
(
rg
,
REASON_RULE
)
end
function
Auxiliary
.
SinglePickForMain
(
p
,
list
,
count
)
function
Auxiliary
.
SinglePickForMain
(
p
,
list
,
count
,
ex_list
,
ex_count
)
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
...
...
@@ -92,6 +98,12 @@ function Auxiliary.SinglePickForMain(p,list,count)
local
code
=
list
[
math.random
(
#
list
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
if
ex_list
and
ex_count
then
for
i
=
1
,
ex_count
do
local
code
=
ex_list
[
math.random
(
#
ex_list
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
end
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_RULE
)
end
local
sg
=
g1
:
Clone
()
...
...
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