3 #include "../loader/Interpreter.h"
4 #include "../loader/TypeDescription.h"
6 using loader::FieldDescription;
7 using loader::Interpreter;
8 using loader::TypeDescription;
22 void LevelUp::CreateTypeDescription() {
26 TypeDescription &td(TypeDescription::Create(TYPE_ID, "LevelUp"));
27 td.SetDescription("Describes the requirements and benefits of a levelup.");
28 td.SetConstructor(&Construct);
29 td.SetSize(sizeof(LevelUp));
30 td.AddSupertype(Stats::TYPE_ID, ((char *)s) - ((char *)&l));
32 td.AddField("exp", FieldDescription(((char *)&l.experience) - ((char *)&l), Interpreter::NUMBER_ID).SetDescription("reuired experience points"));
33 td.AddField("maxHP", FieldDescription(((char *)&l.maxHealth) - ((char *)&l), Interpreter::NUMBER_ID).SetDescription("increase in maximum health points"));
34 td.AddField("maxMP", FieldDescription(((char *)&l.maxMagic) - ((char *)&l), Interpreter::NUMBER_ID).SetDescription("increas in maximum magic points"));
36 AddFields(td, l, ((char *)s) - ((char *)&l));
39 void LevelUp::Construct(void *data) {