[Freeciv-tickets] [freeciv] #41120: Counter requirement type

Back to archive index
OSDN Ticket System norep****@osdn*****
Sun Feb 27 01:56:57 JST 2022


#41120: Counter requirement type

  Open Date: 2021-01-07 22:24
Last Update: 2022-02-26 17:56

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/41120
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41120

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-02-26 17:56 Updated by: alienvalkyrie
 * Milestone Update from 3.2.0 to S3_2 d3f

Comment:

Sorry for radio silence; happens sometimes.
counters.c: I believe cazfi meant to adjust the definition in the counters array at the very top of the file to set the checkpoint, rather than in counters_init(). In fact, because a new member is added to the counter struct, that definition needs to be adjusted anyway. It might also be sensible to use designeted initialization a la { .rule_name = "Owned", .type = COUNTER_OWNED, /* etc */ }, since there are now two integer members that could cause confusion.
requirements.c, is_req_active(): Set eval variable rather than returning directly, and use tristate values, i.e. BOOL_TO_TRISTATE macro for the comparison and TRI_MAYBE when the city is null (to make sure negated requirements and different requirement problem types are handled correctly).
rssanity.c: Please mind the line length; try to keep lines below 77 characters (also see the doc/CodingStyle document).
README.effects is still missing info on Counter requirements.
requirements.c, universal_name_translation() and reqtext.c, req_text_insert(): Since we are currently missing counter_name_translation() those can't be covered yet ~> #43989 must be resolved first.


---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: S3_2 d3f
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Add a new requirement type 'Counter'. Name of the requirement is name of the counter. Requirement works only at City range for now.
Add new 'checkpoint' int field to struct counter, and set it e.g. 5 for the City Owned counter. Requirement is fulfilled if the value of the requirement is at least checkpoint.
Test for example by introducing a ruleset rule that when city has been owned less than those 5 turns, it suffers extra unhappiness.


-- 
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/41120
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41120



More information about the Freeciv-tickets mailing list
Back to archive index