use of eidolons.game.module.adventure.entity.MacroParty in project Eidolons by IDemiurge.
the class EditorManager method create.
private static <E extends MapActor> MacroObj create(ObjType type) {
MacroRef ref = new MacroRef(MacroGame.game);
ref.setPlayer(MacroGame.game.getPlayerFaction().getOwner());
ref.setPlayer(MacroGame.game.getFactions().get(0).getOwner());
if (type.getOBJ_TYPE_ENUM() == MACRO_OBJ_TYPES.PLACE)
return new Place(MacroGame.game, type, ref);
if (type.getOBJ_TYPE_ENUM() == DC_TYPE.PARTY)
try {
MacroParty party = new MacroParty(type, MacroGame.game, ref);
party.getParty().initMembers();
return party;
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
return null;
}
use of eidolons.game.module.adventure.entity.MacroParty 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.entity.MacroParty in project Eidolons by IDemiurge.
the class ExploreMaster method newTurn.
public static void newTurn() {
for (MacroParty party : MacroGame.getGame().getParties()) {
if (party.getStatus() != MACRO_STATUS.TRAVELING) {
return;
}
Place place = party.getCurrentExploration();
if (place instanceof Route) {
ExploreMaster.exploreRoute(party, (Route) place);
} else {
Boolean north_or_south = RandomWizard.random();
Boolean west_or_east = RandomWizard.random();
// getOrCreate available directions
ExploreMaster.exploreLocation(party, north_or_south, west_or_east);
}
}
}
use of eidolons.game.module.adventure.entity.MacroParty in project Eidolons by IDemiurge.
the class TravelMasterOld method newTurn.
public static void newTurn() {
for (MacroParty party : MacroGame.getGame().getParties()) {
if (party.getStatus() != MACRO_STATUS.TRAVELING) {
return;
}
// party.newTurn(); already done
Route route = party.getCurrentRoute();
if (route == null) {
continue;
}
// TODO perhaps travel PER HOUR with a mini-message with progress
// updates... although if 'nothing happens', it certainly should be
// skippable
travel(party, route);
MacroManager.refreshGui();
// while (TimeMaster.hoursLeft() > 1) {
// if (!travel(party, route, 1))
// break;
// // TODO reduce Vigor gradually... notify and ask - linked stuff,
// // possible discoveries (less likely than explore mode but
// // still... maybe it should be *the same* just with different
// // stats!
// MacroManager.refreshGui();
// }
}
}
use of eidolons.game.module.adventure.entity.MacroParty in project Eidolons by IDemiurge.
the class MapVisionMaster method update.
public void update(float delta) {
MacroParty party = game.getPlayerParty();
Place location = game.getPlayerParty().getCurrentLocation();
for (Place sub : game.getPlaces()) {
int distance = RouteMaster.getDistance(location, sub);
int scoutRange = party.getExploreCapacity();
MAP_OBJ_INFO_LEVEL info_level = MAP_OBJ_INFO_LEVEL.INVISIBLE;
if (distance <= scoutRange) {
if (sub.isHidden()) {
// check
} else
info_level = MAP_OBJ_INFO_LEVEL.VISIBLE;
sub.setDetected(true);
} else {
if (sub.isDetected())
info_level = MAP_OBJ_INFO_LEVEL.KNOWN;
else {
if (sub.isHidden())
info_level = MAP_OBJ_INFO_LEVEL.INVISIBLE;
else
info_level = MAP_OBJ_INFO_LEVEL.UNKNOWN;
}
}
// sight range? route length?
// check concealed!
sub.setInfoLevel(info_level);
}
}
Aggregations