X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fbattle%2FBattleState.h;h=9f30fb5a1d439effc3b4ef8857ac1d7d69d1df60;hb=8639675fbf1d232ab8188dd283149ab650e10336;hp=ab9f731a9c838e0d9e5430bb491007c0353b35a3;hpb=7263bddbde91d555decd58f043f6b43f54ba2b00;p=l2e.git diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index ab9f731..9f30fb5 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -58,6 +58,8 @@ public: , numHeroes(0) , activeHero(-1) , attackCursor(-1) + , expReward(0) + , goldReward(0) , ranAway(false) { assert(background && res); } public: @@ -76,6 +78,7 @@ public: 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; } @@ -108,6 +111,8 @@ public: const AttackChoice &ActiveHeroAttackChoice() const { return AttackChoiceAt(activeHero); } AttackChoice &AttackChoiceAt(int index) { assert(index >= 0 && index < NumHeroes()); return attackChoices[index]; } const AttackChoice &AttackChoiceAt(int index) const { assert(index >= 0 && index < NumHeroes()); return attackChoices[index]; } + AttackChoice &MonsterAttackChoiceAt(int index) { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; } + const AttackChoice &MonsterAttackChoiceAt(int index) const { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; } bool AttackSelectionDone() const { return activeHero >= numHeroes; } int NumHeroes() const { return numHeroes; } @@ -134,6 +139,7 @@ public: void CalculateDamage(); void ApplyDamage(); const Order &CurrentAttack() const { assert(attackCursor >= 0 && attackCursor < int(attackOrder.size())); return attackOrder[attackCursor]; }; + AttackChoice &CurrentAttackAttackChoice(); void ClearAllAttacks(); bool Victory() const; @@ -186,6 +192,8 @@ private: int numHeroes; int activeHero; int attackCursor; + int expReward; + int goldReward; bool ranAway; };