Opened 4 years ago

Closed 6 months ago

#1746 closed change (fixed (in master))

Remove annoying/useless terrain

Reported by: takkaria Owned by: d_m
Milestone: 4.1 Keywords: dungeon player
Cc:

Description

  • Remove most secret doors (they're boring)
  • Remove bashing and jamming and iron spikes

Change History (7)

comment:1 Changed 4 years ago by takkaria

  • Type changed from bug to change

comment:2 Changed 4 years ago by PowerWyrm

Changes for bashing and jamming left bugs and an annoying message each time a monster tries to bash a door and fails. The following patch fixes and simplifies the code (process_monster() in melee2.c):

/* Handle doors and secret doors */
else if (cave_iscloseddoor(cave, ny, nx) || cave_issecretdoor(cave, ny, nx))
{
	/* Take a turn */
	do_turn = TRUE;

	/* Learn about door abilities */
	if (m_ptr->ml) {
		rf_on(l_ptr->flags, RF_OPEN_DOOR);
		rf_on(l_ptr->flags, RF_BASH_DOOR);
	}

	/* Creature can open or bash doors */
	if (rf_has(m_ptr->race->flags, RF_OPEN_DOOR) || rf_has(m_ptr->race->flags, RF_BASH_DOOR))
	{
		bool may_bash = ((rf_has(m_ptr->race->flags, RF_BASH_DOOR) && one_in_(2))? TRUE: FALSE);

		/* Stuck door -- try to unlock it */
		if (cave_islockeddoor(cave, ny, nx))
		{
			int k = cave_door_power(cave, ny, nx);

			if (randint0(m_ptr->hp / 10) > k)
			{
				/* Print a message */
				if (m_ptr->ml)
				{
					if (may_bash)
						msg("%s slams against the door.", m_name);
					else
						msg("%s fiddles with the lock.", m_name);
				}
				else
				{
					if (may_bash)
						msg("Something slams against a door.");
					else
						msg("Something fiddles with a lock.");
				}

				/* Reduce the power of the door by one */
				cave_set_feat(c, ny, nx, cave->feat[ny][nx] - 1);
			}
		}

		/* Closed or secret door -- open or bash if allowed */
		else
		{
			if (may_bash)
			{
				cave_smash_door(c, ny, nx);
				msg("You hear a door burst open!");

				disturb(p_ptr, 0, 0);

				/* Fall into doorway */
				do_move = TRUE;
			}
			else
				cave_open_door(c, ny, nx);

			/* Handle viewable doors */
			if (player_has_los_bold(ny, nx))
				do_view = TRUE;
		}
	}
}

comment:3 Changed 4 years ago by takkaria

  • Milestone changed from 3.5.0 to Future

Punting to post 3.5.

comment:4 Changed 4 years ago by takkaria

Thanks, I've included your patch now.

comment:5 Changed 3 years ago by nckmccnnll

  • Milestone changed from Future to 4.1

Targeting 4.1 for the secret doors, and possibly less doors overall

comment:6 Changed 12 months ago by nckmccnnll

  • Status changed from new to confirmed

This is underway, but I'll leave it open for now

comment:7 Changed 6 months ago by nckmccnnll

  • Resolution set to fixed (in master)
  • Status changed from confirmed to closed

I'm calling this done

Note: See TracTickets for help on using tickets.