ScummVM API documentation
overworld_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_OVERWORLD_MONSTER_H
23#define ULTIMA_ULTIMA1_WIDGETS_OVERWORLD_MONSTER_H
24
25#include "ultima/ultima1/widgets/overworld_widget.h"
26#include "ultima/shared/maps/creature.h"
27
28namespace Ultima {
29namespace Ultima1 {
30namespace Widgets {
31
32enum OverworldMonsterId {
33 NESS_CREATURE = 0, GIANT_SQUID, DRAGON_TURTLE, PIRATE_SHIP, HOOD, BEAR, HIDDEN_ARCHER, DARK_KNIGHT,
34 EVIL_TRENT, THIEF, ORC, KNIGHT, NECROMANCER, EVIL_RANGER, WANDERING_WARLOCK
35};
36
41private:
42 OverworldMonsterId _monsterId;
43 uint _attackStrength;
44protected:
48 void attackParty() override;
49
53 void movement() override;
54public:
55 DECLARE_WIDGET(OverworldMonster)
56
57
60 OverworldMonster(Shared::Game *game, Shared::Maps::MapBase *map, uint tileNum, int hitPoints,
61 const Point &pt, Shared::Maps::Direction dir = Shared::Maps::DIR_NONE);
62
66 OverworldMonster(Shared::Game *game, Shared::Maps::MapBase *map) : OverworldWidget(game, map),
67 Shared::Maps::Creature(game, map), _monsterId(NESS_CREATURE), _attackStrength(0) {}
68
72 ~OverworldMonster() override {}
73
77 OverworldMonsterId id() const { return _monsterId; }
78
83
88 uint attackDistance() const override;
89};
90
95public:
99 EnemyVessel(Shared::Game *game, Shared::Maps::MapBase *map, uint tileNum, int hitPoints,
100 const Point &pt, Shared::Maps::Direction dir = Shared::Maps::DIR_NONE) :
101 OverworldMonster(game, map, tileNum, hitPoints, pt, dir) {}
102
107};
108
109} // End of namespace Widgets
110} // End of namespace Ultima1
111} // End of namespace Ultima
112
113#endif
Definition: serializer.h:80
Definition: game.h:42
Definition: creature.h:40
Creature(Game *game, MapBase *)
Definition: creature.h:67
Definition: map_base.h:47
Definition: overworld_monster.h:94
EnemyVessel(Shared::Game *game, Shared::Maps::MapBase *map)
Definition: overworld_monster.h:106
EnemyVessel(Shared::Game *game, Shared::Maps::MapBase *map, uint tileNum, int hitPoints, const Point &pt, Shared::Maps::Direction dir=Shared::Maps::DIR_NONE)
Definition: overworld_monster.h:99
Definition: overworld_monster.h:40
void synchronize(Common::Serializer &s) override
OverworldMonsterId id() const
Definition: overworld_monster.h:77
~OverworldMonster() override
Definition: overworld_monster.h:72
Definition: overworld_widget.h:42
Definition: rect.h:144