Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out infra units from hit point calculation #3364

Merged
merged 1 commit into from Apr 11, 2018

Conversation

ron-murhammer
Copy link
Member

@ron-murhammer ron-murhammer commented Apr 11, 2018

Infra units can participate in battles but they have 0 HP and are either captured/destroyed if no other units remain. Fix the HP calculation and display in BC.

Example of HoH where cannon are infra:
image

Copy link
Member

@DanVanAtta DanVanAtta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-io
Copy link

Codecov Report

Merging #3364 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3364      +/-   ##
============================================
+ Coverage     21.95%   21.95%   +<.01%     
- Complexity     5886     5887       +1     
============================================
  Files           832      832              
  Lines         71877    71878       +1     
  Branches      11588    11589       +1     
============================================
+ Hits          15778    15780       +2     
  Misses        54015    54015              
+ Partials       2084     2083       -1
Impacted Files Coverage Δ Complexity Δ
...es/strategy/triplea/delegate/BattleCalculator.java 52.01% <66.66%> (-0.1%) 78 <0> (ø)
.../src/main/java/games/strategy/net/nio/Decoder.java 72.82% <0%> (-1.09%) 24% <0%> (-1%)
.../strategy/triplea/odds/calculator/DummyPlayer.java 36.36% <0%> (+1.13%) 10% <0%> (+1%) ⬆️
...rategy/triplea/attachments/UnitTypeComparator.java 53.84% <0%> (+7.69%) 13% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be21e70...03cfb8c. Read the comment docs.

@DanVanAtta DanVanAtta merged commit 5c51ee6 into master Apr 11, 2018
@DanVanAtta DanVanAtta deleted the Fix_BC_Hit_Points branch April 11, 2018 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants