aboutsummaryrefslogtreecommitdiff
path: root/src/spell.cc
blob: 0294956035eed912a9f2d93c10db60ce0b5b42a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "spell.h"
#include "utils.h"
#include <string>
#include <sstream>

using namespace std;

namespace entry {
    string Spell::getText() const {
        stringstream text;
        text << utils::toOrdinal(getLevel()) << " level " << getSchool() << " spell." << endl;
        text << "Casting time: " << getCastingTime() << ", Duration: " << getDuration() << ", Range: " << getRange() << ", Components: " << getComponents() << "." << endl;
        text << Entry::getText() << endl;
        text << "Available for: " << utils::join(getClasses(), ", ") << "." << endl;
        return text.str();
    }
}