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
3640ff59
Commit
3640ff59
authored
Mar 24, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/patch-select-shuffle-deck' into develop
parents
5214ecd2
820d5247
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
card.cpp
card.cpp
+9
-2
No files found.
card.cpp
View file @
3640ff59
...
@@ -104,9 +104,16 @@ bool card::card_operation_sort(card* c1, card* c2) {
...
@@ -104,9 +104,16 @@ bool card::card_operation_sort(card* c1, card* c2) {
else
else
return
true
;
return
true
;
}
}
// if deck reversed and the card being at the top, it should go first
if
(
pduel
->
game_field
->
core
.
deck_reversed
)
{
if
(
c1
->
current
.
sequence
==
pduel
->
game_field
->
player
[
cp1
].
list_main
.
size
()
-
1
)
return
false
;
if
(
c2
->
current
.
sequence
==
pduel
->
game_field
->
player
[
cp2
].
list_main
.
size
()
-
1
)
return
true
;
}
// sort deck as card property
// sort deck as card property
auto
c1_type
=
c1
->
current
.
type
&
0x7
;
auto
c1_type
=
c1
->
data
.
type
&
0x7
;
auto
c2_type
=
c2
->
current
.
type
&
0x7
;
auto
c2_type
=
c2
->
data
.
type
&
0x7
;
// monster should go before spell, and then trap
// monster should go before spell, and then trap
if
(
c1_type
!=
c2_type
)
if
(
c1_type
!=
c2_type
)
return
c1_type
>
c2_type
;
return
c1_type
>
c2_type
;
...
...
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