version 1.11 | | version 1.12 |
---|
| | |
/* | | /* |
* static char *rcsid_gods_c = | | * static char *rcsid_gods_c = |
* "$Id: gods.c,v 1.11 2000/12/04 00:40:05 cvs Exp $"; | | * "$Id: gods.c,v 1.12 2000/12/16 23:32:14 avogl Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | |
void become_follower (object *op, object *new_god) { | | void become_follower (object *op, object *new_god) { |
object *exp_obj = op->chosen_skill->exp_obj; | | object *exp_obj = op->chosen_skill->exp_obj; |
| | int i; |
| | |
if(!op||!new_god) return; | | if(!op||!new_god) return; |
| | |
| | |
exp_obj->path_attuned=new_god->path_attuned; | | exp_obj->path_attuned=new_god->path_attuned; |
exp_obj->path_repelled=new_god->path_repelled; | | exp_obj->path_repelled=new_god->path_repelled; |
exp_obj->path_denied=new_god->path_denied; | | exp_obj->path_denied=new_god->path_denied; |
/* This may copy immunities */ | | /* copy god's resistances */ |
memcpy(exp_obj->resist, new_god->resist, sizeof(new_god->resist)); | | memcpy(exp_obj->resist, new_god->resist, sizeof(new_god->resist)); |
| | |
| | /* make sure that certain immunities do NOT get passed |
| | * to the follower! */ |
| | for (i=0; i<NROFATTACKS; i++) |
| | if (exp_obj->resist[i] > 30 && (i==ATNR_FIRE || i==ATNR_COLD || |
| | i==ATNR_ELECTRICITY || i==ATNR_POISON)) |
| | exp_obj->resist[i] = 30; |
| | |
#ifdef MORE_PRIEST_GIFTS | | #ifdef MORE_PRIEST_GIFTS |
exp_obj->stats.hp= (sint16) new_god->last_heal; | | exp_obj->stats.hp= (sint16) new_god->last_heal; |
exp_obj->stats.sp= (sint16) new_god->last_sp; | | exp_obj->stats.sp= (sint16) new_god->last_sp; |