Skip to content

Commit

Permalink
Merge pull request #1 from ppy/master
Browse files Browse the repository at this point in the history
Update branch
  • Loading branch information
frenzibyte authored May 4, 2019
2 parents 59da78b + f05471a commit 93c8ba3
Show file tree
Hide file tree
Showing 215 changed files with 2,965 additions and 1,640 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
clone_depth: 1
version: '{branch}-{build}'
image: Visual Studio 2017
image: Previous Visual Studio 2017
test: off
install:
- cmd: git submodule update --init --recursive --depth=5
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/Judgements/CatchBananaJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override double HealthIncreaseFor(HitResult result)
default:
return 0;
case HitResult.Perfect:
return 8;
return 0.008;
}
}

Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Catch/Judgements/CatchDropletJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ protected override double HealthIncreaseFor(HitResult result)
switch (result)
{
default:
return 0;
return base.HealthIncreaseFor(result);
case HitResult.Perfect:
return 7;
return 0.007;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Catch/Judgements/CatchJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ protected override double HealthIncreaseFor(HitResult result)
switch (result)
{
default:
return 0;
return -0.02;
case HitResult.Perfect:
return 10.2;
return 0.01;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override double HealthIncreaseFor(HitResult result)
default:
return 0;
case HitResult.Perfect:
return 4;
return 0.004;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.MathUtils;
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/Objects/Drawable/Pieces/Pulp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osuTK.Graphics;
Expand Down
18 changes: 6 additions & 12 deletions osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Judgements;
Expand All @@ -27,20 +26,15 @@ protected override void ApplyBeatmap(Beatmap<CatchHitObject> beatmap)
hpDrainRate = beatmap.BeatmapInfo.BaseDifficulty.DrainRate;
}

private const double harshness = 0.01;

protected override void ApplyResult(JudgementResult result)
protected override double HealthAdjustmentFactorFor(JudgementResult result)
{
base.ApplyResult(result);

if (result.Type == HitResult.Miss)
switch (result.Type)
{
if (!result.Judgement.IsBonus)
Health.Value -= hpDrainRate * (harshness * 2);
return;
case HitResult.Miss:
return hpDrainRate;
default:
return 10.2 - hpDrainRate; // Award less HP as drain rate is increased
}

Health.Value += Math.Max(result.Judgement.HealthIncreaseFor(result) - hpDrainRate, 0) * harshness;
}

public override HitWindows CreateHitWindows() => new CatchHitWindows();
Expand Down
11 changes: 11 additions & 0 deletions osu.Game.Rulesets.Mania/Judgements/HoldNoteTickJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,16 @@ public class HoldNoteTickJudgement : ManiaJudgement
public override bool AffectsCombo => false;

protected override int NumericResultFor(HitResult result) => 20;

protected override double HealthIncreaseFor(HitResult result)
{
switch (result)
{
case HitResult.Miss:
return 0;
default:
return 0.040;
}
}
}
}
21 changes: 21 additions & 0 deletions osu.Game.Rulesets.Mania/Judgements/ManiaJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,26 @@ protected override int NumericResultFor(HitResult result)
return 300;
}
}

