1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 19:32:55 +08:00

Implement hp increase for osu!

This commit is contained in:
smoogipoo 2019-04-22 17:24:42 +09:00
parent 78c844e259
commit 144e6012dc
2 changed files with 28 additions and 12 deletions

View File

@ -24,5 +24,20 @@ namespace osu.Game.Rulesets.Osu.Judgements
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;
}
}
}
}

View File

@ -47,28 +47,29 @@ namespace osu.Game.Rulesets.Osu.Scoring
if (result.Type != HitResult.None)
comboResultCounts[osuResult.ComboType] = comboResultCounts.GetOrDefault(osuResult.ComboType) + 1;
}
switch (result.Type)
protected override double HpFactorFor(Judgement judgement, HitResult result)
{
switch (result)
{
case HitResult.Great:
Health.Value += (10.2 - hpDrainRate) * harshness;
break;
return 10.2 - hpDrainRate;
case HitResult.Good:
Health.Value += (8 - hpDrainRate) * harshness;
break;
return 8 - hpDrainRate;
case HitResult.Meh:
Health.Value += (4 - hpDrainRate) * harshness;
break;
return 4 - hpDrainRate;
/*case HitResult.SliderTick:
Health.Value += Math.Max(7 - hpDrainRate, 0) * 0.01;
break;*/
// case HitResult.SliderTick:
// return Math.Max(7 - hpDrainRate, 0) * 0.01;
case HitResult.Miss:
Health.Value -= hpDrainRate * (harshness * 2);
break;
return hpDrainRate;
default:
return 0;
}
}