Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: patches for savethrow & regeneration



This is a report from Japanese crossfire mailing-list.

1) Character max level is 110 now. But elements of savethrow array
   are 101 yet.
   We adopt "1" for 101-110 level savethrow value on this patch,
   however, I don't know it is a right.

2) There are no regeneration codes in living.c. So regereration
   variables doesn't change on 0.92.7.
   Regeneration variables in character save-file (gen_hp,gen_sp,
   gen_grace,digestion) may be different from right value. So
   you must check save-files after use this patch.


patch for common/living.c

*** living.c.orig	Fri Oct  4 14:51:11 1996
--- living.c.new	Fri Oct  4 15:29:37 1996
***************
*** 196,208 ****
  /* Max level is 100.  By making it 101, it means values 0->100 are valid.
   * Thus, we can use op->level directly, and it also works for level 0 people.
   */
! int savethrow[101]={
    18,
    18,17,16,15,14,14,13,13,12,12,12,11,11,11,11,10,10,10,10, 9,
     9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
     6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4,
     4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2,
!    2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  };
  
  int object_saves[NROFATTACKS][NROFMATERIALS] = {
--- 196,209 ----
  /* Max level is 100.  By making it 101, it means values 0->100 are valid.
   * Thus, we can use op->level directly, and it also works for level 0 people.
   */
! int savethrow[111]={
    18,
    18,17,16,15,14,14,13,13,12,12,12,11,11,11,11,10,10,10,10, 9,
     9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6,
     6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4,
     4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2,
!    2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
!    1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  };
  
  int object_saves[NROFATTACKS][NROFMATERIALS] = {
***************
*** 572,577 ****
--- 573,579 ----
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel less lucky.");
      }
    if(tmp->stats.hp && op->type==PLAYER) {
+     op->contr->gen_hp+=tmp->stats.hp*flag;
      if(flag*tmp->stats.hp>0)
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel much more healthy!");
      else
***************
*** 578,583 ****
--- 580,586 ----
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel much less healthy!");
    }
    if(tmp->stats.sp && op->type==PLAYER && tmp->type!=SKILL) {
+     op->contr->gen_sp+=tmp->stats.sp*flag;
      if(flag*tmp->stats.sp>0)
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel one with the powers of magic!");
      else
***************
*** 585,596 ****
    }
    /* for the future when artifacts set this -b.t. */
    if(tmp->stats.grace && op->type==PLAYER) {
!      if(flag*tmp->stats.grace>0)
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel closer to your god!");
      else 
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You suddenly feel less holy.");
    } 
    if(tmp->stats.food && op->type==PLAYER) {
      if(tmp->stats.food*flag>0)
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel your digestion slowing down.");
      else
--- 588,601 ----
    }
    /* for the future when artifacts set this -b.t. */
    if(tmp->stats.grace && op->type==PLAYER) {
!     op->contr->gen_grace+=tmp->stats.grace*flag;
!     if(flag*tmp->stats.grace>0)
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel closer to your god!");
      else 
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You suddenly feel less holy.");
    } 
    if(tmp->stats.food && op->type==PLAYER) {
+     op->contr->digestion+=tmp->stats.food*flag;
      if(tmp->stats.food*flag>0)
        (*draw_info_func)(NDI_UNIQUE, 0, op,"You feel your digestion slowing down.");
      else

patch for include/living.h

*** living.h.orig	Fri Oct  4 15:02:07 1996
--- living.h.new	Fri Oct  4 15:03:09 1996
***************
*** 43,49 ****
  extern int turn_bonus[MAX_STAT + 1];
  extern int max_carry[MAX_STAT + 1];
  extern int dam_bonus[MAX_STAT + 1];
! extern int savethrow[101];
  extern int turn_bonus[MAX_STAT + 1];
  extern int object_saves[NROFATTACKS][NROFMATERIALS];
  extern int learn_spell[];
--- 43,49 ----
  extern int turn_bonus[MAX_STAT + 1];
  extern int max_carry[MAX_STAT + 1];
  extern int dam_bonus[MAX_STAT + 1];
! extern int savethrow[111];
  extern int turn_bonus[MAX_STAT + 1];
  extern int object_saves[NROFATTACKS][NROFMATERIALS];
  extern int learn_spell[];


Sorry, May English is poor.
-- 
Mannen Akihiro mannen@is.s.u-tokyo.ac.jp
Department of Information Science, Faculty of Science
University of Tokyo