--- deliantra/server/common/living.C 2006/12/22 16:34:00 1.19 +++ deliantra/server/common/living.C 2006/12/25 06:53:39 1.21 @@ -226,11 +226,11 @@ }; const char *const statname[NUM_STATS] = { - "strength", "dexterity", "constitution", "wisdom", "charisma", "intelligence", "power" + "strength", "dexterity", "constitution", "intelligence", "wisdom", "power", "charisma" }; const char *const short_stat_name[NUM_STATS] = { - "Str", "Dex", "Con", "Wis", "Cha", "Int", "Pow" + "Str", "Dex", "Con", "Int", "Wis", "Pow", "Cha" }; /* @@ -373,9 +373,9 @@ /* remember what object was like before it was changed. note that * refop is a local copy of op only to be used for detecting changes - * found by fix_player. refop is not a real object + * found by update_stats. refop is not a real object */ - object_pod refop = *op; + object_copy refop = *op; if (op->type == PLAYER) { @@ -403,6 +403,7 @@ { nstat = 20 + get_attr_value (&(op->arch->clone.stats), j); } + if (nstat != ostat) { set_attr_value (&(op->contr->orig_stats), j, nstat); @@ -414,12 +415,14 @@ potion_max = 1; } } + /* This section of code ups the characters normal stats also. I am not * sure if this is strictly necessary, being that fix_player probably * recalculates this anyway. */ for (j = 0; j < NUM_STATS; j++) change_attr_value (&(op->stats), j, flag * get_attr_value (&(tmp->stats), j)); + check_stat_bounds (&(op->stats)); } /* end of potion handling code */ } @@ -453,21 +456,25 @@ success = 1; DIFF_MSG (flag, "Your hands begin to glow red.", "Your hands stop glowing red."); } + if (QUERY_FLAG (op, FLAG_LIFESAVE) != QUERY_FLAG (&refop, FLAG_LIFESAVE)) { success = 1; DIFF_MSG (flag, "You feel very protected.", "You don't feel protected anymore."); } + if (QUERY_FLAG (op, FLAG_REFL_MISSILE) != QUERY_FLAG (&refop, FLAG_REFL_MISSILE)) { success = 1; DIFF_MSG (flag, "A magic force shimmers around you.", "The magic force fades away."); } + if (QUERY_FLAG (op, FLAG_REFL_SPELL) != QUERY_FLAG (&refop, FLAG_REFL_SPELL)) { success = 1; DIFF_MSG (flag, "You feel more safe now, somehow.", "Suddenly you feel less safe, somehow."); } + /* movement type has changed. We don't care about cases where * user has multiple items giving the same type appled like we * used to - that is more work than what we gain, plus messages @@ -525,11 +532,13 @@ success = 1; DIFF_MSG (flag, "You walk more quietly.", "You walk more noisily."); } + if (QUERY_FLAG (op, FLAG_MAKE_INVIS) != QUERY_FLAG (&refop, FLAG_MAKE_INVIS)) { success = 1; DIFF_MSG (flag, "You become transparent.", "You can see yourself."); } + /* blinded you can tell if more blinded since blinded player has minimal * vision */ @@ -657,6 +666,7 @@ } } } + return success; }