ScummVM API documentation
city_castle_logic.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 ULTIMA2_LOGIC_CITY_CASTLE_LOGIC_H
23#define ULTIMA2_LOGIC_CITY_CASTLE_LOGIC_H
24
25#include "ultima/ultima2/logic/overworld_logic.h"
26
27namespace Ultima {
28namespace Ultima2 {
29namespace Logic {
30
40private:
41 // Slot targeted by a pending offer(), remembered between the Direction
42 // interaction resolving and the OfferGold interaction completing
43 int _offerTargetSlot = -1;
44
45 // The hundreds of gold offered, held while the attribute to boost is chosen
46 int _offerBoost = 0;
47
51 int16 &attribute(int stat) const;
52
56 void boostAttribute(int stat, int goldHundreds);
57
61 bool cityMonsterCanEnter(int slot, int x, int y) const;
62
67 bool tryMoveCityMonster(int slot, int dx, int dy);
68
72 bool shopkeeperAt(int x, int y) const;
73
77 void exitToOverworld();
78
83 bool openShopForCurrentQuadrant();
84
88 bool tithe();
89
90protected:
91 void updateCreatures() override;
92
93public:
94 ~CityCastleLogic() override {}
95
96 bool move(Data::Direction dir) override;
97 bool steal(Data::Direction dir) override;
98 bool unlock(Data::Direction dir) override;
99 bool offer(Data::Direction dir) override;
100 bool transact(Data::Direction dir) override;
101 void completeOffer(int goldHundreds) override;
102 void completeStatBoost(int choice) override;
103};
104
105} // namespace Logic
106} // namespace Ultima2
107} // namespace Ultima
108
109#endif
Definition: city_castle_logic.h:39
void completeOffer(int goldHundreds) override
void completeStatBoost(int choice) override
Definition: overworld_logic.h:35