Opened 11 years ago

Closed 7 years ago

#847 closed bug (fixed (in master))

After killing Morgoth, staircase can appear in wall

Reported by: magnate Owned by: d_m
Milestone: 3.5.0 Keywords: dungeon


Very minor bug, but it would be nice if the staircase after killing Morgoth appeared on a floor tile rather than a wall or door (there must be at least one available, where Morgy was standing). The same code may be used when Sauron is killed (I haven't checked).

Change History (9)

comment:1 Changed 11 years ago by magnate

Ok, the problem is in build_quest_stairs, which calls cave_valid_bold, which deliberately *doesn't* avoid walls - because it's called when creating a "destroyed" dungeon level. So without changing cave_valid_bold, I can see two alternatives:

  1. Add a big if statement to build_quest_stairs with ten sets of && !(cave_feat[x][y] == FEAT_FOO), covering three types each of magma and quartz and four types of granite. (Oh, and doors, if we don't want to build there.)
  1. Rewrite build_quest_stairs altogether, to build the staircase where the questor was standing. This seems to me the better solution, but it's a teeny bit radical so I'll wait for Takkaria's view ...

comment:2 Changed 11 years ago by magnate

  • Keywords dungeon added
  • Milestone changed from Triage to 3.1.2 beta

comment:3 Changed 11 years ago by d_m

FWIW, I think the code already uses the fact that Questor's space is "known open" in order to drop quest rewards... is there a problem with putting the quest rewards and the staircase on the same square?

For that matter, any square (especially in a battle with Morgoth) might have items on it. I guess maybe this isn't a big deal. I think I like the idea of putting the stairs either under the (dead) Questor, or under the player.

comment:4 follow-up: Changed 11 years ago by d_m

  • Owner set to d_m
  • Status changed from new to assigned

comment:5 in reply to: ↑ 4 Changed 10 years ago by Timo Pietilä

Stairs possibility to appear in wall is there because it might be the only place to put the stairs when floor is already littered by artifacts. That's OK as long as it doesn't appear in permanent wall in border of the dungeon. To change that we either need to allow artifact and stairs exists in same floor grid (which is bad because player doesn't know where they are) or we need to be able to "push" artifact out of the way when creating the stairs.

I think pushing the artifacts out of the way is right solution.

OTOH that still leaves the situation where you have Morgoth completely surrounded by permanent walls, artifact under him, and you standing on a (sea of) rune(s) so that items can't "flow" anywhere. Creating stairs in that situation has impossible choice of killing artifact, rune or wall. I think in that situation it should be the rune that gets changed to stairs. Any other situation and there are at least two spaces where items can be pushed (under you or under Morgoth).

comment:6 Changed 10 years ago by magnate

  • Milestone changed from 3.2.0 to 3.3.0

Punting to 3.3: non-urgent bug or change.

comment:7 Changed 9 years ago by magnate

  • Milestone changed from 3.3.0 to Future
  • Status changed from assigned to confirmed

Punting in accordance with new milestone policy (that any other milestone is only set once someone is actually working on the ticket).

comment:8 Changed 8 years ago by takkaria

  • Milestone changed from Future to 3.5.0

Assigning still-open bugs from Future to 3.5 for fixing.

comment:9 Changed 7 years ago by takkaria

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

Fixed in 8ed6919

Note: See TracTickets for help on using tickets.