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

#ifndef EAGLE0_UNDEADCHANGEACTION_HPP
#define EAGLE0_UNDEADCHANGEACTION_HPP

#include <utility>

#include "src/main/cpp/net/eagle0/shardok/library/ShardokAction.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
#include "src/main/protobuf/net/eagle0/shardok/common/terrain.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/common/weather.pb.h"

namespace shardok {

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

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

    const vector<UnitId> undeadUnitIds;
    const int bodyCount;
    const double armament;
    const double decayRate;
    const int decayFloor;
    const double reinforceRate;
    const int undeadCapacity;

public:
    UndeadChangeAction(
            vector<UnitId> undeadUnitIds,
            const int bodyCount,
            const double armament,
            const double decayRate,
            const int decayFloor,
            const double reinforceRate,
            const int undeadCapacity)
        : undeadUnitIds(std::move(undeadUnitIds)),
          bodyCount(bodyCount),
          armament(armament),
          decayRate(decayRate),
          decayFloor(decayFloor),
          reinforceRate(reinforceRate),
          undeadCapacity(undeadCapacity) {}
};
}  // namespace shardok

#endif  // EAGLE0_UNDEADCHANGEACTION_HPP
