Example #1
0
        private static Mission GenerateMission(CaveMission caveMission)
        {
            if (MathHelper.ChanceD100(GameConfiguration.ChancesOfMapMission))
            {
                return(new MiningMission(caveMission.CaveMinerals));
            }

            return(new MapMission(caveMission.CaveRooms));
        }
Example #2
0
        public static CaveMission GenerateCaveMission()
        {
            var caveMission = new CaveMission
            {
                CaveName     = NameGenerator.GenerateCaveName(),
                CaveSize     = (CaveSize)Random.Range(0, 3),
                CaveMinerals = GenerateMinerals()
            };

            caveMission.CaveRooms = MathHelper.SelectFromRange(GameConfiguration.CaveSizeRooms[caveMission.CaveSize]);
            caveMission.Mission   = GenerateMission(caveMission);

            return(caveMission);
        }