//
//  Hero.hpp
//  eagle0
//
//  Created by Dan Crosby on 11/18/14.
//  Copyright (c) 2014 none. All rights reserved.
//

#ifndef __eagle0__Hero__
#define __eagle0__Hero__

#include <limits>
#include <optional>
#include <string>

#include "src/main/cpp/net/eagle0/shardok/library/ActionCost.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/CombatDamage.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokException.hpp"
#include "src/main/flatbuffer/net/eagle0/shardok/storage/hero.hpp"
#include "src/main/protobuf/net/eagle0/shardok/common/terrain.pb.h"

namespace shardok {
using std::string;

using Hero = net::eagle0::shardok::storage::fb::Hero;

using TerrainProto = net::eagle0::shardok::common::Terrain;

[[nodiscard]] auto IsDestroyed(const Hero &hero) -> bool;

void MutatingAdjustVigor(Hero *mutableHero, double vigorDelta);

// Returns remaining damage.
auto MutatingTakeDamage(
        Hero *mutableHero,
        const CombatDamage &damage,
        int battalionSize,
        bool isAmbush) -> CombatDamage;

}  // namespace shardok

#endif /* defined(__eagle0__Hero__) */
