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 
28 namespace Ultima {
29 namespace Ultima1 {
30 namespace Widgets {
31 
32 enum 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 
41 private:
42  OverworldMonsterId _monsterId;
43  uint _attackStrength;
44 protected:
48  void attackParty() override;
49 
53  void movement() override;
54 public:
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 
67  Shared::Maps::Creature(game, map), _monsterId(NESS_CREATURE), _attackStrength(0) {}
68 
72  ~OverworldMonster() override {}
73 
77  OverworldMonsterId id() const { return _monsterId; }
78 
82  void synchronize(Common::Serializer &s) override;
83 
88  uint attackDistance() const override;
89 };
90 
94 class EnemyVessel : public OverworldMonster {
95 public:
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
void synchronize(Common::Serializer &s) override
Definition: overworld_widget.h:42
Definition: game.h:42
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
EnemyVessel(Shared::Game *game, Shared::Maps::MapBase *map)
Definition: overworld_monster.h:106
Definition: serializer.h:79
Creature(Game *game, MapBase *)
Definition: creature.h:67
Definition: detection.h:27
OverworldMonsterId id() const
Definition: overworld_monster.h:77
OverworldMonster(Shared::Game *game, Shared::Maps::MapBase *map)
Definition: overworld_monster.h:66
Definition: creature.h:40
Definition: overworld_monster.h:40
Definition: overworld_monster.h:94
Definition: rect.h:45
OverworldMonster(Shared::Game *game, Shared::Maps::MapBase *map, uint tileNum, int hitPoints, const Point &pt, Shared::Maps::Direction dir=Shared::Maps::DIR_NONE)
Definition: map_base.h:47
~OverworldMonster() override
Definition: overworld_monster.h:72