-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBookOfHealingSpell.cpp
41 lines (35 loc) · 1 KB
/
BookOfHealingSpell.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// Created by Alex on 10.09.18.
//
#include "BookOfHealingSpell.h"
BookOfHealingSpell::BookOfHealingSpell()
{
life_energy_spell = new Life_Energy_Spell();
dawn_of_lite = new Dawn_of_Lite();
whirlwind_of_light = new Whirlwind_of_Light();
enhaemon = new Enhaemon();
santino = new Santino();
spellMap.emplace(LIFE_ENERGY_SPELL, life_energy_spell);
spellMap.emplace(DAWN_OF_LIFE, dawn_of_lite);
spellMap.emplace(WHIRLWIND_OF_LIGHT, whirlwind_of_light);
spellMap.emplace(ENHAEMON, enhaemon);
spellMap.emplace(SANTINO, santino);
}
int BookOfHealingSpell::getAmountRestoreHp(HealingSpellList spell)
{
auto it = spellMap.find(spell);
return it->second->getHealth();;
}
int BookOfHealingSpell::getNeedMana(HealingSpellList spell)
{
auto it = spellMap.find(spell);
return it->second->getNeedMana();
}
BookOfHealingSpell::~BookOfHealingSpell()
{
delete life_energy_spell;
delete dawn_of_lite;
delete whirlwind_of_light;
delete enhaemon;
delete santino;
}