示例#1
0
bool spec_cast_adept( CHAR_DATA *ch )
{
    CHAR_DATA *victim;
    CHAR_DATA *v_next;

    if ( !IS_AWAKE(ch) )
	return FALSE;

    for ( victim = ch->in_room->people; victim != NULL; victim = v_next )
    {
	v_next = victim->next_in_room;
	if ( victim != ch && can_see( ch, victim ) && number_bits( 1 ) == 0 )
	    break;
    }

    if ( victim == NULL )
	return FALSE;

    switch ( number_bits( 3 ) )
    {
    case 0:
	act( "$n utters the word 'tehctah'.", ch, NULL, NULL, TO_ROOM );
	spell_armor( skill_lookup( "armor" ), ch->level, ch, victim );
	return TRUE;

    case 1:
	act( "$n utters the word 'nhak'.", ch, NULL, NULL, TO_ROOM );
	spell_bless( skill_lookup( "bless" ), ch->level, ch, victim );
	return TRUE;

    case 2:
	act( "$n utters the word 'yeruf'.", ch, NULL, NULL, TO_ROOM );
	spell_cure_blindness( skill_lookup( "cure blindness" ),
	    ch->level, ch, victim );
	return TRUE;

    case 3:
	act( "$n utters the word 'garf'.", ch, NULL, NULL, TO_ROOM );
	spell_cure_light( skill_lookup( "cure light" ),
	    ch->level, ch, victim );
	return TRUE;

    case 4:
	act( "$n utters the words 'rozar'.", ch, NULL, NULL, TO_ROOM );
	spell_cure_poison( skill_lookup( "cure poison" ),
	    ch->level, ch, victim );
	return TRUE;

    case 5:
	act( "$n utters the words 'nadroj'.", ch, NULL, NULL, TO_ROOM );
	spell_refresh( skill_lookup( "refresh" ), ch->level, ch, victim );
	return TRUE;

    }

    return FALSE;
}
示例#2
0
void cast_armor( byte level, struct char_data *ch, char *arg, int type,
	struct char_data *tar_ch, struct obj_data *tar_obj )
{
  switch (type) {
		case SPELL_TYPE_SPELL:
			if ( affected_by_spell(tar_ch, SPELL_ARMOR) ){
				send_to_char("Nothing seems to happen.\r\n", ch);
				return;
			}
			if (ch != tar_ch)
				act("$N is protected by your deity.", FALSE, ch, 0, tar_ch, TO_CHAR);

			spell_armor(level,ch,tar_ch,0);
			break;
		case SPELL_TYPE_POTION:
			if ( affected_by_spell(ch, SPELL_ARMOR) )
				return;
			spell_armor(level,ch,ch,0);
			break;
		case SPELL_TYPE_SCROLL:
			if (tar_obj) return;
         if (!tar_ch) tar_ch = ch;
			if ( affected_by_spell(tar_ch, SPELL_ARMOR) )
				return;
			spell_armor(level,ch,ch,0);
			break;
		case SPELL_TYPE_WAND:
			if (tar_obj) return;
			if ( affected_by_spell(tar_ch, SPELL_ARMOR) )
				return;
			spell_armor(level,ch,ch,0);
			break;
      default : 
         log("Serious screw-up in armor!");
         break;
	}
}
示例#3
0
bool spec_cast_adept( CHAR_DATA *ch )
{
	CHAR_DATA *victim;
	CHAR_DATA *v_next;

	if ( !IS_AWAKE(ch) )
		return FALSE;

	for ( victim = ch->in_room->people; victim != NULL; victim = v_next )
	{
		v_next = victim->next_in_room;
		if ( victim != ch && can_see( ch, victim ) && number_bits( 1 ) == 0 
			&& !IS_NPC(victim) && victim->level < 11)
			break;
	}

	if ( victim == NULL )
		return FALSE;

	switch ( number_bits( 4 ) )
	{
		case 0:
		act( "$n utters the word 'abrazak'.", ch, NULL, NULL, TO_ROOM );
		spell_armor( skill_lookup( "armor" ), ch->level,ch,victim,TARGET_CHAR);
		return TRUE;

		case 1:
		act( "$n utters the word 'fido'.", ch, NULL, NULL, TO_ROOM );
		spell_bless( skill_lookup( "bless" ), ch->level,ch,victim,TARGET_CHAR);
		return TRUE;

		case 2:
		act("$n utters the words 'judicandus noselacri'.",ch,NULL,NULL,TO_ROOM);
		spell_cure_blindness( skill_lookup( "cure blindness" ),
			ch->level, ch, victim,TARGET_CHAR);
		return TRUE;

		case 3:
		act("$n utters the words 'judicandus dies'.", ch,NULL, NULL, TO_ROOM );
		spell_cure_light( skill_lookup( "cure light" ),
			ch->level, ch, victim,TARGET_CHAR);
		return TRUE;

		case 4:
		act( "$n utters the words 'judicandus sausabru'.",ch,NULL,NULL,TO_ROOM);
		spell_cure_poison( skill_lookup( "cure poison" ),
			ch->level, ch, victim,TARGET_CHAR);
		return TRUE;

		case 5:
		act("$n utters the word 'candusima'.", ch, NULL, NULL, TO_ROOM );
		spell_refresh( skill_lookup("refresh"),ch->level,ch,victim,TARGET_CHAR);
		return TRUE;

		case 6:
		act("$n utters the words 'judicandus eugzagz'.",ch,NULL,NULL,TO_ROOM);
		spell_cure_disease(skill_lookup("cure disease"),
			ch->level,ch,victim,TARGET_CHAR);
	}

	return FALSE;
}