//
// Created by Dan Crosby on 5/17/20.
//

#ifndef EAGLE0_METEORSTARTCOMMAND_HPP
#define EAGLE0_METEORSTARTCOMMAND_HPP

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/CoordsSet.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"

namespace shardok {

class MeteorStartCommand : public ShardokCommand {
protected:
    [[nodiscard]] auto InternalExecute(
            const GameStateW& currentState,
            const std::shared_ptr<RandomGenerator>& generator) const
            -> vector<ActionResult> override;

    const ActionCost cost;
    const SettingsGetter settings;
    const UnitId casterId;
    const CoordsSet nextRoundTargets;

public:
    MeteorStartCommand(
            const ActionCost& cost,
            const SettingsGetter& settingsGetter,
            PlayerId playerId,
            UnitId casterId,
            const CoordsSet& nextRoundTargets);
    ~MeteorStartCommand() override = default;

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

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

#endif  // EAGLE0_METEORSTARTCOMMAND_HPP
