Curses feature branch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9638

    Originally posted by PowerWyrm
    Didn't see anything in the code that does it (seems you get the message when equipping a cursed item)... but of course I didn't check everything yet. My problem atm is being able to generate cursed items with the game... I didn't manage to generate one yet.
    They are probably a little rare at the moment.

    Originally posted by PowerWyrm
    The big problem with this system is having attached a lot of things to curses: combat mods, stats, flags... This means you will have to replace all instances of obj->something in the code with a function that iterates over obj + obj->curses, and do the same with obj->known->something. This will rapidly become an unmanageable mess...
    It's actually fairly simple. The curse struct contains an object struct, and so you just iterate over both of those when calculating the player's equipment bonuses.

    Originally posted by PowerWyrm
    Moreover, it seems that the code reveals a curse as soon as one of its component is learned. Doesn't feel right.
    I thought it felt OK. One of the things I was aiming for was the game telling the player what was happening at the same time as a player could work it out. Your suggestions are possibilities too, they just don't happen to be the one I picked
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • PowerWyrm
      Prophet
      • Apr 2008
      • 2986

      Originally posted by Nick
      It's actually fairly simple. The curse struct contains an object struct, and so you just iterate over both of those when calculating the player's equipment bonuses.
      Looking at the code, this seems far from sufficient. It will work at player level, but not at object level. So for example when equipping gloves of weakness (curse->obj->modifiers), you will get the STR penalty applied when the player acts (calc_bonuses), but won't get it applied:
      - on character screen (prt_player_sust_info, prt_resistance_panel)
      - in object description (obj_desc_mods)
      - when checking ignore level (ignore_level_of)
      - when describing objects (describe_stats)
      - when stacking objects (object_stackable, object_absorb)
      - for power/value calculation (modifier_power)
      - in stores (find_inven -- but wouldn't really matter, since one object with the curse and one object without the curse would have been stacked)

      For flags, there are already two functions: object_flags_known and object_flags. Then it's just a matter of processing curse->obj->flags and the corresponding known flags along with obj->flags. For other curse components (modifiers, elements, combat mods), there should be equivalent functions to deal with curses.
      PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

      Comment

      • PowerWyrm
        Prophet
        • Apr 2008
        • 2986

        Originally posted by Nick
        I thought it felt OK. One of the things I was aiming for was the game telling the player what was happening at the same time as a player could work it out. Your suggestions are possibilities too, they just don't happen to be the one I picked
        This choice has a BIG advantage though: instead of having to check each single property to see if it's known or not, you check the property at curse level. In the code, this means you never care about obj->curse->obj->known->xxx vs obj->curse->obj->xxx, but always use obj->known->curse->obj->xxx. This should simplify all changes that must be made (see previous post) a lot.
        PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

        Comment

        • PowerWyrm
          Prophet
          • Apr 2008
          • 2986

          Oh and I was looking at how cursed egos were removed and turned into curses. So basically a Cloak of Envelopping is now a plain Cloak with the "envelopping" curse, which can be removed with the corresponding scroll or spell. That's nice. But why not do that with Morgul and Nazgul egos?
          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

          Comment

          • spara
            Adept
            • Nov 2014
            • 235

            I've been either a very lucky or something is not working correctly. I wore a cursed ring (+2 to speed) for many, many dungeon levels and a couple of town visits until I finally managed to find an identify scroll. The ring turned out to be a ring of random teleportation.

            Just to test it out I've been using the ring after it's been IDd a few more levels and it still hasn't activated. Lucky me, +2 speed is always handy .

            Edit: I'm fairly certain that the curse in the ring is definitely not working. I've dived quite deep now wearing the ring all the time and there has been no random teleportation happening.
            Last edited by spara; August 1, 2016, 21:40.

            Comment

            • d_m
              Angband Devteam member
              • Aug 2008
              • 1517

              Originally posted by Nick
              How do you think it should work?
              Something close to the current system would be fine. I think the big distinction I'd like to see is between positive and negative runes (e.g. non-curses and curses, or something close). This way you don't spend a ton of time testing weapons against every conceivable monster type only to realize it has some kind of curse (in some cases one I was never able to trigger).

              It also helps make the (great item + potentially bad curse) mechanic a bit more transparent and interesting. Arguably revealing the curse on wield would be a bit of an information leak but I think it might be worth it.

              I don't think the code would need to change very much to accommodate this.
              linux->xterm->screen->pmacs

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9638

                Originally posted by d_m
                Something close to the current system would be fine. I think the big distinction I'd like to see is between positive and negative runes (e.g. non-curses and curses, or something close). This way you don't spend a ton of time testing weapons against every conceivable monster type only to realize it has some kind of curse (in some cases one I was never able to trigger).

                It also helps make the (great item + potentially bad curse) mechanic a bit more transparent and interesting. Arguably revealing the curse on wield would be a bit of an information leak but I think it might be worth it.

                I don't think the code would need to change very much to accommodate this.
                This is starting to sound like a general opinion - I think we should probably do something like this. Feel free to play around with the code
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9638

                  Originally posted by spara
                  I've been either a very lucky or something is not working correctly. I wore a cursed ring (+2 to speed) for many, many dungeon levels and a couple of town visits until I finally managed to find an identify scroll. The ring turned out to be a ring of random teleportation.

                  Just to test it out I've been using the ring after it's been IDd a few more levels and it still hasn't activated. Lucky me, +2 speed is always handy .

                  Edit: I'm fairly certain that the curse in the ring is definitely not working. I've dived quite deep now wearing the ring all the time and there has been no random teleportation happening.
                  Yeah, looks like I've broken random teleport - d_m has noticed it too.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • Nick
                    Vanilla maintainer
                    • Apr 2007
                    • 9638

                    Originally posted by PowerWyrm
                    Oh and I was looking at how cursed egos were removed and turned into curses. So basically a Cloak of Envelopping is now a plain Cloak with the "envelopping" curse, which can be removed with the corresponding scroll or spell. That's nice. But why not do that with Morgul and Nazgul egos?
                    It was because I find them more interesting. Enveloping is OK but not terribly exciting, whereas I think Morgul weapons and Nazgul bows should actually feel like things that the ringwraiths would have used. The definitions might not be right yet, but that was the idea behind it.
                    One for the Dark Lord on his dark throne
                    In the Land of Mordor where the Shadows lie.

                    Comment

                    • Pete Mack
                      Prophet
                      • Apr 2007
                      • 6883

                      Weapons of Morgul were junk. Back when you could buy lots of enchantment in the general store, Nazgul bows were occasionally useful. The only real drawback was the easily fixed negative melee, and an early SI bow could be very useful.

                      Comment

                      • PowerWyrm
                        Prophet
                        • Apr 2008
                        • 2986

                        Originally posted by Ingwe Ingweron
                        Do Boots of Wormtongue no longer have a "sticky" curse? @ found and removed such a curse on a regular item some time ago, but now having found the Boots of Wormtongue, they show as fully identified and have no curse associated with them (apart from their regular pluses and minuses).
                        All non permanent sticky curses are gone from artifacts. I guess they aren't really needed: bad artifacts already have bad properties like aggravation or experience drain, good artifacts like Boots of Wormtongue shouldn't get a sticky curse.
                        PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                        Comment

                        • PowerWyrm
                          Prophet
                          • Apr 2008
                          • 2986

                          Originally posted by Ingwe Ingweron
                          Was surprised to find The Cloak of Thingol had a curse (sticky curse). Also there is a bug in the messages line when a curse is removed. Casting a remove curse spell resulted in a question asking if I wanted to remove the sticky curse and told the power of the curse (in this case power 20) and the message line:
                          "The D[][] curse is removed!" (Where "[]" is actually a box.)
                          This should be fixed now, it was simply a case of using the curse name after having freed the curse.
                          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                          Comment

                          • PowerWyrm
                            Prophet
                            • Apr 2008
                            • 2986

                            Originally posted by Ingwe Ingweron
                            @ is wearing a fully identified =Dexterity (+4), so knows the runes associated therewith. @ is also carrying a =Dexterity (+2), this one with "??". Don the +2 Dex ring and "Oops! It feels deathly cold!". So it's cursed. BUT, examine the ring, no curse is disclosed.
                            I think this is due to the fact that curses currently only identify themselves by their flags and modifiers (see object_learn_on_wield). If the ring you found had a curse with flags or modifiers (like sticky, cowardice...), it would be noticed and learned on wield. If the curse didn't have flags or modifiers (like poison, teleportation...), it would not. My guess if that you have to use ?Identify on the object to reveal the curse, since I don't think there's a way to learn runes from effects in the current code.
                            PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                            Comment

                            • spara
                              Adept
                              • Nov 2014
                              • 235

                              Maybe it's just me, but the iconic "Oops! It feels deathly cold!" message constantly makes me think of a sticky curse. Maybe that message should be reserved to only those. Maybe a non-sticky curse could say something like "It feels sinister!" or "There's something not right with it!" or "You have a bad feeling about it!"

                              Comment

                              • PowerWyrm
                                Prophet
                                • Apr 2008
                                • 2986

                                Originally posted by PowerWyrm
                                Moreover, it seems that the code reveals a curse as soon as one of its component is learned. Doesn't feel right. At this point, I see two ways of dealing with the problem: the simple way and the complete way.
                                In fact, there's an even simpler way, once object_flags() and similar functions are reworked to take into account the curses:
                                - learn curses on wield
                                - learn flags, modifiers... like before, using object_flags(), object_modifiers()... to take into account object + curses
                                PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                                Comment

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