}
public static void generateRPClass() {
try {
stats = Statistics.getStatistics();
final RPClass entity = new RPClass("rpentity");
entity.isA("active_entity");
entity.addAttribute("name", Type.STRING);
entity.addAttribute(ATTR_TITLE, Type.STRING);
entity.addAttribute("level", Type.SHORT);
entity.addAttribute("xp", Type.INT);
entity.addAttribute("mana", Type.INT);
entity.addAttribute("base_mana", Type.INT);
entity.addAttribute("base_hp", Type.SHORT);
entity.addAttribute("hp", Type.SHORT);
entity.addAttribute("atk", Type.SHORT, Definition.PRIVATE);
entity.addAttribute("atk_xp", Type.INT, Definition.PRIVATE);
entity.addAttribute("def", Type.SHORT, Definition.PRIVATE);
entity.addAttribute("def_xp", Type.INT, Definition.PRIVATE);
entity.addAttribute("atk_item", Type.INT,
(byte) (Definition.PRIVATE | Definition.VOLATILE));
entity.addAttribute("def_item", Type.INT,
(byte) (Definition.PRIVATE | Definition.VOLATILE));
entity.addAttribute("risk", Type.BYTE, Definition.VOLATILE); // obsolete, do not use
entity.addAttribute("damage", Type.INT, Definition.VOLATILE); // obsolete, do not use
entity.addAttribute("heal", Type.INT, Definition.VOLATILE);
// TODO: check that the binary representation of old saved players is compatible when this is changed into a list.
entity.addAttribute("target", Type.INT, Definition.VOLATILE);
entity.addAttribute("title_type", Type.STRING, Definition.VOLATILE);
entity.addRPSlot("head", 1, Definition.PRIVATE);
entity.addRPSlot("rhand", 1, Definition.PRIVATE);
entity.addRPSlot("lhand", 1, Definition.PRIVATE);
entity.addRPSlot("armor", 1, Definition.PRIVATE);
entity.addRPSlot("finger", 1, Definition.PRIVATE);
entity.addRPSlot("cloak", 1, Definition.PRIVATE);
entity.addRPSlot("legs", 1, Definition.PRIVATE);
entity.addRPSlot("feet", 1, Definition.PRIVATE);
entity.addRPSlot("bag", 12, Definition.PRIVATE);
entity.addRPSlot("keyring", 8, Definition.PRIVATE);
entity.addRPEvent("attack", Definition.VOLATILE);
} catch (final SyntaxException e) {
logger.error("cannot generateRPClass", e);
}
}