//
// Created by Dan Crosby on 3/4/21.
//

#ifndef EAGLE0_FORTIFYCOMMAND_HPP
#define EAGLE0_FORTIFYCOMMAND_HPP

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"

namespace shardok {
class FortifyCommand : public ShardokCommand {
protected:
    auto InternalExecute(
            const GameStateW& currentState,
            const std::shared_ptr<RandomGenerator>& generator) const
            -> vector<ActionResult> override;

    const ActionCost cost;
    const UnitId fortifyingUnitId;
    const int strengthXp;
    const int agilityXp;
    const int minimumKnowledgeAfter;

public:
    FortifyCommand(
            const ActionCost& cost,
            PlayerId playerId,
            UnitId fortifyingUnitId,
            int strengthXp,
            int agilityXp,
            int professionKnowledgeBump);

    auto GetCommandType() const -> CommandType override {
        return net::eagle0::shardok::common::FORTIFY_COMMAND;
    }

    auto GetCommandProto() const -> CommandProto override;
};
}  // namespace shardok

#endif  // EAGLE0_FORTIFYCOMMAND_HPP
