Search in sources :

Example 1 with MacroObj

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);
}
Also used : MacroObj(eidolons.game.module.adventure.entity.MacroObj)

Example 2 with MacroObj

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);
}
Also used : MacroObj(eidolons.game.module.adventure.entity.MacroObj)

Example 3 with MacroObj

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();
}
Also used : TurnRule(eidolons.game.module.adventure.rules.TurnRule) MacroParty(eidolons.game.module.adventure.entity.MacroParty) MacroObj(eidolons.game.module.adventure.entity.MacroObj)

Example 4 with MacroObj

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);
}
Also used : MAP_EDITOR_MOUSE_MODE(eidolons.libgdx.screens.map.editor.EditorControlPanel.MAP_EDITOR_MOUSE_MODE) Vector2(com.badlogic.gdx.math.Vector2) ObjType(main.entity.type.ObjType) MacroObj(eidolons.game.module.adventure.entity.MacroObj)

Aggregations

MacroObj (eidolons.game.module.adventure.entity.MacroObj)4 Vector2 (com.badlogic.gdx.math.Vector2)1 MacroParty (eidolons.game.module.adventure.entity.MacroParty)1 TurnRule (eidolons.game.module.adventure.rules.TurnRule)1 MAP_EDITOR_MOUSE_MODE (eidolons.libgdx.screens.map.editor.EditorControlPanel.MAP_EDITOR_MOUSE_MODE)1 ObjType (main.entity.type.ObjType)1