View Single Post
Old November 13, 2019, 23:32   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
Nick will become famous soon enough
All monster ranged attacks (aside from spells that act directly on the player like causing wounds), and all player ranged attacks and effects except shooting and throwing of objects. So it includes all the elemental damage types, (as listed in list-elements.h) and a bunch of other effects to monsters, terrain, etc (listed in list-projections.h).

All the information used to be in mon-spell.c, the list-*.h files and the project*.c files; projection.txt is meant to make it easier to adjust the properties of projections (like words used in messages, effect of resistance) without having to recompile the game. Note that the code: line includes the code from the relevant list-*.h file, which is used in the project*.c files to make the effects actually happen.

So monster_spell.txt will define the breath (like BR_FIRE) which appears in monster.txt; the effect line tells you that BR_FIRE uses the breath effect (defined in effects.c), the FIRE projection type, and parameters for the size of the breath cone. The breath effect code then calls the project() function to affect all the grids in the cone of effect, which in turn calls functions to deal with the effects of fire on terrain, objects, monsters and the player that are on one of those grids.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.

Last edited by Nick; November 13, 2019 at 23:39. Reason: Answer the second part of the question
Nick is offline   Reply With Quote