#include "AttackChoice.h"
#include "PartyLayout.h"
#include "TargetSelection.h"
+#include "../common/GameState.h"
#include "../common/Stats.h"
+#include "../common/Upgrade.h"
#include <cassert>
#include <stdexcept>
+using common::GameState;
using common::Stats;
+using common::Upgrade;
+using std::vector;
namespace battle {
return true;
}
+
+void Battle::ApplyRewards(
+ GameState &state,
+ vector<Upgrade> &info) {
+ for (vector<Hero>::iterator i(HeroesBegin()), end(HeroesEnd());
+ i != end; ++i) {
+ if (i->Health() <= 0) continue;
+ i->Master().AddExperience(expReward, info);
+ }
+ if (capsule.Health() > 0) {
+ capsule.Master().AddExperience(expReward, info);
+ }
+ state.money += goldReward;
+}
+
}