#47940: Unhardcode "Unreachable" Open Date: 2023-04-25 20:37 Last Update: 2023-04-25 23:24 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/47940 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47940 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-04-25 23:24 Updated by: cazfi Comment: Reply To ihnatus Likely, HRM922323 has not yet been translocated here so let me do it now. Thanks. I added comment to hrm ticket linking to this one (please add such comments to other hrm tickets you copy over - if you still have functional hrm account) --------------------------------------------------------------------- Ticket Status: Reporter: ihnatus Owner: (None) Type: Feature Requests Status: Open Priority: 5 - Medium MileStone: S3_2 d3f Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Likely, HRM922323 has not yet been translocated here so let me do it now. Make some changes to actions mechanism to unhardcode the way "Unreachable" flag works. That is: for actions that target unit stacks, certain units in the stack may be not considered its targets, and either the action is prevented by their presence (unreachableprotects setting on, that way can be currently moved to requirements but not so comfortable) or other units are affected but not they. My own idea: introduce unreachable_reqs list in action enablers, like [actionenabler_attack_from_native] action = "Attack" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "NonMil", "Local", FALSE "UnitClassFlag", "Missile", "Local", FALSE "MinMoveFrags", "1", "Local", TRUE "UnitState", "OnNativeTile", "Local", TRUE "DiplRel", "War", "Local", TRUE } unreachable_reqs = { "type", "name", "range", "present" "UnitFlag", "Unreachable", "Local", TRUE "CityTile", "CityCenter", "Tile", FALSE "UnitState", "InNativeExtra", "Local", FALSE } And the same addition for any action enabler that should check reachability. To unhardcode furtherly unreachable protection mechanics without quadrupling each enabler (i.e., in the form above add negative server setting "unreachableprotects", and add an enabler with it being positive for a non-"Unreachable" target, for a target in a city and for a target in a base), we could just add to each enabler yet another parameter that by requirements or another way tells when it should happen. -- 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/47940 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47940