Search in sources :

Example 6 with Party

use of eidolons.client.cc.logic.party.Party in project Eidolons by IDemiurge.

the class WorldGenerator method createParty.

private static MacroParty createParty(MacroRef ref, String s) {
    Coordinates coordinates = new Coordinates(true, Integer.valueOf(VariableManager.getVar(s, 0)), Integer.valueOf(VariableManager.getVar(s, 1)));
    String string = (VariableManager.getVar(s, 2));
    Faction faction = null;
    if (StringMaster.isEmpty(string)) {
        faction = game.getPlayerFaction();
    } else if (string.equalsIgnoreCase("player")) {
        Party party = DC_Game.game.getMetaMaster().getPartyManager().getParty();
        if (party == null) {
            return null;
        }
        MacroParty playerParty = new MacroParty(getMacroPartyType(party), game, ref, party);
        game.setPlayerParty(playerParty);
        playerParty.setFaction(game.getPlayerFaction());
        playerParty.setCoordinates(coordinates);
        return playerParty;
    } else
        faction = game.getFaction(string);
    String name = VariableManager.removeVarPart(s);
    MacroParty party = new MacroParty(DataManager.getType(name, DC_TYPE.PARTY), ref.getGame(), ref);
    party.setCoordinates(coordinates);
    party.setFaction(faction);
    party.setOriginalOwner(faction.getOwner());
    party.setOwner(faction.getOwner());
    return party;
}
Also used : Party(eidolons.client.cc.logic.party.Party) MacroParty(eidolons.game.module.adventure.entity.MacroParty) MacroParty(eidolons.game.module.adventure.entity.MacroParty) Coordinates(main.game.bf.Coordinates) Faction(eidolons.game.module.adventure.faction.Faction)

Example 7 with Party

use of eidolons.client.cc.logic.party.Party in project Eidolons by IDemiurge.

the class PartyEffect method getObjectsToModify.

@Override
protected List<Obj> getObjectsToModify() {
    Party party = (Party) ref.getSourceObj().getRef().getObj(KEYS.PARTY);
    List<Unit> list = party.getMembers();
    initFilterConditions();
    FilterMaster.filter(list, conditions);
    List<Obj> objList = new ArrayList<>();
    for (Unit j : list) {
        objList.add(j);
    }
    return objList;
}
Also used : Party(eidolons.client.cc.logic.party.Party) Obj(main.entity.obj.Obj) ArrayList(java.util.ArrayList) Unit(eidolons.entity.obj.unit.Unit)

Example 8 with Party

use of eidolons.client.cc.logic.party.Party in project Eidolons by IDemiurge.

the class TutorialPartyManager method initPlayerParty.

@Override
public Party initPlayerParty() {
    ObjType type = DataManager.getType(TUTORIAL_PARTY, DC_TYPE.PARTY);
    party = new Party(type);
    getGame().getState().addObject(party);
    getGame().getDataKeeper().addUnitData(new UnitData(party));
    return party;
}
Also used : Party(eidolons.client.cc.logic.party.Party) ObjType(main.entity.type.ObjType) UnitData(eidolons.game.battlecraft.logic.dungeon.universal.UnitData)

Example 9 with Party

use of eidolons.client.cc.logic.party.Party in project Eidolons by IDemiurge.

the class PartyHelper method newParty.

private static Party newParty(ObjType newType) {
    Party party = new Party(newType);
    DC_Game.game.getState().addObject(party);
    if (DC_Game.game.getGameMode() == GAME_MODES.ARENA_ARCADE) {
    // DC_Game.game.getArenaArcadeMaster().init(partyObj);
    }
    return party;
}
Also used : Party(eidolons.client.cc.logic.party.Party)

Example 10 with Party

use of eidolons.client.cc.logic.party.Party in project Eidolons by IDemiurge.

the class PartyHelper method newParty.

public static Party newParty(Unit hero) {
    String newName = "";
    if (CharacterCreator.isArcadeMode()) {
        while (true) {
            if ((newName) == null) {
                return null;
            }
            if (checkPartyName(newName)) {
                newName = StringMaster.getPossessive(hero.getName()) + " Party";
                break;
            }
            newName = DialogMaster.inputText(PARTY_NAME_TIP, DEFAULT_TYPE_NAME);
        }
    }
    Party party = createParty(hero);
    // party.getLeader().getProperty(G_PROPS.NAME) +
    // StringMaster.PARTY_SUFFIX;
    party.setProperty(G_PROPS.NAME, newName, true);
    // if (CharacterCreator.isArcadeMode()) {
    // savePartyAs(true);
    // } Now after 1st battle!
    setParty(party);
    return party;
}
Also used : Party(eidolons.client.cc.logic.party.Party)

Aggregations

Party (eidolons.client.cc.logic.party.Party)10 Unit (eidolons.entity.obj.unit.Unit)3 ObjType (main.entity.type.ObjType)3 UnitData (eidolons.game.battlecraft.logic.dungeon.universal.UnitData)2 Coordinates (main.game.bf.Coordinates)2 DC_Player (eidolons.game.battlecraft.logic.battle.universal.DC_Player)1 MacroParty (eidolons.game.module.adventure.entity.MacroParty)1 Faction (eidolons.game.module.adventure.faction.Faction)1 ArrayList (java.util.ArrayList)1 Obj (main.entity.obj.Obj)1