Monster speed variations?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bogatyr
    Knight
    • Feb 2014
    • 525

    Monster speed variations?

    I just killed a Black Wraith (which moves "quickly"). I was at speed +11. After my first shot of firebolt, the wraith took *two* steps towards me in one turn. WTF?! I remember reading about small variations in speed given to monsters, is that what this is? I died in the last game from a wraith double moving me when I was supposedly hasted enough to be on par with it, each time taking a full strength curse attack.
  • Werbaer
    Adept
    • Aug 2014
    • 182

    #2
    Originally posted by Bogatyr
    I just killed a Black Wraith (which moves "quickly"). I was at speed +11. After my first shot of firebolt, the wraith took *two* steps towards me in one turn. WTF?! I remember reading about small variations in speed given to monsters, is that what this is?
    Might be.
    Normal monsters can get +/- 1 speed, fast monsters +/-2, very fast monsters +/-3. Uniques move at regular speed without variation.

    Comment

    • Timo Pietilä
      Prophet
      • Apr 2007
      • 4096

      #3
      Originally posted by Werbaer
      Might be.
      Normal monsters can get +/- 1 speed, fast monsters +/-2, very fast monsters +/-3. Uniques move at regular speed without variation.
      Could also be hasted wraith. Any shriekers nearby (shambling mounds, crebain etc.).

      Comment

      • PowerWyrm
        Prophet
        • Apr 2008
        • 2987

        #4
        There was also a bug in the code that got fixed very recently. Monsters with more energy were not acting first, so they could get a double move, even if their speed was lower.
        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

        • Bogatyr
          Knight
          • Feb 2014
          • 525

          #5
          The wraith was asleep when I attacked it. In response to my attack it took two steps towards me.

          It was not hasted from a shrieker -- I had just arrived on the level, and have Legendary stealth.

          It is possible that it had +12 speed then. I had +11 speed. I presume that means that a monster will once every (10 <= x <= 20?) turns get a double move. Does that extra-energy bug include sleeping monsters?

          Comment

          • Werbaer
            Adept
            • Aug 2014
            • 182

            #6
            Originally posted by Bogatyr
            It is possible that it had +12 speed then. I had +11 speed. I presume that means that a monster will once every (10 <= x <= 20?) turns get a double move.
            You gain 21 energy per game turn, the monster gains 22 energy. It will get an extra move for 21 of your moves.

            Originally posted by Bogatyr
            Does that extra-energy bug include sleeping monsters?
            That bug is fixed in 4.0.3.

            In addition, this bug had no effect when the monster energy/turn is a divider of 100; that means, it had no effect for monsters with speed +0 and +10.
            Against monsters with speed +20 it didn't happen if the player has speed +24 or more.
            So it mainly happened in the final fight against Morgoth.

            Comment

            • Bogatyr
              Knight
              • Feb 2014
              • 525

              #7
              Originally posted by Werbaer
              You gain 21 energy per game turn, the monster gains 22 energy. It will get an extra move for 21 of your moves.
              Starting when? I was futzing around a bit before settling in for the fight, is it possible I just happened to futz around for 20 turns, on the 21st turn I attacked, and that's when the double move happened?
              That bug is fixed in 4.0.3.

              In addition, this bug had no effect when the monster energy/turn is a divider of 100; that means, it had no effect for monsters with speed +0 and +10.
              Against monsters with speed +20 it didn't happen if the player has speed +24 or more.
              So it mainly happened in the final fight against Morgoth.
              I'm playing 3.5.1.

              The interesting take-away is that one must be several speed points higher than "normal", "quickly", "very quickly" (+0/+10/+20) monsters to make sure that monsters with a max attack of >= HP/2 can't wipe you out with a double move.

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #8
                Originally posted by Bogatyr
                Starting when? I was futzing around a bit before settling in for the fight, is it possible I just happened to futz around for 20 turns, on the 21st turn I attacked, and that's when the double move happened?
                Starting as soon as you enter the level. Sleeping monsters still get turns, they just don't do anything with them except wake up a little.

                Comment

                • Werbaer
                  Adept
                  • Aug 2014
                  • 182

                  #9
                  Originally posted by Bogatyr
                  I'm playing 3.5.1.
                  No double move bug for you, then.

                  The bug was first introduced with the change of the speed system in 2.7.3, was unrealized for 5 years, and was fixed in 2.9.1.
                  It was reintroduced by the mojor code rewrite for 4.0.0, and fixed in 4.0.3.

                  Comment

                  • Bogatyr
                    Knight
                    • Feb 2014
                    • 525

                    #10
                    Originally posted by Derakon
                    Starting as soon as you enter the level. Sleeping monsters still get turns, they just don't do anything with them except wake up a little.
                    I still don't quite get how energy and turns and speed all work. Does a sleeping monster who is just a few speed points faster than me "build up" energy and spend it on double moves right when I attack it? Or is its energy cycling around in a modular loop and I have say a 5% chance (for 1 point of speed difference, say +11 vs. +12) in any given turn for the double-move to occur, and I just happened to "be lucky" and experienced it in on the wraith's first awake turn?

                    Comment

                    • Derakon
                      Prophet
                      • Dec 2009
                      • 9022

                      #11
                      Originally posted by Bogatyr
                      I still don't quite get how energy and turns and speed all work. Does a sleeping monster who is just a few speed points faster than me "build up" energy and spend it on double moves right when I attack it? Or is its energy cycling around in a modular loop and I have say a 5% chance (for 1 point of speed difference, say +11 vs. +12) in any given turn for the double-move to occur, and I just happened to "be lucky" and experienced it in on the wraith's first awake turn?
                      Sleeping or awake, monsters gain energy based on their speed, same as the player. When they reach 100 energy, they get a turn. Every time the monster gets a turn, this happens:

                      Code:
                      If monster is asleep:
                        monster becomes a bit more awake, based on
                        distance from player and player's stealth
                      otherwise:
                        monster takes an action (move, cast a spell, etc.)
                      monster's energy is reduced by 100
                      Note that their energy is decremented whether or not they are awake.

                      Monsters and the player do not have independent loops; they're both slaves to the game clock. Each game turn, the game assigns energy to every actor based on that actor's speed rating. Then, if the player has at least 100 energy, they get a turn; then all monsters that have at least 100 energy get turns. In order for a monster to get a double turn, then, they must have 100 energy, get a turn, and then return to 100 energy before you do.

                      In short, you just got lucky. Congratulations!

                      Comment

                      • Bogatyr
                        Knight
                        • Feb 2014
                        • 525

                        #12
                        Originally posted by Derakon
                        Sleeping or awake, monsters gain energy based on their speed, same as the player. When they reach 100 energy, they get a turn. Every time the monster gets a turn, this happens:

                        Code:
                        If monster is asleep:
                          monster becomes a bit more awake, based on
                          distance from player and player's stealth
                        otherwise:
                          monster takes an action (move, cast a spell, etc.)
                        monster's energy is reduced by 100
                        Note that their energy is decremented whether or not they are awake.

                        Monsters and the player do not have independent loops; they're both slaves to the game clock. Each game turn, the game assigns energy to every actor based on that actor's speed rating. Then, if the player has at least 100 energy, they get a turn; then all monsters that have at least 100 energy get turns. In order for a monster to get a double turn, then, they must have 100 energy, get a turn, and then return to 100 energy before you do.

                        In short, you just got lucky. Congratulations!
                        Thanks for the explanation. What are the initial conditions for just arriving on to a level so that the player always gets the first move in the game clock loop?

                        Comment

                        • Derakon
                          Prophet
                          • Dec 2009
                          • 9022

                          #13
                          Originally posted by Bogatyr
                          Thanks for the explanation. What are the initial conditions for just arriving on to a level so that the player always gets the first move in the game clock loop?
                          I think it's simply that the player's energy is set to 100. During the game turn, if the player has at least 100 energy, they go, then all monsters are given a chance to go. Thus if the player has 100 energy on level start, they go first.

                          Monsters I believe are given randomized amounts of energy when they are created, to avoid excessive clumping of monster turns. I admit I haven't looked at this code in a very long time though, and certainly not since 4.0 went through and rewrote everything.

                          Comment

                          • Timo Pietilä
                            Prophet
                            • Apr 2007
                            • 4096

                            #14
                            Originally posted by Derakon
                            I think it's simply that the player's energy is set to 100. During the game turn, if the player has at least 100 energy, they go, then all monsters are given a chance to go. Thus if the player has 100 energy on level start, they go first.
                            It wasn't guaranteed in older versions. Only thing that was guaranteed was that monsters with FORCE_SLEEP flag can't use their distance attacks until player had his first turn. I once nearly died by descending next to death mold. It got at least two, maybe three turns before I could do anything.

                            Comment

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