You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
500 B

5 years ago
  1. #include <cstring>
  2. #include "Spell.hpp"
  3. Spell::Spell(const char *spellName,
  4. const int spellType,
  5. int spellPower,
  6. int spellCost) : type(spellType), name("")
  7. {
  8. this->power = spellPower;
  9. this->cost = spellCost;
  10. strcpy(this->name, spellName);
  11. }
  12. int Spell::getType()
  13. {
  14. return this->type;
  15. }
  16. int Spell::getPower()
  17. {
  18. return this->power;
  19. }
  20. int Spell::getCost()
  21. {
  22. return this->cost;
  23. }
  24. const char *Spell::getName()
  25. {
  26. return this->name;
  27. }