Magic.h 855 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Magic.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. /**
  12. * High-level interface for spells subsystem
  13. */
  14. class CSpell;
  15. class CStack;
  16. class DLL_LINKAGE ISpellCaster
  17. {
  18. public:
  19. virtual ~ISpellCaster(){};
  20. /// returns level on which given spell would be cast by this(0 - none, 1 - basic etc);
  21. /// caster may not know this spell at all
  22. /// optionally returns number of selected school by arg - 0 - air magic, 1 - fire magic, 2 - water magic, 3 - earth magic
  23. virtual ui8 getSpellSchoolLevel(const CSpell * spell, int *outSelectedSchool = nullptr) const = 0;
  24. virtual ui32 getSpellBonus(const CSpell * spell, ui32 base, const CStack * affectedStack) const = 0;
  25. };