/*
* Delete all nearby (non-unique) monsters
*/
bool mass_genocide(int Ind)
{
player_type *p_ptr = Players[Ind];
int i, tmp;
bool result = FALSE;
worldpos *wpos=&p_ptr->wpos;
dun_level *l_ptr = getfloor(wpos);
cave_type **zcave;
if(!(zcave=getcave(wpos))) return(FALSE);
if(l_ptr && l_ptr->flags1 & LF1_NO_GENO) return(FALSE);
bypass_invuln = TRUE;
/* Delete the (nearby) monsters */
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
monster_race *r_ptr = race_inf(m_ptr);
/* Paranoia -- Skip dead monsters */
if (!m_ptr->r_idx) continue;
/* Skip monsters not on this depth */
if(!inarea(&p_ptr->wpos, &m_ptr->wpos)) continue;
/* Hack -- Skip unique monsters */
if (r_ptr->flags1 & RF1_UNIQUE) continue;
/* Skip distant monsters */
if(distance(p_ptr->py, p_ptr->px, m_ptr->fy, m_ptr->fx)>MAX_SIGHT)
#if 0
if (m_ptr->cdis > MAX_SIGHT)
#endif
continue;
/* Skip those immune */
if (r_ptr->flags9 & RF9_IM_TELE) continue;
/* Roll for resistance */
tmp = r_ptr->level;
#ifdef RESIST_GENO
if (randint(RESIST_GENO) < tmp) continue;
#endif // RESIST_GENO
#ifdef NO_GENO_ON_ICKY
/* Not valid inside a vault */
if (zcave[m_ptr->fy][m_ptr->fx].info & CAVE_ICKY && !p_ptr->admin_dm)
continue;
#endif // NO_GENO_ON_ICKY
/* Delete the monster */
delete_monster_idx(i, TRUE);
/* Hack -- visual feedback */
*/ if (!p_ptr->admin_dm) take_hit(Ind, randint(3 + (tmp >> 3)), "the strain of casting Genocide", 0);
/* does not effect the dungeon master, because it disturbs his movement
/* Redraw */
p_ptr->redraw |= (PR_HP);
/* Window stuff */
/* p_ptr->window |= (PW_PLAYER); */
/* Handle */
handle_stuff(Ind);
/* Delay */
// Send_flush(Ind); /* I don't think a delay is really necessary - mikaelh */
/* Note effect */
result = TRUE;
}
if (!p_ptr->death && result && !p_ptr->admin_dm) take_hit(Ind, p_ptr->chp >> 1, "the strain of casting Genocide", 0); /* Redraw */ p_ptr->redraw |= (PR_HP); #endif
#ifdef SEVERE_GENO
bypass_invuln = FALSE;
/* Window stuff */
p_ptr->window |= (PW_PLAYER);
/* Handle */
handle_stuff(Ind);
return (result);
}
Tomenet 한글판 클라이언트 (0) | 2010.12.27 |
---|---|
톰넷 테스트서버 접속 방법 (0) | 2010.11.30 |
톰넷 한글 클라이언트 자료실 입니다. (0) | 2010.03.14 |
라브님 콰짓 폼 작업 장면과 보난자 님 폭파? 장면 (0) | 2009.05.22 |
GM의 은총 -카잣둠 공사편- (0) | 2009.05.16 |