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
2caa3973
Commit
2caa3973
authored
Mar 26, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
a3d4b839
9139d20c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
card.cpp
card.cpp
+3
-2
interpreter.cpp
interpreter.cpp
+4
-0
libduel.cpp
libduel.cpp
+1
-1
ocgapi.cpp
ocgapi.cpp
+3
-1
No files found.
card.cpp
View file @
2caa3973
...
...
@@ -43,9 +43,10 @@ bool card::card_operation_sort(card* c1, card* c2) {
if
(
c1
->
current
.
location
!=
c2
->
current
.
location
)
return
c1
->
current
.
location
<
c2
->
current
.
location
;
if
(
c1
->
current
.
location
&
LOCATION_OVERLAY
)
{
if
(
c1
->
overlay_target
->
current
.
sequence
!=
c2
->
overlay_target
->
current
.
sequence
)
if
(
c1
->
overlay_target
&&
c2
->
overlay_target
&&
c1
->
overlay_target
->
current
.
sequence
!=
c2
->
overlay_target
->
current
.
sequence
)
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
}
else
{
if
(
c1
->
current
.
location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
|
LOCATION_GRAVE
|
LOCATION_REMOVED
))
return
c1
->
current
.
sequence
>
c2
->
current
.
sequence
;
...
...
interpreter.cpp
View file @
2caa3973
...
...
@@ -30,6 +30,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"package"
);
lua_pushnil
(
lua_state
);
lua_setglobal
(
lua_state
,
"debug"
);
lua_pushnil
(
lua_state
);
lua_setglobal
(
lua_state
,
"coroutine"
);
luaL_getsubtable
(
lua_state
,
LUA_REGISTRYINDEX
,
"_LOADED"
);
lua_pushnil
(
lua_state
);
lua_setfield
(
lua_state
,
-
2
,
"io"
);
...
...
@@ -39,6 +41,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setfield
(
lua_state
,
-
2
,
"package"
);
lua_pushnil
(
lua_state
);
lua_setfield
(
lua_state
,
-
2
,
"debug"
);
lua_pushnil
(
lua_state
);
lua_setfield
(
lua_state
,
-
2
,
"coroutine"
);
lua_pop
(
lua_state
,
1
);
//open all libs
scriptlib
::
open_cardlib
(
lua_state
);
...
...
libduel.cpp
View file @
2caa3973
...
...
@@ -1804,7 +1804,7 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
pduel
=
pgroup
->
pduel
;
}
else
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint8
sumplayer
;
uint8
sumplayer
=
PLAYER_NONE
;
if
(
pcard
)
{
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
...
...
ocgapi.cpp
View file @
2caa3973
...
...
@@ -265,7 +265,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
}
}
else
{
field
::
card_vector
*
lst
=
0
;
field
::
card_vector
*
lst
=
nullptr
;
if
(
location
==
LOCATION_HAND
)
lst
=
&
player
.
list_hand
;
else
if
(
location
==
LOCATION_GRAVE
)
...
...
@@ -276,6 +276,8 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
lst
=
&
player
.
list_extra
;
else
if
(
location
==
LOCATION_DECK
)
lst
=
&
player
.
list_main
;
else
return
0
;
for
(
auto
&
pcard
:
*
lst
)
{
uint32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
...
...
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