Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

src/ai.c File Reference


Detailed Description

Monster AI.

Definition in file ai.c.

#include "crogue.h"

Go to the source code of this file.

Functions

int count_adjacent_tiles (int x, int y, int type)
void monstmove (sint monst)
void webspinner_build (ushort monst, ushort tile_web, ushort tile_floor)
void webspinner_cower (ushort monst, ushort tile_web, ushort tile_wall)
void monst_chat (ushort monst)


Function Documentation

int count_adjacent_tiles int  x,
int  y,
int  type
[static]
 

Definition at line 26 of file ai.c.

References MAPSIZE_X, MAPSIZE_Y, sint, world::t, tile::type, uint, and w.

Referenced by webspinner_build(), and webspinner_cower().

void monst_chat ushort  monst  ) 
 

Definition at line 228 of file ai.c.

References call_chatfunc, MDESC, monstcanmove(), world::plr, w, player::x, and player::y.

void monstmove sint  monst  ) 
 

Definition at line 50 of file ai.c.

References call_aifunc, distancesquare, monster::flags, monster::hps, world::m, MDESC, message(), MONST_ACTIVE, monst_attack_type(), monst_battle_pet(), MONST_CONFUSED, MONST_CUST_WHEN_ACTIVE, MONST_CUST_WHEN_IDLE, monst_detect_player(), MONST_FRIENDLY, monst_is_aligned_with_plr(), MONST_PARALYZED, MONST_PEACEFUL, MONST_PET, MONST_SCARED, MONST_WANDER_WHEN_IDLE, monstcanmove(), MONSTFLAG_REGENERATE, monstmoveawayfromplayer(), monstmoverandomly(), monstmovetowardsplayer(), monstname(), MTRIGGER_RANGED, MTRIGGER_SEEN, pet_move(), player_can_see(), world::plr, monster::power, RANGE, w, player::x, monster::x, player::y, and monster::y.

Referenced by timepass().

void webspinner_build ushort  monst,
ushort  tile_web,
ushort  tile_floor
 

Definition at line 144 of file ai.c.

References count_adjacent_tiles(), world::m, monstcanmove(), monstmoveto(), RANGE, world::t, tile::type, w, monster::x, and monster::y.

void webspinner_cower ushort  monst,
ushort  tile_web,
ushort  tile_wall
 

Definition at line 188 of file ai.c.

References count_adjacent_tiles(), distancesquare, player::extrinsic, world::m, monstbytile(), monstmoveto(), monstmovetowardsplayer(), world::plr, STAT_FLAG_ENTANGLED, STAT_FLAGS, world::t, tile::type, w, player::x, monster::x, player::y, and monster::y.


Generated on Thu May 20 13:12:12 2004 for CalcRogue by doxygen 1.3.6