virtual void UpdateWorld(float deltaT);
virtual void Render(SDL_Surface *);
- // TODO: turn this mess into a well stuctured interface
public:
const Resources &Res() const { return *res; }
AttackTypeMenu &GetAttackTypeMenu() { return attackTypeMenu; }
int MaxHeroes() const { return 4; }
int MaxMonsters() const { return monsters.size(); }
- const std::vector<geometry::Point<int> > &MonsterPositions() const { return monsterPositions; }
bool MonsterPositionOccupied(int index) { return index >= 0 && index < int(monsters.size()) && monsters[index].Health() > 0; }
- const std::vector<geometry::Point<int> > &HeroesPositions() const { return heroesPositions; }
bool HeroPositionOccupied(int index) const { return index >= 0 && index < numHeroes; }
void SetRunaway() { ranAway = true; }
private:
void LoadInventory();
+ void DecideMonsterAttack(Monster &) const;
+ void CalculateDamage(const Stats &attackerStats, TargetSelection &targets) const;
Uint16 CalculateDamage(const Stats &attacker, const Stats &defender) const;
private:
const Resources *res;
AttackTypeMenu attackTypeMenu;
MoveMenu moveMenu;
- // TODO: combine all data about heros or monsters
- std::vector<geometry::Point<int> > monsterPositions;
- std::vector<geometry::Point<int> > heroesPositions;
std::vector<Monster> monsters;
std::vector<Order> attackOrder;
Hero heroes[4];