ScummVM API documentation
fire_type.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 ULTIMA8_WORLD_FIRETYPE_H
23#define ULTIMA8_WORLD_FIRETYPE_H
24
25namespace Ultima {
26namespace Ultima8 {
27
28class Item;
29struct Point3;
30
34class FireType {
35public:
36 constexpr FireType(uint16 typeNo, uint16 minDamage, uint16 maxDamage, uint8 range,
37 uint8 numShots, uint16 shieldCost, uint8 shieldMask, bool accurate,
38 uint16 cellsPerRound, uint16 roundDuration, bool nearSprite) :
39 _typeNo(typeNo), _minDamage(minDamage), _maxDamage(maxDamage),
40 _range(range), _numShots(numShots), _shieldCost(shieldCost),
41 _shieldMask(shieldMask), _accurate(accurate),
42 _cellsPerRound(cellsPerRound), _roundDuration(roundDuration),
43 _nearSprite(nearSprite) {}
44
45 uint16 getTypeNo() const {
46 return _typeNo;
47 }
48
49 uint16 getMinDamage() const {
50 return _minDamage;
51 }
52
53 uint16 getMaxDamage() const {
54 return _maxDamage;
55 }
56
57 uint8 getRange() const {
58 return _range;
59 }
60
61 uint8 getNumShots() const {
62 return _numShots;
63 }
64
65 uint16 getShieldCost() const {
66 return _shieldCost;
67 }
68
69 uint8 getShieldMask() const {
70 return _shieldMask;
71 }
72
73 bool getAccurate() const {
74 return _accurate;
75 }
76
77 uint16 getCellsPerRound() const {
78 return _cellsPerRound;
79 }
80
81 uint16 getRoundDuration() const {
82 return _roundDuration;
83 }
84
85 bool getNearSprite() const {
86 return _nearSprite;
87 }
88
89 uint16 getRandomDamage() const;
90
91 void applySplashDamageAround(const Point3 &pt, int damage, int rangediv,
92 const Item *exclude, const Item *src) const;
93
94 void makeBulletSplashShapeAndPlaySound(int32 x, int32 y, int32 z) const;
95
96private:
97 uint16 _typeNo;
98 uint16 _minDamage;
99 uint16 _maxDamage;
100 uint8 _range;
101 uint8 _numShots;
102 uint16 _shieldCost;
103 uint8 _shieldMask;
104 bool _accurate;
105 uint16 _cellsPerRound;
106 uint16 _roundDuration;
107 bool _nearSprite;
108};
109
110}
111}
112
113#endif
Definition: fire_type.h:34
Definition: item.h:42
Definition: point3.h:30