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
619941aa
Commit
619941aa
authored
Mar 04, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core into develop
parents
2f611ad8
88a9a6ca
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
16 deletions
+25
-16
.github/workflows/build.yml
.github/workflows/build.yml
+11
-3
card.cpp
card.cpp
+4
-4
card.h
card.h
+2
-1
effect.cpp
effect.cpp
+2
-5
effect.h
effect.h
+2
-2
field.cpp
field.cpp
+1
-0
operations.cpp
operations.cpp
+2
-0
premake/dll.lua
premake/dll.lua
+1
-1
No files found.
.github/workflows/build.yml
View file @
619941aa
...
...
@@ -16,16 +16,24 @@ jobs:
with
:
fetch-depth
:
0
-
name
:
Install lua
-
name
:
Download dependencies
run
:
|
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-beta5/premake-5.0.0-beta5-windows.zip \
; exit 0"
-
name
:
Lua
run
:
|
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 temp/lua-5.4.7.tar.gz
move lua-5.4.7 lua
-
name
:
Premake
run
:
|
mkdir premake-5
tar -C premake-5 -xzf temp/premake-5.0.0-beta
2
-windows.zip
tar -C premake-5 -xzf temp/premake-5.0.0-beta
5
-windows.zip
copy premake\lua.lua lua\premake5.lua
copy premake\dll.lua dll.lua
.\premake-5\premake5.exe vs2022 --file=dll.lua
...
...
card.cpp
View file @
619941aa
...
...
@@ -1072,9 +1072,9 @@ uint32_t card::get_mat_level_from_effect(card* pcard, uint32_t effect_code) {
return
0
;
effect_set
eset
;
filter_effect
(
effect_code
,
&
eset
);
for
(
int32_t
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
uint32_t
lev
=
eset
[
i
]
->
get_value
(
pcard
);
if
(
lev
)
for
(
auto
&
peffect
:
eset
)
{
uint32_t
lev
=
peffect
->
get_value
(
pcard
);
if
(
lev
)
return
lev
;
}
return
0
;
...
...
@@ -1120,7 +1120,7 @@ uint32_t card::check_xyz_level(card* pcard, uint32_t lv) {
return
(
card_lv
&
MAX_XYZ_LEVEL
)
|
((
uint32_t
)
min_count
<<
12
);
return
0
;
}
for
(
auto
&
peffect
:
m
set
)
{
for
(
auto
&
peffect
:
e
set
)
{
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
uint32_t
lev
=
peffect
->
get_value
(
2
);
...
...
card.h
View file @
619941aa
...
...
@@ -178,7 +178,8 @@ public:
uint8_t
attack_controler
{};
uint64_t
cardid
{};
uint32_t
fieldid
{};
uint32_t
fieldid_r
{};
uint32_t
fieldid_r
{};
//real field id, updated when moving to new location
uint32_t
activate_count_id
{};
//updated when moving to new location or flipping
uint16_t
turnid
{};
uint16_t
turn_counter
{};
uint8_t
unique_pos
[
2
]{};
...
...
effect.cpp
View file @
619941aa
...
...
@@ -159,9 +159,6 @@ int32_t effect::is_single_ready() {
int32_t
res
=
pduel
->
lua
->
check_condition
(
condition
,
1
);
return
res
;
}
// reset_count: count of effect reset
// count_limit: left count of activation
// count_limit_max: max count of activation
int32_t
effect
::
check_count_limit
(
uint8_t
playerid
)
{
if
(
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
))
{
if
(
count_limit
==
0
)
...
...
@@ -171,7 +168,7 @@ int32_t effect::check_count_limit(uint8_t playerid) {
uint32_t
limit_type
=
count_code
&
0xf0000000U
;
int32_t
count
=
count_limit_max
;
if
(
limit_code
==
EFFECT_COUNT_CODE_SINGLE
)
{
if
(
pduel
->
game_field
->
get_effect_code
(
limit_type
|
get_handler
()
->
field
id
,
PLAYER_NONE
)
>=
count
)
if
(
pduel
->
game_field
->
get_effect_code
(
limit_type
|
get_handler
()
->
activate_count_
id
,
PLAYER_NONE
)
>=
count
)
return
FALSE
;
}
else
{
if
(
pduel
->
game_field
->
get_effect_code
(
count_code
,
playerid
)
>=
count
)
...
...
@@ -683,7 +680,7 @@ void effect::dec_count(uint8_t playerid) {
uint32_t
limit_code
=
count_code
&
MAX_CARD_ID
;
uint32_t
limit_type
=
count_code
&
0xf0000000
;
if
(
limit_code
==
EFFECT_COUNT_CODE_SINGLE
)
pduel
->
game_field
->
add_effect_code
(
limit_type
|
get_handler
()
->
field
id
,
PLAYER_NONE
);
pduel
->
game_field
->
add_effect_code
(
limit_type
|
get_handler
()
->
activate_count_
id
,
PLAYER_NONE
);
else
pduel
->
game_field
->
add_effect_code
(
count_code
,
playerid
);
}
...
...
effect.h
View file @
619941aa
...
...
@@ -40,8 +40,8 @@ public:
uint16_t
range
{
0
};
uint16_t
s_range
{
0
};
uint16_t
o_range
{
0
};
uint8_t
count_limit
{
0
};
uint8_t
count_limit_max
{
0
};
uint8_t
count_limit
{
0
};
//left count of activation
uint8_t
count_limit_max
{
0
};
//max count of activation
uint16_t
status
{
0
};
int32_t
reset_count
{
0
};
uint32_t
reset_flag
{
0
};
...
...
field.cpp
View file @
619941aa
...
...
@@ -183,6 +183,7 @@ void field::add_card(uint8_t playerid, card* pcard, uint8_t location, uint8_t se
pcard
->
apply_field_effect
();
pcard
->
fieldid
=
infos
.
field_id
++
;
pcard
->
fieldid_r
=
pcard
->
fieldid
;
pcard
->
activate_count_id
=
pcard
->
fieldid
;
if
(
check_unique_onfield
(
pcard
,
pcard
->
current
.
controler
,
pcard
->
current
.
location
))
pcard
->
unique_fieldid
=
UINT_MAX
;
pcard
->
turnid
=
infos
.
turn_id
;
...
...
operations.cpp
View file @
619941aa
...
...
@@ -2030,6 +2030,7 @@ int32_t field::flip_summon(uint16_t step, uint8_t sumplayer, card * target, uint
target
->
summon_player
=
sumplayer
;
target
->
summon_info
|=
SUMMON_TYPE_FLIP
;
target
->
fieldid
=
infos
.
field_id
++
;
target
->
activate_count_id
=
target
->
fieldid
;
core
.
phase_action
=
TRUE
;
pduel
->
write_buffer8
(
MSG_FLIPSUMMONING
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
...
...
@@ -4965,6 +4966,7 @@ int32_t field::change_position(uint16_t step, group * targets, effect * reason_e
core
.
hint_timing
[
pcard
->
current
.
controler
]
|=
TIMING_POS_CHANGE
;
if
((
opos
&
POS_FACEDOWN
)
&&
(
npos
&
POS_FACEUP
))
{
pcard
->
fieldid
=
infos
.
field_id
++
;
pcard
->
activate_count_id
=
pcard
->
fieldid
;
if
(
check_unique_onfield
(
pcard
,
pcard
->
current
.
controler
,
pcard
->
current
.
location
))
pcard
->
unique_fieldid
=
UINT_MAX
;
if
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
{
...
...
premake/dll.lua
View file @
619941aa
...
...
@@ -35,7 +35,7 @@ workspace "ocgcoredll"
startproject
"ocgcore"
filter
{
"configurations:Release"
,
"action:vs*"
}
flags
{
"LinkTimeOptimization"
}
linktimeoptimization
"On"
staticruntime
"On"
disablewarnings
{
"4334"
}
...
...
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