Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
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
Old December 12, 2014, 14:55   #2
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,025
fizzix is on a distinguished road
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.
fizzix is offline   Reply With Quote
Old December 12, 2014, 15:16   #3
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 926
Therem Harth is on a distinguished road
Hmm. Can you elaborate on that? I did a little testing and it didn't seem too broken.
Therem Harth is offline   Reply With Quote
Old December 12, 2014, 18:01   #4
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
Quote:
Originally Posted by Therem Harth View Post
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.
buzzkill is offline   Reply With Quote
Old December 12, 2014, 18:13   #5
Therem Harth
Knight
 
Join Date: Jan 2008
Posts: 926
Therem Harth is on a distinguished road
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...
Therem Harth is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixing the X11 port? AnonymousHero Development 4 October 7, 2012 11:23
Fixing dir, shift-dir and ctrl-dir keys part 1: Win client PowerWyrm Development 14 June 4, 2012 15:30
Fixing dir, shift-dir and ctrl-dir keys part 2: GCU client PowerWyrm Development 1 June 1, 2012 19:34
calendar broken? ghengiz Oook! 2 January 6, 2012 20:56
Morgoth Broken Again Gordon Vanilla 5 January 15, 2010 15:54


All times are GMT +1. The time now is 21:09.


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