Tíquete #47940

Unhardcode "Unreachable"

: 2023-04-26 02:37 Última Atualização: 2024-08-17 10:41

Relator:
Dono:
(Nenhum)
Estado:
Aberto
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Nenhum
Arquivo:
Nenhum

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 History (3/3 Histories)

2023-04-26 02:37 Updated by: ihnatus
  • New Ticket "Unhardcode "Unreachable"" created
2023-04-26 05:24 Updated by: cazfi
Comentário

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)

2024-08-17 10:41 Updated by: cazfi

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Login