--- deliantra/server/common/living.C 2007/01/08 20:39:48 1.27 +++ deliantra/server/common/living.C 2007/01/18 19:42:09 1.31 @@ -1,26 +1,26 @@ /* - 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 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - The authors can be reached via e-mail at -*/ + * 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 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * The authors can be reached via e-mail at + */ #include #include @@ -195,7 +195,7 @@ "You feel less healthy", "You suddenly begin to lose your memory!", "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] = { @@ -204,7 +204,7 @@ "You feel your health return.", "You feel your memory return.", "You feel your wisdom return.", - "You feel your spirits return." + "You feel your spirits return.", "You feel your charisma return.", }; const char *const gain_msg[NUM_STATS] = { @@ -213,7 +213,7 @@ "You feel healthy.", "You feel smarter.", "You feel wiser.", - "You feel more potent." + "You feel more potent.", "You seem to look better.", }; const char *const lose_msg[NUM_STATS] = { @@ -222,7 +222,7 @@ "You feel less healthy!", "You feel stupid!", "You lose some of your memory!", - "You feel less potent!" + "You feel less potent!", "You look ugly!", }; @@ -757,7 +757,7 @@ /* Randomly change the players luck. Basically, we move it * back neutral (if greater>0, subtract, otherwise add) */ - if (RANDOM () % (FABS (tmp->stats.luck)) >= RANDOM () % 30) + if (RANDOM () % (FABS (tmp->stats.luck)) >= rndm (30)) { int diff = tmp->stats.luck > 0 ? -1 : 1; @@ -1611,16 +1611,16 @@ char buf[MAX_BUF]; /* tmp. string buffer */ /* now grab the 'dragon_ability'-forces from the player's inventory */ - for (tmp = who->inv; tmp != NULL; tmp = tmp->below) - { - if (tmp->type == FORCE) - { - if (strcmp (tmp->arch->name, "dragon_ability_force") == 0) - abil = tmp; - if (strcmp (tmp->arch->name, "dragon_skin_force") == 0) - skin = tmp; - } - } + shstr_cmp dragon_ability_force ("dragon_ability_force"); + shstr_cmp dragon_skin_force ("dragon_skin_force"); + + for (tmp = who->inv; tmp; tmp = tmp->below) + if (tmp->type == FORCE) + if (tmp->arch->name == dragon_ability_force) + abil = tmp; + else if (tmp->arch->name == dragon_skin_force) + skin = tmp; + /* if the force is missing -> bail out */ if (abil == NULL) return;