AdventureSpellCastMovementActions.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. DayFlags flagsToAdd;
  24. public:
  25. AdventureCastAction(SpellID spellToCast, const CGHeroInstance * hero, DayFlags flagsToAdd = DayFlags::NONE);
  26. virtual void execute(const CGHeroInstance * hero) const override;
  27. virtual void applyOnDestination(
  28. const CGHeroInstance * hero,
  29. CDestinationNodeInfo & destination,
  30. const PathNodeInfo & source,
  31. AIPathNode * dstMode,
  32. const AIPathNode * srcNode) const override;
  33. virtual bool canAct(const AIPathNode * source) const override;
  34. virtual std::string toString() const override;
  35. };
  36. class WaterWalkingAction : public AdventureCastAction
  37. {
  38. public:
  39. WaterWalkingAction(const CGHeroInstance * hero);
  40. };
  41. class AirWalkingAction : public AdventureCastAction
  42. {
  43. public:
  44. AirWalkingAction(const CGHeroInstance * hero);
  45. };
  46. }
  47. }