action.h 991 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * action.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "BAI/v13/battlefield.h"
  12. #include "BAI/v13/hex.h"
  13. #include "BAI/v13/hexaction.h"
  14. namespace MMAI::BAI::V13
  15. {
  16. /*
  17. * Wrapper around Schema::Action
  18. */
  19. struct Action
  20. {
  21. static std::unique_ptr<Hex> initHex(const Schema::Action & a, const Battlefield * bf);
  22. static std::unique_ptr<Hex> initAMoveTargetHex(const Schema::Action & a, const Battlefield * bf);
  23. static HexAction initHexAction(const Schema::Action & a, const Battlefield * bf);
  24. Action(Schema::Action action_, const Battlefield * bf, const std::string & color);
  25. const Schema::Action action;
  26. const std::unique_ptr<Hex> hex;
  27. const std::unique_ptr<Hex> aMoveTargetHex;
  28. const HexAction hexaction; // XXX: must come after action
  29. const std::string color;
  30. std::string name() const;
  31. };
  32. }