#45595: AI: High value for martial law defenders when no danger Open Date: 2022-09-06 18:36 Last Update: 2022-11-05 00:35 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45595 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45595 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-11-05 00:35 Updated by: cazfi * Status Update from Open to Closed * Resolution Update from Accepted to Fixed --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Bugs Status: Closed Priority: 5 - Medium MileStone: 3.0.5 Component: AI Severity: 5 - Medium Resolution: Fixed --------------------------------------------------------------------- Ticket details: military_advisor_choose_build() When there's no danger at all, but defenders would make sense for martial law reasons, notable danger might still get assigned to the value of the defender. The check "qdanger >= our_def" assumes that qdanger > 0, which it's not when we're in this code block solely for martial law. So in the special case that both qdanger and our_def are zero, danger is considered 100%. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45595 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45595