#ifndef SPELL_H
#define SPELL_H

#include <QString>
#include <QStringList>
#include "Components.h"

class QDomElement;

class Spell
{
public:
    Spell();
    Spell(QDomElement &e);

    QString name() const;
    QString school() const;
    int level() const;
    bool ritual() const;
    bool concentration() const;
    QStringList classes() const;
    QString description() const;
    QString castingtime() const;
    QString range() const;
    QString duration() const;
    Components components() const;

    bool operator==(const Spell &other) const;

private:
    void parseFromElement(QDomElement &e);

private:
    // In root tag.
    QString _name;
    QString _school;
    int _level;
    bool _ritual;
    bool _concentration;

    // Subtags.
    QStringList _classes;
    QString _description;
    QString _castingtime;
    QString _range;
    QString _duration;
    Components _components;
};

#endif // SPELL_H
