ScummVM API documentation
npc_dat.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 WORLD_ACTORS_NPC_DAT_H
23 #define WORLD_ACTORS_NPC_DAT_H
24 
25 #include "ultima/shared/std/string.h"
26 #include "ultima/ultima8/filesys/raw_archive.h"
27 
28 namespace Ultima {
29 namespace Ultima8 {
30 
31 class NPCDat {
32 public:
33  NPCDat();
34 
35  static Std::vector<NPCDat *> load(RawArchive *archive);
36 
37  const Std::string &getName() const {
38  return _name;
39  };
40 
41  uint16 getShapeNo() const {
42  return _shapeNo;
43  };
44 
45  uint16 getMinHp() const {
46  return _minHp;
47  };
48 
49  uint16 getMaxHp() const {
50  return _maxHp;
51  };
52 
53  uint16 getWpnType() const {
54  return _wpnType;
55  };
56 
57  uint16 getWpnType2() const {
58  return _wpnType2;
59  };
60 
61  uint16 getDefaultActivity(int no) const {
62  assert(no >= 0 && no < 3);
63  return _defaultActivity[no];
64  }
65 
67  static uint16 randomlyGetStrongerWeaponTypes(uint shapeno);
68 
69 private:
71 
72  Std::string _name;
73  uint16 _minHp;
74  uint16 _maxHp;
75  uint16 _shapeNo;
76  uint16 _wpnType;
77  uint16 _wpnType2;
78  uint16 _defaultActivity[3]; // activities 0x6, 0x8, and 0xA in game.
79 };
80 
81 } // End of namespace Ultima8
82 } // End of namespace Ultima
83 
84 #endif
uint16 getDefaultActivity(int no) const
A function for randomly assigning stronger weapons for the highest difficulty level.
Definition: npc_dat.h:61
Definition: raw_archive.h:33
Definition: stream.h:745
Definition: detection.h:27
Definition: string.h:30
Definition: npc_dat.h:31
Definition: containers.h:38