Difference for server/gods.c from version 1.37 to 1.38


version 1.37 version 1.38
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_gods_c =   * static char *rcsid_gods_c =
  *   "$Id: gods.c,v 1.37 2003/09/13 05:02:10 mwedel Exp $";   *   "$Id: gods.c,v 1.38 2003/11/10 05:39:50 mwedel Exp $";
  */   */
   
 /*  /*
Line 271
 
Line 271
    god_intervention(pl,pl_god, skill);     god_intervention(pl,pl_god, skill);
   
     } else { /* praying to another god! */      } else { /* praying to another god! */
  int loss = 0,angry=1;   uint64 loss = 0;
    int angry=1;
   
  /* I believe the logic for detecting opposing gods was completely   /* I believe the logic for detecting opposing gods was completely
  * broken - I think it should work now.  altar->other_arch   * broken - I think it should work now.  altar->other_arch
Line 291
 
Line 292
                                 "Foul Priest! %s punishes you!",pl_god->name);                                  "Foul Priest! %s punishes you!",pl_god->name);
  tmp=get_archetype(LOOSE_MANA);   tmp=get_archetype(LOOSE_MANA);
  cast_magic_storm(pl,tmp, pl_god->level+20);   cast_magic_storm(pl,tmp, pl_god->level+20);
      }       } else
      new_draw_info_format(NDI_UNIQUE|NDI_NAVY,0,pl,       new_draw_info_format(NDI_UNIQUE|NDI_NAVY,0,pl,
                                 "Foolish heretic! %s is livid!",pl_god->name);                                  "Foolish heretic! %s is livid!",pl_god->name);
  } else    } else
Line 302
 
Line 303
  * we lose experience from the clerical experience obj    * we lose experience from the clerical experience obj
  */   */
   
  loss = 0.1 * (float) skill->stats.exp;   loss = angry * (skill->stats.exp / 10);
  if(loss)   if(loss)
      change_exp(pl, -random_roll(0, loss*angry-1, pl, PREFER_LOW),       change_exp(pl, -random_roll64(0, loss, pl, PREFER_LOW),
     skill?skill->skill:"none", SK_SUBTRACT_SKILL_EXP);      skill?skill->skill:"none", SK_SUBTRACT_SKILL_EXP);
   
  /* May switch Gods, but its random chance based on our current level   /* May switch Gods, but its random chance based on our current level
Line 374
 
Line 375
 void become_follower (object *op, object *new_god) {  void become_follower (object *op, object *new_god) {
     object *old_god = NULL;                      /* old god */      object *old_god = NULL;                      /* old god */
     treasure *tr;      treasure *tr;
     object *item, *skop;      object *item, *skop, *next;
     int i;      int i;
          
     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. */
     for(item=op->inv;item!=NULL;item=item->below) {      for(item=op->inv;item!=NULL;item=next) {
         if(QUERY_FLAG(item,FLAG_STARTEQUIP) && item->invisible) {   next = item->below;
      /* remove all invisible startequip items which are       /* remove all invisible startequip items which are
       *  not skill, exp or force         *  not skill, exp or force
       */        */
      if(item->type==SKILL || item->type==EXPERIENCE ||          if(QUERY_FLAG(item,FLAG_STARTEQUIP) && item->invisible &&
         item->type==FORCE) continue;      (item->type != SKILL) && (item->type != EXPERIENCE) &&
       (item->type != FORCE)) {
   
        if (item->type == SPELL)
    new_draw_info_format(NDI_UNIQUE|NDI_NAVY, 0, op,
    "You lose knowledge of %s.", item->name);
      remove_ob(item);       remove_ob(item);
      free_object(item);       free_object(item);
      item=op->inv;  
  }   }
     }      }
          
Line 417
 
Line 422
     /* give the player any special god-characteristic-items. */      /* give the player any special god-characteristic-items. */
     for(tr=new_god->randomitems->items; tr!=NULL; tr = tr->next) {      for(tr=new_god->randomitems->items; tr!=NULL; tr = tr->next) {
       if(tr->item && tr->item->clone.invisible && tr->item->clone.type != SPELLBOOK &&        if(tr->item && tr->item->clone.invisible && tr->item->clone.type != SPELLBOOK &&
          tr->item->clone.type != BOOK)           tr->item->clone.type != BOOK && tr->item->clone.type != SPELL)
         god_gives_present(op,new_god,tr); }          god_gives_present(op,new_god,tr); }
   
   
Line 497
 
Line 502
  stop_using_item(op,SHIELD,1);   stop_using_item(op,SHIELD,1);
     }      }
   
     SET_FLAG(skop,FLAG_APPLIED);  /*    SET_FLAG(skop,FLAG_APPLIED);*/
     (void) change_abil(op,skop);      (void) change_abil(op,skop);
   
     check_special_prayers (op, new_god);      check_special_prayers (op, new_god);


Legend:
line(s) removed in v.1.37 
line(s) changed
 line(s) added in v.1.38

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:33