protected override double HealthIncreaseFor(HitResult result)
{
switch (result)
{
case HitResult.Miss:
return -0.125;
case HitResult.Meh:
return 0.005;
case HitResult.Ok:
return 0.010;
case HitResult.Good:
return 0.035;
case HitResult.Great:
return 0.055;
case HitResult.Perfect:
return 0.065;
default:
return 0;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Scoring;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Mania/Objects/Drawables/DrawableNote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Input.Bindings;
using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
using osu.Game.Rulesets.Scoring;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osuTK.Graphics;
Expand Down
78 changes: 2 additions & 76 deletions osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using osu.Game.Beatmaps;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
Expand All @@ -28,36 +27,6 @@ internal class ManiaScoreProcessor : ScoreProcessor<ManiaHitObject>
/// </summary>
private const double hp_multiplier_max = 1;

/// <summary>
/// The default BAD hit HP increase.
/// </summary>
private const double hp_increase_bad = 0.005;

/// <summary>
/// The default OK hit HP increase.
/// </summary>
private const double hp_increase_ok = 0.010;

/// <summary>
/// The default GOOD hit HP increase.
/// </summary>
private const double hp_increase_good = 0.035;

/// <summary>
/// The default tick hit HP increase.
/// </summary>
private const double hp_increase_tick = 0.040;

/// <summary>
/// The default GREAT hit HP increase.
/// </summary>
private const double hp_increase_great = 0.055;

/// <summary>
/// The default PERFECT hit HP increase.
/// </summary>
private const double hp_increase_perfect = 0.065;

/// <summary>
/// The MISS HP multiplier at OD = 0.
/// </summary>
Expand All @@ -73,11 +42,6 @@ internal class ManiaScoreProcessor : ScoreProcessor<ManiaHitObject>
/// </summary>
private const double hp_multiplier_miss_max = 1;

/// <summary>
/// The default MISS HP increase.
/// </summary>
private const double hp_increase_miss = -0.125;

/// <summary>
/// The MISS HP multiplier. This is multiplied to the miss hp increase.
/// </summary>
Expand All @@ -88,10 +52,6 @@ internal class ManiaScoreProcessor : ScoreProcessor<ManiaHitObject>
/// </summary>
private double hpMultiplier = 1;

public ManiaScoreProcessor()
{
}

public ManiaScoreProcessor(DrawableRuleset<ManiaHitObject> drawableRuleset)
: base(drawableRuleset)
{
Expand Down Expand Up @@ -122,42 +82,8 @@ protected override void SimulateAutoplay(Beatmap<ManiaHitObject> beatmap)
}
}

protected override void ApplyResult(JudgementResult result)
{
base.ApplyResult(result);

bool isTick = result.Judgement is HoldNoteTickJudgement;

if (isTick)
{
if (result.IsHit)
Health.Value += hpMultiplier * hp_increase_tick;
}
else
{
switch (result.Type)
{
case HitResult.Miss:
Health.Value += hpMissMultiplier * hp_increase_miss;
break;
case HitResult.Meh:
Health.Value += hpMultiplier * hp_increase_bad;
break;
case HitResult.Ok:
Health.Value += hpMultiplier * hp_increase_ok;
break;
case HitResult.Good:
Health.Value += hpMultiplier * hp_increase_good;
break;
case HitResult.Great:
Health.Value += hpMultiplier * hp_increase_great;
break;
case HitResult.Perfect:
Health.Value += hpMultiplier * hp_increase_perfect;
break;
}
}
}
protected override double HealthAdjustmentFactorFor(JudgementResult result)
=> result.Type == HitResult.Miss ? hpMissMultiplier : hpMultiplier;

public override HitWindows CreateHitWindows() => new ManiaHitWindows();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Rulesets.UI;
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Mania/UI/Components/ColumnKeyArea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings;
using osu.Game.Graphics;
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Mania/UI/HitExplosion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Framework.MathUtils;
using osu.Game.Rulesets.Mania.Objects.Drawables;
Expand Down
15 changes: 15 additions & 0 deletions osu.Game.Rulesets.Osu/Judgements/OsuJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,20 @@ protected override int NumericResultFor(HitResult result)
return 300;
}
}

protected override double HealthIncreaseFor(HitResult result)
{
switch (result)
{
case HitResult.Miss:
return -0.02;
case HitResult.Meh:
case HitResult.Good:
case HitResult.Great:
return 0.01;
default:
return 0;
}
}
}
}
3 changes: 3 additions & 0 deletions osu.Game.Rulesets.Osu/Mods/OsuModBlinds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Scoring;
using osuTK;
using osuTK.Graphics;

Expand Down Expand Up @@ -41,6 +42,8 @@ public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
scoreProcessor.Health.ValueChanged += health => { blinds.AnimateClosedness((float)health.NewValue); };
}

public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank;

/// <summary>
/// Element for the Blinds mod drawing 2 black boxes covering the whole screen which resize inside a restricted area with some leniency.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Skinning;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics.Sprites;
using osuTK.Graphics;
using osu.Framework.Graphics.Shapes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics.Shapes;
Expand Down
Loading

0 comments on commit 93c8ba3

Please sign in to comment.