Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #923112

open

Check ai_city.wallvalue semantics

Added by Alexandro Ignatiev over 3 years ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
AI
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The comment near this value says: "how much it helps for defenders to be ground units". Some other comments tell us that this value used to have various values in soe former versions. Currently assess_danger() sets this value to either 90 (if there is any potential unit that by a pathfinder's path or by paradropping seems to be able to get to the city) or 5 (if no danger is visible to the "omniscent" dummy). Then:
  • assess_defense() that is called from many places multiplies the unit's defense on floor(sqrt(wall_value / 10));
  • dai_process_defender_want() multiplies desire for a unit (basically, its squared rating without effects) if it is not a "BadCityDefender" on wall_value, so 1/2 if the city is not threatened and 9 if it is. I can't see any connection to "BadCityDefender" flag since it's already figured out in desire for not calculating firepower, we should just halve the unsquared desire cuz it also doubles the attacker's attack.

Related issues

Related to Freeciv - Feature #865086: Specific IgWalls combat bonusNew

Actions
Actions #1

Updated by Alexandro Ignatiev over 3 years ago

Actions #2

Updated by Marko Lindqvist over 3 years ago

  • Sprint/Milestone changed from 2.6.4 to 2.6.5
Actions #3

Updated by Marko Lindqvist over 3 years ago

  • Sprint/Milestone changed from 2.6.5 to 2.6.6
Actions #4

Updated by Marko Lindqvist almost 3 years ago

  • Sprint/Milestone changed from 2.6.6 to 3.0.1
Actions #5

Updated by Marko Lindqvist over 2 years ago

  • Sprint/Milestone changed from 3.0.1 to 3.0.2
Actions #6

Updated by Marko Lindqvist over 2 years ago

  • Sprint/Milestone changed from 3.0.2 to 3.0.3
Actions #7

Updated by Marko Lindqvist over 2 years ago

  • Sprint/Milestone changed from 3.0.3 to 3.0.4
Actions #8

Updated by Marko Lindqvist about 2 years ago

  • Sprint/Milestone changed from 3.0.4 to 3.0.5
Actions #9

Updated by Marko Lindqvist almost 2 years ago

  • Category set to AI
  • Sprint/Milestone changed from 3.0.5 to 3.0.6
Actions #10

Updated by Marko Lindqvist almost 2 years ago

  • Sprint/Milestone changed from 3.0.6 to 3.0.7
Actions #11

Updated by Marko Lindqvist over 1 year ago

  • Sprint/Milestone changed from 3.0.7 to 3.0.8
Actions #12

Updated by Marko Lindqvist 8 months ago

  • Sprint/Milestone changed from 3.0.8 to 3.1.1

Also available in: Atom PDF