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; }
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; }
void cast_bless( byte level, struct char_data *ch, char *arg, int type, struct char_data *tar_ch, struct obj_data *tar_obj ) { struct affected_type af; switch (type) { case SPELL_TYPE_SPELL: if (tar_obj) { /* It's an object */ if ( IS_SET(tar_obj->obj_flags.extra_flags, ITEM_BLESS) ) { send_to_char("Nothing seems to happen.\r\n", ch); return; } spell_bless(level,ch,0,tar_obj); } else { /* Then it is a PC | NPC */ if ( affected_by_spell(tar_ch, SPELL_BLESS) || (GET_POS(tar_ch) == POSITION_FIGHTING)) { send_to_char("Nothing seems to happen.\r\n", ch); return; } spell_bless(level,ch,tar_ch,0); } break; case SPELL_TYPE_POTION: if ( affected_by_spell(ch, SPELL_BLESS) || (GET_POS(ch) == POSITION_FIGHTING)) return; spell_bless(level,ch,ch,0); break; case SPELL_TYPE_SCROLL: if (tar_obj) { /* It's an object */ if ( IS_SET(tar_obj->obj_flags.extra_flags, ITEM_BLESS) ) return; spell_bless(level,ch,0,tar_obj); } else { /* Then it is a PC | NPC */ if (!tar_ch) tar_ch = ch; if ( affected_by_spell(tar_ch, SPELL_BLESS) || (GET_POS(tar_ch) == POSITION_FIGHTING)) return; spell_bless(level,ch,tar_ch,0); } break; case SPELL_TYPE_WAND: if (tar_obj) { /* It's an object */ if ( IS_SET(tar_obj->obj_flags.extra_flags, ITEM_BLESS) ) return; spell_bless(level,ch,0,tar_obj); } else { /* Then it is a PC | NPC */ if ( affected_by_spell(tar_ch, SPELL_BLESS) || (GET_POS(tar_ch) == POSITION_FIGHTING)) return; spell_bless(level,ch,tar_ch,0); } break; default : log("Serious screw-up in bless!"); break; } }