Skip to content

Conversation

@HammerGS
Copy link
Member

Summary

Adds a "Show Spotting FOV" toggle that visualizes the +1 elevation bonus from Mast Mounts when determining what a VTOL can spot versus what it can directly fire at.

Fixes #7015

Root Cause

The FOV visualization in FovHighlightingAndDarkening.java calculates line-of-sight based solely on the unit's physical position without considering equipment modifiers. Per BattleTech rules, Mast Mount allows a VTOL to spot targets (for C3, TAG, artillery, indirect fire) as if it were one elevation level higher, but this bonus does NOT apply to direct fire attacks.

The existing FOV display only showed what the unit could directly fire at, with no option to visualize the extended
spotting range. This is a missing feature rather than broken logic - the game correctly applies the Mast Mount bonus during actual spotting resolution, but the visual FOV display had no mechanism to show this bonus to the player.

Changes

  • New menu item: View > Show Spotting FOV (keyboard shortcut: O)
  • When enabled, FOV calculations include the +1 elevation bonus from Mast Mount equipment
  • Visual indicators when active: blue tint + reversed stripe direction
  • Automatically resets to OFF at game start to prevent player confusion

  PR Description:

  Summary

  Adds a "Show Spotting FOV" toggle that visualizes the +1 elevation bonus from Mast Mounts when determining what a VTOL
   can spot versus what it can directly fire at.

  Fixes #7015

  Root Cause

  The FOV visualization in FovHighlightingAndDarkening.java calculates line-of-sight based solely on the unit's physical
   position without considering equipment modifiers. Per BattleTech rules, Mast Mount allows a VTOL to spot targets (for
   C3, TAG, artillery, indirect fire) as if it were one elevation level higher, but this bonus does NOT apply to direct
  fire attacks.

  The existing FOV display only showed what the unit could directly fire at, with no option to visualize the extended
  spotting range. This is a missing feature rather than broken logic - the game correctly applies the Mast Mount bonus
  during actual spotting resolution, but the visual FOV display had no mechanism to show this bonus to the player.

  Changes

  - New menu item: View > Show Spotting FOV (keyboard shortcut: O)
  - When enabled, FOV calculations include the +1 elevation bonus from Mast Mount equipment
  - Visual indicators when active: blue tint + reversed stripe direction
  - Automatically resets to OFF at game start to prevent player confusion
Copilot AI review requested due to automatic review settings December 21, 2025 01:05
@HammerGS HammerGS added AI Generated Fix AI-generated fix. Requires human testing and review before merging. Needs Player Testing PR lacks actual play testing. labels Dec 21, 2025
@HammerGS HammerGS requested a review from a team as a code owner December 21, 2025 01:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a new "Show Spotting FOV" visualization mode that displays the extended line-of-sight range available when VTOLs use Mast Mount equipment for spotting (C3, TAG, indirect fire) versus direct fire attacks. Per BattleTech rules, Mast Mount provides a +1 elevation bonus for spotting but not for direct fire.

Key Changes:

  • Added keyboard shortcut (O) and menu toggle for "Show Spotting FOV" mode
  • Modified FOV calculations to apply Mast Mount +1 elevation bonus when spotting mode is enabled
  • Visual distinction through blue tint and reversed stripe direction when active
  • Automatic reset to OFF at game start

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
KeyCommandBind.java Adds FOV_SPOTTING key binding with 'O' shortcut
FovHighlightingAndDarkening.java Implements Mast Mount elevation bonus logic, adds cache clearing, and applies visual indicators (blue tint, reversed stripes)
BoardView.java Extends drawHexLayer methods with reverseStripes parameter and implements gradient paint reversal logic
GUIPreferences.java Adds FOV_SPOTTING_MODE preference with getter/setter methods
CommonMenuBar.java Integrates new menu item with accelerator and preference change handling
ClientGUI.java Handles toggle action and auto-resets spotting mode at game start
messages.properties Adds menu label and tooltip text for the new feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HammerGS HammerGS marked this pull request as draft December 21, 2025 01:24
@HammerGS
Copy link
Member Author

Just a note on this. Our LOS and Spotting code is correct the issue is we don't show it with the hex shading.

This is the Field of View.
image

This is the Spotting Mode. (with a Mast Mount)
image

@HammerGS HammerGS removed the Needs Player Testing PR lacks actual play testing. label Dec 23, 2025
@HammerGS HammerGS marked this pull request as ready for review December 24, 2025 17:22
@HammerGS HammerGS marked this pull request as draft December 29, 2025 19:13
@HammerGS HammerGS added the AI ready for Review Indicates that is has been in game tested and is ready for review as it can be label Dec 31, 2025
@HammerGS HammerGS marked this pull request as ready for review January 2, 2026 23:49
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Fix AI-generated fix. Requires human testing and review before merging. AI ready for Review Indicates that is has been in game tested and is ready for review as it can be

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] Mast Mount not working for LOS

3 participants