AdventureSpellCastMovementActions.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * AdventureSpellCastMovementActions.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 "SpecialAction.h"
  12. #include "../../../../lib/mapObjects/MapObjects.h"
  13. namespace NKAI
  14. {
  15. namespace AIPathfinding
  16. {
  17. class AdventureCastAction : public SpecialAction
  18. {
  19. private:
  20. SpellID spellToCast;
  21. const CGHeroInstance * hero;
  22. int manaCost;
  23. public:
  24. AdventureCastAction(SpellID spellToCast, const CGHeroInstance * hero);
  25. virtual void execute(const CGHeroInstance * hero) const override;
  26. virtual void applyOnDestination(
  27. const CGHeroInstance * hero,
  28. CDestinationNodeInfo & destination,
  29. const PathNodeInfo & source,
  30. AIPathNode * dstMode,
  31. const AIPathNode * srcNode) const override;
  32. virtual bool canAct(const AIPathNode * source) const override;
  33. virtual std::string toString() const override;
  34. };
  35. class WaterWalkingAction : public AdventureCastAction
  36. {
  37. public:
  38. WaterWalkingAction(const CGHeroInstance * hero);
  39. };
  40. class AirWalkingAction : public AdventureCastAction
  41. {
  42. public:
  43. AirWalkingAction(const CGHeroInstance * hero);
  44. };
  45. }
  46. }