public ClassSquad() { stashList = new List <ClassItem>(); rosterList = new List <ClassSoldier>(); memberList = new List <ClassSoldier>(); Random rd = new Random(); int result = rd.Next(0, 100); int spec = rd.Next(0, 5); CaptainSpec capSpec = (CaptainSpec)spec; EditSquadInfo("NPC_Team_" + result.ToString(), "Host_" + result.ToString(), capSpec, false); captain = new ClassCaptain(); captain.specialism = capSpec; hierophant = new ClassHierophant(); spec = rd.Next(0, 3); HeroSpec heroSpec = (HeroSpec)spec; hierophant.specialism = heroSpec; credit = 500; result = rd.Next(1, 8); memberList = new List <ClassSoldier>(); for (int i = 0; i < result; i++) { ClassSoldier soldier = new ClassSoldier(); memberList.Add(soldier); } }
public void EditSquadInfo(string newName, string newPlayerName, CaptainSpec newSpec, bool newPublic) { if (newName != null) { name = newName; } if (newPlayerName != null) { playerName = newPlayerName; } soldierSpec = newSpec; isPublic = newPublic; }
public ClassSquad(string newName, string newPlayerName, CaptainSpec newSpec, bool newPublic, CaptainSpec captainSpec, HeroSpec heroSpec) { if (newName == null || newPlayerName == null) { throw new Exception("Invalid Parameter!"); } stashList = new List <ClassItem>(); rosterList = new List <ClassSoldier>(); memberList = new List <ClassSoldier>(); EditSquadInfo(newName, newPlayerName, newSpec, newPublic); captain = new ClassCaptain(); captain.specialism = captainSpec; hierophant = new ClassHierophant(); hierophant.specialism = heroSpec; credit = 500; }