private MusicTheme GetBattleThemeWithCulture(
                CultureCode cultureCode,
                out bool isPaganBattle)
            {
                isPaganBattle = false;
                MusicTheme musicTheme = MusicTheme.None;

                if ((double)MBRandom.RandomFloat <= (double)this._factionSpecificBattleThemeSelectionFactor)
                {
                    this._factionSpecificBattleThemeSelectionFactor -= 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificBattleThemeSelectionFactor);
                    switch (cultureCode)
                    {
                    case CultureCode.Sturgia:
                    case CultureCode.Aserai:
                    case CultureCode.Khuzait:
                    case CultureCode.Battania:
                        isPaganBattle = true;
                        musicTheme    = (double)MBRandom.RandomFloat < 0.5 ? MusicTheme.BattlePaganA : MusicTheme.BattlePaganB;
                        break;

                    default:
                        musicTheme = (double)MBRandom.RandomFloat < 0.5 ? MusicTheme.CombatA : MusicTheme.CombatB;
                        break;
                    }
                }
                return(musicTheme);
            }
            public MusicTheme GetCampaignDramaticThemeWithCulture(CultureCode cultureCode)
            {
                if ((double)MBRandom.RandomFloat <= (double)this._factionSpecificCampaignDramaticThemeSelectionFactor)
                {
                    this._factionSpecificCampaignDramaticThemeSelectionFactor -= 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificCampaignDramaticThemeSelectionFactor);
                    switch (cultureCode)
                    {
                    case CultureCode.Empire:
                        return(MusicTheme.EmpireCampaignDramatic);

                    case CultureCode.Sturgia:
                        return(MusicTheme.SturgiaCampaignDramatic);

                    case CultureCode.Aserai:
                        return(MusicTheme.AseraiCampaignDramatic);

                    case CultureCode.Vlandia:
                        return(MusicTheme.VlandiaCampaignDramatic);

                    case CultureCode.Khuzait:
                        return(MusicTheme.KhuzaitCampaignDramatic);

                    case CultureCode.Battania:
                        return(MusicTheme.BattaniaCampaignDramatic);
                    }
                }
                this._factionSpecificCampaignDramaticThemeSelectionFactor += 0.1f;
                MBMath.ClampUnit(ref this._factionSpecificCampaignDramaticThemeSelectionFactor);
                return(MusicTheme.None);
            }
            public MusicTheme GetSiegeTheme(CultureCode culture)
            {
                MusicTheme themeWithCulture = this.GetSiegeThemeWithCulture(culture);
                MusicTheme musicTheme;

                if (themeWithCulture == MusicTheme.None)
                {
                    musicTheme = MusicTheme.BattleSiege;
                    this._factionSpecificSiegeThemeSelectionFactor += 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificSiegeThemeSelectionFactor);
                }
                else
                {
                    musicTheme = themeWithCulture;
                    this._factionSpecificSiegeThemeSelectionFactor -= 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificSiegeThemeSelectionFactor);
                }
                return(musicTheme);
            }
            private MusicTheme GetSiegeThemeWithCulture(CultureCode cultureCode)
            {
                MusicTheme musicTheme = MusicTheme.None;

                if ((double)MBRandom.RandomFloat <= (double)this._factionSpecificSiegeThemeSelectionFactor)
                {
                    this._factionSpecificSiegeThemeSelectionFactor -= 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificSiegeThemeSelectionFactor);
                    switch (cultureCode)
                    {
                    case CultureCode.Sturgia:
                    case CultureCode.Aserai:
                    case CultureCode.Khuzait:
                    case CultureCode.Battania:
                        musicTheme = MusicTheme.PaganSiege;
                        break;
                    }
                }
                return(musicTheme);
            }
            public MusicTheme GetBattleTheme(
                CultureCode culture,
                int battleSize,
                out bool isPaganBattle)
            {
                MusicTheme themeWithCulture = this.GetBattleThemeWithCulture(culture, out isPaganBattle);
                MusicTheme musicTheme;

                if (themeWithCulture == MusicTheme.None)
                {
                    musicTheme = (double)battleSize < (double)MusicParameters.SmallBattleTreshold - (double)MusicParameters.SmallBattleTreshold * 0.200000002980232 * (double)MBRandom.RandomFloat ? MusicTheme.BattleSmall : MusicTheme.BattleMedium;
                    this._factionSpecificBattleThemeSelectionFactor += 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificBattleThemeSelectionFactor);
                }
                else
                {
                    musicTheme = themeWithCulture;
                    this._factionSpecificBattleThemeSelectionFactor -= 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificBattleThemeSelectionFactor);
                }
                return(musicTheme);
            }
            public MusicTheme GetCampaignTheme(CultureCode cultureCode, bool isDark)
            {
                if (isDark)
                {
                    return(MusicTheme.CampaignDark);
                }
                MusicTheme themeWithCulture = this.GetCampaignThemeWithCulture(cultureCode);
                MusicTheme musicTheme;

                if (themeWithCulture == MusicTheme.None)
                {
                    musicTheme = MusicTheme.CampaignStandard;
                    this._factionSpecificCampaignThemeSelectionFactor += 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificCampaignThemeSelectionFactor);
                }
                else
                {
                    musicTheme = themeWithCulture;
                    this._factionSpecificCampaignThemeSelectionFactor -= 0.1f;
                    MBMath.ClampUnit(ref this._factionSpecificCampaignThemeSelectionFactor);
                }
                return(musicTheme);
            }