#include <spellsmanager.h>
#include <spells/meleedamagespell.h>
#include <spells/selfhealspell.h>
#include <spells/selfmovespell.h>

#include <effects/effect.h>
#include <effects/meleedamage.h>
#include <effects/selfheal.h>
#include <effects/selfmove.h>

SpellManager::SpellManager(){
    spells_factory_.addClass<MeleeDamageSpell, QString>("MeleeDamageSpell");
    spells_factory_.addClass<SelfHealSpell, QString>("SelfHealSpell");
    spells_factory_.addClass<SelfMoveSpell, QString>("SelfMoveSpell");

    effects_factory_.addClass<SelfMove, QString>("SelfMove");
    //effects_factory_.addClass<MeleeDamage, QString>("MeleeDamage");
    //effects_factory_.addClass<SelfHeal, QString>("SelfHeal");


}
std::shared_ptr<Spell> SpellManager::createSpell(QString spell_name){
    return spells_factory_.createObject(spell_name, QString());
}

std::shared_ptr<Effect> SpellManager::createEffect(QString effect_name){
    return effects_factory_.createObject(effect_name, QString());
}
