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 about 1 year ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
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 about 1 year ago

#2 Updated by Alexandro Ignatiev about 1 year 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 11 months 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 about 1 month 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 26 days ago

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

Also available in: Atom PDF