> /* We could keep track of how many hp a player gained at each level,
> but what a pain! And what to do about NPCs?! Just find the
> average HP per level and subtract HP based on this average. */
If you just take care of their hitpoints, players can abuse the spell to
gain tremendous ammounts of movement or mana or practice sessions, etc.
I had a God command that penalizes EXP, and consequently needed to handle
lowering players levels. I wrote the following based on the mud's stats,
you can change it around for yours if you'd like.
void lower_level(struct char_data * ch)
{
int add_hp = 0, add_mana = 0, add_move = 0;
extern struct wis_app_type wis_app[];
extern struct con_app_type con_app[];
add_hp = con_app[GET_CON(ch)].hitp;
if(GET_LEVEL(ch) <= 0)
return;
switch (GET_CLASS(ch)) {
case CLASS_MAGIC_USER:
add_hp += number(5, 9);
add_mana = number(GET_LEVEL(ch), (int) (1.5 * GET_LEVEL(ch)));
add_mana = MIN(add_mana, 10);
add_move = number(1, 4);
break;
case CLASS_CLERIC:
add_hp += number(7, 11);
add_mana = number(GET_LEVEL(ch), (int) (1.5 * GET_LEVEL(ch)));
add_mana = MIN(add_mana, 10);
add_move = number(1, 4);
break;
case CLASS_ASSASSIN:
add_hp += number(9, 14);
add_mana = 0;
add_move = number(2, 5);
break;
case CLASS_WARRIOR:
add_hp += number(11, 17);
add_mana = 0;
add_move = number(2, 4);
break;
case CLASS_SHAMAN:
add_hp = number(11, 14);
add_mana = number(GET_LEVEL(ch), (2.0 * GET_LEVEL(ch)));
add_mana = MIN(add_mana, 10);
add_move = number(2, 4);
break;
}
ch->points.max_hit -= MAX(1, add_hp);
ch->points.max_move -= MAX(1, add_move);
ch->points.max_mana -= add_mana;
GET_PRACTICES(ch) -= MAX(2, wis_app[GET_WIS(ch)].bonus);
GET_LEVEL(ch) -= 1;
save_char(ch, NOWHERE);
}
+------------------------------------------------------------+
| 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 : 12/15/00 PST