/* * PCCLASSLEVELONLY Since this is really only something that will be done * within a PlayerCharacter (real processing) it is only required in * PCClassLevel. * * As a side note, I'm not sure what I think of accessing the ClassTypes and * using one of those to set the response to this request. Should this be * done when a PCClassLevel is built? Is that possible? How does that * interact with a PlayerCharacter being reimported if those rules change? */ public boolean hasXPPenalty() { for (Type type : getTrueTypeList(false)) { final ClassType aClassType = SettingsHandler.getGame().getClassTypeByName(type.toString()); if ((aClassType != null) && !aClassType.getXPPenalty()) { return false; } } return true; }
/* * FUTUREREFACTOR This would really be nice to have initilized when the LST files * are read in, which is possible because the ClassTypes are all defined as part * of the GameMode... however the problem is that the order of the ISMONSTER tag * and the TYPE tags cannot be defined - .MODs and .COPYs make it impossible to * guarantee an order. Therefore, this must wait for a two-pass design in the * import system - thpr 10/4/06 */ public boolean isMonster() { Boolean mon = get(ObjectKey.IS_MONSTER); if (mon != null) { return mon.booleanValue(); } ClassType aClassType = SettingsHandler.getGame().getClassTypeByName(getClassType()); if ((aClassType != null) && aClassType.isMonster()) { return true; } else { for (Type type : getTrueTypeList(false)) { aClassType = SettingsHandler.getGame().getClassTypeByName(type.toString()); if ((aClassType != null) && aClassType.isMonster()) { return true; } } } return false; }