OSDN Git Service

スコア計算では最大の最大経験値を読むようにした. これにより, アイテム
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 26 Aug 2003 02:32:05 +0000 (02:32 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 26 Aug 2003 02:32:05 +0000 (02:32 +0000)
で経験値吸収されてもスコアが減らなくなった. なお, セーブデータバー
ジョンは1.5.4.1に上がった.

src/defines.h
src/files.c
src/load.c
src/save.c
src/types.h
src/xtra2.c

index 7191617..36c0631 100644 (file)
@@ -49,7 +49,7 @@
 #define H_VER_MAJOR 1
 #define H_VER_MINOR 5
 #define H_VER_PATCH 4
-#define H_VER_EXTRA 0
+#define H_VER_EXTRA 1
 
 /* Added for ZAngband */
 #define FAKE_VERSION   0
index 3f0d0d7..c4a55f0 100644 (file)
@@ -5984,7 +5984,7 @@ long total_points(void)
                if(max_dlv[i] > max_dl)
                        max_dl = max_dlv[i];
 
-       point_l = (p_ptr->max_exp + (100 * max_dl));
+       point_l = (p_ptr->max_max_exp + (100 * max_dl));
        point_h = point_l / 0x10000L;
        point_l = point_l % 0x10000L;
        point_h *= mult;
index 8e4daf6..279e5e7 100644 (file)
@@ -1490,6 +1490,8 @@ static void rd_extra(void)
        rd_s32b(&p_ptr->au);
 
        rd_s32b(&p_ptr->max_exp);
+       if (h_older_than(1, 5, 4, 1)) p_ptr->max_max_exp = p_ptr->max_exp;
+       else rd_s32b(&p_ptr->max_max_exp);
        rd_s32b(&p_ptr->exp);
        rd_u16b(&p_ptr->exp_frac);
 
index fb12f49..0626bd7 100644 (file)
@@ -566,6 +566,7 @@ static void wr_extra(void)
        wr_u32b(p_ptr->au);
 
        wr_u32b(p_ptr->max_exp);
+       wr_u32b(p_ptr->max_max_exp);
        wr_u32b(p_ptr->exp);
        wr_u16b(p_ptr->exp_frac);
        wr_s16b(p_ptr->lev);
index 8396df1..16aed08 100644 (file)
@@ -990,6 +990,7 @@ struct player_type
 
        s32b au;                        /* Current Gold */
 
+       s32b max_max_exp;       /* Max max experience (only to calculate score) */
        s32b max_exp;           /* Max experience */
        s32b exp;                       /* Cur experience */
        u16b exp_frac;          /* Cur exp frac (times 2^16) */
index 0d5808a..da59e40 100644 (file)
@@ -28,19 +28,20 @@ void check_experience(void)
 
        /* Hack -- lower limit */
        if (p_ptr->exp < 0) p_ptr->exp = 0;
-
-       /* Hack -- lower limit */
        if (p_ptr->max_exp < 0) p_ptr->max_exp = 0;
+       if (p_ptr->max_max_exp < 0) p_ptr->max_max_exp = 0;
 
        /* Hack -- upper limit */
        if (p_ptr->exp > PY_MAX_EXP) p_ptr->exp = PY_MAX_EXP;
-
-       /* Hack -- upper limit */
        if (p_ptr->max_exp > PY_MAX_EXP) p_ptr->max_exp = PY_MAX_EXP;
+       if (p_ptr->max_max_exp > PY_MAX_EXP) p_ptr->max_max_exp = PY_MAX_EXP;
 
        /* Hack -- maintain "max" experience */
        if (p_ptr->exp > p_ptr->max_exp) p_ptr->max_exp = p_ptr->exp;
 
+       /* Hack -- maintain "max max" experience */
+       if (p_ptr->max_exp > p_ptr->max_max_exp) p_ptr->max_max_exp = p_ptr->max_exp;
+
        /* Redraw experience */
        p_ptr->redraw |= (PR_EXP);