22 #ifndef ULTIMA4_CONTROLLERS_COMBAT_CONTROLLER_H 23 #define ULTIMA4_CONTROLLERS_COMBAT_CONTROLLER_H 25 #include "ultima/ultima4/map/direction.h" 26 #include "ultima/ultima4/map/map.h" 27 #include "ultima/ultima4/controllers/controller.h" 28 #include "ultima/ultima4/core/observer.h" 29 #include "ultima/ultima4/core/types.h" 30 #include "ultima/ultima4/filesys/savegame.h" 31 #include "ultima/ultima4/game/creature.h" 32 #include "ultima/ultima4/game/game.h" 33 #include "ultima/ultima4/game/object.h" 34 #include "ultima/ultima4/game/player.h" 39 #define AREA_CREATURES 16 40 #define AREA_PLAYERS 8 68 bool isCombatController()
const override {
77 bool isCamping()
const;
78 bool isWinOrLose()
const;
79 Direction getExitDir()
const;
80 byte getFocus()
const;
86 void setExitDir(Direction d);
88 void setWinOrLose(
bool worl =
true);
89 void showCombatMessage(
bool show =
true);
110 virtual void begin();
111 virtual void end(
bool adjustKarma);
156 virtual void awardLoot();
159 void attack(Direction dir = DIR_NONE,
int distance = 0);
160 bool attackAt(
const Coords &coords,
PartyMember *attacker,
int dir,
int range,
int distance);
163 bool returnWeaponToOwner(
const Coords &coords,
int distance,
int dir,
const Weapon *weapon);
170 static void doScreenAnimationsWhilePausing(
int timeFactor);
172 void keybinder(KeybindingAction action)
override;
174 void finishTurn()
override;
189 const Creature *_creatureTable[AREA_CREATURES];
193 bool _forceStandardEncounterSize;
194 bool _placePartyOnMap;
195 bool _placeCreaturesOnMap;
242 static MapId mapForTile(
const Tile *ground,
const Tile *transport,
Object *obj);
245 bool isDungeonRoom()
const {
248 bool isAltarRoom()
const {
249 return _altarRoom != VIRT_NONE;
251 bool isContextual()
const {
254 BaseVirtue getAltarRoom()
const {
259 void setAltarRoom(BaseVirtue ar) {
262 void setDungeonRoom(
bool d) {
265 void setContextual(
bool c) {
272 BaseVirtue _altarRoom;
276 Coords creature_start[AREA_CREATURES];
277 Coords player_start[AREA_PLAYERS];
280 bool isCombatMap(
Map *punknown);
Definition: movement.h:53
Definition: observer.h:37
static void attackFlash(const Coords &coords, MapTile tile, int timeFactor)
void keybinder(KeybindingAction action) override
Definition: combat_controller.h:212
bool setActivePlayer(int player)
void setActive() override
Definition: controller.h:153
Definition: controller.h:35
virtual void init(Creature *m)
Definition: detection.h:27
void movePartyMember(MoveEvent &event)
Definition: combat_controller.h:59
Definition: map_tile.h:34
Definition: creature.h:159
void initDungeonRoom(int room, Direction from)
int initialNumberOfCreatures(const Creature *creature) const
Definition: containers.h:38
void applyCreatureTileEffects()
void fillCreatureTable(const Creature *creature)