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
d611c960
Commit
d611c960
authored
Feb 04, 2026
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch '233/patch-synchro-1' into develop
parents
29aa6bbe
6989d65c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
55 deletions
+43
-55
field.cpp
field.cpp
+34
-38
field.h
field.h
+1
-0
ocgapi.cpp
ocgapi.cpp
+6
-15
ocgapi.h
ocgapi.h
+1
-1
operations.cpp
operations.cpp
+1
-1
No files found.
field.cpp
View file @
d611c960
...
...
@@ -498,13 +498,44 @@ int32_t field::get_pzone_sequence(uint8_t pseq) const {
return
7
;
}
}
const
card_vector
*
field
::
get_field_vector
(
uint8_t
playerid
,
uint8_t
location
)
const
{
if
(
!
check_playerid
(
playerid
))
return
nullptr
;
switch
(
location
)
{
case
LOCATION_MZONE
:
return
&
player
[
playerid
].
list_mzone
;
case
LOCATION_SZONE
:
return
&
player
[
playerid
].
list_szone
;
case
LOCATION_DECK
:
return
&
player
[
playerid
].
list_main
;
case
LOCATION_HAND
:
return
&
player
[
playerid
].
list_hand
;
case
LOCATION_GRAVE
:
return
&
player
[
playerid
].
list_grave
;
case
LOCATION_REMOVED
:
return
&
player
[
playerid
].
list_remove
;
case
LOCATION_EXTRA
:
return
&
player
[
playerid
].
list_extra
;
default:
return
nullptr
;
}
}
card
*
field
::
get_field_card
(
uint8_t
playerid
,
uint32_t
general_location
,
uint8_t
sequence
)
const
{
if
(
!
check_playerid
(
playerid
))
return
nullptr
;
switch
(
general_location
)
{
case
LOCATION_MZONE
:
{
if
(
sequence
<
(
int32_t
)
player
[
playerid
].
list_mzone
.
size
())
return
player
[
playerid
].
list_mzone
[
sequence
];
case
LOCATION_MZONE
:
case
LOCATION_DECK
:
case
LOCATION_HAND
:
case
LOCATION_GRAVE
:
case
LOCATION_REMOVED
:
case
LOCATION_EXTRA
:
{
auto
ptr
=
get_field_vector
(
playerid
,
general_location
);
if
(
!
ptr
)
return
nullptr
;
auto
&
container
=
*
ptr
;
if
(
sequence
<
container
.
size
())
return
container
[
sequence
];
else
return
nullptr
;
break
;
...
...
@@ -531,41 +562,6 @@ card* field::get_field_card(uint8_t playerid, uint32_t general_location, uint8_t
return
nullptr
;
break
;
}
case
LOCATION_DECK
:
{
if
(
sequence
<
player
[
playerid
].
list_main
.
size
())
return
player
[
playerid
].
list_main
[
sequence
];
else
return
nullptr
;
break
;
}
case
LOCATION_HAND
:
{
if
(
sequence
<
player
[
playerid
].
list_hand
.
size
())
return
player
[
playerid
].
list_hand
[
sequence
];
else
return
nullptr
;
break
;
}
case
LOCATION_GRAVE
:
{
if
(
sequence
<
player
[
playerid
].
list_grave
.
size
())
return
player
[
playerid
].
list_grave
[
sequence
];
else
return
nullptr
;
break
;
}
case
LOCATION_REMOVED
:
{
if
(
sequence
<
player
[
playerid
].
list_remove
.
size
())
return
player
[
playerid
].
list_remove
[
sequence
];
else
return
nullptr
;
break
;
}
case
LOCATION_EXTRA
:
{
if
(
sequence
<
player
[
playerid
].
list_extra
.
size
())
return
player
[
playerid
].
list_extra
[
sequence
];
else
return
nullptr
;
break
;
}
}
return
nullptr
;
}
...
...
field.h
View file @
d611c960
...
...
@@ -383,6 +383,7 @@ public:
void
set_control
(
card
*
pcard
,
uint8_t
playerid
,
uint16_t
reset_phase
,
uint8_t
reset_count
);
int32_t
get_pzone_sequence
(
uint8_t
pseq
)
const
;
const
card_vector
*
get_field_vector
(
uint8_t
playerid
,
uint8_t
location
)
const
;
card
*
get_field_card
(
uint8_t
playerid
,
uint32_t
general_location
,
uint8_t
sequence
)
const
;
int32_t
is_location_useable
(
uint8_t
playerid
,
uint32_t
general_location
,
uint8_t
sequence
)
const
;
int32_t
get_useable_count
(
card
*
pcard
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
uplayer
,
uint32_t
reason
,
uint32_t
zone
=
0xff
,
uint32_t
*
list
=
nullptr
);
...
...
ocgapi.cpp
View file @
d611c960
...
...
@@ -204,7 +204,7 @@ OCGCORE_API void new_tag_card(intptr_t pduel, uint32_t code, uint8_t owner, uint
* @param buf int32_t array
* @return buffer length in bytes
*/
OCGCORE_API
int32_t
query_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
int32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
)
{
OCGCORE_API
int32_t
query_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
u
int32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
)
{
if
(
!
check_playerid
(
playerid
))
return
LEN_FAIL
;
duel
*
ptduel
=
(
duel
*
)
pduel
;
...
...
@@ -213,22 +213,13 @@ OCGCORE_API int32_t query_card(intptr_t pduel, uint8_t playerid, uint8_t locatio
if
(
location
==
LOCATION_MZONE
||
location
==
LOCATION_SZONE
)
pcard
=
ptduel
->
game_field
->
get_field_card
(
playerid
,
location
,
sequence
);
else
{
card_vector
*
lst
=
nullptr
;
if
(
location
==
LOCATION_HAND
)
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_hand
;
else
if
(
location
==
LOCATION_GRAVE
)
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_grave
;
else
if
(
location
==
LOCATION_REMOVED
)
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_remove
;
else
if
(
location
==
LOCATION_EXTRA
)
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_extra
;
else
if
(
location
==
LOCATION_DECK
)
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_main
;
else
auto
ptr
=
ptduel
->
game_field
->
get_field_vector
(
playerid
,
location
);
if
(
!
ptr
)
return
LEN_FAIL
;
if
(
sequence
>=
(
int32_t
)
lst
->
size
())
auto
&
lst
=
*
ptr
;
if
(
sequence
>=
lst
.
size
())
return
LEN_FAIL
;
pcard
=
(
*
lst
)
[
sequence
];
pcard
=
lst
[
sequence
];
}
if
(
pcard
)
{
return
pcard
->
get_infos
(
buf
,
query_flag
,
use_cache
);
...
...
ocgapi.h
View file @
d611c960
...
...
@@ -53,7 +53,7 @@ OCGCORE_API int32_t get_message(intptr_t pduel, byte* buf);
OCGCORE_API
uint32_t
process
(
intptr_t
pduel
);
OCGCORE_API
void
new_card
(
intptr_t
pduel
,
uint32_t
code
,
uint8_t
owner
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
uint8_t
position
);
OCGCORE_API
void
new_tag_card
(
intptr_t
pduel
,
uint32_t
code
,
uint8_t
owner
,
uint8_t
location
);
OCGCORE_API
int32_t
query_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
int32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
);
OCGCORE_API
int32_t
query_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint8_t
sequence
,
u
int32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
);
OCGCORE_API
int32_t
query_field_count
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
);
OCGCORE_API
int32_t
query_field_card
(
intptr_t
pduel
,
uint8_t
playerid
,
uint8_t
location
,
uint32_t
query_flag
,
byte
*
buf
,
int32_t
use_cache
);
OCGCORE_API
int32_t
query_field_info
(
intptr_t
pduel
,
byte
*
buf
);
...
...
operations.cpp
View file @
d611c960
...
...
@@ -5369,7 +5369,7 @@ int32_t field::select_synchro_material(int16_t step, uint8_t playerid, card* pca
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
if
(
pcheck
)
pcheck
->
get_value
(
smat
);
if
(
min
==
1
)
{
if
(
min
==
1
&&
max
==
1
)
{
group
*
pgroup
=
pduel
->
new_group
();
pgroup
->
container
.
insert
(
tuner
);
pgroup
->
container
.
insert
(
smat
);
...
...
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