diff --git a/src/load.c b/src/load.c index 1659ee5..a98cd17 100644 --- a/src/load.c +++ b/src/load.c @@ -843,12 +843,13 @@ static const struct { { 193, "birth_randarts" }, { 195, "birth_ironman" }, { 196, "birth_no_stores" }, - { 197, "birth_no_artifacts" }, - { 198, "birth_no_stacking" }, - { 199, "birth_no_preserve" }, - { 200, "birth_no_stairs" }, - { 201, "birth_no_feelings" }, - { 202, "birth_no_selling" }, + { 197, "birth_no_home" }, + { 198, "birth_no_artifacts" }, + { 199, "birth_no_stacking" }, + { 200, "birth_no_preserve" }, + { 201, "birth_no_stairs" }, + { 202, "birth_no_feelings" }, + { 203, "birth_no_selling" }, { 205, "birth_ai_sound" }, { 206, "birth_ai_smell" }, { 207, "birth_ai_packs" }, diff --git a/src/option.c b/src/option.c index 5350247..1303708 100644 --- a/src/option.c +++ b/src/option.c @@ -75,6 +75,7 @@ const int option_page[OPT_PAGE_MAX][OPT_PAGE_PER] = OPT_birth_ai_smart, OPT_birth_ironman, OPT_birth_no_stores, + OPT_birth_no_home, OPT_birth_no_artifacts, OPT_birth_no_stacking, OPT_birth_no_preserve, @@ -167,23 +168,24 @@ static const struct option options[OPT_MAX] = { "birth_maximize", "Maximise effect of race/class bonuses", TRUE }, /* 50 */ { "birth_randarts", "Randomise the artifacts (except a very few)", FALSE }, /* 51 */ { "birth_ironman", "Restrict the use of stairs/recall", FALSE }, /* 52 */ -{ "birth_no_stores", "Restrict the use of stores/home", FALSE }, /* 53 */ -{ "birth_no_artifacts", "Restrict creation of artifacts", FALSE }, /* 54 */ -{ "birth_no_stacking", "Don't stack objects on the floor", FALSE }, /* 55 */ -{ "birth_no_preserve", "Lose artifacts when leaving level", FALSE }, /* 56 */ -{ "birth_no_stairs", "Don't generate connected stairs", FALSE }, /* 57 */ -{ "birth_no_feelings", "Don't show level feelings", FALSE }, /* 58 */ -{ "birth_no_selling", "Items always sell for 0 gold", FALSE }, /* 59 */ -{ "birth_keep_randarts", "Use previous set of randarts", TRUE }, /* 60 */ -{ "birth_ai_smell", "Monsters chase recent locations", TRUE }, /* 61 */ -{ "birth_ai_packs", "Monsters act smarter in groups", TRUE }, /* 62 */ -{ "birth_ai_learn", "Monsters learn from their mistakes", FALSE }, /* 63 */ -{ "birth_ai_cheat", "Monsters exploit player's weaknesses", FALSE }, /* 64 */ -{ "birth_ai_smart", "Monsters behave more intelligently (broken)", FALSE }, /* 65 */ -{ NULL, NULL, FALSE }, /* 66 */ +{ "birth_no_stores", "Restrict the use of stores", FALSE }, /* 53 */ +{ "birth_no_home", "Restrict the use of the home", FALSE }, /* 54 */ +{ "birth_no_artifacts", "Restrict creation of artifacts", FALSE }, /* 55 */ +{ "birth_no_stacking", "Don't stack objects on the floor", FALSE }, /* 56 */ +{ "birth_no_preserve", "Lose artifacts when leaving level", FALSE }, /* 57 */ +{ "birth_no_stairs", "Don't generate connected stairs", FALSE }, /* 58 */ +{ "birth_no_feelings", "Don't show level feelings", FALSE }, /* 59 */ +{ "birth_no_selling", "Items always sell for 0 gold", FALSE }, /* 60 */ +{ "birth_keep_randarts", "Use previous set of randarts", TRUE }, /* 61 */ +{ "birth_ai_smell", "Monsters chase recent locations", TRUE }, /* 62 */ +{ "birth_ai_packs", "Monsters act smarter in groups", TRUE }, /* 63 */ +{ "birth_ai_learn", "Monsters learn from their mistakes", FALSE }, /* 64 */ +{ "birth_ai_cheat", "Monsters exploit player's weaknesses", FALSE }, /* 65 */ +{ "birth_ai_smart", "Monsters behave more intelligently (broken)", FALSE }, /* 66 */ { NULL, NULL, FALSE }, /* 67 */ { NULL, NULL, FALSE }, /* 68 */ { NULL, NULL, FALSE }, /* 69 */ +{ NULL, NULL, FALSE }, /* 70 */ }; diff --git a/src/option.h b/src/option.h index e710252..539b0ae 100644 --- a/src/option.h +++ b/src/option.h @@ -89,18 +89,19 @@ extern const int option_page[OPT_PAGE_MAX][OPT_PAGE_PER]; #define OPT_birth_randarts (OPT_BIRTH+1) #define OPT_birth_ironman (OPT_BIRTH+2) #define OPT_birth_no_stores (OPT_BIRTH+3) -#define OPT_birth_no_artifacts (OPT_BIRTH+4) -#define OPT_birth_no_stacking (OPT_BIRTH+5) -#define OPT_birth_no_preserve (OPT_BIRTH+6) -#define OPT_birth_no_stairs (OPT_BIRTH+7) -#define OPT_birth_no_feelings (OPT_BIRTH+8) -#define OPT_birth_no_selling (OPT_BIRTH+9) -#define OPT_birth_keep_randarts (OPT_BIRTH+10) -#define OPT_birth_ai_smell (OPT_BIRTH+11) -#define OPT_birth_ai_packs (OPT_BIRTH+12) -#define OPT_birth_ai_learn (OPT_BIRTH+13) -#define OPT_birth_ai_cheat (OPT_BIRTH+14) -#define OPT_birth_ai_smart (OPT_BIRTH+15) +#define OPT_birth_no_home (OPT_BIRTH+4) +#define OPT_birth_no_artifacts (OPT_BIRTH+5) +#define OPT_birth_no_stacking (OPT_BIRTH+6) +#define OPT_birth_no_preserve (OPT_BIRTH+7) +#define OPT_birth_no_stairs (OPT_BIRTH+8) +#define OPT_birth_no_feelings (OPT_BIRTH+9) +#define OPT_birth_no_selling (OPT_BIRTH+10) +#define OPT_birth_keep_randarts (OPT_BIRTH+11) +#define OPT_birth_ai_smell (OPT_BIRTH+12) +#define OPT_birth_ai_packs (OPT_BIRTH+13) +#define OPT_birth_ai_learn (OPT_BIRTH+14) +#define OPT_birth_ai_cheat (OPT_BIRTH+15) +#define OPT_birth_ai_smart (OPT_BIRTH+16) #define OPT(opt_name) op_ptr->opt[OPT_##opt_name] diff --git a/src/store.c b/src/store.c index 907a6d5..e6edfff 100644 --- a/src/store.c +++ b/src/store.c @@ -3040,7 +3040,8 @@ void do_cmd_store(cmd_code code, cmd_arg args[]) } /* Check if we can enter the store */ - if (OPT(birth_no_stores)) { + if ((OPT(birth_no_stores) && store->sidx != STORE_HOME) || + (OPT(birth_no_home) && store->sidx == STORE_HOME)) { msg("The doors are locked."); return; }