X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.h;h=27953cd013cd5e050aa9d2bded9a20eeb78856f8;hb=0542849dfccfec1ce1477265fa0fee2401a8fb23;hp=d22d6894d314bb44f98223bce046ae7edc313a76;hpb=cb86f68c08eec5c2e131037116bf9a9f5cf9f2c7;p=l2e.git diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index d22d689..27953cd 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -16,7 +16,6 @@ #include "Resources.h" #include "SmallHeroTag.h" #include "../app/State.h" -#include "../geometry/Point.h" #include "../geometry/Vector.h" #include "../graphics/Animation.h" #include "../graphics/Menu.h" @@ -99,7 +98,7 @@ public: const Monster &MonsterAt(int index) const { assert(index >= 0 && index < NumHeroes()); return monsters[index]; } const HeroTag &HeroTagAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTags[index]; } - const geometry::Point &HeroTagPositionAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTagPositions[index]; } + const geometry::Vector &HeroTagPositionAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTagPositions[index]; } bool HasChosenAttackType() const { return ActiveHero().GetAttackChoice().GetType() != AttackChoice::UNDECIDED; } bool AttackSelectionDone() const { return activeHero >= numHeroes; } @@ -150,6 +149,8 @@ public: 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: @@ -165,8 +166,8 @@ private: graphics::Menu itemMenu; HeroTag heroTags[4]; SmallHeroTag smallHeroTags[4]; - geometry::Point heroTagPositions[4]; - geometry::Point smallHeroTagPositions[4]; + geometry::Vector heroTagPositions[4]; + geometry::Vector smallHeroTagPositions[4]; int numHeroes; int activeHero; int attackCursor;