Project

General

Profile

Feature #672612

Pick what "Attack" target reqs should be evaluated against

Added by Sveinung Kvilhaugsvik over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

When the "Attack" action was introduced in gna patch #7260 it was made tile targeted until the proper target class to evaluate its action enablers against could be determined. Releasing a version of Freeciv where the target is a tile would bind us to support DiplRel requirements against the owner of the tile the target unit is located at in future versions.

The "Attack" action's current target requirements are made against three different target classes. Two of the target classes, "individual cities" and "unit stacks", are supported as action enabler target kinds. The last class, "any or, if the unreachableprotects server setting is enabled, all untransported units", has no current support in the action enabler system.


Related issues

Blocks Freeciv - Task #656466: S3_0 datafile format freeze (d3f)Closed2019-10-05

History

#1 Updated by Sveinung Kvilhaugsvik over 2 years ago

  • Blocks Task #656466: S3_0 datafile format freeze (d3f) added

#2 Updated by Sveinung Kvilhaugsvik over 2 years ago

The two candidates for the target to evaluate the "Attack" action's target requirement vector against are those about units. Each has a currently hardcoded unit requirement it alone can express. The unit stack target kind can express the "must be at war with all units in the stack" rule. The other target kind could, combined with the introduction of a new requirement type, have expressed the requirement that each/any non transported unit must be in a city, be in an extra native to it, not have the "Unreachable" unit class flag or belong to a unit type listed in the actor's targets.

Choose the unit stack action target kind. Move the "must be at war with all units in the stack" rule to the action enabler as an obligatory hard requirement.

A unit stack targeted "Attack" action makes ruleset authors able to specify requirements for all units in an attacked unit stack. Requirements for all non transported units in an attacked unit stacks can be achieved via the "Transported" UnitState requirement type property (and an action enabler that enables the action for a transported unit no matter what the non transported only requirements are).

Should having "Attack" action enabler target requirements closely following the unreachableprotects server setting become important in the future it can still be implemented. One potential way to do it is by introducing a version of "Attack" that targets individual units. Its and Attack's action enablers should then be able to use the "ServerSetting" requirement type to determine what action should be enabled based on the unreachableprotects server setting value.

#3 Updated by Sveinung Kvilhaugsvik over 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF