ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/exp.C
(Generate patch)

Comparing deliantra/server/common/exp.C (file contents):
Revision 1.11 by pippijn, Mon Jan 15 21:06:18 2007 UTC vs.
Revision 1.13 by root, Thu May 17 13:24:54 2007 UTC

79 * It's far from perfect, and doesn't consider everything which 79 * It's far from perfect, and doesn't consider everything which
80 * can be considered, thus it's only used in debugging. 80 * can be considered, thus it's only used in debugging.
81 * this is only used with one of the dumpflags, 81 * this is only used with one of the dumpflags,
82 * and not anyplace in the code. 82 * and not anyplace in the code.
83 */ 83 */
84
85int 84int
86new_exp (const object *ob) 85new_exp (const object *ob)
87{ 86{
88 double att_mult, prot_mult, spec_mult; 87 double att_mult, prot_mult, spec_mult;
89 double exp; 88 double exp;
113 112
114 exp = (ob->stats.maxhp < 5) ? 5 : ob->stats.maxhp; 113 exp = (ob->stats.maxhp < 5) ? 5 : ob->stats.maxhp;
115 exp *= (QUERY_FLAG (ob, FLAG_CAST_SPELL) && has_ability (ob)) ? (40 + (ob->stats.maxsp > 80 ? 80 : ob->stats.maxsp)) / 40 : 1; 114 exp *= (QUERY_FLAG (ob, FLAG_CAST_SPELL) && has_ability (ob)) ? (40 + (ob->stats.maxsp > 80 ? 80 : ob->stats.maxsp)) / 40 : 1;
116 exp *= (80.0 / (70.0 + ob->stats.wc)) * (80.0 / (70.0 + ob->stats.ac)) * (50.0 + ob->stats.dam) / 50.0; 115 exp *= (80.0 / (70.0 + ob->stats.wc)) * (80.0 / (70.0 + ob->stats.ac)) * (50.0 + ob->stats.dam) / 50.0;
117 exp *= att_mult * prot_mult * spec_mult; 116 exp *= att_mult * prot_mult * spec_mult;
118 exp *= 2.0 / (2.0 - ((FABS (ob->speed) < 0.95) ? FABS (ob->speed) : 0.95)); 117 exp *= 2.0 / (2.0 - ((fabs (ob->speed) < 0.95) ? fabs (ob->speed) : 0.95));
119 exp *= (20.0 + ob->stats.Con) / 20.0; 118 exp *= (20.0 + ob->stats.Con) / 20.0;
120 if (QUERY_FLAG (ob, FLAG_STAND_STILL)) 119 if (QUERY_FLAG (ob, FLAG_STAND_STILL))
121 exp /= 2; 120 exp /= 2;
122 121
123 return (int) exp; 122 return (int) exp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines