version 1.3 | | version 1.4 |
---|
| | |
/* | | /* |
* static char *rcsid_arch_c = | | * static char *rcsid_arch_c = |
* "$Id: exp.c,v 1.3 2000/12/04 00:40:03 cvs Exp $"; | | * "$Id: exp.c,v 1.4 2002/07/15 04:57:11 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
Copyright (C) 1992 Frank Tore Johansen | | Copyright (C) 1992 Frank Tore Johansen |
| | |
This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify |
| | |
along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| | |
The author can be reached via e-mail to frankj@ifi.uio.no. | | The authors can be reached via e-mail at crossfire-devel@real-time.com |
*/ | | */ |
| | |
#include <stdio.h> | | #include <stdio.h> |
#include <global.h> | | #include <global.h> |
| | |
| | |
(1.0*(QUERY_FLAG(ob,FLAG_NO_MAGIC)!= FALSE)) + | | (1.0*(QUERY_FLAG(ob,FLAG_NO_MAGIC)!= FALSE)) + |
(0.1*(QUERY_FLAG(ob,FLAG_PICK_UP)!= FALSE)) + | | (0.1*(QUERY_FLAG(ob,FLAG_PICK_UP)!= FALSE)) + |
(0.1*(QUERY_FLAG(ob,FLAG_USE_SCROLL)!= FALSE)) + | | (0.1*(QUERY_FLAG(ob,FLAG_USE_SCROLL)!= FALSE)) + |
(0.2*(QUERY_FLAG(ob,FLAG_USE_WAND)!= FALSE)) + | | (0.2*(QUERY_FLAG(ob,FLAG_USE_RANGE)!= FALSE)) + |
(0.1*(QUERY_FLAG(ob,FLAG_USE_BOW)!= FALSE)) + | | (0.1*(QUERY_FLAG(ob,FLAG_USE_BOW)!= FALSE)); |
(0.1*(ob->can_apply != FALSE)); | | |
exp = (ob->stats.maxhp<5) ? 5 : ob->stats.maxhp; | | exp = (ob->stats.maxhp<5) ? 5 : ob->stats.maxhp; |
exp *= (QUERY_FLAG(ob,FLAG_CAST_SPELL) && has_ability(ob)) | | exp *= (QUERY_FLAG(ob,FLAG_CAST_SPELL) && has_ability(ob)) |
? (40+(ob->stats.maxsp>80?80:ob->stats.maxsp))/40 : 1; | | ? (40+(ob->stats.maxsp>80?80:ob->stats.maxsp))/40 : 1; |