diff --git a/campgns/ancntkpr_cfgs/rules.cfg b/campgns/ancntkpr_cfgs/rules.cfg index 6062d0c65..d1d390c84 100644 --- a/campgns/ancntkpr_cfgs/rules.cfg +++ b/campgns/ancntkpr_cfgs/rules.cfg @@ -29,7 +29,7 @@ DungeonHeartHealth = 30000 DungeonHeartHealTime = 8 DungeonHeartHealHealth = 1 HeroDoorWaitTime = 200 -PreserveClassicBugs = RESURRECT_FOREVER OVERFLOW_8BIT CLAIM_ROOM_ALL_THINGS RESURRECT_REMOVED NO_HAND_PURGE_ON_DEFEAT MUST_OBEY_KEEPS_NOT_DO_JOBS PASSIVE_NEUTRALS +PreserveClassicBugs = RESURRECT_FOREVER OVERFLOW_8BIT CLAIM_ROOM_ALL_THINGS RESURRECT_REMOVED NO_HAND_PURGE_ON_DEFEAT MUST_OBEY_KEEPS_NOT_DO_JOBS PASSIVE_NEUTRALS BREAK_NEUTRAL_WALLS [computer] AutoDigLimit = 10 diff --git a/config/fxdata/rules.cfg b/config/fxdata/rules.cfg index c10157482..3f5c0b087 100644 --- a/config/fxdata/rules.cfg +++ b/config/fxdata/rules.cfg @@ -34,7 +34,7 @@ DungeonHeartHealth = 30000 DungeonHeartHealTime = 8 DungeonHeartHealHealth = 1 HeroDoorWaitTime = 200 -; Possible Classic Bugs: RESURRECT_FOREVER, OVERFLOW_8BIT, CLAIM_ROOM_ALL_THINGS, RESURRECT_REMOVED, NO_HAND_PURGE_ON_DEFEAT, MUST_OBEY_KEEPS_NOT_DO_JOBS, PASSIVE_NEUTRALS +; Possible Classic Bugs: RESURRECT_FOREVER OVERFLOW_8BIT CLAIM_ROOM_ALL_THINGS RESURRECT_REMOVED NO_HAND_PURGE_ON_DEFEAT MUST_OBEY_KEEPS_NOT_DO_JOBS PASSIVE_NEUTRALS BREAK_NEUTRAL_WALLS PreserveClassicBugs = [computer] diff --git a/src/config_rules.c b/src/config_rules.c index d1ac7635a..fcca7b7c0 100644 --- a/src/config_rules.c +++ b/src/config_rules.c @@ -77,6 +77,7 @@ const struct NamedCommand rules_game_classicbugs_commands[] = { {"NO_HAND_PURGE_ON_DEFEAT", 5}, {"MUST_OBEY_KEEPS_NOT_DO_JOBS", 6}, {"PASSIVE_NEUTRALS", 7}, + {"BREAK_NEUTRAL_WALLS", 8}, {NULL, 0}, }; @@ -619,6 +620,11 @@ TbBool parse_rules_game_blocks(char *buf, long len, const char *config_textname, gameadd.classic_bugs_flags |= ClscBug_PassiveNeutrals; n++; break; + + case 8: // BREAK_NEUTRAL_WALLS + gameadd.classic_bugs_flags |= ClscBug_BreakNeutralWalls; + n++; + break; default: CONFWRNLOG("Incorrect value of \"%s\" parameter \"%s\" in [%s] block of %s file.", COMMAND_TEXT(cmd_num),word_buf,block_buf,config_textname); diff --git a/src/game_merge.h b/src/game_merge.h index fa1d6a5df..af3497835 100644 --- a/src/game_merge.h +++ b/src/game_merge.h @@ -66,7 +66,8 @@ enum ClassicBugFlags { ClscBug_ResurrectRemoved = 0x0008, ClscBug_NoHandPurgeOnDefeat = 0x0010, ClscBug_MustObeyKeepsNotDoJobs = 0x0020, - ClscBug_PassiveNeutrals = 0x0040, + ClscBug_PassiveNeutrals = 0x0040, + ClscBug_BreakNeutralWalls = 0x0080, }; /******************************************************************************/ diff --git a/src/thing_shots.c b/src/thing_shots.c index aad8b0ce7..5ed720c0c 100644 --- a/src/thing_shots.c +++ b/src/thing_shots.c @@ -288,18 +288,28 @@ void process_dig_shot_hit_wall(struct Thing *thing, unsigned long blocked_flags) slb = get_slabmap_for_subtile(stl_x, stl_y); // You can only dig your own tiles or non-fortified neutral ground (dirt/gold) - // If you're not the tile owner - if (slabmap_owner(slb) != diggertng->owner) - { - struct SlabAttr *slbattr; - slbattr = get_slab_attrs(slb); - // and if it's fortified - if (slbattr->category == SlbAtCtg_FortifiedWall) - { - // digging not allowed - return; - } - } + // If you're not the tile owner, unless the classic bug mode is enabled. + if (!(gameadd.classic_bugs_flags & ClscBug_BreakNeutralWalls)) + { + if (slabmap_owner(slb) != diggertng->owner) + { + struct SlabAttr *slbattr; + slbattr = get_slab_attrs(slb); + // and if it's fortified + if (slbattr->category == SlbAtCtg_FortifiedWall) + { + // digging not allowed + return; + } + } + } + else + { + if ((slabmap_owner(slb) != game.neutral_player_num) && (slabmap_owner(slb) != diggertng->owner)) + { + return; + } + } struct Map *mapblk; mapblk = get_map_block_at(stl_x, stl_y);