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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef WORLD_ACTORS_NPC_DAT_H 24 #define WORLD_ACTORS_NPC_DAT_H 25 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 getName()37 const Std::string &getName() const { 38 return _name; 39 }; 40 getShapeNo()41 uint16 getShapeNo() const { 42 return _shapeNo; 43 }; 44 getMinHp()45 uint16 getMinHp() const { 46 return _minHp; 47 }; 48 getMaxHp()49 uint16 getMaxHp() const { 50 return _maxHp; 51 }; 52 getWpnType()53 uint16 getWpnType() const { 54 return _wpnType; 55 }; 56 getWpnType2()57 uint16 getWpnType2() const { 58 return _wpnType2; 59 }; 60 getDefaultActivity(int no)61 uint16 getDefaultActivity(int no) const { 62 assert(no >= 0 && no < 3); 63 return _defaultActivity[no]; 64 } 65 66 //!< A function for randomly assigning stronger weapons for the highest difficulty level. 67 static uint16 randomlyGetStrongerWeaponTypes(uint shapeno); 68 69 private: 70 NPCDat(Common::SeekableReadStream &datars, Common::SeekableReadStream &namers); 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 85