… | |
… | |
103 | } |
103 | } |
104 | } |
104 | } |
105 | } |
105 | } |
106 | |
106 | |
107 | /* sets up to cast a spell. op is the caster, params is the spell name, |
107 | /* sets up to cast a spell. op is the caster, params is the spell name, |
108 | * and command is the first letter of the spell type (c=cast, i=invoke, |
108 | * and command is the first letter of the spell type (c=cast, i=invoke, |
109 | * p=prepare). Invoke casts a spell immediately, where as cast (and I believe |
109 | * p=prepare). Invoke casts a spell immediately, where as cast (and I believe |
110 | * prepare) just set up the range type. |
110 | * prepare) just set up the range type. |
111 | */ |
111 | */ |
112 | static int |
112 | static int |
113 | command_cast_spell (object *op, char *params, char command) |
113 | command_cast_spell (object *op, char *params, char command) |
… | |
… | |
129 | |
129 | |
130 | if ((spellnumber = atoi (params))) |
130 | if ((spellnumber = atoi (params))) |
131 | for (spob = op->inv; spob && spob->count != spellnumber; spob = spob->below) |
131 | for (spob = op->inv; spob && spob->count != spellnumber; spob = spob->below) |
132 | /* nop */; |
132 | /* nop */; |
133 | else |
133 | else |
134 | spob = lookup_spell_by_name (op, params); |
134 | spob = op->find_spell (params); |
135 | |
135 | |
136 | if (spob && spob->type == SPELL) |
136 | if (spob && spob->type == SPELL) |
137 | { |
137 | { |
138 | /* Now grab any extra data, if there is any. Forward pass |
138 | /* Now grab any extra data, if there is any. Forward pass |
139 | * any 'of' delimiter |
139 | * any 'of' delimiter |