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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations