4 * Created on: Aug 10, 2012
10 #include "TargetingMode.h"
11 #include "../loader/Interpreter.h"
12 #include "../loader/TypeDescription.h"
14 using loader::FieldDescription;
15 using loader::Interpreter;
16 using loader::TypeDescription;
28 void Ikari::CreateTypeDescription() {
31 TypeDescription &td(TypeDescription::Create(TYPE_ID, "Ikari"));
33 "Information of a single ikari attack.");
34 td.SetConstructor(&Construct);
35 td.SetSize(sizeof(Ikari));
37 td.AddField("name", FieldDescription(((char *)&i.name) - ((char *)&i), Interpreter::STRING_ID).SetReferenced().SetDescription("the attack's name"));
38 td.AddField("cost", FieldDescription(((char *)&i.cost) - ((char *)&i), Interpreter::NUMBER_ID).SetDescription("amount of ikari points needed and deducted for use"));
39 td.AddField("targets", FieldDescription(((char *)&i.targetingMode) - ((char *)&i), TargetingMode::TYPE_ID).SetDescription("how target selection is to be performed"));
40 td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), Interpreter::BOOLEAN_ID).SetDescription("if the attack is physical (true) or magical(false)"));
43 void Ikari::Construct(void *data) {