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
8b659324
Commit
8b659324
authored
Dec 29, 2017
by
wind2009
Committed by
GitHub
Dec 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge
SinglePickForMain
parents
1585c4a0
6e2558fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
2pick/pick.lua
2pick/pick.lua
+32
-4
No files found.
2pick/pick.lua
View file @
8b659324
...
@@ -89,11 +89,39 @@ function Auxiliary.SinglePick(p,list,count)
...
@@ -89,11 +89,39 @@ function Auxiliary.SinglePick(p,list,count)
--Duel.SendtoDeck(tg,p,0,REASON_RULE)
--Duel.SendtoDeck(tg,p,0,REASON_RULE)
Duel
.
Exile
(
rg
,
REASON_RULE
)
Duel
.
Exile
(
rg
,
REASON_RULE
)
end
end
function
Auxiliary
.
SinglePickForMain
(
p
,
list
,
count
)
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
for
_
,
g
in
ipairs
({
g1
,
g2
})
do
for
i
=
1
,
count
do
local
code
=
list
[
math.random
(
#
list
)]
g
:
AddCard
(
Duel
.
CreateToken
(
p
,
code
))
end
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
rg
=
g1
:
IsContains
(
sc
)
and
g2
or
g1
--Duel.SendtoDeck(tg,p,0,REASON_RULE)
Duel
.
Exile
(
rg
,
REASON_RULE
)
local
g3
=
Group
.
CreateGroup
()
for
nc
in
aux
.
Next
(
tg
)
do
local
copy_code
=
nc
:
GetOriginalCode
()
g3
:
AddCard
(
Duel
.
CreateToken
(
p
,
copy_code
))
end
Duel
.
SendtoDeck
(
g3
,
nil
,
0
,
REASON_RULE
)
end
function
Auxiliary
.
StartPick
(
e
)
function
Auxiliary
.
StartPick
(
e
)
math.randomseed
(
os.time
())
math.randomseed
(
os.time
())
local
g
=
Duel
.
GetFieldGroup
(
0
,
LOCATION_HAND
|
LOCATION_DECK
|
LOCATION_EXTRA
,
LOCATION_HAND
|
LOCATION_DECK
|
LOCATION_EXTRA
)
local
g
=
Duel
.
GetFieldGroup
(
0
,
LOCATION_HAND
|
LOCATION_DECK
|
LOCATION_EXTRA
,
LOCATION_HAND
|
LOCATION_DECK
|
LOCATION_EXTRA
)
Duel
.
Exile
(
g
,
REASON_RULE
)
Duel
.
Exile
(
g
,
REASON_RULE
)
for
i
=
1
,
10
do
for
i
=
1
,
5
do
--[[local list=main
--[[local list=main
local count=4
local count=4
if i==9 then
if i==9 then
...
@@ -107,13 +135,13 @@ function Auxiliary.StartPick(e)
...
@@ -107,13 +135,13 @@ function Auxiliary.StartPick(e)
end]]
end]]
local
list
=
main_monster
local
list
=
main_monster
if
i
==
7
or
i
==
8
then
if
i
==
4
then
list
=
main_spell
list
=
main_spell
elseif
i
==
9
or
i
==
10
then
elseif
i
==
5
then
list
=
main_trap
list
=
main_trap
end
end
for
p
=
0
,
1
do
for
p
=
0
,
1
do
Auxiliary
.
SinglePick
(
p
,
list
,
4
)
Auxiliary
.
SinglePick
ForMain
(
p
,
list
,
4
)
--Auxiliary.SinglePick(p,main,4)
--Auxiliary.SinglePick(p,main,4)
end
end
end
end
...
...
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