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 ULTIMA8_WORLD_WEAPONINFO_H
24 #define ULTIMA8_WORLD_WEAPONINFO_H
25 
26 #include "ultima/shared/std/string.h"
27 
28 namespace Ultima {
29 namespace Ultima8 {
30 
31 struct WeaponInfo {
32 	Std::string _name;
33 	uint32 _shape;
34 	uint8 _overlayType;
35 	uint32 _overlayShape;
36 	uint8 _damageModifier;
37 	uint8 _baseDamage;
38 	uint8 _dexAttackBonus;
39 	uint8 _dexDefendBonus;
40 	uint8 _armourBonus;
41 	uint16 _damageType;
42 	int _treasureChance;
43 
44 	// Crusader-specific fields:
45 	uint16 _sound;		//!< The sound this weapon makes when fired
46 	uint16 _reloadSound; //!< The sound made when reloaded
47 	uint16 _ammoType;	//!< The inventory frame for the ammo used
48 	uint16 _ammoShape;	//!< The shape number for the ammo used
49 	uint16 _displayGumpShape; //! The gump shape to use for inventory display (3,4,5)
50 	uint16 _displayGumpFrame; //!< The frame to use in the inventory gump
51 	uint8 _small;	//! A flag whether or not the weapon is "small" (changes the animations used)
52 	uint16 _clipSize; //! Count of ammo the weapon starts with and gets from a reload
53 	uint16 _energyUse; //! Energy used by each shot
54 	uint8 _field8;	//! Not totally sure, used like "cycle time" in Attack Process
55 	uint16 _shotDelay; //! Delay between shots
56 
57 	enum DmgType {
58 		DMG_NORMAL = 0x0001,
59 		DMG_BLADE  = 0x0002,
60 		DMG_BLUNT  = 0x0004,
61 		DMG_FIRE   = 0x0008,
62 		DMG_UNDEAD = 0x0010,
63 		DMG_MAGIC  = 0x0020,
64 		DMG_SLAYER = 0x0040,
65 		DMG_PIERCE = 0x0080,
66 		DMG_FALLING = 0x0100
67 	};
68 };
69 
70 } // End of namespace Ultima8
71 } // End of namespace Ultima
72 
73 #endif
74