Search in sources :

Example 1 with BF_OBJECT_GROUP

use of main.content.enums.entity.BfObjEnums.BF_OBJECT_GROUP in project Eidolons by IDemiurge.

the class ContentGenerator method initHeight.

// public static void generateBfObjParams(ObjType t) {
// BF_OBJECT_TYPE type = new EnumMaster<BF_OBJECT_TYPE>().retrieveEnumConst(
// BF_OBJECT_TYPE.class, t.getProperty(G_PROPS.BF_OBJECT_TYPE));
// BF_OBJECT_GROUP group = new
// EnumMaster<BF_OBJECT_GROUP>().retrieveEnumConst(
// BF_OBJECT_GROUP.class, t.getProperty(G_PROPS.BF_OBJECT_GROUP));
// BF_OBJECT_SIZE size = new EnumMaster<BF_OBJECT_SIZE>().retrieveEnumConst(
// BF_OBJECT_SIZE.class, t.getProperty(PROPS.BF_OBJECT_SIZE));
// BF_OBJ_MATERIAL material = new
// EnumMaster<BF_OBJ_MATERIAL>().retrieveEnumConst(
// BF_OBJ_MATERIAL.class, t.getProperty(PROPS.BF_OBJ_MATERIAL));
// OBJECT_ARMOR_TYPE armorType = new
// EnumMaster<OBJECT_ARMOR_TYPE>().retrieveEnumConst(
// OBJECT_ARMOR_TYPE.class, t.getProperty(PROPS.OBJECT_ARMOR_TYPE));
// 
// if (armorType == null) {
// switch (type) {
// 
// }
// }
// 
// // TODO
// 
// // stone/wood/metal/ ...
// int i = 0;
// List<String> list = getParamsFor(armorType);
// for (PARAMS portrait : params) {
// t.setParam(portrait, list.getOrCreate(i));
// i++;
// }
// list = getResistancesForArmorType(armorType);
// for (PARAMETER portrait : ValuePages.RESISTANCES) {
// t.setParam(portrait, list.getOrCreate(i));
// i++;
// }
// 
// }
// TODO use mods from size? or multiply later...
// private static String getParams(OBJECT_ARMOR_TYPE armorType, PARAMS portrait) {
// switch (armorType) {
// case AETHER:
// return getAETHERParam(portrait);
// case BONE:
// return getBONEParam(portrait);
// case CRYSTAL:
// return getCRYSTALParam(portrait);
// case ETHEREAL:
// return getETHEREALParam(portrait);
// case FLESH:
// return getFLESHParam(portrait);
// case METAL:
// return getMETALParam(portrait);
// case STONE:
// return getSTONEParam(portrait);
// case WOOD:
// return getWOODParam(portrait);
// 
// }
// 
// return null;
// }
// 
// private static List<String> getResistancesForArmorType(OBJECT_ARMOR_TYPE
// armorType) {
// List<String> list = new ArrayList<>();
// for (PARAMETER portrait : ValuePages.RESISTANCES) {
// switch ((PARAMS) portrait) {
// case PIERCING_RESISTANCE:
// list.add(getPIERCING_RESISTANCE(armorType));
// list.add(getOrCreate(armorType));
// break;
// case BLUDGEONING_RESISTANCE:
// list.add(getBLUDGEONING_RESISTANCE(armorType));
// break;
// case SLASHING_RESISTANCE:
// list.add(getSLASHING_RESISTANCE(armorType));
// break;
// case POISON_RESISTANCE:
// list.add(getPOISON_RESISTANCE(armorType));
// break;
// case FIRE_RESISTANCE:
// list.add(getFIRE_RESISTANCE(armorType));
// break;
// case COLD_RESISTANCE:
// list.add(getCOLD_RESISTANCE(armorType));
// break;
// case ACID_RESISTANCE:
// list.add(getACID_RESISTANCE(armorType));
// break;
// case LIGHTNING_RESISTANCE:
// list.add(getLIGHTNING_RESISTANCE(armorType));
// break;
// case SONIC_RESISTANCE:
// list.add(getSONIC_RESISTANCE(armorType));
// break;
// case LIGHT_RESISTANCE:
// list.add(getLIGHT_RESISTANCE(armorType));
// break;
// case CHAOS_RESISTANCE:
// list.add(getCHAOS_RESISTANCE(armorType));
// break;
// case ARCANE_RESISTANCE:
// list.add(getARCANE_RESISTANCE(armorType));
// break;
// case HOLY_RESISTANCE:
// list.add(getHOLY_RESISTANCE(armorType));
// break;
// case SHADOW_RESISTANCE:
// list.add(getSHADOW_RESISTANCE(armorType));
// break;
// case PSIONIC_RESISTANCE:
// list.add(getPSIONIC_RESISTANCE(armorType));
// break;
// case DEATH_RESISTANCE:
// list.add(getDEATH_RESISTANCE(armorType));
// break;
// }
// }
// 
// return list;
// }
// 
// private static List<String> getParamsFor(OBJECT_ARMOR_TYPE armorType) {
// List<String> list = new ArrayList<>();
// for (PARAMS portrait : params) {
// list.add(getParams(armorType, portrait));
// }
// 
// return list;
// }
public static void initHeight(ObjType t) {
    DC_TYPE TYPE = (DC_TYPE) t.getOBJ_TYPE_ENUM();
    if (t.getIntParam(PARAMS.HEIGHT) != 0) {
        return;
    }
    int height = 0;
    switch(TYPE) {
        case BF_OBJ:
            BF_OBJECT_TYPE type = new EnumMaster<BF_OBJECT_TYPE>().retrieveEnumConst(BF_OBJECT_TYPE.class, t.getProperty(G_PROPS.BF_OBJECT_TYPE));
            BF_OBJECT_GROUP group = new EnumMaster<BF_OBJECT_GROUP>().retrieveEnumConst(BF_OBJECT_GROUP.class, t.getProperty(G_PROPS.BF_OBJECT_GROUP));
            if (type != null) {
                switch(type) {
                }
            }
            if (group != null) {
                switch(group) {
                    case ROCKS:
                        height = 100;
                        break;
                    case TREES:
                        height = 1000;
                        break;
                    default:
                        break;
                }
            }
            break;
        case UNITS:
            List<CLASSIFICATIONS> c = new EnumMaster<CLASSIFICATIONS>().getEnumList(CLASSIFICATIONS.class, t.getProperty(G_PROPS.CLASSIFICATIONS));
            if (c.contains(UnitEnums.CLASSIFICATIONS.GIANT)) {
                height = 600;
            } else if (c.contains(UnitEnums.CLASSIFICATIONS.HUMANOID)) {
                height = 180;
            } else if (c.contains(UnitEnums.CLASSIFICATIONS.TALL)) {
                height = 225;
            } else if (c.contains(UnitEnums.CLASSIFICATIONS.SHORT)) {
                height = 125;
            }
        case CHARS:
            RACE race = new EnumMaster<RACE>().retrieveEnumConst(RACE.class, t.getProperty(G_PROPS.RACE));
            BACKGROUND bg = new EnumMaster<BACKGROUND>().retrieveEnumConst(BACKGROUND.class, t.getProperty(G_PROPS.BACKGROUND));
            GENDER g = new EnumMaster<GENDER>().retrieveEnumConst(GENDER.class, t.getProperty(G_PROPS.GENDER));
            if (race != null) {
                switch(race) {
                    case DEMON:
                        height = 200;
                        break;
                    case DWARF:
                        height = 130;
                        break;
                    case ELF:
                        height = 190;
                        break;
                    case GOBLINOID:
                        height = 160;
                        break;
                    case HUMAN:
                        height = 180;
                        if (bg == HeroEnums.BACKGROUND.MAN_OF_WOLF_REALM) {
                            height += 10;
                        }
                        if (bg == HeroEnums.BACKGROUND.MAN_OF_EAGLE_REALM) {
                            height += 15;
                        }
                        break;
                    case VAMPIRE:
                        height = 180;
                        break;
                    default:
                        break;
                }
            }
            if (g == HeroEnums.GENDER.FEMALE) {
                height -= height / 5;
            }
            break;
    }
    t.setParam(PARAMS.HEIGHT, height);
// per race?
// per obj type
}
Also used : DC_TYPE(main.content.DC_TYPE) BF_OBJECT_GROUP(main.content.enums.entity.BfObjEnums.BF_OBJECT_GROUP) BACKGROUND(main.content.enums.entity.HeroEnums.BACKGROUND) RACE(main.content.enums.entity.HeroEnums.RACE) GENDER(main.content.enums.entity.HeroEnums.GENDER) BF_OBJECT_TYPE(main.content.enums.entity.BfObjEnums.BF_OBJECT_TYPE) CLASSIFICATIONS(main.content.enums.entity.UnitEnums.CLASSIFICATIONS)

Aggregations

DC_TYPE (main.content.DC_TYPE)1 BF_OBJECT_GROUP (main.content.enums.entity.BfObjEnums.BF_OBJECT_GROUP)1 BF_OBJECT_TYPE (main.content.enums.entity.BfObjEnums.BF_OBJECT_TYPE)1 BACKGROUND (main.content.enums.entity.HeroEnums.BACKGROUND)1 GENDER (main.content.enums.entity.HeroEnums.GENDER)1 RACE (main.content.enums.entity.HeroEnums.RACE)1 CLASSIFICATIONS (main.content.enums.entity.UnitEnums.CLASSIFICATIONS)1