22#ifndef ULTIMA3_LOGIC_COMBAT_LOGIC_H
23#define ULTIMA3_LOGIC_COMBAT_LOGIC_H
25#include "common/array.h"
26#include "common/str.h"
27#include "ultima/ultima3/data/arena.h"
28#include "ultima/ultima3/logic/logic.h"
49 int _arg1 = 0, _arg2 = 0, _arg3 = 0;
52 CombatEvent(Type type,
int a = 0,
int b = 0,
int c = 0) : _type(type), _arg1(a), _arg2(b), _arg3(c) {}
63 byte _shown[Data::ARENA_SIZE * Data::ARENA_SIZE] = {};
66 bool _slayUsed =
false;
69 void sound(
int effect,
int arg1 = 0,
int arg2 = 0);
70 void overlay(
int x,
int y,
int tile);
71 void flashSlot(
int slot);
77 const char *chooseArena();
82 static int rollBelow(
int limit);
88 bool isExodusFight()
const;
101 int monsterAt(
int x,
int y)
const;
102 bool canMonsterMoveTo(
int x,
int y)
const;
108 int shoot(
int x,
int y,
int dx,
int dy,
int tile);
114 void playerHit(
int slot,
int monster);
115 void damageMonster(
int slot,
int monster,
int damage);
122 int findTarget(
int monster,
int &target,
int &stepX,
int &stepY,
int &toX,
int &toY)
const;
124 void monsterTurn(
int monster);
125 void monsterAttack(
int slot,
int tile);
126 void monsterPoison(
int slot);
127 void monsterSteal(
int slot);
128 void monsterBreath(
int monster,
int stepX,
int stepY);
129 void damagePlayer(
int slot,
int tile);
130 void killPlayer(
int slot);
136 byte _monsterClass = 0;
139 byte _savedLocation = 0;
163 return _shown[y * Data::ARENA_SIZE + x];
173 bool allMonstersDead()
const;
185 void decrementHold();
Definition: combat_logic.h:59
byte shownTile(int x, int y) const
Definition: combat_logic.h:162
bool castSlay(int slot, byte monsterClass)
void castGroupDamage(int slot, int damage)
Common::Array< CombatEvent > & events()
Definition: combat_logic.h:169
bool movePlayer(int slot, int dx, int dy)
void playerAttack(int slot, Direction dir)
void beginDungeon(byte monsterClass)
void castProjectile(int slot, int damage, Direction dir)
Definition: combat_logic.h:38