orphu / mcdungeon

A procedural dungeon generator for Minecraft
Other
84 stars 18 forks source link

Random chance of trapped chests #103

Closed JiFish closed 11 years ago

JiFish commented 11 years ago

Add a configurable random change of generating trapped loot chests. Perhaps this will have to be a new feature type?

Requires the upcoming 1.5 minecraft update.

orphu commented 11 years ago

I was thinking they also might make a nice addition to the collapsing room. Chest in the middle of the room can trigger it.

JiFish commented 11 years ago

I'd really like to have a configurable chance that any given chest is trapped. There are two simple designs that would be very easy to implement, but they both have some serious flaws:

2013-03-09_20 36 23 Downside: Extremely easy to spot 2013-03-09_20 37 24 Downside: Placing the TNT in the bedrock reduces the blast and provides a shortcut to the next level.

Both have the possible downside that the TNT may generate in such a way that it gets triggered by nearby blocks?

JiFish commented 11 years ago

This is a little less obvious: A dispenser with TNT. Still visible, though.

2013-03-09_22 24 41

orphu commented 11 years ago

Oh! The dispenser could also contain splash potions.

JiFish commented 11 years ago

Good idea! It's a shame we can't use the same list as the hall trap dispensers. But you'd want a high chance of TNT in these, but none in hall traps.

JiFish commented 11 years ago

In the dark, the new variation is quite difficult to see.

Before I have a go implementing this, do you see an issue with them being placed where existing redstone may trigger them? or should that not ever happen?

Perhaps I could check nearby blocks to see if they can generate a redstone signal.

orphu commented 11 years ago

How are you planning on doing this? I'd lean towards a configurable %chance any chest is trapped that way it can appear anywhere. Maybe even just modify addchest to do this. You might have to add some _floor blocks around the dispenser to make sure it is hidden on certain floor/feature types.

I've been playing around with this effect:

http://youtu.be/kcigm6fa5T0

Should be pretty easy to replicate by placing minecart TNT entities in specific places.

JiFish commented 11 years ago

I was planning to modify addchest.

I'll take a look at minecart TNT tomorrow, thanks for the heads-up.

JiFish commented 11 years ago

Spinning trapped chests in falling sand rooms off in to it's own issue (#144) and assigning this to myself.

JiFish commented 11 years ago

The minecart TNT trick is interesting. But I am not certain why it triggers? It doesn't seem to be by block update as a trapped chest won't trigger it. Also, there's no powered rail to activate it - so how does it get activated?

orphu commented 11 years ago

I think when two TNT carts run into each other they explode. The setup here is there are two overlapping carts, but they have no momentum so they don't explode. They are smaller than a block so they are invisible, but the collision box is slightly larger. So when a player gets too close they bump the carts and the carts suddenly realize they need to explode.

JiFish commented 11 years ago

Instead, I am thinking of adding this to placechests as it avoids some of the problems implementing this. At the time addchest is called, the chest block itself has already been placed. It also avoids many situations where a trapped chest would interfere with existing redstone.

Trapped coffins could be implemented separately.

JiFish commented 11 years ago

Initial version of trapped chests. Still to do: try to blend in better by avoiding some floors. Also, traps for some other chests: Prisons, Tombs etc.

JiFish commented 11 years ago

Closing this. New trapped chest features can be dealt with in other issues.