4 * Created on: Aug 10, 2012
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
25 void Ikari::CreateTypeDescription() {
28 int boolId(TypeDescription::GetTypeId("Boolean"));
29 int numberId(TypeDescription::GetTypeId("Number")); // FIXME: need small number type
30 int stringId(TypeDescription::GetTypeId("String"));
31 int targetsId(TypeDescription::GetTypeId("TargetingMode"));
33 TypeDescription &td(TypeDescription::CreateOrGet("Ikari"));
35 "Information of a single ikari attack.");
36 td.SetConstructor(&Construct);
37 td.SetSize(sizeof(Ikari));
39 td.AddField("name", FieldDescription(((char *)&i.name) - ((char *)&i), stringId).SetReferenced().SetDescription("the attack's name"));
40 td.AddField("cost", FieldDescription(((char *)&i.cost) - ((char *)&i), numberId).SetDescription("amount of ikari points needed and deducted for use"));
41 td.AddField("targets", FieldDescription(((char *)&i.targetingMode) - ((char *)&i), targetsId).SetDescription("how target selection is to be performed"));
42 td.AddField("type", FieldDescription(((char *)&i.isPhysical) - ((char *)&i), boolId).SetDescription("if the attack is physical (true) or magical(false)"));
45 void Ikari::Construct(void *data) {