Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
7163cff5
Commit
7163cff5
authored
Nov 10, 2025
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-sort-deck' of
https://github.com/Fluorohydride/ygopro-core
into 888
parents
8dc2821c
8f0f2f90
Pipeline
#41565
passed with stages
in 2 minutes and 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
17 deletions
+18
-17
libduel.cpp
libduel.cpp
+6
-6
libgroup.cpp
libgroup.cpp
+9
-8
processor.cpp
processor.cpp
+3
-3
No files found.
libduel.cpp
View file @
7163cff5
...
...
@@ -1465,14 +1465,14 @@ int32_t scriptlib::duel_confirm_cards(lua_State *L) {
int32_t
scriptlib
::
duel_sort_decktop
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
3
);
uint32_t
sort_player
=
(
u
int32_t
)
lua_tointeger
(
L
,
1
);
uint32_t
target_player
=
(
u
int32_t
)
lua_tointeger
(
L
,
2
);
uint32_t
count
=
(
u
int32_t
)
lua_tointeger
(
L
,
3
);
if
(
sort_player
!=
0
&&
sort_player
!=
1
)
int32_t
sort_player
=
(
int32_t
)
lua_tointeger
(
L
,
1
);
int32_t
target_player
=
(
int32_t
)
lua_tointeger
(
L
,
2
);
int32_t
count
=
(
int32_t
)
lua_tointeger
(
L
,
3
);
if
(
!
check_playerid
(
sort_player
)
)
return
0
;
if
(
target_player
!=
0
&&
target_player
!=
1
)
if
(
!
check_playerid
(
target_player
)
)
return
0
;
if
(
count
<
1
||
count
>
16
)
if
(
count
<
1
)
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
game_field
->
add_process
(
PROCESSOR_SORT_DECK
,
0
,
0
,
0
,
sort_player
+
(
target_player
<<
16
),
count
);
...
...
libgroup.cpp
View file @
7163cff5
...
...
@@ -368,12 +368,12 @@ int32_t scriptlib::group_random_select(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
int32_t
playerid
=
(
int32_t
)
lua_tointeger
(
L
,
2
);
uint32_t
count
=
(
u
int32_t
)
lua_tointeger
(
L
,
3
);
int32_t
count
=
(
int32_t
)
lua_tointeger
(
L
,
3
);
int32_t
no_hint
=
lua_toboolean
(
L
,
4
);
duel
*
pduel
=
pgroup
->
pduel
;
group
*
newgroup
=
pduel
->
new_group
();
if
(
count
>
pgroup
->
container
.
size
())
count
=
(
u
int32_t
)
pgroup
->
container
.
size
();
if
(
count
>
(
int32_t
)
pgroup
->
container
.
size
())
count
=
(
int32_t
)
pgroup
->
container
.
size
();
if
(
count
==
0
)
{
interpreter
::
group2value
(
L
,
newgroup
);
return
1
;
...
...
@@ -381,12 +381,13 @@ int32_t scriptlib::group_random_select(lua_State *L) {
if
(
count
==
pgroup
->
container
.
size
())
newgroup
->
container
=
pgroup
->
container
;
else
{
while
(
newgroup
->
container
.
size
()
<
count
)
{
int32_t
i
=
pduel
->
get_next_integer
(
0
,
(
int32_t
)
pgroup
->
container
.
size
()
-
1
)
;
auto
cit
=
pgroup
->
container
.
begin
();
std
::
advance
(
cit
,
i
);
newgroup
->
container
.
insert
(
*
cit
);
card_vector
cv
(
pgroup
->
container
.
begin
(),
pgroup
->
container
.
end
());
int32_t
back
=
(
int32_t
)
cv
.
size
()
-
1
;
for
(
int32_t
i
=
0
;
i
<
count
;
++
i
)
{
int32_t
r
=
pduel
->
get_next_integer
(
i
,
back
);
std
::
swap
(
cv
[
i
],
cv
[
r
]
);
}
newgroup
->
container
.
insert
(
cv
.
begin
(),
cv
.
begin
()
+
count
);
}
if
(
no_hint
)
{
interpreter
::
group2value
(
L
,
newgroup
);
...
...
processor.cpp
View file @
7163cff5
...
...
@@ -675,15 +675,15 @@ uint32_t field::process() {
++
it
->
step
;
}
else
{
if
(
returns
.
bvalue
[
0
]
!=
0xff
)
{
card
*
tc
[
1
6
];
card
*
tc
[
25
6
];
for
(
i
=
0
;
i
<
count
;
++
i
)
player
[
target_player
].
list_main
.
pop_back
();
for
(
i
=
0
;
i
<
count
;
++
i
)
tc
[
returns
.
bvalue
[
i
]]
=
core
.
select_cards
[
i
];
for
(
i
=
0
;
i
<
count
;
++
i
)
{
player
[
target_player
].
list_main
.
push_back
(
tc
[
count
-
i
-
1
]);
tc
[
count
-
i
-
1
]
->
current
.
sequence
=
(
uint8_t
)
player
[
target_player
].
list_main
.
size
()
-
1
;
player
[
target_player
].
list_main
.
push_back
(
tc
[
count
-
1
-
i
]);
}
reset_sequence
(
target_player
,
LOCATION_DECK
);
auto
clit
=
player
[
target_player
].
list_main
.
rbegin
();
for
(
i
=
0
;
i
<
count
;
++
i
,
++
clit
)
{
card
*
pcard
=
*
clit
;
...
...
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