コード例 #1
0
ファイル: city.c プロジェクト: albert-wang/OmegaRPG
/* makes a hiscore npc for mansions */
void make_justiciar(int i, int j)
{
    pml ml = ((pml) checkmalloc(sizeof(mltype)));
    ml->m = ((pmt) checkmalloc(sizeof(montype)));
    *(ml->m) = Monsters[NPC];
    make_hiscore_npc(ml->m,15);
    ml->m->x = i;
    ml->m->y = j;
    Level->site[i][j].creature = ml->m;
    ml->m->click = (Tick + 1) % 60;
    ml->next = Level->mlist;
    Level->mlist = ml;
    m_status_reset(ml->m,AWAKE);
}
コード例 #2
0
ファイル: house.c プロジェクト: anylonen/omega
/* makes a hiscore npc for mansions */
void make_mansion_npc(int i, int j)
{
  pml ml = ((pml) checkmalloc(sizeof(mltype)));
  ml->m = ((pmt) checkmalloc(sizeof(montype)));
  *(ml->m) = Monsters[NPC];
  make_hiscore_npc(ml->m,random_range(14) + 1);
  mprint("You detect signs of life in this house.");
  ml->m->x = i;
  ml->m->y = j;
  Level->site[i][j].creature = ml->m;
  ml->m->click = (Tick + 1) % 50;
  ml->next = Level->mlist;
  Level->mlist = ml;
  m_status_set(ml->m,HOSTILE);
  if (nighttime())
    m_status_reset(ml->m,AWAKE);
  else m_status_set(ml->m,AWAKE);
}