Beispiel #1
0
static void npc_next_pos_0b(dungeon *d, npc *c, pair_t next)
{
  /*     smart;     telepathic; not tunneling;     erratic */
  if (rand() & 1) {
    npc_next_pos_rand(d, c, next);
  } else {
    npc_next_pos_03(d, c, next);
  }
}
Beispiel #2
0
static void npc_next_pos_0a(dungeon_t *d, character *c, pair_t next)
{
  /* not smart;     telepathic; not tunneling;     erratic */
  if (rand() & 1) {
    npc_next_pos_rand(d, c, next);
  } else {
        npc_next_pos_02(d, c, next);
  }
}
Beispiel #3
0
static void npc_next_pos_00(dungeon *d, npc *c, pair_t next)
{
  /* not smart; not telepathic; not tunneling; not erratic */
  if (can_see(d, character_get_pos(c), character_get_pos(d->PC), 0, 0)) {
    c->pc_last_known_position[dim_y] = d->PC->position[dim_y];
    c->pc_last_known_position[dim_x] = d->PC->position[dim_x];
    npc_next_pos_line_of_sight(d, c, next);
  } else {
    npc_next_pos_rand(d, c, next);
  }
}
Beispiel #4
0
static void npc_next_pos_00(dungeon_t *d, character *c, pair_t next)
{
  pc *the_pc;
  npc *the_npc;

  the_pc = (pc *) d->the_pc;
  the_npc = (npc *) c;

  /* not smart; not telepathic; not tunneling; not erratic */
  if (can_see(d, character_get_pos(c), character_get_pos(d->the_pc), 0)) {
    the_npc->pc_last_known_position[dim_y] = the_pc->position[dim_y];
    the_npc->pc_last_known_position[dim_x] = the_pc->position[dim_x];
    npc_next_pos_line_of_sight(d, c, next);
  } else {
    npc_next_pos_rand(d, c, next);
  }
}