args / description mismatch in list-effects.h?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HermannD
    Rookie
    • Jan 2014
    • 13

    args / description mismatch in list-effects.h?

    As it apparently works, I'm sure my confusion is due to some misunderstanding on my part. However, out of curiosity, I would like to clear this up: When reading list-effects.h I noticed that, just as I would expect from
    Code:
     * args: how many arguments the description takes
    […]
     * description: text of description
    that the value in the args column usually matches up to the number of c-format-specifiers (%s, %d) in the description column. But not for some effects, where args was 2, but there were only one or zero %-signs in the description:
    Code:
    2  	MON_HEAL_HP
    2 % 	CURE
    2 % 	RESTORE_STAT
    2 % 	DRAIN_STAT
    2 % 	LOSE_RANDOM_STAT
    2 % 	GAIN_STAT
    2 % 	PROJECT_LOS
    2 % 	PROJECT_LOS_AWARE
    So, what is the actual meaning of the args column?
    ? of *Destruction* makes the better maps.
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    You understand perfectly, and those numbers in the args column are indeed wrong. The secret information is that the args column is not used in the code - I put it in originally in case I needed to use it, but in the end I didn't need to.

    So the numbers are wrong, but it doesn't matter.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • HermannD
      Rookie
      • Jan 2014
      • 13

      #3
      Ah well, that was a possibility I briefly considered. Still kinda anticlimactic. I sent you a pull request on GitHub to sort that out anyway. A change only affecting unused data is guaranteed not to break anything and I like predetermined success. (=
      ? of *Destruction* makes the better maps.

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