Search in sources :

Example 1 with Area

use of eidolons.game.module.adventure.map.Area in project Eidolons by IDemiurge.

the class EncounterMaster method checkEncounter.

// to be invoked multiple times between threats?
public Encounter checkEncounter(MacroRef ref, boolean explore, int progress) {
    MacroParty party = ref.getParty();
    Route route = ref.getRoute();
    Area area = route.getArea();
    return checkEncounter(area, route, party, explore, progress);
}
Also used : Area(eidolons.game.module.adventure.map.Area) MacroParty(eidolons.game.module.adventure.entity.MacroParty) Route(eidolons.game.module.adventure.map.Route)

Example 2 with Area

use of eidolons.game.module.adventure.map.Area in project Eidolons by IDemiurge.

the class AreaManager method newTurn.

// how to figure out which groups got killed in a skirmish?
public static void newTurn() {
    // danger_level -> newGroup
    for (Region region : MacroManager.getRegions()) {
        for (Area area : region.getAreas()) {
            area.modifyParameter(MACRO_PARAMS.AREA_CREEP_POWER_TOTAL, TimeMaster.getHoursPerTurn() * area.getIntParam(MACRO_PARAMS.CREEP_POWER_PER_HOUR));
            checkAddGroups(area);
            for (MacroGroup group : area.getGroups()) {
                if (group.isAmbushing()) {
                // preCheck continue;
                } else {
                    if (!group.checkSetAmbush()) {
                        group.wander();
                    }
                }
            }
        }
    }
}
Also used : Area(eidolons.game.module.adventure.map.Area) MacroGroup(eidolons.game.module.adventure.travel.MacroGroup) Region(eidolons.game.module.adventure.map.Region)

Example 3 with Area

use of eidolons.game.module.adventure.map.Area in project Eidolons by IDemiurge.

the class WorldGenerator method createRegion.

public static Region createRegion(ObjType type, MacroRef ref) {
    // template
    // add places, towns and routes
    region = new Region(game, type, ref);
    // init default towns/places ; then add randomized
    for (String s : StringMaster.open(region.getProperty(MACRO_PROPS.AREAS))) {
        type = DataManager.getType(s, MACRO_OBJ_TYPES.AREA);
        Area area = new Area(ref.getGame(), type, ref);
        region.getAreas().add(area);
    }
    for (String s : StringMaster.open(region.getProperty(MACRO_PROPS.PARTIES))) {
        try {
            MacroParty party = createParty(ref, s);
            region.addParty(party);
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        }
    }
    for (String s : StringMaster.open(region.getProperty(MACRO_PROPS.PLACES))) {
        Place place = createPlace(ref, s);
        if (place != null)
            region.addPlace(place);
    }
    for (String s : StringMaster.open(region.getProperty(MACRO_PROPS.TOWNS))) {
        Town town = createTown(ref, s);
        region.addTown(town);
    }
    generateRoutes();
    return region;
/*
         * r.getProperty(MACRO_PROPS.PLACES) Places - Power level ++ will be
		 * appearing as the game progresses
		 * 
		 * Routes - there should be at least 1 between each 2 places as
		 * "default" (preset) and then we can generate additional randomized
		 * routes For non-preset Places, we can use some metrics...
		 */
}
Also used : Area(eidolons.game.module.adventure.map.Area) MacroParty(eidolons.game.module.adventure.entity.MacroParty) Town(eidolons.game.module.adventure.town.Town) Region(eidolons.game.module.adventure.map.Region) Place(eidolons.game.module.adventure.map.Place)

Aggregations

Area (eidolons.game.module.adventure.map.Area)3 MacroParty (eidolons.game.module.adventure.entity.MacroParty)2 Region (eidolons.game.module.adventure.map.Region)2 Place (eidolons.game.module.adventure.map.Place)1 Route (eidolons.game.module.adventure.map.Route)1 Town (eidolons.game.module.adventure.town.Town)1 MacroGroup (eidolons.game.module.adventure.travel.MacroGroup)1