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...

Feature #865086

Specific IgWalls combat bonus

Added by Alexandro Ignatiev over 2 years ago. Updated 11 months ago.

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

0%

Estimated time:

Description

Introduce a combat bonus that suppresses city improvement defense bonuses of specific defenders (actually, may be applied as "calculate EFT_DEFEND_BONUS in defense_multiplication() with get_target_bonus_effects() with NULL as city parameter"). In civ2 ruleset, give it to non-Missile air units against fighters (i.e., fighters don't use SAM).

ground-att-def.patch (9.14 KB) ground-att-def.patch Alexandro Ignatiev, 2021-03-07 12:24 AM

Related issues

Related to Freeciv - Feature #865084: Scramble combat bonusClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Freeciv - Bug #923112: Check ai_city.wallvalue semanticsNew

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Alexandro Ignatiev over 2 years ago

#2 Updated by Alexandro Ignatiev over 2 years ago

The same bonus in civ2 should go to land units against air and naval units (in CivII, walls work this way).

#3 Updated by Alexandro Ignatiev over 2 years ago

Probably the most natural way to get the compatible behaviour is introducing a class attribute that lists classes against which that one can't have a city-related DefenseBonus effect. Thus, fighters get to a separate class. The city ignoring lists will be:
Land: ""
Sea: "Land"
Trireme: "Land"
Air [bombers]: "Land"
Fighter: "Land", "Air", "Fighter"
Missile: "Land"
Or, even simpler, so: give to "Land" class the special flag "OnlySameClassCityBonus" and connect "Scramble" unit combat bonus with also ignoring city defense.

#4 Updated by Alexandro Ignatiev over 1 year ago

First draft, applied over my scramble patch. Works but needs more testing for related AI behaviour.
Unit classes without "GroundDefense" flag get no defend bonus in cities against classes with "GroundAttack" flag.In civ2, Land class needs both flags, likely outside of cities no such effect is needed.

#5 Updated by Alexandro Ignatiev over 1 year ago

  • Related to Bug #923112: Check ai_city.wallvalue semantics added

#6 Updated by Marko Lindqvist 11 months ago

  • Category set to General
  • Sprint/Milestone changed from 3.1.0 to 3.2.0

Alexandro Ignatiev wrote:

First draft, applied over my scramble patch. Works but needs more testing for related AI behaviour.

Are you still working on this?

The patch has been outdated a couple of ways, requiring update. Also: You should not reduce number of use unit class flags. Names of the flags could be more generic; some ruleset may want the same effect but without it having anything to do with ground attack.

#7 Updated by Alexandro Ignatiev 11 months ago

I have suspended this item because of, first, lack of time, and, second, hope that Sveinnung will eventually develop some more generic mechanism than class flags here. I won't probably work on it before 3.1 d3f. If one does, welcome.

Also available in: Atom PDF