-
Notifications
You must be signed in to change notification settings - Fork 293
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
Issue 6303: RFE - Ultra Sublevel #6502
Issue 6303: RFE - Ultra Sublevel #6502
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6502 +/- ##
============================================
+ Coverage 28.57% 28.63% +0.06%
- Complexity 14422 14457 +35
============================================
Files 2800 2808 +8
Lines 275290 276237 +947
Branches 48703 48826 +123
============================================
+ Hits 78672 79110 +438
- Misses 191941 192441 +500
- Partials 4677 4686 +9 ☔ View full report in Codecov by Sentry. |
if (entity.getPosition() != null && entity.getGame() != null && entity.getGame().getBoard() != null | ||
&& entity.getGame().getBoard().getHex(entity.getPosition()) != null && | ||
entity.getGame().getBoard().getHex(entity.getPosition()).containsTerrain(Terrains.ULTRA_SUBLEVEL)) { | ||
return; //Don't show wrecks for "Ultra Sublevels" - The unit fell through the map! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glorious!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
// Calc expected damage as ((current damage level [0 ~ 4]) / 4) * | ||
// UNIT_DESTRUCTION_FACTOR | ||
dmg = (unitDamageLevel / 4.0) * UNIT_DESTRUCTION_FACTOR; | ||
logger.trace("Ending hover/VTOL movement over ultra sublevel ({}).", dmg); | ||
return dmg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if current unit damage level is 0 then the dmg it counts is 0, I suggest juts setting return UNIT_DESTRUCTION_FACTOR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if current unit damage level is 0 then the dmg it counts is 0, I suggest juts setting return UNIT_DESTRUCTION_FACTOR
We want unit damage level 0 to indicate that we expect no damage from crossing or stopping on this hex:
0/4 * UNIT_DESTRUCTION_FACTOR = expected hazard damage == 0
1/4 * UNIT_DESTRUCTION_FACTOR = expected hazard damage == UNIT_DESTRUCTION_FACTOR / 4
etc.
The goal is to let Princess drive more aggressively with fresh units, but become more cautious as damage increases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if current unit damage level is 0 then the dmg it counts is 0, I suggest juts setting return UNIT_DESTRUCTION_FACTOR
We want unit damage level 0 to indicate that we expect no damage from crossing or stopping on this hex:
0/4 * UNIT_DESTRUCTION_FACTOR = expected hazard damage == 0 1/4 * UNIT_DESTRUCTION_FACTOR = expected hazard damage == UNIT_DESTRUCTION_FACTOR / 4
etc. The goal is to let Princess drive more aggressively with fresh units, but become more cautious as damage increases.
That's the intent, yeah, this is ripped from the Magma (technically Hazardous Liquid, but that was ripped from Magma) Path Ranker logic. In this specific case it's intended just for VTOLs - a fresh VTOL should feel safe ending its turn over a death hex. But increasingly damaged ones should view it as increasingly dangerous as they get closer to being immobilized and thus risk falling victim to an instant death.
It's why they share the common bug I elude to in a comment in BasicPathRankerTest - VTOLs don't actually consider the ground below them because of some logic at the start of BasicPathRanker::checkPathForHazards - and I'd rather not touch that if I don't have to, that could have other unintended consequences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, I missed the (EntityMovementMode.HOVER == movingUnit.getMovementMode() || EntityMovementMode.WIGE == movingUnit.getMovementMode()) {
at the top
// Calc expected damage as ((current damage level [0 ~ 4]) / 4) * | ||
// UNIT_DESTRUCTION_FACTOR | ||
dmg = (unitDamageLevel / 4.0) * UNIT_DESTRUCTION_FACTOR; | ||
logger.trace("Ending hover/VTOL movement over ultra sublevel ({}).", dmg); | ||
return dmg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, I missed the (EntityMovementMode.HOVER == movingUnit.getMovementMode() || EntityMovementMode.WIGE == movingUnit.getMovementMode()) {
at the top
It would be great to figure out a way to make ultra sublevels be forced to be at an extremely low level, ideally somewhere near There's ultra depth hexes in the upcoming legendary battles maps, which should allow UMU units to submerge to any depth of their choosing, so solving ultra sublevels the "right way" now should make that easier to do later. |
That seemed more invasive than I was going for, but it did cross my mind. If y’all think it’s a good idea I’m down to implement it, either as part of this or an enhancement. |
I think my only worry with that would be switching to isometric view causing ... issues. Not necessarily a blocker, but worth considering. |
Another step towards #6303
It's a really deep hole from Alien Map Packs.
Map Makers, I'd recommend you'd lower the elevation some relative to its surrounding terrain - if a VTOL "lands' on the surface of an ultra sublevel, it'll be destroyed. Lower the surface below the "rim", and it'll let players hover a VTOL over the ultra sublevel, and lower then they can lower the unit's elevation to use it for cover :)