Remove Curse

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agoodman
    Adept
    • Jan 2011
    • 114

    Remove Curse

    When listing objects after reading a remove curse scroll, it seems like it shouldn't include items whose only curses are unremovable... say, a ring of teleportation. Right now the code is

    struct curse_data *c = obj->known->curses;
    if (c) {
    size_t i;
    for (i = 1; i < z_info->curse_max; i++) {
    if (c[i].power < 100) {
    return true;

    should it be

    struct curse_data *c = obj->known->curses;
    if (c) {
    size_t i;
    for (i = 1; i < z_info->curse_max; i++) {
    if (c[i].power && c[i].power < 100) {
    return true;

    So that it isn't triggering on curses with zero power?
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    Unremovable curses should have a power of 100.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • backwardsEric
      Knight
      • Aug 2019
      • 526

      #3
      But the item with one or more curses with power 100 and no curses with power greater than zero and less than 100 will have a number of curses with power of zero. That item will return true rom the check and goodman's proposal would stop that.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9634

        #4
        Oh, I get it now...
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • agoodman
          Adept
          • Jan 2011
          • 114

          #5
          Originally posted by Nick
          Oh, I get it now...
          Just so I am clear, you get it ... and it is a bug? Or you get what I am saying but the list should show all cursed items, it is up to the player to not try to uncurse something that can't be uncursed?

          If it is a bug, do you want me to push up a fix (I hesitate to check in fixes because, as we saw with the -more- fix, my understanding of base angband code is not as deep as you guys and my fix there would have been, what is the word? Oh ya.... wrong. )

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9634

            #6
            It was a bug, but Eric's fix for it is incorporated now
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

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