22 #ifndef ULTIMA_ULTIMA1_MAP_MAP_DUNGEON_H 23 #define ULTIMA_ULTIMA1_MAP_MAP_DUNGEON_H 25 #include "ultima/ultima1/maps/map_base.h" 26 #include "ultima/shared/core/rect.h" 27 #include "common/random.h" 37 #define DUNGEON_WIDTH 11 38 #define DUNGEON_HEIGHT 11 41 DTILE_HALLWAY = 0, DTILE_WALL = 1, DTILE_SECRET_DOOR = 2, DTILE_DOOR = 3, DTILE_LADDER_DOWN = 6,
42 DTILE_LADDER_UP = 7, DTILE_BEAMS = 8
62 uint getDeterministicRandomNumber(uint min, uint max) {
return min + _random.
getRandomNumber(max - min); }
67 void leavingDungeon();
69 uint _dungeonExitHitPoints;
72 _dungeonLevel(0), _dungeonExitHitPoints(0) {}
83 void load(Shared::Maps::MapId mapId)
override;
95 bool changeLevel(
int delta)
override;
100 uint
getLevel()
const override {
return _dungeonLevel; }
105 void update()
override;
115 void spawnMonsterAt(
const Point &pt);
127 void attack(
int direction,
int effectId)
override;
138 void attack(
int direction,
int effectId, uint maxDistance, uint amount, uint agility,
const Common::String &hitWidget)
override;
143 void inform()
override;
148 void climb()
override;
153 void open()
override;
163 void castSpell(uint spell)
override;
void unlock() override
Definition: map_dungeon.h:158
Definition: map_tile.h:36
Definition: map_dungeon.h:48
uint getRandomNumber(uint max)
Definition: serializer.h:79
Definition: map_base.h:39
Definition: detection.h:27
uint getLevel() const override
Definition: map_dungeon.h:100