1 | /* |
1 | /* |
2 | * static char *rcsid_skills_c = |
2 | * static char *rcsid_skills_c = |
3 | * "$Id: skills.c,v 1.3 2006/06/06 23:32:27 root Exp $"; |
3 | * "$Id: skills.c,v 1.4 2006/06/06 23:38:05 root Exp $"; |
4 | */ |
4 | */ |
5 | /* |
5 | /* |
6 | CrossFire, A Multiplayer game for X-windows |
6 | CrossFire, A Multiplayer game for X-windows |
7 | |
7 | |
8 | Copyright (C) 2003 Mark Wedel & Crossfire Development Team |
8 | Copyright (C) 2003 Mark Wedel & Crossfire Development Team |
… | |
… | |
295 | } |
295 | } |
296 | |
296 | |
297 | // reduce monster experience by experience we gained, as to |
297 | // reduce monster experience by experience we gained, as to |
298 | // limit the amount of exp that can be gained by stealing from monsters |
298 | // limit the amount of exp that can be gained by stealing from monsters |
299 | // (jessies gave ~20,000,000 exp otherwise. |
299 | // (jessies gave ~20,000,000 exp otherwise. |
300 | int exp = MIN (tmp->stats.exp, calc_skill_exp (op,tmp, skill)); |
300 | int exp = calc_skill_exp (op, tmp, skill); |
|
|
301 | exp = MIN (tmp->stats.exp, exp); |
301 | tmp->stats.exp -= exp; |
302 | tmp->stats.exp -= exp; |
302 | return exp; |
303 | return exp; |
303 | } |
304 | } |
304 | } |
305 | } |
305 | return 0; |
306 | return 0; |