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
8aa09e47
Commit
8aa09e47
authored
Dec 25, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
7ee2d3d1
fd9fc404
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
effect.h
effect.h
+2
-0
libdebug.cpp
libdebug.cpp
+2
-0
processor.cpp
processor.cpp
+24
-0
No files found.
effect.h
View file @
8aa09e47
...
@@ -518,4 +518,6 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
...
@@ -518,4 +518,6 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EVENT_REMOVE_COUNTER 0x20000
#define EVENT_REMOVE_COUNTER 0x20000
#define EVENT_CUSTOM 0x10000000
#define EVENT_CUSTOM 0x10000000
#define DOUBLE_DAMAGE 0x80000000
#define HALF_DAMAGE 0x80000001
#endif
/* EFFECT_H_ */
#endif
/* EFFECT_H_ */
libdebug.cpp
View file @
8aa09e47
...
@@ -39,6 +39,8 @@ int32 scriptlib::debug_add_card(lua_State *L) {
...
@@ -39,6 +39,8 @@ int32 scriptlib::debug_add_card(lua_State *L) {
if
(
pduel
->
game_field
->
is_location_useable
(
playerid
,
location
,
sequence
))
{
if
(
pduel
->
game_field
->
is_location_useable
(
playerid
,
location
,
sequence
))
{
card
*
pcard
=
pduel
->
new_card
(
code
);
card
*
pcard
=
pduel
->
new_card
(
code
);
pcard
->
owner
=
owner
;
pcard
->
owner
=
owner
;
if
(
location
==
LOCATION_EXTRA
&&
position
==
0
)
position
=
POS_FACEDOWN_DEFENSE
;
pcard
->
sendto_param
.
position
=
position
;
pcard
->
sendto_param
.
position
=
position
;
if
(
location
==
LOCATION_PZONE
)
{
if
(
location
==
LOCATION_PZONE
)
{
int32
seq
=
pduel
->
game_field
->
core
.
duel_rule
>=
4
?
sequence
*
4
:
sequence
+
6
;
int32
seq
=
pduel
->
game_field
->
core
.
duel_rule
>=
4
?
sequence
*
4
:
sequence
+
6
;
...
...
processor.cpp
View file @
8aa09e47
...
@@ -3357,6 +3357,30 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
...
@@ -3357,6 +3357,30 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
if(dp[1 - pd] && !core.attacker->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attack_target)
if(dp[1 - pd] && !core.attacker->is_affected_by_effect(EFFECT_AVOID_BATTLE_DAMAGE, core.attack_target)
&& !is_player_affected_by_effect(1 - pd, EFFECT_AVOID_BATTLE_DAMAGE))
&& !is_player_affected_by_effect(1 - pd, EFFECT_AVOID_BATTLE_DAMAGE))
core.battle_damage[1 - pd] = a - d;
core.battle_damage[1 - pd] = a - d;
bool double_damage = false;
//bool half_damage = false;
for(int32 i = 0; i < eset.size(); ++i) {
if(eset[i]->get_value() == DOUBLE_DAMAGE)
double_damage = true;
//if(eset[i]->get_value() == HALF_DAMAGE)
// half_damage = true;
}
//if(double_damage && half_damage) {
// double_damage = false;
// half_damage = false;
//}
if(double_damage) {
if(dp[0])
core.battle_damage[0] *= 2;
if(dp[1])
core.battle_damage[1] *= 2;
}
//if(half_damage) {
// if(dp[0])
// core.battle_damage[0] /= 2;
// if(dp[1])
// core.battle_damage[1] /= 2;
//}
reason_card = core.attacker;
reason_card = core.attacker;
}
}
bd[1] = TRUE;
bd[1] = TRUE;
...
...
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