Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Artificial Intelligence code (http://angband.oook.cz/forum/showthread.php?t=6890)

Zireael August 2, 2014 21:17

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?

Magnate August 2, 2014 21:53

src/monster/melee2.c for melee attacks, and mon-spell.c for spell attacks/escapes.

Nick August 3, 2014 01:33

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.

Zireael August 5, 2014 14:01

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.

Nick August 5, 2014 14:59

Quote:

Originally Posted by Zireael (Post 94514)
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


All times are GMT +1. The time now is 04:24.

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