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
a8246428
Commit
a8246428
authored
Dec 15, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2pick' of
https://github.com/purerosefallen/ygopro-7210srv
into 2pick
parents
027bf102
1d3a7c50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
expansions/pick.lua
expansions/pick.lua
+11
-9
No files found.
expansions/pick.lua
View file @
a8246428
...
...
@@ -46,7 +46,7 @@ function Auxiliary.LoadDB()
local
cat
=
tonumber
(
line
:
sub
(
col
+
1
,
#
line
))
if
(
cat
&
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
>
0
then
table.insert
(
extra
,
code
)
elseif
(
cat
&
TYPE_TOKEN
)
==
0
then
elseif
(
cat
&
TYPE_TOKEN
)
==
0
and
cat
~=
TYPE_MONSTER
+
TYPE_NORMAL
then
table.insert
(
main
,
code
)
if
forbidden_check
[
code
]
then
table.insert
(
forbidden
,
code
)
...
...
@@ -66,25 +66,22 @@ function Auxiliary.SinglePick(p,list,count)
local
code
=
list
[
math.random
(
#
list
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_RULE
)
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_RULE
)
end
local
sg
=
g1
:
Clone
()
sg
:
Merge
(
g2
)
--Duel.ConfirmCards(p,sg)
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
sc
=
sg
:
Select
(
p
,
1
,
1
,
nil
):
GetFirst
()
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
Duel
.
SendtoDeck
(
tg
,
p
,
0
,
REASON_RULE
)
--
Duel.SendtoDeck(tg,p,0,REASON_RULE)
Duel
.
Exile
(
rg
,
REASON_RULE
)
end
function
Auxiliary
.
StartPick
(
e
)
math.randomseed
(
os.time
())
local
g
=
Duel
.
GetFieldGroup
(
0
,
LOCATION_HAND
|
LOCATION_DECK
|
LOCATION_EXTRA
,
LOCATION_HAND
|
LOCATION_DECK
|
LOCATION_EXTRA
)
Duel
.
Exile
(
g
,
REASON_RULE
)
for
i
=
1
,
5
do
for
p
=
0
,
1
do
Auxiliary
.
SinglePick
(
p
,
extra
,
4
)
end
end
for
i
=
1
,
11
do
local
list
=
main
local
count
=
4
...
...
@@ -101,6 +98,11 @@ function Auxiliary.StartPick(e)
Auxiliary
.
SinglePick
(
p
,
list
,
count
)
end
end
for
i
=
1
,
5
do
for
p
=
0
,
1
do
Auxiliary
.
SinglePick
(
p
,
extra
,
4
)
end
end
Duel
.
ShuffleDeck
(
0
)
Duel
.
ShuffleDeck
(
1
)
Duel
.
Draw
(
0
,
5
,
REASON_RULE
)
...
...
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