, numHeroes(0)
, activeHero(-1)
, attackCursor(-1)
+ , expReward(0)
+ , goldReward(0)
, ranAway(false) { assert(background && res); }
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; }
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; }
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;
int numHeroes;
int activeHero;
int attackCursor;
+ int expReward;
+ int goldReward;
bool ranAway;
};