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
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
MyCard
ygopro-core
Commits
bdbf19a2
Commit
bdbf19a2
authored
Apr 21, 2020
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_SET_BATTLE_ATTACK and EFFECT_SET_BATTLE_DEFENSE
parent
4b9e6dc0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
card.cpp
card.cpp
+16
-0
card.h
card.h
+2
-0
effect.h
effect.h
+2
-0
processor.cpp
processor.cpp
+3
-3
No files found.
card.cpp
View file @
bdbf19a2
...
@@ -866,6 +866,22 @@ int32 card::get_defense() {
...
@@ -866,6 +866,22 @@ int32 card::get_defense() {
temp
.
defense
=
-
1
;
temp
.
defense
=
-
1
;
return
def
;
return
def
;
}
}
int32
card
::
get_battle_attack
()
{
effect_set
eset
;
filter_effect
(
EFFECT_SET_BATTLE_ATTACK
,
&
eset
);
if
(
eset
.
size
())
return
eset
.
get_last
()
->
get_value
(
this
);
else
return
get_attack
();
}
int32
card
::
get_battle_defense
()
{
effect_set
eset
;
filter_effect
(
EFFECT_SET_BATTLE_DEFENSE
,
&
eset
);
if
(
eset
.
size
())
return
eset
.
get_last
()
->
get_value
(
this
);
else
return
get_defense
();
}
// Level/Attribute/Race is available for:
// Level/Attribute/Race is available for:
// 1. cards with original type TYPE_MONSTER or
// 1. cards with original type TYPE_MONSTER or
// 2. cards with current type TYPE_MONSTER or
// 2. cards with current type TYPE_MONSTER or
...
...
card.h
View file @
bdbf19a2
...
@@ -210,6 +210,8 @@ public:
...
@@ -210,6 +210,8 @@ public:
int32
get_attack
();
int32
get_attack
();
int32
get_base_defense
();
int32
get_base_defense
();
int32
get_defense
();
int32
get_defense
();
int32
get_battle_attack
();
int32
get_battle_defense
();
uint32
get_level
();
uint32
get_level
();
uint32
get_rank
();
uint32
get_rank
();
uint32
get_link
();
uint32
get_link
();
...
...
effect.h
View file @
bdbf19a2
...
@@ -448,6 +448,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -448,6 +448,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_QP_ACT_IN_SET_TURN 359
#define EFFECT_QP_ACT_IN_SET_TURN 359
#define EFFECT_EXTRA_PENDULUM_SUMMON 360
#define EFFECT_EXTRA_PENDULUM_SUMMON 360
#define EFFECT_MATERIAL_LIMIT 361
#define EFFECT_MATERIAL_LIMIT 361
#define EFFECT_SET_BATTLE_ATTACK 362
#define EFFECT_SET_BATTLE_DEFENSE 363
#define EVENT_STARTUP 1000
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
processor.cpp
View file @
bdbf19a2
...
@@ -3288,7 +3288,7 @@ int32 field::process_damage_step(uint16 step, uint32 new_attack) {
...
@@ -3288,7 +3288,7 @@ int32 field::process_damage_step(uint16 step, uint32 new_attack) {
return
TRUE
;
return
TRUE
;
}
}
void
field
::
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
)
{
void
field
::
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
)
{
uint32
aa
=
core
.
attacker
->
get_
attack
(),
ad
=
core
.
attacker
->
get
_defense
();
uint32
aa
=
core
.
attacker
->
get_
battle_attack
(),
ad
=
core
.
attacker
->
get_battle
_defense
();
uint32
da
=
0
,
dd
=
0
,
a
=
aa
,
d
;
uint32
da
=
0
,
dd
=
0
,
a
=
aa
,
d
;
uint8
pa
=
core
.
attacker
->
current
.
controler
,
pd
;
uint8
pa
=
core
.
attacker
->
current
.
controler
,
pd
;
uint8
damp
=
0
;
uint8
damp
=
0
;
...
@@ -3303,8 +3303,8 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
...
@@ -3303,8 +3303,8 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
a
=
ad
;
a
=
ad
;
}
}
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
)
{
da
=
core
.
attack_target
->
get_attack
();
da
=
core
.
attack_target
->
get_
battle_
attack
();
dd
=
core
.
attack_target
->
get_defense
();
dd
=
core
.
attack_target
->
get_
battle_
defense
();
pd
=
core
.
attack_target
->
current
.
controler
;
pd
=
core
.
attack_target
->
current
.
controler
;
if
(
core
.
attack_target
->
is_position
(
POS_ATTACK
))
{
if
(
core
.
attack_target
->
is_position
(
POS_ATTACK
))
{
d
=
da
;
d
=
da
;
...
...
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