Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
List
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
REIKAI
ygopro
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
Duel
.
SendtoDeck
(
g3
,
nil
,
0
,
REASON_RULE
)
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
local
ag
=
Group
.
CreateGroup
()
local
pg
=
Group
.
CreateGroup
()
local
eg
=
Group
.
CreateGroup
()
local
plist
=
list
[
p
]
local
pick_count
=
0
while
pick_count
<
list_count
do
local
code
=
plist
[
math.random
(
#
plist
)]
local
lv
=
Duel
.
ReadCard
(
code
,
CARDDATA_LEVEL
)
if
not
ag
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
code
)
and
not
(
lv_diff
and
pg
:
IsExists
(
Card
.
IsLevel
,
1
,
nil
,
lv
))
then
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
)]
for
index
,
list
in
pairs
(
pick_lists
)
do
local
plist
=
list
[
p
]
local
pg
=
Group
.
CreateGroup
()
local
pick_count
=
lists_count
[
index
]
while
pick_count
>
0
do
local
code
=
plist
[
math.random
(
#
plist
)]
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
)
ag
:
AddCard
(
card
)
e
g
:
AddCard
(
card
)
ex_pick_count
=
ex_pick_count
+
1
p
g
:
AddCard
(
card
)
pick_count
=
pick_count
-
1
end
end
end
...
...
@@ -295,45 +283,52 @@ function Auxiliary.StartPick(e)
end
]]
--
for
i
=
1
,
6
do
local
list
=
main
local
list_count
=
8
local
ex_list
=
nil
local
ex_count
=
nil
local
lists
=
{[
1
]
=
main
}
local
lists_count
=
{[
1
]
=
8
}
if
i
==
1
or
i
==
2
then
list
=
main_plain
list
_count
=
6
ex_list
=
main_adv
ex_count
=
2
list
s
[
1
]
=
main_plain
list
s_count
[
1
]
=
6
lists
[
2
]
=
main_adv
lists_count
[
2
]
=
2
elseif
i
==
3
then
list
=
main_monster
list
s
[
1
]
=
main_monster
elseif
i
==
4
then
list
=
main_spell
list
s
[
1
]
=
main_spell
elseif
i
==
5
then
list
=
main_trap
list
s
[
1
]
=
main_trap
elseif
i
==
6
then
list
_count
=
6
ex_list
=
main_new
ex_count
=
2
list
s_count
[
1
]
=
6
lists
[
2
]
=
main_new
list_counts
[
2
]
=
2
end
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
for
tp
,
list
in
pairs
(
extra_sp
)
do
if
tp
~=
TYPE_FUSION
then
for
p
=
0
,
1
do
lists
=
{[
1
]
=
list
}
counts
=
{[
1
]
=
8
}
lv_diff
=
false
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
Auxiliary
.
ArbitraryPick
(
p
,
4
,
list
,
4
,
list
,
4
,
false
,
true
)
else
Auxiliary
.
ArbitraryPick
(
p
,
4
,
list
,
8
,
nil
,
nil
,
false
,
lv_diff
)
counts
[
1
]
=
4
lists
[
2
]
=
list
counts
[
2
]
=
4
lv_diff
=
true
end
Auxiliary
.
ArbitraryPick
(
p
,
4
,
lists
,
counts
,
false
,
lv_diff
)
end
end
end
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
-- -- 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