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
21a21da5
Commit
21a21da5
authored
Jan 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
f1e81a50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
37 deletions
+11
-37
2pick/pick.lua
2pick/pick.lua
+11
-37
No files found.
2pick/pick.lua
View file @
21a21da5
...
@@ -75,35 +75,7 @@ function Auxiliary.SaveDeck()
...
@@ -75,35 +75,7 @@ function Auxiliary.SaveDeck()
Duel
.
SavePickDeck
(
p
,
g
)
Duel
.
SavePickDeck
(
p
,
g
)
end
end
end
end
function
Auxiliary
.
SinglePick
(
p
,
list
,
count
,
ex_list
,
ex_count
)
function
Auxiliary
.
SinglePick
(
p
,
list
,
count
,
ex_list
,
ex_count
,
copy
)
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
plist
=
list
[
p
]
for
_
,
g
in
ipairs
({
g1
,
g2
})
do
for
i
=
1
,
count
do
local
code
=
plist
[
math.random
(
#
plist
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
if
ex_list
and
ex_count
then
local
ex_plist
=
ex_list
[
p
]
for
i
=
1
,
ex_count
do
local
code
=
ex_plist
[
math.random
(
#
ex_plist
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
end
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_RULE
)
end
local
sg
=
g1
:
Clone
()
sg
:
Merge
(
g2
)
Duel
.
ResetTimeLimit
(
p
,
60
)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
sc
=
sg
:
Select
(
p
,
1
,
1
,
nil
):
GetFirst
()
local
rg
=
g1
:
IsContains
(
sc
)
and
g2
or
g1
Duel
.
Exile
(
rg
,
REASON_RULE
)
end
function
Auxiliary
.
SinglePickForMain
(
p
,
list
,
count
,
ex_list
,
ex_count
)
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
local
g1
=
Group
.
CreateGroup
()
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
...
@@ -130,12 +102,14 @@ function Auxiliary.SinglePickForMain(p,list,count,ex_list,ex_count)
...
@@ -130,12 +102,14 @@ function Auxiliary.SinglePickForMain(p,list,count,ex_list,ex_count)
local
tg
=
g1
:
IsContains
(
sc
)
and
g1
or
g2
local
tg
=
g1
:
IsContains
(
sc
)
and
g1
or
g2
local
rg
=
g1
:
IsContains
(
sc
)
and
g2
or
g1
local
rg
=
g1
:
IsContains
(
sc
)
and
g2
or
g1
Duel
.
Exile
(
rg
,
REASON_RULE
)
Duel
.
Exile
(
rg
,
REASON_RULE
)
local
g3
=
Group
.
CreateGroup
()
if
copy
then
for
nc
in
aux
.
Next
(
tg
)
do
local
g3
=
Group
.
CreateGroup
()
local
copy_code
=
nc
:
GetOriginalCode
()
for
nc
in
aux
.
Next
(
tg
)
do
g3
:
AddCard
(
Duel
.
CreateToken
(
p
,
copy_code
))
local
copy_code
=
nc
:
GetOriginalCode
()
g3
:
AddCard
(
Duel
.
CreateToken
(
p
,
copy_code
))
end
Duel
.
SendtoDeck
(
g3
,
nil
,
0
,
REASON_RULE
)
end
end
Duel
.
SendtoDeck
(
g3
,
nil
,
0
,
REASON_RULE
)
end
end
function
Auxiliary
.
StartPick
(
e
)
function
Auxiliary
.
StartPick
(
e
)
...
@@ -160,19 +134,19 @@ function Auxiliary.StartPick(e)
...
@@ -160,19 +134,19 @@ function Auxiliary.StartPick(e)
list
=
main_trap
list
=
main_trap
end
end
for
p
=
0
,
1
do
for
p
=
0
,
1
do
Auxiliary
.
SinglePickForMain
(
p
,
list
,
count
,
ex_list
,
ex_count
)
Auxiliary
.
SinglePickForMain
(
p
,
list
,
count
,
ex_list
,
ex_count
,
true
)
end
end
end
end
for
tp
,
list
in
pairs
(
extra_sp
)
do
for
tp
,
list
in
pairs
(
extra_sp
)
do
if
tp
~=
TYPE_FUSION
then
if
tp
~=
TYPE_FUSION
then
for
p
=
0
,
1
do
for
p
=
0
,
1
do
Auxiliary
.
SinglePick
(
p
,
list
,
4
)
Auxiliary
.
SinglePick
(
p
,
list
,
4
,
nil
,
nil
,
false
)
end
end
end
end
end
end
for
i
=
1
,
2
do
for
i
=
1
,
2
do
for
p
=
0
,
1
do
for
p
=
0
,
1
do
Auxiliary
.
SinglePick
(
p
,
extra
,
4
)
Auxiliary
.
SinglePick
(
p
,
extra
,
4
,
nil
,
nil
,
false
)
end
end
end
end
Auxiliary
.
SaveDeck
()
Auxiliary
.
SaveDeck
()
...
...
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