public static NPC TransformTo(NpcProfile o) { var config = new MapperConfiguration(cfg => cfg.CreateMap <NpcProfile, NPC>()); var mapper = new Mapper(config); return(mapper.Map <NPC>(o)); }
public static NpcProfile Generate(NpcGenerationConfiguration config) { if (!config.Branch.HasValue) { config.Branch = MilitaryUnits.GetServiceBranch(); } NpcProfile = new NpcProfile { Id = Guid.NewGuid() }; NpcProfile.Unit = MilitaryUnits.GetOneByServiceBranch(config.Branch.Value); NpcProfile.Rank = MilitaryRanks.GetRankByBranch(config.Branch.Value); NpcProfile.BiologicalSex = PhysicalCharacteristics.GetBiologicalSex(); NpcProfile.Birthdate = PhysicalCharacteristics.GetBirthdate(NpcProfile.Rank.Pay); NpcProfile.Health = HealthService.GetHealthProfile(); NpcProfile.Address.Add(Address.GetHomeAddress()); NpcProfile.Name = Name.GetName(); NpcProfile.Email = Internet.GetMilEmail(NpcProfile.Name.ToString()); NpcProfile.Password = Internet.GetPassword(); NpcProfile.CellPhone = PhoneNumber.GetPhoneNumber(); NpcProfile.HomePhone = PhoneNumber.GetPhoneNumber(); NpcProfile.Workstation.Domain = Internet.GetMilDomainName(); NpcProfile.Workstation.Name = Internet.GetComputerName(); NpcProfile.Workstation.Password = Internet.GetPassword(); NpcProfile.Workstation.Username = Internet.GetMilUserName(NpcProfile.Name.ToString()); NpcProfile.Workstation.IPAddress = $"192.168.{AnimatorRandom.Rand.Next(2, 254)}.{AnimatorRandom.Rand.Next(2, 254)}"; NpcProfile.Career.Strengths = Career.GetStrengths(); NpcProfile.Career.Weaknesses = Career.GetWeaknesses(); NpcProfile.Career.WorkEthic = Career.GetWorkEthic(); NpcProfile.Career.TeamValue = Career.GetTeamValue(); NpcProfile.Employment = EmploymentHistory.GetEmployment(); NpcProfile.Family.Members = Family.GetMembers(); NpcProfile.Finances.CreditCards = CreditCard.GetCreditCards(); NpcProfile.Finances.NetWorth = CreditCard.GetNetWorth(); NpcProfile.Finances.TotalDebt = CreditCard.GetTotalDebt(); NpcProfile.ForeignTravel.Trips = Travel.GetTrips(); NpcProfile.MentalHealth = MentalHealth.GetMentalHealth(); NpcProfile.Accounts = Internet.GetAccounts(NpcProfile.Name.ToString()); NpcProfile.Education = Education.GetMilEducationProfile(NpcProfile.Rank); NpcProfile.PGP = PgpService.Generate(NpcProfile.Email); NpcProfile.InsiderThreat = InsiderThreat.GetInsiderThreatProfile(); NpcProfile.PhotoLink = PhysicalCharacteristics.GetPhotoUrl(); NpcProfile.Attributes = AttributesService.GetAttributes(); return(NpcProfile); }
public NpcTests() { this._npc = Npc.Generate(MilitaryUnits.GetServiceBranch()); }
public EnemyView(Application inApp, string inName, string inLayerName, NpcProfile inProfile) : base(inApp, inName, inLayerName) { IsAlive = true; Profile = inProfile; Health = Profile.startHealth; }