use of eidolons.game.module.adventure.entity.MacroObj in project Eidolons by IDemiurge.
the class EditorManager method remove.
public static <E extends MapActor> void remove(E actor) {
MacroObj obj = actorObjMap.remove(actor);
if (obj == null)
return;
MacroGame.getGame().getState().removeObject(obj.getId());
GuiEventManager.trigger(MapEvent.REMOVE_MAP_OBJ, actor);
}
use of eidolons.game.module.adventure.entity.MacroObj in project Eidolons by IDemiurge.
the class ExploreMaster method checkGotLost.
private static boolean checkGotLost(MacroParty party, Route route) {
// make random progress? negative progress?
// basic version -
// "You got lost and barely management to find your way back before sundown/rise"
party.getExploreCapacity();
party.getSurvivalCapacity();
// preCheck encounters
route.getBendFactor();
MacroObj area = route.getRef().getRegion().getArea(// getCurrentArea()
party.getProperty(MACRO_PROPS.AREA));
return RandomWizard.chance(0);
}
use of eidolons.game.module.adventure.entity.MacroObj in project Eidolons by IDemiurge.
the class MacroGameManager method newTurn.
public void newTurn() {
// factionsTurn();
SaveMaster.saveInNewThread();
getGame().getCampaign().modifyParameter(MACRO_PARAMS.HOURS_ELAPSED, TimeMaster.getHoursPerTurn());
for (MacroParty p : getGame().getParties()) {
p.newTurn();
}
for (MacroObj p : getGame().getPlaces()) {
p.newTurn();
}
for (MacroObj p : getGame().getFactions()) {
p.newTurn();
}
for (MacroObj p : getGame().getRoutes()) {
p.newTurn();
}
for (TurnRule r : getGame().getTurnRules()) {
r.newTurn();
}
TravelMasterOld.newTurn();
AreaManager.newTurn();
refreshAll();
}
use of eidolons.game.module.adventure.entity.MacroObj in project Eidolons by IDemiurge.
the class EditorManager method modify.
public static void modify(boolean addOrRemove, int screenX, int screenY) {
MAP_EDITOR_MOUSE_MODE mode = EditorManager.getMode();
/*
add listener to each actor
*/
Vector2 v = EditorMapView.getInstance().getMapStage().screenToStageCoordinates(new Vector2(screenX, screenY));
int x = (int) v.x;
int y = (int) v.y;
if (mode == null)
mode = MAP_EDITOR_MOUSE_MODE.ADD;
switch(mode) {
case ADD:
if (!addOrRemove) {
EditorMapView.getInstance().getObjectStage().removeClosest(x, y);
return;
}
break;
case POINT:
MacroManager.getPointMaster().clicked(x, y);
return;
case EMITTER:
if (addOrRemove) {
EditorMapView.getInstance().getEditorParticles().clicked(x, y);
} else {
EditorMapView.getInstance().getEditorParticles().removeClosest(x, y);
}
return;
}
ObjType type = EditorMapView.getInstance().getGuiStage().getPalette().getSelectedType();
if (type == null)
return;
MacroObj obj = create(type);
added(obj, screenX, screenY);
}
Aggregations