public static bool AllowRanking(Mods enabledMods) { if (Player.Mode == PlayModes.OsuMania) { if (CheckActive(Mods.HardRock | Mods.Random, enabledMods)) { return(false); } if (CheckActive(Mods.KeyCoop, enabledMods)) { return(false); } if (BeatmapManager.Current.PlayMode == PlayModes.Osu) { int columns = StageMania.ColumnsWithMods(BeatmapManager.Current, enabledMods); if (columns < 4 || columns > 9) { return(false); } } } if (CheckActive(Mods.Autoplay, enabledMods)) { return(false); } if (CheckActive(Mods.Target, enabledMods)) { return(false); } return(true); }
internal void UpdateDifficultyText() { if (Beatmap == null) { return; } textDifficulty.Text = Beatmap.Version; if ((Player.Mode == PlayModes.OsuMania && Beatmap.PlayMode == PlayModes.Osu) || Beatmap.PlayMode == PlayModes.OsuMania) { textDifficulty.Text += string.Format(@" ({0}K{1})", StageMania.ColumnsWithMods(Beatmap), Math.Round(Beatmap.DifficultyOverall) <= 4 ? @"↓" : string.Empty); } }
protected override void OnSetBeatmap() { if (spriteManager != null) { ManiaStage = new StageMania(SkinManager.LoadManiaSkin(StageMania.ColumnsWithMods(Beatmap, ActiveMods), ActiveMods)); } else { ManiaStage = new StageMania(this); } nextSound = new HitCircleMania[ManiaStage.Columns.Count]; releaseTime = new int[ManiaStage.Columns.Count]; //generate random index randomIndex = new int[ManiaStage.Columns.Count]; Dictionary <int, bool> exist = new Dictionary <int, bool>(ManiaStage.Columns.Count); Random random = new Random(Player.Seed); for (int i = 0; i < ManiaStage.Columns.Count; i++) { if (ManiaStage.AllowSpecialStyle && i == 0) { if (ManiaStage.SpecialStyleRight) { randomIndex[0] = ManiaStage.Columns.Count - 1; exist[ManiaStage.Columns.Count - 1] = true; } else { randomIndex[0] = 0; exist[0] = true; } } else { int next = random.Next(0, ManiaStage.Columns.Count); while (exist.ContainsKey(next)) { next = random.Next(0, ManiaStage.Columns.Count); } randomIndex[i] = next; exist[next] = true; } } exist.Clear(); }
public HitFactoryMania(HitObjectManager hitObjectMananager) : base(hitObjectMananager) { // scroll speed should not be set by difficuly calc if (hitObjectManager.spriteManager != null) { // the scroll speed is only owned if we're playing, or watching autoplay bool owned = !InputManager.ReplayMode || (InputManager.ReplayScore != null && ModManager.CheckActive(InputManager.ReplayScore.EnabledMods, Mods.Autoplay)); SpeedMania.ResetSpeed(owned); } int seed = (int)Math.Round(hitObjectManager.Beatmap.DifficultyHpDrainRate + hitObjectManager.Beatmap.DifficultyCircleSize) * 20 + (int)(hitObjectManager.Beatmap.DifficultyOverall * 41.2) + (int)Math.Round(hitObjectManager.Beatmap.DifficultyApproachRate); random.Reinitialise(seed); randomSync.Reinitialise(seed); prevNotes = new List <int>(prevCount); record(Vector2.Zero, 0); prevRow = new bool[StageMania.ColumnsWithMods(hitObjectManager.Beatmap, hitObjectManager.ActiveMods)]; }
internal static double ScoreMultiplier(Mods modStatus, PlayModes mode, Beatmap beatmap) { double multiplier = 1; switch (mode) { case PlayModes.Osu: case PlayModes.Taiko: if (CheckActive(modStatus, Mods.NoFail)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.Easy)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.HalfTime)) { multiplier *= 0.3; } if (CheckActive(modStatus, Mods.Hidden)) { multiplier *= 1.06; } if (CheckActive(modStatus, Mods.HardRock)) { multiplier *= 1.06; } if (CheckActive(modStatus, Mods.DoubleTime)) { multiplier *= 1.12; } if (CheckActive(modStatus, Mods.Flashlight)) { multiplier *= 1.12; } if (CheckActive(modStatus, Mods.SpunOut)) { multiplier *= 0.9; } if (CheckActive(modStatus, Mods.Relax) || CheckActive(modStatus, Mods.Relax2)) { multiplier *= 0; } break; case PlayModes.CatchTheBeat: if (CheckActive(modStatus, Mods.NoFail)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.Easy)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.HalfTime)) { multiplier *= 0.3; } if (CheckActive(modStatus, Mods.Hidden)) { multiplier *= 1.06; } if (CheckActive(modStatus, Mods.HardRock)) { multiplier *= 1.12; } if (CheckActive(modStatus, Mods.DoubleTime)) { multiplier *= 1.06; } if (CheckActive(modStatus, Mods.Flashlight)) { multiplier *= 1.12; } if (CheckActive(modStatus, Mods.SpunOut)) { multiplier *= 0.9; } if (CheckActive(modStatus, Mods.Relax) || CheckActive(modStatus, Mods.Relax2)) { multiplier *= 0; } break; case PlayModes.OsuMania: if (CheckActive(modStatus, Mods.NoFail)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.Easy)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.HalfTime)) { multiplier *= 0.5; } if (CheckActive(modStatus, Mods.Hidden) || CheckActive(modStatus, Mods.FadeIn)) { multiplier *= 1.06; } if (CheckActive(modStatus, Mods.HardRock)) { multiplier *= 1.08; } if (CheckActive(modStatus, Mods.DoubleTime)) { multiplier *= 1.1; } if (CheckActive(modStatus, Mods.Flashlight)) { multiplier *= 1.06; } if (CheckActive(modStatus, Mods.SpunOut)) { multiplier *= 0; } if (CheckActive(modStatus, Mods.Relax)) { multiplier *= 0; } if (CheckActive(modStatus, Mods.Relax2)) { multiplier *= 0; } if (CheckActive(modStatus, Mods.Random)) { multiplier *= 1; } if (beatmap != null) { int org = StageMania.ColumnsWithoutMods(beatmap); int use = StageMania.ColumnsWithMods(beatmap, modStatus); if (use > org) { multiplier *= 0.9; } else if (use < org) { multiplier *= (0.9 - 0.04 * (org - use)); } } break; } return(Math.Max(0, multiplier)); }