You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
727 B
33 lines
727 B
package mightypork.rogue.world.gen.rooms;
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
import mightypork.rogue.world.gen.MapTheme;
|
|
import mightypork.rogue.world.gen.ScratchMap;
|
|
import mightypork.rogue.world.gen.TileProtectLevel;
|
|
import mightypork.rogue.world.item.Item;
|
|
import mightypork.utils.math.algo.Coord;
|
|
|
|
|
|
public class TreasureChestRoom extends ItemShrineRoom {
|
|
|
|
public TreasureChestRoom(Item item)
|
|
{
|
|
super(item);
|
|
}
|
|
|
|
|
|
@Override
|
|
protected void buildExtras(ScratchMap map, MapTheme theme, Random rand, Coord min, Coord max)
|
|
{
|
|
// set tile
|
|
final Coord center = min.add(2, 2);
|
|
|
|
map.set(center, theme.chest());
|
|
map.protect(center, TileProtectLevel.STRONG);
|
|
|
|
// drop item
|
|
super.buildExtras(map, theme, rand, min, max);
|
|
}
|
|
}
|
|
|