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);
}
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();
}
}
}
}
}
}
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...
*/
}
Aggregations