Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old August 2, 2014, 21:17   #1
Zireael
Adept
 
Join Date: Jul 2011
Posts: 204
Zireael is on a distinguished road
Artificial Intelligence code

In which file(s) does the artificial intelligence code live?

I'm watching the NPPAngband source and some port of it and Unangband and FAngband and would have loved to take a look at the AI, but can't find it. Found monster recall and various other stuff but not the AI. Help?
Zireael is offline   Reply With Quote
Old August 2, 2014, 21:53   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
src/monster/melee2.c for melee attacks, and mon-spell.c for spell attacks/escapes.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old August 3, 2014, 01:33   #3
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,836
Donated: $60
Nick will become famous soon enough
In FA you'll find most of the AI in src/onmove.c and src/monattk.c, with some of the support code (on sound and smell) in src/cave.c.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old August 5, 2014, 14:01   #4
Zireael
Adept
 
Join Date: Jul 2011
Posts: 204
Zireael is on a distinguished road
Nick, can't find src/onmove.c in the github repo.

BTW I'm looking more for the code where the monster decides what to do (ranged attack? spell? melee attack? run away?) rather than the damage-dealing code.
Zireael is offline   Reply With Quote
Old August 5, 2014, 14:59   #5
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,836
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Zireael View Post
Nick, can't find src/onmove.c in the github repo.

BTW I'm looking more for the code where the monster decides what to do (ranged attack? spell? melee attack? run away?) rather than the damage-dealing code.
Sorry, typo - it's src/monmove.c
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick 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
is there a code? jozmon Development 19 August 4, 2014 01:38
Rings of Constitution / Intelligence Bombadil Vanilla 6 March 4, 2013 07:28
Pack UI = artificial stupidity? Timo Pietilš Vanilla 35 November 27, 2010 21:47
code help please will_asher Variants 22 March 15, 2010 20:00
Lost intelligence while sustained. Sergio Vanilla 9 August 7, 2009 18:12


All times are GMT +1. The time now is 06:16.


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