Search in sources :

Example 1 with ENCOUNTER_SUBGROUP

use of main.content.enums.EncounterEnums.ENCOUNTER_SUBGROUP in project Eidolons by IDemiurge.

the class AreaManager method getRandomCreepGroup.

// TODO pass MIN_MAX !
private static MacroGroup getRandomCreepGroup(Area area) {
    Loop.startLoop(10);
    while (!Loop.loopEnded()) {
        ENCOUNTER_SUBGROUP group = new RandomWizard<ENCOUNTER_SUBGROUP>().getObjectByWeight(area.getProperty(MACRO_PROPS.ENCOUNTER_SUBGROUPS), // TODO
        ENCOUNTER_SUBGROUP.class);
        List<ObjType> pool;
        if (group != null) {
            pool = DataManager.getTypesSubGroup(DC_TYPE.ENCOUNTERS, group.toString());
        } else // TODO
        {
            pool = DataManager.getTypes(DC_TYPE.ENCOUNTERS);
        }
        FilterMaster.filterByParam(pool, PARAMS.POWER_MINIMUM, EncounterMaster.getMaxCreepWavePower(), DC_TYPE.ENCOUNTERS, false);
        FilterMaster.filterByParam(pool, PARAMS.POWER_MAXIMUM, EncounterMaster.getMinCreepWavePower(), DC_TYPE.ENCOUNTERS, true);
        // more filter! By TYPE? TODO
        if (pool.isEmpty()) {
            continue;
        }
        // higher probability for non-bosses?
        String waveName = new RandomWizard<ObjType>().getRandomListItem(pool).getName();
        MacroGroup macroGroup = new MacroGroup(waveName, area);
        return macroGroup;
    }
    return null;
}
Also used : MacroGroup(eidolons.game.module.adventure.travel.MacroGroup) ObjType(main.entity.type.ObjType) RandomWizard(main.system.auxiliary.RandomWizard) ENCOUNTER_SUBGROUP(main.content.enums.EncounterEnums.ENCOUNTER_SUBGROUP)

Aggregations

MacroGroup (eidolons.game.module.adventure.travel.MacroGroup)1 ENCOUNTER_SUBGROUP (main.content.enums.EncounterEnums.ENCOUNTER_SUBGROUP)1 ObjType (main.entity.type.ObjType)1 RandomWizard (main.system.auxiliary.RandomWizard)1