--- /dev/null
+#include "LevelUp.h"
+
+#include "../loader/Interpreter.h"
+#include "../loader/TypeDescription.h"
+
+using loader::FieldDescription;
+using loader::Interpreter;
+using loader::TypeDescription;
+
+
+namespace common {
+
+LevelUp::LevelUp()
+: Stats()
+, experience(0)
+, maxHealth(0)
+, maxMagic(0) {
+
+}
+
+
+void LevelUp::CreateTypeDescription() {
+ LevelUp l;
+ Stats *s = &l;
+
+ TypeDescription &td(TypeDescription::Create(TYPE_ID, "LevelUp"));
+ td.SetDescription("Describes the requirements and benefits of a levelup.");
+ td.SetConstructor(&Construct);
+ td.SetSize(sizeof(LevelUp));
+ td.AddSupertype(Stats::TYPE_ID, ((char *)s) - ((char *)&l));
+
+ td.AddField("exp", FieldDescription(((char *)&l.experience) - ((char *)&l), Interpreter::NUMBER_ID).SetDescription("reuired experience points"));
+ td.AddField("maxHP", FieldDescription(((char *)&l.maxHealth) - ((char *)&l), Interpreter::NUMBER_ID).SetDescription("increase in maximum health points"));
+ td.AddField("maxMP", FieldDescription(((char *)&l.maxMagic) - ((char *)&l), Interpreter::NUMBER_ID).SetDescription("increas in maximum magic points"));
+
+ AddFields(td, l, ((char *)s) - ((char *)&l));
+}
+
+void LevelUp::Construct(void *data) {
+ new (data) LevelUp;
+}
+
+}