Skip to content

Low: npc_movearmy() High Movement Points Edge Case #7

@smooge

Description

@smooge

Priority: LOW
File: Src/moveA.c
Function: npc_movearmy()
Discovered: During Phase 6B-1 unit testing (11/12 tests pass)

Description: Function handles high movement points (≥100) with unexpected calculation logic in edge case scenario.

Reproduction Steps:

  1. Create test army with 150 movement points
  2. Set mock movement cost to 200 (higher than available)
  3. Call npc_movearmy(11, 21)
  4. Expected: Returns TRUE, movement points reduced to -50 (over-expenditure allowed)
  5. Actual: Returns TRUE, movement points set to 206 (unexpected calculation)

Impact: Minor edge case behavior difference that may affect game balance in high-movement scenarios, but doesn't break core functionality.

Proposed Fix: Investigate the high movement point logic in the function to understand the intended behavior when umove ≥ 100. May be working as designed.

Original Bug ID: BUG-009

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmodernizationIssues related to C code modernization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions