Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Fixing the broken AI_SMART option (http://angband.oook.cz/forum/showthread.php?t=7086)

Therem Harth December 12, 2014 14:16

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 December 12, 2014 14:55

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.

Therem Harth December 12, 2014 15:16

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

buzzkill December 12, 2014 18:01

Quote:

Originally Posted by Therem Harth (Post 97286)
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).

Therem Harth December 12, 2014 18:13

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...


All times are GMT +1. The time now is 01:33.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.