public void PlaceUnitInParty(Unit u, Party newParty) { if (u.Party != null) { u.Party.RemoveUnit(u); } u.Party = newParty; newParty.AddUnit(u); Log.Debug($"{UserID} moved unit {u.SpecId} to party {newParty.PartyIndex}"); }
public Party CreateParty(Party create) { for (int c = 0; c < 5; c++) { Item item = new Item(10, 0, 0, "Potion"); //Units' Items Unit temp = new Unit(5 + c, 20 + c, 20 + c, false, "Good Unit " + (c + 1), 0.0, 10.0, 0, item); //Create instance of the unit create.AddUnit(temp); } return(create); }
public Party CreateParty(Party create, string type) //Function that creates a party for the GM and returns that party. { for (int c = 0; c < 10; c++) { Item item = new Item(10, 0, 0, "Potion"); //Units' Items Unit temp = new Unit(5 + c, 20 + c, 20 + c, false, type + "Unit" + (c + 1), 0.0, 10.0, 0, item); //Create instance of the unit create.AddUnit(temp); } return(create); }
public void SpawnUnit(FormationUnit spawnUnit, int targetRank) { Party.AddUnit(spawnUnit, targetRank); Ranks.RedistributeParty(Party); Overlay.FreeSlot.LockOnUnit(spawnUnit); }