Code:
if (IS_SET(SINFO.routines, MAG_MANUAL))
switch (spellnum) {
case SPELL_CHARM: MANUAL_SPELL(spell_charm); break;
case SPELL_CREATE_WATER: MANUAL_SPELL(spell_create_water); break;
case SPELL_DETECT_POISON: MANUAL_SPELL(spell_detect_poison); break;
case SPELL_ENCHANT_WEAPON: MANUAL_SPELL(spell_enchant_weapon); break;
case SPELL_IDENTIFY: MANUAL_SPELL(spell_identify); break;
case SPELL_LOCATE_OBJECT: MANUAL_SPELL(spell_locate_object); break; <<<---289
int cast_spell(struct char_data *ch, struct char_data *tch,
struct obj_data *tobj, int spellnum)
{
if (spellnum < 0 || spellnum > TOP_SPELL_DEFINE) {
log("SYSERR: cast_spell trying to call spellnum %d/%d.", spellnum,
TOP_SPELL_DEFINE);
return (0);
}
if (GET_POS(ch) < SINFO.min_position) {
switch (GET_POS(ch)) {
case POS_SLEEPING:
send_to_char(ch, "You dream about great magical powers.\r\n");
break;
case POS_RESTING:
send_to_char(ch, "You cannot concentrate while resting.\r\n");
break;
case POS_SITTING:
send_to_char(ch, "You can't do this sitting!\r\n");
break;
case POS_FIGHTING:
send_to_char(ch, "Impossible! You can't concentrate enough!\r\n");
break;
default:
send_to_char(ch, "You can't do much of anything like this!\r\n");
break;
}
return (0);
}
if (AFF_FLAGGED(ch, AFF_CHARM) && (ch->master == tch)) {
send_to_char(ch, "You are afraid you might hurt your master!\r\n");
return (0);
}
if ((tch != ch) && IS_SET(SINFO.targets, TAR_SELF_ONLY)) {
send_to_char(ch, "You can only cast this spell upon yourself!\r\n");
return (0);
}
if ((tch == ch) && IS_SET(SINFO.targets, TAR_NOT_SELF)) {
send_to_char(ch, "You cannot cast this spell upon yourself!\r\n");
return (0);
}
if (IS_SET(SINFO.routines, MAG_GROUPS) && !GROUP(ch)) {
send_to_char(ch, "You can't cast this spell if you're not in a group!\r\n");
return (0);
}
send_to_char(ch, "%s", CONFIG_OK);
say_spell(ch, spellnum, tch, tobj, (GET_CLASS(ch) == CLASS_BARD ? SCMD_SONG : SCMD_CAST));
return (call_magic(ch, tch, tobj, spellnum, GET_LEVEL(ch), CAST_SPELL)); <<<---513
}
} else { /* cast spell returns 1 on success; subtract mana & set waitstate */
if (cast_spell(ch, tch, tobj, spellnum)) { <<<---668
WAIT_STATE(ch, PULSE_VIOLENCE);
if (mana > 0)
GET_MANA(ch) = MAX(0, MIN(GET_MAX_MANA(ch), GET_MANA(ch) - mana));
}
}
}