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
7a6a7819
Commit
7a6a7819
authored
Dec 24, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround: change battle damage take min
parent
a4fc4689
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
processor.cpp
processor.cpp
+10
-5
No files found.
processor.cpp
View file @
7a6a7819
...
@@ -3587,21 +3587,26 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
...
@@ -3587,21 +3587,26 @@ void field::calculate_battle_damage(effect** pdamchange, card** preason_card, ui
bool double_dam = false;
bool double_dam = false;
bool half_dam = false;
bool half_dam = false;
int32 dam_value = -1;
int32 dam_value = -1;
int32 current_min = INT32_MAX;
for(int32 i = 0; i < eset.size(); ++i) {
for(int32 i = 0; i < eset.size(); ++i) {
int32 val = -1;
int32 val = -1;
if(!eset[i]->is_flag(EFFECT_FLAG_PLAYER_TARGET)) {
if(!eset[i]->is_flag(EFFECT_FLAG_PLAYER_TARGET)) {
pduel->lua->add_param(p, PARAM_TYPE_INT);
pduel->lua->add_param(p, PARAM_TYPE_INT);
val = eset[i]->get_value(1);
val = eset[i]->get_value(1);
}
else
if
(
eset
[
i
]
->
is_target_player
(
p
))
}
else if (eset[i]->is_target_player(p))
val = eset[i]->get_value();
val = eset[i]->get_value();
if
(
val
==
0
)
{
if
(val == 0) {
dam_value = 0;
dam_value = 0;
break;
break;
}
else
if
(
val
>
0
)
}
else if (val > 0 && val < current_min) {
current_min = val;
dam_value = val;
dam_value = val;
else
if
(
val
==
DOUBLE_DAMAGE
)
}
else if (val == DOUBLE_DAMAGE)
double_dam = true;
double_dam = true;
else
if
(
val
==
HALF_DAMAGE
)
else if
(val == HALF_DAMAGE)
half_dam = true;
half_dam = true;
}
}
if(double_dam && half_dam) {
if(double_dam && half_dam) {
...
...
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