mock_spells_Mechanics.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * mock_spells_Mechanics.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 "../../lib/spells/ISpellMechanics.h"
  12. namespace spells
  13. {
  14. class MechanicsMock : public Mechanics
  15. {
  16. public:
  17. MOCK_CONST_METHOD2(adaptProblem, bool(ESpellCastProblem::ESpellCastProblem, Problem &));
  18. MOCK_CONST_METHOD1(adaptGenericProblem, bool(Problem &));
  19. MOCK_CONST_METHOD1(rangeInHexes, std::vector<BattleHex>(BattleHex));
  20. MOCK_CONST_METHOD1(getAffectedStacks, std::vector<const CStack *>(const Target &));
  21. MOCK_CONST_METHOD1(canBeCast, bool(Problem &));
  22. MOCK_CONST_METHOD2(canBeCastAt, bool(const Target &, Problem &));
  23. MOCK_CONST_METHOD4(applyEffects, void(ServerCallback *, const Target &, bool, bool));
  24. MOCK_METHOD2(cast, void(ServerCallback *, const Target &));
  25. MOCK_METHOD2(castEval, void(ServerCallback *, const Target &));
  26. MOCK_CONST_METHOD1(isReceptive, bool(const battle::Unit * ));
  27. MOCK_CONST_METHOD0(getTargetTypes, std::vector<AimType>());
  28. MOCK_CONST_METHOD4(getPossibleDestinations, std::vector<Destination>(size_t, AimType, const Target &, bool));
  29. MOCK_CONST_METHOD0(getSpell, const Spell *());
  30. MOCK_CONST_METHOD0(getEffectLevel, IBattleCast::Value());
  31. MOCK_CONST_METHOD0(getRangeLevel, IBattleCast::Value());
  32. MOCK_CONST_METHOD0(getEffectPower, IBattleCast::Value());
  33. MOCK_CONST_METHOD0(getEffectDuration, IBattleCast::Value());
  34. MOCK_CONST_METHOD0(getEffectValue, IBattleCast::Value64());
  35. MOCK_CONST_METHOD0(getCasterColor, PlayerColor());
  36. MOCK_CONST_METHOD0(getSpellIndex, int32_t());
  37. MOCK_CONST_METHOD0(getSpellId, SpellID());
  38. MOCK_CONST_METHOD0(getSpellName, std::string());
  39. MOCK_CONST_METHOD0(getSpellLevel, int32_t());
  40. MOCK_CONST_METHOD0(isSmart, bool());
  41. MOCK_CONST_METHOD0(isMassive, bool());
  42. MOCK_CONST_METHOD0(alwaysHitFirstTarget, bool());
  43. MOCK_CONST_METHOD0(requiresClearTiles, bool());
  44. MOCK_CONST_METHOD0(isNegativeSpell, bool());
  45. MOCK_CONST_METHOD0(isPositiveSpell, bool());
  46. MOCK_CONST_METHOD0(isMagicalEffect, bool());
  47. MOCK_CONST_METHOD1(adjustEffectValue,int64_t(const battle::Unit *));
  48. MOCK_CONST_METHOD2(applySpellBonus,int64_t(int64_t, const battle::Unit *));
  49. MOCK_CONST_METHOD1(applySpecificSpellBonus,int64_t(int64_t));
  50. MOCK_CONST_METHOD2(calculateRawEffectValue, int64_t(int32_t, int32_t));
  51. MOCK_CONST_METHOD0(getElementalImmunity, std::vector<BonusType>());
  52. MOCK_CONST_METHOD1(ownerMatches, bool(const battle::Unit *));
  53. MOCK_CONST_METHOD2(ownerMatches, bool(const battle::Unit *, const boost::logic::tribool));
  54. MOCK_CONST_METHOD0(creatures, const CreatureService *());
  55. #if SCRIPTING_ENABLED
  56. MOCK_CONST_METHOD0(scripts, const scripting::Service *());
  57. #endif
  58. MOCK_CONST_METHOD0(spells, const Service *());
  59. MOCK_CONST_METHOD0(game, const IGameInfoCallback * ());
  60. MOCK_CONST_METHOD0(battle, const CBattleInfoCallback * ());
  61. };
  62. }