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
3d1a3700
Commit
3d1a3700
authored
Apr 11, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recover & update EFFECT_FLAG_REPEAT
parent
775b7666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
card.cpp
card.cpp
+13
-3
effect.h
effect.h
+1
-1
No files found.
card.cpp
View file @
3d1a3700
...
@@ -498,7 +498,7 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
...
@@ -498,7 +498,7 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
int32
rev
=
FALSE
;
int32
rev
=
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_REVERSE_UPDATE
))
if
(
is_affected_by_effect
(
EFFECT_REVERSE_UPDATE
))
rev
=
TRUE
;
rev
=
TRUE
;
effect_set
effects_atk
,
effects_def
;
effect_set
effects_atk
,
effects_def
,
effects_atk_r
,
effects_def_r
;
int32
swap_final
=
FALSE
;
int32
swap_final
=
FALSE
;
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
switch
(
eset
[
i
]
->
code
)
{
switch
(
eset
[
i
]
->
code
)
{
...
@@ -518,8 +518,11 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
...
@@ -518,8 +518,11 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
base_atk
=
eset
[
i
]
->
get_value
(
this
);
base_atk
=
eset
[
i
]
->
get_value
(
this
);
up_atk
=
0
;
up_atk
=
0
;
upc_atk
=
0
;
upc_atk
=
0
;
}
else
}
else
{
effects_atk
.
add_item
(
eset
[
i
]);
effects_atk
.
add_item
(
eset
[
i
]);
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_REPEAT
))
effects_atk_r
.
add_item
(
eset
[
i
]);
}
break
;
break
;
case
EFFECT_UPDATE_DEFENCE
:
case
EFFECT_UPDATE_DEFENCE
:
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
...
@@ -537,8 +540,11 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
...
@@ -537,8 +540,11 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
base_def
=
eset
[
i
]
->
get_value
(
this
);
base_def
=
eset
[
i
]
->
get_value
(
this
);
up_def
=
0
;
up_def
=
0
;
upc_def
=
0
;
upc_def
=
0
;
}
else
}
else
{
effects_def
.
add_item
(
eset
[
i
]);
effects_def
.
add_item
(
eset
[
i
]);
if
(
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_REPEAT
))
effects_def_r
.
add_item
(
eset
[
i
]);
}
break
;
break
;
case
EFFECT_SWAP_AD
:
case
EFFECT_SWAP_AD
:
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
{
if
((
eset
[
i
]
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
eset
[
i
]
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
{
...
@@ -575,6 +581,8 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
...
@@ -575,6 +581,8 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
if
(
patk
)
{
if
(
patk
)
{
for
(
int32
i
=
0
;
i
<
effects_atk
.
size
();
++
i
)
for
(
int32
i
=
0
;
i
<
effects_atk
.
size
();
++
i
)
temp
.
attack
=
effects_atk
[
i
]
->
get_value
(
this
);
temp
.
attack
=
effects_atk
[
i
]
->
get_value
(
this
);
for
(
int32
i
=
0
;
i
<
effects_atk_r
.
size
();
++
i
)
temp
.
attack
=
effects_atk_r
[
i
]
->
get_value
(
this
);
int32
atk
=
temp
.
attack
;
int32
atk
=
temp
.
attack
;
if
(
atk
<
0
)
if
(
atk
<
0
)
atk
=
0
;
atk
=
0
;
...
@@ -583,6 +591,8 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
...
@@ -583,6 +591,8 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
if
(
pdef
)
{
if
(
pdef
)
{
for
(
int32
i
=
0
;
i
<
effects_def
.
size
();
++
i
)
for
(
int32
i
=
0
;
i
<
effects_def
.
size
();
++
i
)
temp
.
defence
=
effects_def
[
i
]
->
get_value
(
this
);
temp
.
defence
=
effects_def
[
i
]
->
get_value
(
this
);
for
(
int32
i
=
0
;
i
<
effects_def_r
.
size
();
++
i
)
temp
.
defence
=
effects_def_r
[
i
]
->
get_value
(
this
);
int32
def
=
temp
.
defence
;
int32
def
=
temp
.
defence
;
if
(
def
<
0
)
if
(
def
<
0
)
def
=
0
;
def
=
0
;
...
...
effect.h
View file @
3d1a3700
...
@@ -162,7 +162,7 @@ enum effect_flag : uint32 {
...
@@ -162,7 +162,7 @@ enum effect_flag : uint32 {
EFFECT_FLAG_UNCOPYABLE
=
0x40000
,
EFFECT_FLAG_UNCOPYABLE
=
0x40000
,
EFFECT_FLAG_OATH
=
0x80000
,
EFFECT_FLAG_OATH
=
0x80000
,
EFFECT_FLAG_SPSUM_PARAM
=
0x100000
,
EFFECT_FLAG_SPSUM_PARAM
=
0x100000
,
//
EFFECT_FLAG_REPEAT = 0x200000,
EFFECT_FLAG_REPEAT
=
0x200000
,
EFFECT_FLAG_NO_TURN_RESET
=
0x400000
,
EFFECT_FLAG_NO_TURN_RESET
=
0x400000
,
EFFECT_FLAG_EVENT_PLAYER
=
0x800000
,
EFFECT_FLAG_EVENT_PLAYER
=
0x800000
,
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
,
EFFECT_FLAG_OWNER_RELATE
=
0x1000000
,
...
...
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