#46046: AI: Improve attacker danger evaluation Open Date: 2022-11-07 20:12 Last Update: 2022-12-05 09:23 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/46046 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46046 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-12-05 09:23 Updated by: cazfi Comment: On a tree with this applied, clang analyzer gives (at leas some of this from tri_req_active_turns() added by this patch): ../../../src/common/requirements.c:5146:9: warning: Value stored to 'present' is never read [deadcode.DeadStores] present = req->source.value.age <= ca; ~ ../../../src/common/requirements.c:5147:9: warning: Value stored to 'present1' is never read [deadcode.DeadStores] present1 = req->source.value.age <= ca + period; ../../../src/common/requirements.c:5153:9: warning: Value stored to 'present' is never read [deadcode.DeadStores] present = req->source.value.age ~ ../../../src/common/requirements.c:5155:9: warning: Value stored to 'present1' is never read [deadcode.DeadStores] present1 = req->source.value.age ~ --------------------------------------------------------------------- Ticket Status: Reporter: ihnatus Owner: (None) Type: Feature Requests Status: Open Priority: 5 - Medium MileStone: 3.1.0-beta1 Component: AI Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Firstly, consider "Attack_bonus" effect. Then, pay a heed to action enablers, maybe they prohibit the attack. Also, don't consider harmless units that can't attack but can occupy the city. Actually, a split from #41781 since the patch grew too big. -- 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/46046 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46046