aboutsummaryrefslogtreecommitdiff
path: root/src/spell.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/spell.cc')
-rw-r--r--src/spell.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/spell.cc b/src/spell.cc
new file mode 100644
index 0000000..0294956
--- /dev/null
+++ b/src/spell.cc
@@ -0,0 +1,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();
+ }
+}