mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Implement approximate hp increase for catch
This commit is contained in:
parent
fbb4e9df04
commit
d7919544fe
@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
default:
|
||||
return 0;
|
||||
case HitResult.Perfect:
|
||||
return 8;
|
||||
return 0.08;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,9 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
return base.HealthIncreaseFor(result);
|
||||
case HitResult.Perfect:
|
||||
return 7;
|
||||
return 0.07;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,9 +27,9 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
return -0.02;
|
||||
case HitResult.Perfect:
|
||||
return 10.2;
|
||||
return 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
||||
default:
|
||||
return 0;
|
||||
case HitResult.Perfect:
|
||||
return 4;
|
||||
return 0.004;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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;
|
||||
@ -27,20 +26,17 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
||||
hpDrainRate = beatmap.BeatmapInfo.BaseDifficulty.DrainRate;
|
||||
}
|
||||
|
||||
private const double harshness = 0.01;
|
||||
|
||||
protected override void ApplyResult(JudgementResult result)
|
||||
protected override double HpFactorFor(Judgement judgement, HitResult result)
|
||||
{
|
||||
base.ApplyResult(result);
|
||||
|
||||
if (result.Type == HitResult.Miss)
|
||||
switch (result)
|
||||
{
|
||||
if (!result.Judgement.IsBonus)
|
||||
Health.Value -= hpDrainRate * (harshness * 2);
|
||||
return;
|
||||
case HitResult.Miss when judgement.IsBonus:
|
||||
return 0;
|
||||
case HitResult.Miss:
|
||||
return hpDrainRate;
|
||||
default:
|
||||
return 10 - 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();
|
||||
|
Loading…
Reference in New Issue
Block a user