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
29namespace Ultima {
30namespace Ultima1 {
31namespace Widgets {
32
33enum {
34 // Vegeta, what does the scouter say about his power level?
35 ITS_OVER_9000 = 10000
36};
37
42private:
46 void monsterDead();
47protected:
51 void movement() override;
52public:
56 static Shared::Maps::MapWidget::CanMove canMoveTo(Shared::Maps::MapBase *map, MapWidget *widget, const Point &destPos);
57public:
58 DECLARE_WIDGET(DungeonMonster)
59
60
63 DungeonMonster(Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId monsterId, int hitPoints,
64 const Point &pt);
65
69 DungeonMonster(Ultima1Game *game, Maps::MapBase *map);
70
74 ~DungeonMonster() override {}
75
79 DungeonWidgetId id() const { return _widgetId; }
80
84 bool isBlockingView() const override;
85
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
Definition: serializer.h:80
Definition: dungeon_surface.h:37
Definition: dungeon_creature.h:38
Definition: map_base.h:47
MapWidget(Game *game, MapBase *map)
Definition: map_widget.h:70
Definition: game.h:42
Definition: dungeon_monster.h:41
void synchronize(Common::Serializer &s) override
CanMove canMoveTo(const Point &destPos) override
void draw(Shared::DungeonSurface &s, uint distance) override
void attackMonster(uint effectNum, uint agility, uint damage)
void update(bool isPreUpdate) override
DungeonWidgetId id() const
Definition: dungeon_monster.h:79
static Shared::Maps::MapWidget::CanMove canMoveTo(Shared::Maps::MapBase *map, MapWidget *widget, const Point &destPos)
Definition: dungeon_widget.h:52
Definition: rect.h:144