|
![]() |
#1 |
Adept
Join Date: Jul 2011
Posts: 204
![]() |
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? |
![]() |
![]() |
![]() |
#2 |
Angband Devteam member
|
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 |
![]() |
![]() |
![]() |
#3 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
![]() |
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. |
![]() |
![]() |
![]() |
#4 |
Adept
Join Date: Jul 2011
Posts: 204
![]() |
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. |
![]() |
![]() |
![]() |
#5 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
![]() |
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. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 |