Search in sources :

Example 1 with MacroParty

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

Example 2 with MacroParty

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

Example 3 with MacroParty

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

Example 4 with MacroParty

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

Example 5 with MacroParty

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

Aggregations

MacroParty (eidolons.game.module.adventure.entity.MacroParty)12 Place (eidolons.game.module.adventure.map.Place)5 Route (eidolons.game.module.adventure.map.Route)3 Area (eidolons.game.module.adventure.map.Area)2 Region (eidolons.game.module.adventure.map.Region)2 Party (eidolons.client.cc.logic.party.Party)1 MacroRef (eidolons.game.module.adventure.MacroRef)1 MacroObj (eidolons.game.module.adventure.entity.MacroObj)1 Faction (eidolons.game.module.adventure.faction.Faction)1 TurnRule (eidolons.game.module.adventure.rules.TurnRule)1 Town (eidolons.game.module.adventure.town.Town)1 ActionValueContainer (eidolons.libgdx.gui.panels.dc.actionpanel.ActionValueContainer)1 Coordinates (main.game.bf.Coordinates)1