version 1.61 | | version 1.62 |
---|
| | |
/* | | /* |
* static char *rcsid_gods_c = | | * static char *rcsid_gods_c = |
* "$Id: gods.c,v 1.61 2006/06/05 06:28:56 mwedel Exp $"; | | * "$Id: gods.c,v 1.62 2006/07/21 12:39:54 gros Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
treasure *tr; | | treasure *tr; |
object *item, *skop, *next; | | object *item, *skop, *next; |
int i,sk_applied; | | int i,sk_applied; |
| | int undeadified = 0; /* Turns to true if changing god can changes the undead |
| | * status of the player.*/ |
old_god = find_god(determine_god(op)); | | old_god = find_god(determine_god(op)); |
| | |
/* take away any special god-characteristic items. */ | | /* take away any special god-characteristic items. */ |
| | |
| | |
sk_applied=QUERY_FLAG(skop,FLAG_APPLIED); /* save skill status */ | | sk_applied=QUERY_FLAG(skop,FLAG_APPLIED); /* save skill status */ |
| | |
| | /* Clear the "undead" status. We also need to force a call to change_abil, |
| | * so I set undeadified for that. |
| | * - gros, 21th July 2006. |
| | */ |
| | if ((old_god)&&(QUERY_FLAG(old_god,FLAG_UNDEAD))) |
| | { |
| | CLEAR_FLAG(skop,FLAG_UNDEAD); |
| | undeadified=1; |
| | } |
| | |
if(skop->title) { /* get rid of old god */ | | if(skop->title) { /* get rid of old god */ |
new_draw_info_format(NDI_UNIQUE,0,op, | | new_draw_info_format(NDI_UNIQUE,0,op, |
"%s's blessing is withdrawn from you.",skop->title); | | "%s's blessing is withdrawn from you.",skop->title); |
/* The point of this is to really show what abilities the player just lost */ | | /* The point of this is to really show what abilities the player just lost */ |
if (sk_applied) { | | if (sk_applied||undeadified) { |
CLEAR_FLAG(skop,FLAG_APPLIED); | | CLEAR_FLAG(skop,FLAG_APPLIED); |
(void) change_abil(op,skop); | | (void) change_abil(op,skop); |
} | | } |