/// <summary> /// calculate how many notes in a row by giving probability /// </summary> /// <param name="deltaTime"></param> /// <param name="repeatCount"></param> /// <param name="noteNeed4">put 4 notes in a row if probability larger than this value</param> /// <param name="noteNeed3"></param> /// <param name="noteNeed2"></param> private void NoteCalculation(int startTime, int deltaTime, float noteNeed4, float noteNeed3, float noteNeed2) { //reduce probability by Column limit. switch (hitObjectManager.ManiaStage.Columns.Count) { case 2: noteNeed4 = 1f; noteNeed3 = 1f; noteNeed2 = 1f; break; case 3: noteNeed4 = 1f; noteNeed3 = 1f; noteNeed2 = Math.Max(noteNeed2, 0.90f); break; case 4: noteNeed4 = 1f; noteNeed3 = Math.Max(noteNeed3, 0.96f); noteNeed2 = Math.Max(noteNeed2, 0.7f); break; case 5: noteNeed4 = Math.Max(noteNeed4, 0.97f); noteNeed3 = Math.Max(noteNeed3, 0.90f); noteNeed2 = Math.Max(noteNeed2, 0.66f); break; } if ((convertType & ManiaConvertType.LowProbability) == 0 && (SoundType.IsType(HitObjectSoundType.Clap | HitObjectSoundType.Finish) || SoundTypeAt(startTime).IsType(HitObjectSoundType.Clap | HitObjectSoundType.Finish))) { noteNeed2 = 0; } AddRandomNote(hitFactoryMania.GetRandomValue(noteNeed2, noteNeed3, noteNeed4), startTime, deltaTime); }
/// <summary> /// calculate how many notes in a row by giving probability /// </summary> /// <param name="noteNeed5"></param> /// <param name="noteNeed4"></param> /// <param name="noteNeed3"></param> /// <param name="noteNeed2"></param> /// <param name="rn"></param> private void NoteCalculationNormal(float noteNeed5, float noteNeed4, float noteNeed3, float noteNeed2) { //reduce probability by Column limit. switch (hitObjectManager.ManiaStage.Columns.Count) { case 2: noteNeed5 = 1f; noteNeed4 = 1f; noteNeed3 = 1f; noteNeed2 = 1f; break; case 3: noteNeed5 = 1f; noteNeed4 = 1f; noteNeed3 = 1f; noteNeed2 = Math.Max(noteNeed2, 0.90f); break; case 4: noteNeed5 = 1f; noteNeed4 = 1f; noteNeed3 = Math.Max(noteNeed3, 0.96f); noteNeed2 = Math.Max(noteNeed2, 0.77f); break; case 5: noteNeed5 = 1f; noteNeed4 = Math.Max(noteNeed4, 0.97f); noteNeed3 = Math.Max(noteNeed3, 0.85f); break; } if (SoundType.IsType(HitObjectSoundType.Clap)) { noteNeed2 = 0; } int noteNeed = hitFactoryMania.GetRandomValue(noteNeed2, noteNeed3, noteNeed4, noteNeed5); AddRandomNote(noteNeed); }