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
3e47c6f8
Commit
3e47c6f8
authored
May 18, 2024
by
mercury233
Committed by
mercury233
May 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update temp value format
inited in temp.init_state()
parent
6194667e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
card.cpp
card.cpp
+16
-16
No files found.
card.cpp
View file @
3e47c6f8
...
...
@@ -456,7 +456,7 @@ std::tuple<uint32, uint32> card::get_original_code_rule() const {
uint32
card
::
get_code
()
{
if
(
assume_type
==
ASSUME_CODE
)
return
assume_value
;
if
(
temp
.
code
!=
0xffffffff
)
if
(
temp
.
code
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
code
;
effect_set
effects
;
uint32
code
=
std
::
get
<
0
>
(
get_original_code_rule
());
...
...
@@ -464,7 +464,7 @@ uint32 card::get_code() {
filter_effect
(
EFFECT_CHANGE_CODE
,
&
effects
);
if
(
effects
.
size
())
code
=
effects
.
get_last
()
->
get_value
(
this
);
temp
.
code
=
0xffffffff
;
temp
.
code
=
UINT32_MAX
;
return
code
;
}
// return: the current second card name
...
...
@@ -608,7 +608,7 @@ uint32 card::get_type() {
return
data
.
type
;
if
(
current
.
is_location
(
LOCATION_PZONE
))
return
TYPE_PENDULUM
+
TYPE_SPELL
;
if
(
temp
.
type
!=
0xffffffff
)
if
(
temp
.
type
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
type
;
effect_set
effects
;
int32
type
=
data
.
type
;
...
...
@@ -625,7 +625,7 @@ uint32 card::get_type() {
type
=
effects
[
i
]
->
get_value
(
this
);
temp
.
type
=
type
;
}
temp
.
type
=
0xffffffff
;
temp
.
type
=
UINT32_MAX
;
if
(
data
.
type
&
TYPE_TOKEN
)
type
|=
TYPE_TOKEN
;
return
type
;
...
...
@@ -993,7 +993,7 @@ uint32 card::get_level() {
return
0
;
if
(
assume_type
==
ASSUME_LEVEL
)
return
assume_value
;
if
(
temp
.
level
!=
0xffffffff
)
if
(
temp
.
level
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
level
;
effect_set
effects
;
int32
level
=
data
.
level
;
...
...
@@ -1016,7 +1016,7 @@ uint32 card::get_level() {
level
+=
up
;
if
(
level
<
1
&&
(
get_type
()
&
TYPE_MONSTER
))
level
=
1
;
temp
.
level
=
0xffffffff
;
temp
.
level
=
UINT32_MAX
;
return
level
;
}
uint32
card
::
get_rank
()
{
...
...
@@ -1026,7 +1026,7 @@ uint32 card::get_rank() {
return
assume_value
;
if
(
!
(
current
.
location
&
LOCATION_MZONE
))
return
data
.
level
;
if
(
temp
.
level
!=
0xffffffff
)
if
(
temp
.
level
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
level
;
effect_set
effects
;
int32
rank
=
data
.
level
;
...
...
@@ -1049,7 +1049,7 @@ uint32 card::get_rank() {
rank
+=
up
;
if
(
rank
<
1
&&
(
get_type
()
&
TYPE_MONSTER
))
rank
=
1
;
temp
.
level
=
0xffffffff
;
temp
.
level
=
UINT32_MAX
;
return
rank
;
}
uint32
card
::
get_link
()
{
...
...
@@ -1108,7 +1108,7 @@ uint32 card::get_attribute() {
return
assume_value
;
if
(
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
)
&&
!
is_affected_by_effect
(
EFFECT_PRE_MONSTER
))
return
0
;
if
(
temp
.
attribute
!=
0xffffffff
)
if
(
temp
.
attribute
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
attribute
;
effect_set
effects
;
int32
attribute
=
data
.
attribute
;
...
...
@@ -1128,7 +1128,7 @@ uint32 card::get_attribute() {
attribute
=
effects
[
i
]
->
get_value
(
this
);
temp
.
attribute
=
attribute
;
}
temp
.
attribute
=
0xffffffff
;
temp
.
attribute
=
UINT32_MAX
;
return
attribute
;
}
uint32
card
::
get_fusion_attribute
(
uint8
playerid
)
{
...
...
@@ -1178,7 +1178,7 @@ uint32 card::get_race() {
return
assume_value
;
if
(
!
(
data
.
type
&
TYPE_MONSTER
)
&&
!
(
get_type
()
&
TYPE_MONSTER
)
&&
!
is_affected_by_effect
(
EFFECT_PRE_MONSTER
))
return
0
;
if
(
temp
.
race
!=
0xffffffff
)
if
(
temp
.
race
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
race
;
effect_set
effects
;
int32
race
=
data
.
race
;
...
...
@@ -1198,7 +1198,7 @@ uint32 card::get_race() {
race
=
effects
[
i
]
->
get_value
(
this
);
temp
.
race
=
race
;
}
temp
.
race
=
0xffffffff
;
temp
.
race
=
UINT32_MAX
;
return
race
;
}
uint32
card
::
get_link_race
(
uint8
playerid
)
{
...
...
@@ -1234,7 +1234,7 @@ uint32 card::get_grave_race(uint8 playerid) {
uint32
card
::
get_lscale
()
{
if
(
!
current
.
is_location
(
LOCATION_PZONE
))
return
data
.
lscale
;
if
(
temp
.
lscale
!=
0xffffffff
)
if
(
temp
.
lscale
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
lscale
;
effect_set
effects
;
int32
lscale
=
data
.
lscale
;
...
...
@@ -1257,13 +1257,13 @@ uint32 card::get_lscale() {
lscale
+=
up
+
upc
;
if
(
lscale
<
0
&&
current
.
pzone
)
lscale
=
0
;
temp
.
lscale
=
0xffffffff
;
temp
.
lscale
=
UINT32_MAX
;
return
lscale
;
}
uint32
card
::
get_rscale
()
{
if
(
!
current
.
is_location
(
LOCATION_PZONE
))
return
data
.
rscale
;
if
(
temp
.
rscale
!=
0xffffffff
)
if
(
temp
.
rscale
!=
UINT32_MAX
)
// prevent recursion, return the former value
return
temp
.
rscale
;
effect_set
effects
;
int32
rscale
=
data
.
rscale
;
...
...
@@ -1286,7 +1286,7 @@ uint32 card::get_rscale() {
rscale
+=
up
+
upc
;
if
(
rscale
<
0
&&
current
.
pzone
)
rscale
=
0
;
temp
.
rscale
=
0xffffffff
;
temp
.
rscale
=
UINT32_MAX
;
return
rscale
;
}
uint32
card
::
get_link_marker
()
{
...
...
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