--- deliantra/server/common/living.C 2007/01/03 00:21:35 1.23 +++ deliantra/server/common/living.C 2007/01/09 00:22:01 1.28 @@ -1,6 +1,7 @@ /* CrossFire, A Multiplayer game for X-windows + Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team Copyright (C) 2002 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen @@ -193,36 +194,36 @@ "You're feeling clumsy!", "You feel less healthy", "You suddenly begin to lose your memory!", - "Your face gets distorted!", "Watch out, your mind is going!", - "Your spirit feels drained!" + "Your spirit feels drained!", + "Your face gets distorted!", }; const char *const restore_msg[NUM_STATS] = { "You feel your strength return.", "You feel your agility return.", "You feel your health return.", + "You feel your memory return.", "You feel your wisdom return.", + "You feel your spirits return.", "You feel your charisma return.", - "You feel your memory return.", - "You feel your spirits return." }; const char *const gain_msg[NUM_STATS] = { "You feel stronger.", "You feel more agile.", "You feel healthy.", + "You feel smarter.", "You feel wiser.", + "You feel more potent.", "You seem to look better.", - "You feel smarter.", - "You feel more potent." }; const char *const lose_msg[NUM_STATS] = { "You feel weaker!", "You feel clumsy!", "You feel less healthy!", + "You feel stupid!", "You lose some of your memory!", + "You feel less potent!", "You look ugly!", - "You feel stupid!", - "You feel less potent!" }; const char *const statname[NUM_STATS] = { @@ -834,6 +835,7 @@ int best_wc = 0, best_ac = 0, wc = 0, ac = 0; int prot[NROFATTACKS], vuln[NROFATTACKS], potion_resist[NROFATTACKS]; object *grace_obj = NULL, *mana_obj = NULL, *wc_obj = NULL, *tmp; + float old_speed = speed; /* First task is to clear all the values back to their original values */ if (type == PLAYER) @@ -1504,7 +1506,8 @@ else if (move_type & (MOVE_FLY_LOW | MOVE_FLY_HIGH)) move_type &= ~MOVE_WALK; - set_speed (speed); + if (speed != old_speed) + set_speed (speed); /* It is quite possible that a player's spell costing might have changed, * so we will check that now. @@ -1678,11 +1681,14 @@ skill_obj->stats.exp = 0; skill_obj->level = 1; insert_ob_in_ob (skill_obj, op); + if (op->contr) { - op->contr->last_skill_ob[skill_obj->subtype] = skill_obj; - op->contr->last_skill_exp[skill_obj->subtype] = -1; + op->contr->last_skill_ob [skill_obj->subtype] = skill_obj; + if (op->contr->ns) + op->contr->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous } + return skill_obj; }