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
xiaoye
ygopro-core
Commits
92bb5048
Commit
92bb5048
authored
May 13, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:moecube/ygopro-core
parents
5fe666ff
c5d72671
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
common.h
common.h
+1
-0
duel.cpp
duel.cpp
+3
-0
field.cpp
field.cpp
+10
-4
operations.cpp
operations.cpp
+2
-2
No files found.
common.h
View file @
92bb5048
...
...
@@ -9,6 +9,7 @@
#define COMMON_H_
#include <stdint.h>
#include <assert.h>
typedef
unsigned
long
long
uint64
;
typedef
unsigned
int
uint32
;
typedef
unsigned
short
uint16
;
...
...
duel.cpp
View file @
92bb5048
...
...
@@ -29,6 +29,9 @@ duel::duel() {
game_field
->
rose_card
=
0
;
game_field
->
rose_level
=
0
;
message_buffer
.
reserve
(
SIZE_MESSAGE_BUFFER
);
#ifdef _WIN32
_set_error_mode
(
_OUT_TO_MSGBOX
);
#endif // _WIN32
}
duel
::~
duel
()
{
for
(
auto
&
pcard
:
cards
)
...
...
field.cpp
View file @
92bb5048
...
...
@@ -16,10 +16,15 @@
int32
field
::
field_used_count
[
32
]
=
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
};
bool
chain
::
chain_operation_sort
(
const
chain
&
c1
,
const
chain
&
c2
)
{
if
(
c1
.
triggering_effect
&&
c2
.
triggering_effect
&&
c1
.
triggering_effect
->
id
!=
c2
.
triggering_effect
->
id
)
return
c1
.
triggering_effect
->
id
<
c2
.
triggering_effect
->
id
;
else
return
c1
.
chain_id
<
c2
.
chain_id
;
auto
e1
=
c1
.
triggering_effect
;
auto
e2
=
c2
.
triggering_effect
;
if
(
e1
&&
e2
)
{
if
(
e1
->
handler
==
e2
->
handler
&&
e1
->
description
!=
e2
->
description
)
return
e1
->
description
<
e2
->
description
;
if
(
e1
->
id
!=
e2
->
id
)
return
e1
->
id
<
e2
->
id
;
}
return
c1
.
chain_id
<
c2
.
chain_id
;
}
void
chain
::
set_triggering_state
(
card
*
pcard
)
{
triggering_controler
=
pcard
->
current
.
controler
;
...
...
@@ -1117,6 +1122,7 @@ void field::swap_deck_and_grave(uint8 playerid) {
}
player
[
playerid
].
list_extra
.
insert
(
player
[
playerid
].
list_extra
.
end
()
-
player
[
playerid
].
extra_p_count
,
ex
.
begin
(),
ex
.
end
());
reset_sequence
(
playerid
,
LOCATION_GRAVE
);
reset_sequence
(
playerid
,
LOCATION_DECK
);
reset_sequence
(
playerid
,
LOCATION_EXTRA
);
pduel
->
write_buffer8
(
MSG_SWAP_GRAVE_DECK
);
pduel
->
write_buffer8
(
playerid
);
...
...
operations.cpp
View file @
92bb5048
...
...
@@ -4702,9 +4702,9 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
target
->
reset
(
resetflag
,
RESET_EVENT
);
target
->
clear_card_target
();
}
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
target
->
clear_relate_effect
();
}
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
target
->
clear_relate_effect
();
if
(
ret
==
1
)
target
->
current
.
reason
&=
~
REASON_TEMPORARY
;
if
(
ret
==
0
&&
location
!=
target
->
current
.
location
...
...
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