View Single Post
Old December 12, 2014, 14:16   #1
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 926
Therem Harth is on a distinguished road
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).
Therem Harth is offline   Reply With Quote