* @return なし
* @details
*/
-long calc_score(void)
+long calc_score(player_type *creature_ptr)
{
int i, mult = 100;
DEPTH max_dl = 0;
u32b point, point_h, point_l;
- int arena_win = MIN(p_ptr->arena_number, MAX_ARENA_MONS);
+ int arena_win = MIN(creature_ptr->arena_number, MAX_ARENA_MONS);
if (!preserve_mode) mult += 10;
if (!autoroller) mult += 10;
if (max_dlv[i] > max_dl)
max_dl = max_dlv[i];
- point_l = (p_ptr->max_max_exp + (100 * max_dl));
+ point_l = (creature_ptr->max_max_exp + (100 * max_dl));
point_h = point_l / 0x10000L;
point_l = point_l % 0x10000L;
point_h *= mult;
point_l /= 100;
point = (point_h << 16) + (point_l);
- if (p_ptr->arena_number >= 0)
+ if (creature_ptr->arena_number >= 0)
point += (arena_win * arena_win * (arena_win > 29 ? 1000 : 100));
if (ironman_downward) point *= 2;
- if (p_ptr->pclass == CLASS_BERSERKER)
+ if (creature_ptr->pclass == CLASS_BERSERKER)
{
- if (p_ptr->prace == RACE_SPECTRE)
+ if (creature_ptr->prace == RACE_SPECTRE)
point = point / 5;
}
- if ((p_ptr->pseikaku == SEIKAKU_MUNCHKIN) && point)
+ if ((creature_ptr->pseikaku == SEIKAKU_MUNCHKIN) && point)
{
point = 1;
- if (p_ptr->total_winner) point = 2;
+ if (creature_ptr->total_winner) point = 2;
}
if (easy_band) point = (0 - point);
extern void wreck_the_pattern(player_type *creature_ptr);
extern void cnv_stat(int val, char *out_val);
extern s16b modify_stat_value(int value, int amount);
-extern long calc_score(void);
+extern long calc_score(player_type *creature_ptr);
extern const s32b player_exp[PY_MAX_LEVEL];
extern const s32b player_exp_a[PY_MAX_LEVEL];
buf_sprintf(score, "version: Hengband %d.%d.%d\n",
FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH);
#endif
- buf_sprintf(score, "score: %d\n", calc_score());
+ buf_sprintf(score, "score: %d\n", calc_score(p_ptr));
buf_sprintf(score, "level: %d\n", p_ptr->lev);
buf_sprintf(score, "depth: %d\n", current_floor_ptr->dun_level);
buf_sprintf(score, "maxlv: %d\n", p_ptr->max_plv);
FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
/* Calculate and save the points */
- sprintf(the_score.pts, "%9ld", (long)calc_score());
+ sprintf(the_score.pts, "%9ld", (long)calc_score(p_ptr));
the_score.pts[9] = '\0';
/* Save the current gold */
FAKE_VER_MAJOR, FAKE_VER_MINOR, FAKE_VER_PATCH);
/* Calculate and save the points */
- sprintf(the_score.pts, "%9ld", (long)calc_score());
+ sprintf(the_score.pts, "%9ld", (long)calc_score(p_ptr));
/* Save the current gold */
sprintf(the_score.gold, "%9lu", (long)p_ptr->au);