Fixing the broken AI_SMART option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Therem Harth
    Knight
    • Jan 2008
    • 926

    Fixing the broken AI_SMART option

    Something I just noticed in melee2.c:

    Code:
    		/* We're hurt (not badly), try to heal */
    		else if (has_heal && (m_ptr->hp < m_ptr->maxhp * 3 / 4) &&
    		         (randint0(100) < 60))
    		{
    			/* Choose heal spell */
    			flags_mask(f, RSF_SIZE, RSF_HEAL_MASK, FLAG_END);
    		}
    So if a monster is slightly hurt, it has a pretty high chance of trying to heal, which is basically why AI_SMART is broken.

    Suggestion: drop that to (randint0(100) < 10).
  • fizzix
    Prophet
    • Aug 2009
    • 3025

    #2
    That is not the only reason why AI_SMART is broken. It is one of them, but it's broken for monsters that can't heal either.

    Comment

    • Therem Harth
      Knight
      • Jan 2008
      • 926

      #3
      Hmm. Can you elaborate on that? I did a little testing and it didn't seem too broken.

      Comment

      • buzzkill
        Prophet
        • May 2008
        • 2939

        #4
        Originally posted by Therem Harth
        Hmm. Can you elaborate on that? I did a little testing and it didn't seem too broken.
        AS I recall, monsters that can teleport you or teleport self are also really hard to kill. You can kill them, but it's a real challenge (and quite entertaining at first). But then again, isn't that what smart_ai is all about, making the enemy behave more like the player (very hard to kill with tele, to, or heal).
        www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
        My banding life on Buzzkill's ladder.

        Comment

        • Therem Harth
          Knight
          • Jan 2008
          • 926

          #5
          Okay, thanks. That should not be hard to deal with either.

          Actually I may want to write some of my own routines for the AI. The way AI_SMART is implemented is quite easy to understand...

          Comment

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