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
9a2d6fd0
Commit
9a2d6fd0
authored
Dec 25, 2024
by
Nanahira
Committed by
GitHub
Dec 25, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29 from mycard/develop-8888
Develop 8888
parents
e6856201
461e6fe5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
22 deletions
+18
-22
.github/workflows/build.yml
.github/workflows/build.yml
+6
-7
.gitignore
.gitignore
+5
-3
ocgapi.cpp
ocgapi.cpp
+5
-6
operations.cpp
operations.cpp
+2
-6
No files found.
.github/workflows/build.yml
View file @
9a2d6fd0
...
@@ -18,17 +18,16 @@ jobs:
...
@@ -18,17 +18,16 @@ jobs:
-
name
:
Install lua
-
name
:
Install lua
run
:
|
run
:
|
bash -c "curl -
-retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://www.lua.org/ftp/lua-5.4.7.tar.gz
; exit 0"
bash -c "curl -
Z --retry 5 --connect-timeout 30 --location --create-dirs --output-dir temp --remote-name-all https://www.lua.org/ftp/lua-5.4.7.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip
; exit 0"
tar
xzf
lua-5.4.7.tar.gz
tar
-xzf temp/
lua-5.4.7.tar.gz
move lua-5.4.7 lua
move lua-5.4.7 lua
-
name
:
Premake
-
name
:
Premake
run
:
|
run
:
|
bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip ; exit 0"
7z x temp/premake-5.0.0-beta2-windows.zip -opremake-5
7z x premake-5.0.0-beta2-windows.zip
move premake/lua.lua lua/premake5.lua
move premake\lua.lua lua\premake5.lua
move premake/dll.lua dll.lua
move premake\dll.lua dll.lua
./premake-5/premake5.exe vs2022 --file=dll.lua
.\premake5.exe vs2022 --file=dll.lua
-
name
:
Add msbuild to PATH
-
name
:
Add msbuild to PATH
uses
:
microsoft/setup-msbuild@v2
uses
:
microsoft/setup-msbuild@v2
...
...
.gitignore
View file @
9a2d6fd0
.vscode/
/.vscode/
/build/
/lua/
/temp/
/premake-5/
/premake5.exe
/premake5.exe
/build
/lua
ocgapi.cpp
View file @
9a2d6fd0
...
@@ -201,7 +201,7 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8
...
@@ -201,7 +201,7 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8
}
}
/**
/**
* @brief Get card information.
* @brief Get card information.
* @param buf
u
int32_t array
* @param buf int32_t array
* @return buffer length in bytes
* @return buffer length in bytes
*/
*/
extern
"C"
DECL_DLLEXPORT
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
)
{
extern
"C"
DECL_DLLEXPORT
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
)
{
...
@@ -210,7 +210,7 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
...
@@ -210,7 +210,7 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
duel
*
ptduel
=
(
duel
*
)
pduel
;
duel
*
ptduel
=
(
duel
*
)
pduel
;
card
*
pcard
=
nullptr
;
card
*
pcard
=
nullptr
;
location
&=
0x7f
;
location
&=
0x7f
;
if
(
location
&
LOCATION_ONFIELD
)
if
(
location
==
LOCATION_MZONE
||
location
==
LOCATION_SZONE
)
pcard
=
ptduel
->
game_field
->
get_field_card
(
playerid
,
location
,
sequence
);
pcard
=
ptduel
->
game_field
->
get_field_card
(
playerid
,
location
,
sequence
);
else
{
else
{
card_vector
*
lst
=
nullptr
;
card_vector
*
lst
=
nullptr
;
...
@@ -226,10 +226,9 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
...
@@ -226,10 +226,9 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_main
;
lst
=
&
ptduel
->
game_field
->
player
[
playerid
].
list_main
;
else
else
return
LEN_FAIL
;
return
LEN_FAIL
;
if
(
sequence
>=
(
int32_t
)
lst
->
size
())
if
(
sequence
>=
(
int32_t
)
lst
->
size
())
pcard
=
nullptr
;
return
LEN_FAIL
;
else
pcard
=
(
*
lst
)[
sequence
];
pcard
=
(
*
lst
)[
sequence
];
}
}
if
(
pcard
)
{
if
(
pcard
)
{
return
pcard
->
get_infos
(
buf
,
query_flag
,
use_cache
);
return
pcard
->
get_infos
(
buf
,
query_flag
,
use_cache
);
...
...
operations.cpp
View file @
9a2d6fd0
...
@@ -4327,10 +4327,8 @@ int32_t field::send_to(uint16_t step, group * targets, effect * reason_effect, u
...
@@ -4327,10 +4327,8 @@ int32_t field::send_to(uint16_t step, group * targets, effect * reason_effect, u
if
(
nloc
==
LOCATION_GRAVE
)
if
(
nloc
==
LOCATION_GRAVE
)
pcard
->
reset
(
RESET_TOGRAVE
,
RESET_EVENT
);
pcard
->
reset
(
RESET_TOGRAVE
,
RESET_EVENT
);
if
(
nloc
==
LOCATION_REMOVED
||
((
pcard
->
data
.
type
&
TYPE_TOKEN
)
&&
pcard
->
sendto_param
.
location
==
LOCATION_REMOVED
))
{
if
(
nloc
==
LOCATION_REMOVED
||
((
pcard
->
data
.
type
&
TYPE_TOKEN
)
&&
pcard
->
sendto_param
.
location
==
LOCATION_REMOVED
))
{
if
(
pcard
->
current
.
reason
&
REASON_TEMPORARY
)
{
if
(
pcard
->
current
.
reason
&
REASON_TEMPORARY
)
pcard
->
reset
(
RESET_TEMP_REMOVE
,
RESET_EVENT
);
pcard
->
reset
(
RESET_TEMP_REMOVE
,
RESET_EVENT
);
pcard
->
set_status
(
STATUS_CANNOT_CHANGE_FORM
,
FALSE
);
}
else
else
pcard
->
reset
(
RESET_REMOVE
,
RESET_EVENT
);
pcard
->
reset
(
RESET_REMOVE
,
RESET_EVENT
);
}
}
...
@@ -4711,10 +4709,8 @@ int32_t field::move_to_field(uint16_t step, card* target, uint32_t enable, uint3
...
@@ -4711,10 +4709,8 @@ int32_t field::move_to_field(uint16_t step, card* target, uint32_t enable, uint3
target
->
clear_relate_effect
();
target
->
clear_relate_effect
();
if
(
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
)
{
if
(
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
)
{
target
->
current
.
reason
&=
~
REASON_TEMPORARY
;
target
->
current
.
reason
&=
~
REASON_TEMPORARY
;
target
->
set_status
(
STATUS_CANNOT_CHANGE_FORM
,
FALSE
);
}
}
if
(
ret
==
0
&&
location
!=
target
->
current
.
location
if
(
ret
==
0
&&
location
!=
target
->
current
.
location
||
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
)
{
||
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
&&
target
->
turnid
!=
infos
.
turn_id
)
{
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_SPSUMMON_TURN
,
FALSE
);
target
->
set_status
(
STATUS_SPSUMMON_TURN
,
FALSE
);
...
...
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