summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2014-12-22 21:19:32 +0100
committerBardur Arantsson <bardur@scientician.net>2014-12-23 12:09:35 +0100
commitbd77f03d382725f540bb70b546dfc3f8cb3eb8be (patch)
tree9f5ce92e322f9a72673a9f4a8b2e14c4f3faad82
parentbc77660df705f46e55c8c733a924c5cc85dcdc48 (diff)
Enable "maxmize stats" permanently
-rw-r--r--src/birth.cc57
-rw-r--r--src/externs.h2
-rw-r--r--src/files.cc7
-rw-r--r--src/loadsave.cc2
-rw-r--r--src/tables.cc3
-rw-r--r--src/types.h1
-rw-r--r--src/variable.cc4
-rw-r--r--src/xtra1.cc12
8 files changed, 16 insertions, 72 deletions
diff --git a/src/birth.cc b/src/birth.cc
index 04797dc3..bcacb664 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -338,22 +338,10 @@ static int adjust_stat(int value, int amount, int auto_roll)
{
value++;
}
- else if (p_ptr->maximize)
+ else
{
value += 10;
}
- else if (value < 18 + 70)
- {
- value += ((auto_roll ? 15 : randint(15)) + 5);
- }
- else if (value < 18 + 90)
- {
- value += ((auto_roll ? 6 : randint(6)) + 2);
- }
- else if (value < 18 + 100)
- {
- value++;
- }
}
}
@@ -422,25 +410,11 @@ static void get_stats(void)
/* Obtain a "bonus" for "race" and "class" */
bonus = rp_ptr->r_adj[i] + rmp_ptr->r_adj[i] + cp_ptr->c_adj[i];
- /* Variable stat maxes */
- if (p_ptr->maximize)
- {
- /* Start fully healed */
- p_ptr->stat_cur[i] = p_ptr->stat_max[i];
+ /* Start fully healed */
+ p_ptr->stat_cur[i] = p_ptr->stat_max[i];
- /* Efficiency -- Apply the racial/class bonuses */
- stat_use[i] = modify_stat_value(p_ptr->stat_max[i], bonus);
- }
-
- /* Fixed stat maxes */
- else
- {
- /* Apply the bonus to the stat (somewhat randomly) */
- stat_use[i] = adjust_stat(p_ptr->stat_max[i], bonus, FALSE);
-
- /* Save the resulting stat maximum */
- p_ptr->stat_cur[i] = p_ptr->stat_max[i] = stat_use[i];
- }
+ /* Efficiency -- Apply the racial/class bonuses */
+ stat_use[i] = modify_stat_value(p_ptr->stat_max[i], bonus);
/* No temporary drain (yet...) */
p_ptr->stat_cnt[i] = 0;
@@ -2336,7 +2310,6 @@ static bool_ player_birth_aux_ask()
}
/* Set birth options: maximize, preserve, sepcial levels and astral */
- p_ptr->maximize = maximize;
p_ptr->preserve = preserve;
p_ptr->special = special_lvls;
p_ptr->astral = (PRACE_FLAG2(PR2_ASTRAL)) ? TRUE : FALSE;
@@ -2542,24 +2515,8 @@ static bool_ player_birth_aux_point(void)
/* Process stats */
for (i = 0; i < 6; i++)
{
- /* Variable stat maxes */
- if (p_ptr->maximize)
- {
- /* Reset stats */
- p_ptr->stat_cur[i] = p_ptr->stat_max[i] = stats[i];
-
- }
-
- /* Fixed stat maxes */
- else
- {
- /* Obtain a "bonus" for "race" and "class" */
- int bonus = rp_ptr->r_adj[i] + cp_ptr->c_adj[i];
-
- /* Apply the racial/class bonuses */
- p_ptr->stat_cur[i] = p_ptr->stat_max[i] =
- modify_stat_value(stats[i], bonus);
- }
+ /* Reset stats */
+ p_ptr->stat_cur[i] = p_ptr->stat_max[i] = stats[i];
/* Total cost */
cost += birth_stat_costs[stats[i] - 10];
diff --git a/src/externs.h b/src/externs.h
index 281a4e8c..fe68c707 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -489,7 +489,7 @@ extern s16b doppleganger;
extern bool_ generate_encounter;
extern bool_ autoroll;
extern bool_ point_based;
-extern bool_ maximize, preserve, special_lvls, ironman_rooms;
+extern bool_ preserve, special_lvls, ironman_rooms;
extern bool_ inventory_no_move;
extern bool_ *m_allow_special;
extern bool_ *k_allow_special;
diff --git a/src/files.cc b/src/files.cc
index ed782f72..728a01ad 100644
--- a/src/files.cc
+++ b/src/files.cc
@@ -2610,11 +2610,6 @@ errr file_character(cptr name, bool_ full)
else
fprintf(fff, "\n Joke monsters: OFF");
- if (p_ptr->maximize)
- fprintf(fff, "\n Maximize mode: ON");
- else
- fprintf(fff, "\n Maximize mode: OFF");
-
if (p_ptr->preserve)
fprintf(fff, "\n Preserve Mode: ON");
else
@@ -4251,7 +4246,7 @@ long total_points(void)
if (!comp_death) comp_death = 1;
if (p_ptr->preserve) mult -= 1; /* Penalize preserve, maximize modes */
- if (p_ptr->maximize) mult -= 1;
+ mult -= 1; /* maximize pentalty, always on */
if (auto_scum) mult -= 4;
if (small_levels) mult += ((always_small_level) ? 4 : 10);
if (empty_levels) mult += 2;
diff --git a/src/loadsave.cc b/src/loadsave.cc
index df58fa76..18cd28f5 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -616,7 +616,7 @@ static bool_ do_extra(int flag)
do_byte((byte*)&p_ptr->black_breath, flag);
do_byte((byte*)&fate_flag, flag);
do_byte(&p_ptr->searching, flag);
- do_byte(&p_ptr->maximize, flag);
+ do_byte(&tmp8u, flag);
do_byte(&p_ptr->preserve, flag);
do_byte(&p_ptr->special, flag);
do_byte((byte*)&ambush_flag, flag);
diff --git a/src/tables.cc b/src/tables.cc
index b3b616bb..efcbfe27 100644
--- a/src/tables.cc
+++ b/src/tables.cc
@@ -1595,9 +1595,6 @@ option_type option_info[] =
/*** Birth Options ***/
- { &maximize, TRUE, 6, 1,
- "maximize", "Maximise stats" },
-
{ &preserve, TRUE, 6, 2,
"preserve", "Preserve artifacts" },
diff --git a/src/types.h b/src/types.h
index efc83a64..85bb91a8 100644
--- a/src/types.h
+++ b/src/types.h
@@ -1391,7 +1391,6 @@ struct player_type
byte hitdie; /* Hit dice (sides) */
u16b expfact; /* Experience factor */
- byte maximize; /* Maximize stats */
byte preserve; /* Preserve artifacts */
byte special; /* Special levels */
byte allow_one_death; /* Blood of life */
diff --git a/src/variable.cc b/src/variable.cc
index bf27393b..a6df056d 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -1203,8 +1203,8 @@ bool_ autoroll;
/* Point based */
bool_ point_based;
-/* Maximize, preserve, special levels, ironman_rooms */
-bool_ maximize, preserve, special_lvls, ironman_rooms;
+/* Preserve, special levels, ironman_rooms */
+bool_ preserve, special_lvls, ironman_rooms;
/* In inventory option window, just erase the letters,
* rather that displaying the list without the invalid
diff --git a/src/xtra1.cc b/src/xtra1.cc
index 01d010fa..e819cbfb 100644
--- a/src/xtra1.cc
+++ b/src/xtra1.cc
@@ -3049,15 +3049,11 @@ void calc_bonuses(bool_ silent)
/* The extra flags */
apply_flags(p_ptr->xtra_f1, p_ptr->xtra_f2, p_ptr->xtra_f3, p_ptr->xtra_f4, p_ptr->xtra_f5, p_ptr->xtra_esp, 0, 0, 0, 0, 0);
- /* Hack -- apply racial/class stat maxes */
- if (p_ptr->maximize)
+ /* Apply the racial modifiers */
+ for (i = 0; i < 6; i++)
{
- /* Apply the racial modifiers */
- for (i = 0; i < 6; i++)
- {
- /* Modify the stats for "race" */
- p_ptr->stat_add[i] += (rp_ptr->r_adj[i] + rmp_ptr->r_adj[i] + cp_ptr->c_adj[i]);
- }
+ /* Modify the stats for "race" */
+ p_ptr->stat_add[i] += (rp_ptr->r_adj[i] + rmp_ptr->r_adj[i] + cp_ptr->c_adj[i]);
}