On Sun, 6 Feb 2000 21:04:25 Victor Wennberg wrote:
> How do i make spells with INT REQ, and WIS
> REQ...
I've done this already :)
Add to wis_app_type and/or int_app_type:
struct wis_app_type {
byte bonus;
sh_int mana_bonus;
sh_int failure;
byte max_spell_level;
};
struct int_app_type {
byte learn;
sh_int mana_bonus;
byte max_spell_level;
sh_int chance_to_learn;
};
add to constants.c definitions appropriately.
Then in the guild proc, check for appropriate
ability - here's how I did it:
/* Mages are limited in their max learnable spell level by their int */
if (IS_MAGIC_USER(ch)) {
if (skill_num > 0 && skill_num <= MAX_SPELLS ) {
if (spell_info[skill_num].min_level[CLASS_MAGIC_USER] >
int_app[GET_INT(ch)].max_spell_level) {
send_to_char("You cannot learn such a powerful spell!\r\n", ch);
return (1);
}
}
}
/* Clerics are limited in their max learnable spell level by their wis */
if (IS_CLERIC(ch)) {
if (skill_num > 0 && skill_num <= MAX_SPELLS ) {
if (spell_info[skill_num].min_level[CLASS_CLERIC] >
wis_app[GET_WIS(ch)].max_spell_level) {
send_to_char("You cannot learn such a powerful spell!\r\n", ch);
return (1);
}
}
}
> i also want spell's to cost movement points...
> please give me some pointers and i can handle
> it
Grep for mag_manacost (spell_parser.c) and see
how mana is handled, then do something similar
for movement.
Angelfire for your free web-based e-mail. http://www.angelfire.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT