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