diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-19 23:11:34 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-19 23:11:42 +0200 |
commit | 4743b501f48b257b32defb201c35ec05cf7feaa9 (patch) | |
tree | 5e47e9cf73aa86541abd2da0249a5c8dfa53c0b3 /src | |
parent | 1cd265d4f32d2c624387b1bafc45ed0d18b3d257 (diff) |
Add option to edit piety in wizard mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/wizard2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/wizard2.c b/src/wizard2.c index 36efa148..e2683435 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -351,6 +351,23 @@ static void do_cmd_wiz_change_aux(void) /* Update */ check_experience(); + + /* Default */ + sprintf(tmp_val, "%ld", (long) (p_ptr->grace)); + + /* Query */ + if (!get_string("Piety: ", tmp_val, 9)) return; + + /* Extract */ + tmp_long = atol(tmp_val); + + /* Verify */ + if (tmp_long < 0) tmp_long = 0L; + + /* Save */ + p_ptr->grace = tmp_long; + + /* Default */ sprintf(tmp_val, "%d", p_ptr->luck_base); |