mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 13:47:38 +08:00
Merge branch 'master' into rearrange-playlist
This commit is contained in:
commit
f76cecc704
@ -23,6 +23,13 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float hpDrainRate;
|
||||||
|
|
||||||
|
protected override void ComputeTargets(Game.Beatmaps.Beatmap<OsuHitObject> beatmap)
|
||||||
|
{
|
||||||
|
hpDrainRate = beatmap.BeatmapInfo.Difficulty.DrainRate;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Reset()
|
protected override void Reset()
|
||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
@ -56,14 +63,26 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
scoreResultCounts[judgement.Score] = scoreResultCounts.GetOrDefault(judgement.Score) + 1;
|
scoreResultCounts[judgement.Score] = scoreResultCounts.GetOrDefault(judgement.Score) + 1;
|
||||||
comboResultCounts[judgement.Combo] = comboResultCounts.GetOrDefault(judgement.Combo) + 1;
|
comboResultCounts[judgement.Combo] = comboResultCounts.GetOrDefault(judgement.Combo) + 1;
|
||||||
}
|
}
|
||||||
|
switch (judgement.Score)
|
||||||
switch (judgement.Result)
|
|
||||||
{
|
{
|
||||||
case HitResult.Hit:
|
case OsuScoreResult.Hit300:
|
||||||
Health.Value += 0.1f;
|
Health.Value += (10.2 - hpDrainRate) * 0.02;
|
||||||
break;
|
break;
|
||||||
case HitResult.Miss:
|
|
||||||
Health.Value -= 0.2f;
|
case OsuScoreResult.Hit100:
|
||||||
|
Health.Value += (8 - hpDrainRate) * 0.02;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OsuScoreResult.Hit50:
|
||||||
|
Health.Value += (4 - hpDrainRate) * 0.02;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OsuScoreResult.SliderTick:
|
||||||
|
Health.Value += System.Math.Max(7 - hpDrainRate, 0) * 0.01;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OsuScoreResult.Miss:
|
||||||
|
Health.Value -= hpDrainRate * 0.04;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user