ScummVM API documentation
entity.h
1
2/* ScummVM - Graphic Adventure Engine
3 *
4 * ScummVM is the legal property of its developers, whose names
5 * are too numerous to list here. Please refer to the COPYRIGHT
6 * file distributed with this source distribution.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef ULTIMA2_DATA_ENTITY_H
24#define ULTIMA2_DATA_ENTITY_H
25
26#include "common/serializer.h"
27
28namespace Ultima {
29namespace Ultima1 {
30namespace Data {
31
32constexpr int MONSTER_TYPE_COUNT = 15;
33
34extern const char *OVERWORLD_MONSTERS[];
35
36// Per monster-type coin/experience reward multiplier, indexed by
37// (tileNum - TILE_FIRST_MONSTER) / 2
38extern const int OVERWORLD_MONSTERS_DAMAGE[MONSTER_TYPE_COUNT];
39
40// Per monster-type base hit points value, also reused as a spawn-weighting
41// threshold when picking which monster type to generate
42extern const int OVERWORLD_MONSTERS_HITS[MONSTER_TYPE_COUNT];
43
44// Spawn-chance threshold per character level (experience / 1000), checked
45// against a 1-255 random roll each turn
46extern const int MONSTER_THRESHOLDS_PER_LEVEL[10];
47
52 int16 _type;
53 int16 _data;
54 int16 _x;
55 int16 _y;
56 int16 _hits;
57 int16 _unused1, _unused2, _unused3;
58
59 void synchronize(Common::Serializer &s);
60
65 static int getMonsterAttackDistance(int tileNum, int xDiff, int yDiff);
66};
67
68} // namespace Data
69} // namespace Ultima1
70} // namespace Ultima
71
72#endif
Definition: serializer.h:80
static int getMonsterAttackDistance(int tileNum, int xDiff, int yDiff)