ScummVM API documentation
overworld_logic.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_LOGIC_OVERWORLD_LOGIC_H
24#define ULTIMA2_LOGIC_OVERWORLD_LOGIC_H
25
26#include "ultima/ultima1/logic/logic.h"
27#include "ultima/ultima1/data/map.h"
28
29namespace Ultima {
30namespace Ultima1 {
31namespace Logic {
32
33class OverworldLogic : public Logic {
34private:
38 bool moveCheck(Data::Direction dir);
39
43 void impassable(int reason);
44
48 void moveLeft();
49
53 void moveRight();
54
58 void moveUp();
59
63 void moveDown();
64
68 void continentChanged(int oldContinent);
69
73 void endOfTurn() override;
74
78 void generateCreatures();
79
83 void reduceFood();
84
92 bool monsterTransportCheck(int entityIndex, int xDiff, int yDiff);
93
98 void moveEntityFromPlayer(int entityIndex, int xDiff, int yDiff);
99
104 bool monsterMoveCheckX(int entityIndex, int xDiff, int yDiff);
105
110 bool monsterMoveCheckY(int entityIndex, int xDiff, int yDiff);
111
112 void monsterMoveCheck(int entityIndex, int xDiff, int yDiff);
113
114 void monsterAttack(int entityIndex, int xDiff, int yDiff, int distance);
115
116 void castPrayer();
117 void castSpell(int spellNum, int val);
118
125 int getMagicWeaponPower();
126
127protected:
131 bool board() override;
132
136 bool cast() override;
137
141 bool enter() override;
142
146 bool fire() override;
147
151 bool quit() override;
152
156 bool xit() override;
157
161 bool move(Data::Direction dir) override;
162
166 void updateCreatures() override;
167
168 void castSpellAttack(Data::Direction dir) override;
169
179 void damage(Data::Direction dir, int effectNum, int maxDistance, int strike, int hitChance, int tileId) override;
180
181public:
183 ~OverworldLogic() override {
184 }
185};
186
187} // namespace Logic
188} // namespace Ultima1
189} // namespace Ultima
190
191#endif
Definition: logic.h:40
Definition: overworld_logic.h:33
void castSpellAttack(Data::Direction dir) override
void damage(Data::Direction dir, int effectNum, int maxDistance, int strike, int hitChance, int tileId) override
bool move(Data::Direction dir) override