Пример #1
0
SPEC_RET spec_breath_any( CHAR_DATA *ch )
{
	if ( ch->position != POSITION_FIGHT
	  && ch->position != POSITION_EVASIVE
	  && ch->position != POSITION_DEFENSIVE
	  && ch->position != POSITION_AGGRESSIVE
	  && ch->position != POSITION_BERSERK )
	{
		return FALSE;
	}

	switch ( number_bits(3) )
	{
	  case 0:	return spec_breath_fire		( ch );
	  case 1:
	  case 2:	return spec_breath_lightning( ch );
	  case 3:	return spec_breath_gas		( ch );
	  case 4:	return spec_breath_acid		( ch );
	  case 5:
	  case 6:
	  case 7:	return spec_breath_frost	( ch );
	}

	return FALSE;
}
Пример #2
0
/*
 * Special procedures for mobiles.
 */
bool spec_breath_any( CHAR_DATA *ch )
{
	if ( ch->position != POS_FIGHTING )
		return FALSE;

	switch ( number_bits( 3 ) )
	{
		case 0: return spec_breath_fire		( ch );
		case 1:
		case 2: return spec_breath_lightning	( ch );
		case 3: return spec_breath_gas		( ch );
		case 4: return spec_breath_acid		( ch );
		case 5:
		case 6:
		case 7: return spec_breath_frost		( ch );
	}

	return FALSE;
}