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
078585a4
Commit
078585a4
authored
Mar 09, 2019
by
Wind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Auxiliary.ArbitraryPick
parent
77899b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
42 deletions
+37
-42
2pick/pick.lua
2pick/pick.lua
+37
-42
No files found.
2pick/pick.lua
View file @
078585a4
...
@@ -190,34 +190,22 @@ function Auxiliary.SinglePick(p,list,count,ex_list,ex_count,copy,lv_diff,fixed,p
...
@@ -190,34 +190,22 @@ function Auxiliary.SinglePick(p,list,count,ex_list,ex_count,copy,lv_diff,fixed,p
Duel
.
SendtoDeck
(
g3
,
nil
,
0
,
REASON_RULE
)
Duel
.
SendtoDeck
(
g3
,
nil
,
0
,
REASON_RULE
)
end
end
end
end
function
Auxiliary
.
ArbitraryPick
(
p
,
count
,
list
,
list_count
,
ex_list
,
ex
_count
,
copy
,
lv_diff
,
fixed
)
function
Auxiliary
.
ArbitraryPick
(
p
,
count
,
pick_lists
,
lists
_count
,
copy
,
lv_diff
,
fixed
)
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
if
not
Duel
.
IsPlayerNeedToPickDeck
(
p
)
then
return
end
local
ag
=
Group
.
CreateGroup
()
local
ag
=
Group
.
CreateGroup
()
local
pg
=
Group
.
CreateGroup
()
local
eg
=
Group
.
CreateGroup
()
local
eg
=
Group
.
CreateGroup
()
local
plist
=
list
[
p
]
for
index
,
list
in
pairs
(
pick_lists
)
do
local
pick_count
=
0
local
plist
=
list
[
p
]
while
pick_count
<
list_count
do
local
pg
=
Group
.
CreateGroup
()
local
code
=
plist
[
math.random
(
#
plist
)]
local
pick_count
=
lists_count
[
index
]
local
lv
=
Duel
.
ReadCard
(
code
,
CARDDATA_LEVEL
)
while
pick_count
>
0
do
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
and
not
(
lv_diff
and
pg
:
IsExists
(
Card
.
IsLevel
,
1
,
nil
,
lv
))
then
local
code
=
plist
[
math.random
(
#
plist
)]
local
card
=
Duel
.
CreateToken
(
p
,
code
)
ag
:
AddCard
(
card
)
pg
:
AddCard
(
card
)
pick_count
=
pick_count
+
1
end
end
if
ex_list
and
ex_count
then
local
ex_plist
=
ex_list
[
p
]
local
ex_pick_count
=
0
while
ex_pick_count
<
ex_count
do
local
code
=
ex_plist
[
math.random
(
#
ex_plist
)]
local
lv
=
Duel
.
ReadCard
(
code
,
CARDDATA_LEVEL
)
local
lv
=
Duel
.
ReadCard
(
code
,
CARDDATA_LEVEL
)
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
and
not
(
lv_diff
and
e
g
:
IsExists
(
Card
.
IsLevel
,
1
,
nil
,
lv
))
then
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
and
not
(
lv_diff
and
p
g
:
IsExists
(
Card
.
IsLevel
,
1
,
nil
,
lv
))
then
local
card
=
Duel
.
CreateToken
(
p
,
code
)
local
card
=
Duel
.
CreateToken
(
p
,
code
)
ag
:
AddCard
(
card
)
ag
:
AddCard
(
card
)
e
g
:
AddCard
(
card
)
p
g
:
AddCard
(
card
)
ex_pick_count
=
ex_pick_count
+
1
pick_count
=
pick_count
-
1
end
end
end
end
end
end
...
@@ -295,45 +283,52 @@ function Auxiliary.StartPick(e)
...
@@ -295,45 +283,52 @@ function Auxiliary.StartPick(e)
end
end
]]
--
]]
--
for
i
=
1
,
6
do
for
i
=
1
,
6
do
local
list
=
main
local
lists
=
{[
1
]
=
main
}
local
list_count
=
8
local
lists_count
=
{[
1
]
=
8
}
local
ex_list
=
nil
local
ex_count
=
nil
if
i
==
1
or
i
==
2
then
if
i
==
1
or
i
==
2
then
list
=
main_plain
list
s
[
1
]
=
main_plain
list
_count
=
6
list
s_count
[
1
]
=
6
ex_list
=
main_adv
lists
[
2
]
=
main_adv
ex_count
=
2
lists_count
[
2
]
=
2
elseif
i
==
3
then
elseif
i
==
3
then
list
=
main_monster
list
s
[
1
]
=
main_monster
elseif
i
==
4
then
elseif
i
==
4
then
list
=
main_spell
list
s
[
1
]
=
main_spell
elseif
i
==
5
then
elseif
i
==
5
then
list
=
main_trap
list
s
[
1
]
=
main_trap
elseif
i
==
6
then
elseif
i
==
6
then
list
_count
=
6
list
s_count
[
1
]
=
6
ex_list
=
main_new
lists
[
2
]
=
main_new
ex_count
=
2
list_counts
[
2
]
=
2
end
end
for
p
=
0
,
1
do
for
p
=
0
,
1
do
Auxiliary
.
ArbitraryPick
(
p
,
4
,
list
,
list_count
,
ex_list
,
ex
_count
)
Auxiliary
.
ArbitraryPick
(
p
,
4
,
list
s
,
lists
_count
)
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
lists
=
{[
1
]
=
list
}
counts
=
{[
1
]
=
8
}
lv_diff
=
false
if
tp
==
TYPE_XYZ
then
if
tp
==
TYPE_XYZ
then
Auxiliary
.
ArbitraryPick
(
p
,
4
,
xyz_plain
,
6
,
xyz_adv
,
2
)
counts
[
1
]
=
6
lists
[
2
]
=
xyz_adv
counts
[
2
]
=
2
elseif
tp
==
TYPE_SYNCHRO
then
elseif
tp
==
TYPE_SYNCHRO
then
Auxiliary
.
ArbitraryPick
(
p
,
4
,
list
,
4
,
list
,
4
,
false
,
true
)
counts
[
1
]
=
4
else
lists
[
2
]
=
list
Auxiliary
.
ArbitraryPick
(
p
,
4
,
list
,
8
,
nil
,
nil
,
false
,
lv_diff
)
counts
[
2
]
=
4
lv_diff
=
true
end
end
Auxiliary
.
ArbitraryPick
(
p
,
4
,
lists
,
counts
,
false
,
lv_diff
)
end
end
end
end
end
end
for
p
=
0
,
1
do
for
p
=
0
,
1
do
Auxiliary
.
ArbitraryPick
(
p
,
4
,
extra
,
6
,
nil
,
nil
,
false
,
false
,
extra_fixed
)
lists
=
{[
1
]
=
extra
}
counts
=
{[
1
]
=
6
}
Auxiliary
.
ArbitraryPick
(
p
,
4
,
lists
,
counts
,
false
,
false
,
extra_fixed
)
end
end
-- -- XXYYZZ Additional Picks
-- -- XXYYZZ Additional Picks
...
...
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