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
c48f5e5f
Commit
c48f5e5f
authored
Apr 22, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
f7256c2e
bdbf19a2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
5 deletions
+27
-5
card.cpp
card.cpp
+16
-0
card.h
card.h
+2
-0
effect.h
effect.h
+2
-0
operations.cpp
operations.cpp
+4
-2
processor.cpp
processor.cpp
+3
-3
No files found.
card.cpp
View file @
c48f5e5f
...
...
@@ -915,6 +915,22 @@ int32 card::get_defense() {
temp
.
defense
=
-
1
;
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:
// 1. cards with original type TYPE_MONSTER or
// 2. cards with current type TYPE_MONSTER or
...
...
card.h
View file @
c48f5e5f
...
...
@@ -218,6 +218,8 @@ public:
int32
get_attack
();
int32
get_base_defense
();
int32
get_defense
();
int32
get_battle_attack
();
int32
get_battle_defense
();
uint32
get_level
();
uint32
get_rank
();
uint32
get_link
();
...
...
effect.h
View file @
c48f5e5f
...
...
@@ -467,6 +467,8 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_QP_ACT_IN_SET_TURN 359
#define EFFECT_EXTRA_PENDULUM_SUMMON 360
#define EFFECT_MATERIAL_LIMIT 361
#define EFFECT_SET_BATTLE_ATTACK 362
#define EFFECT_SET_BATTLE_DEFENSE 363
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
...
...
operations.cpp
View file @
c48f5e5f
...
...
@@ -29,7 +29,8 @@ int32 field::negate_chain(uint8 chaincount) {
}
pduel
->
write_buffer8
(
MSG_CHAIN_NEGATED
);
pduel
->
write_buffer8
(
chaincount
);
if
(
pchain
.
triggering_location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
))
if
(
pchain
.
triggering_location
==
LOCATION_DECK
||
core
.
duel_rule
>=
5
&&
pchain
.
triggering_location
==
LOCATION_EXTRA
&&
(
pchain
.
triggering_position
&
POS_FACEDOWN
))
pchain
.
triggering_effect
->
handler
->
release_relation
(
pchain
);
return
TRUE
;
}
...
...
@@ -48,7 +49,8 @@ int32 field::disable_chain(uint8 chaincount) {
core
.
current_chain
[
chaincount
-
1
].
disable_player
=
core
.
reason_player
;
pduel
->
write_buffer8
(
MSG_CHAIN_DISABLED
);
pduel
->
write_buffer8
(
chaincount
);
if
(
pchain
.
triggering_location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
))
if
(
pchain
.
triggering_location
==
LOCATION_DECK
||
core
.
duel_rule
>=
5
&&
pchain
.
triggering_location
==
LOCATION_EXTRA
&&
(
pchain
.
triggering_position
&
POS_FACEDOWN
))
pchain
.
triggering_effect
->
handler
->
release_relation
(
pchain
);
return
TRUE
;
}
...
...
processor.cpp
View file @
c48f5e5f
...
...
@@ -3300,7 +3300,7 @@ int32 field::process_damage_step(uint16 step, uint32 new_attack) {
return
TRUE
;
}
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
;
uint8
pa
=
core
.
attacker
->
current
.
controler
,
pd
;
uint8
damp
=
0
;
...
...
@@ -3315,8 +3315,8 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
a
=
ad
;
}
if
(
core
.
attack_target
)
{
da
=
core
.
attack_target
->
get_attack
();
dd
=
core
.
attack_target
->
get_defense
();
da
=
core
.
attack_target
->
get_
battle_
attack
();
dd
=
core
.
attack_target
->
get_
battle_
defense
();
pd
=
core
.
attack_target
->
current
.
controler
;
if
(
core
.
attack_target
->
is_position
(
POS_ATTACK
))
{
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