ScummVM API documentation
dungeon_monster.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ULTIMA_ULTIMA1_WIDGETS_DUNGEON_MONSTER_H
23 #define ULTIMA_ULTIMA1_WIDGETS_DUNGEON_MONSTER_H
24 
25 #include "ultima/ultima1/widgets/dungeon_widget.h"
26 #include "ultima/shared/maps/creature.h"
27 #include "ultima/shared/maps/dungeon_creature.h"
28 
29 namespace Ultima {
30 namespace Ultima1 {
31 namespace Widgets {
32 
33 enum {
34  // Vegeta, what does the scouter say about his power level?
35  ITS_OVER_9000 = 10000
36 };
37 
42 private:
46  void monsterDead();
47 protected:
51  void movement() override;
52 public:
56  static Shared::Maps::MapWidget::CanMove canMoveTo(Shared::Maps::MapBase *map, MapWidget *widget, const Point &destPos);
57 public:
58  DECLARE_WIDGET(DungeonMonster)
59 
60 
63  DungeonMonster(Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId monsterId, int hitPoints,
64  const Point &pt);
65 
70 
74  ~DungeonMonster() override {}
75 
79  DungeonWidgetId id() const { return _widgetId; }
80 
84  bool isBlockingView() const override;
85 
89  void synchronize(Common::Serializer &s) override;
90 
94  void draw(Shared::DungeonSurface &s, uint distance) override;
95 
101  void update(bool isPreUpdate) override;
102 
106  CanMove canMoveTo(const Point &destPos) override;
107 
111  void attackParty() override;
112 
116  void attackMonster(uint effectNum, uint agility, uint damage);
117 };
118 
119 } // End of namespace Widgets
120 } // End of namespace Ultima1
121 } // End of namespace Ultima
122 
123 #endif
~DungeonMonster() override
Definition: dungeon_monster.h:74
Definition: dungeon_surface.h:37
DungeonMonster(Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId monsterId, int hitPoints, const Point &pt)
void draw(Shared::DungeonSurface &s, uint distance) override
Definition: serializer.h:79
Definition: map_base.h:39
Definition: detection.h:27
MapWidget(Game *game, MapBase *map)
Definition: map_widget.h:70
Definition: dungeon_monster.h:41
void attackMonster(uint effectNum, uint agility, uint damage)
Definition: rect.h:45
Definition: game.h:42
DungeonWidgetId id() const
Definition: dungeon_monster.h:79
static Shared::Maps::MapWidget::CanMove canMoveTo(Shared::Maps::MapBase *map, MapWidget *widget, const Point &destPos)
Definition: map_base.h:47
void update(bool isPreUpdate) override
Definition: dungeon_creature.h:38
void synchronize(Common::Serializer &s) override
Definition: dungeon_widget.h:52