Add basic (new) hp calculations.

This commit is contained in:
smoogipooo 2017-05-26 20:26:26 +09:00
parent 95908af677
commit ca08011734

View File

@ -60,14 +60,17 @@ namespace osu.Game.Rulesets.Mania.Scoring
private int maxTotalHits;
private int totalHits;
private double hpIncreaseBad;
private double hpIncreaseOk;
private double hpIncreaseGood;
private double hpIncreaseGreat;
private double hpIncreasePerfect;
private double hpIncreaseTick;
private double hpIncreaseTickMiss;
private double hpIncreaseMiss;
private double hpMultiplier = 1;
private const double hp_increase_bad = 0.005;
private const double hp_increase_ok = 0.010;
private const double hp_increase_good = 0.035;
private const double hp_increase_tick = 0.040;
private const double hp_increase_great = 0.055;
private const double hp_increase_perfect = 0.065;
private double hpMissMultiplier = 1;
private const double hp_increase_tick_miss = -0.025;
private const double hp_increase_miss = -0.125;
public ManiaScoreProcessor()
{
@ -79,6 +82,8 @@ namespace osu.Game.Rulesets.Mania.Scoring
}
protected override void ComputeTargets(Beatmap<ManiaHitObject> beatmap)
{
while (true)
{
foreach (var obj in beatmap.HitObjects)
{
@ -117,6 +122,15 @@ namespace osu.Game.Rulesets.Mania.Scoring
}
}
if (!HasFailed)
break;
hpMultiplier *= 1.01;
hpMissMultiplier *= 0.98;
Reset();
}
maxTotalHits = totalHits;
maxComboPortion = comboPortion;
}
@ -132,14 +146,14 @@ namespace osu.Game.Rulesets.Mania.Scoring
{
case HitResult.Miss:
if (isTick)
Health.Value += hpIncreaseTickMiss;
Health.Value += hpMissMultiplier * hp_increase_tick_miss;
else
Health.Value += hpIncreaseMiss;
Health.Value += hpMissMultiplier * hp_increase_miss;
break;
case HitResult.Hit:
if (isTick)
{
Health.Value += hpIncreaseTick;
Health.Value += hpMultiplier * hp_increase_tick;
bonusScore += judgement.ResultValueForScore;
}
else
@ -147,19 +161,19 @@ namespace osu.Game.Rulesets.Mania.Scoring
switch (judgement.ManiaResult)
{
case ManiaHitResult.Bad:
Health.Value += hpIncreaseBad;
Health.Value += hpMultiplier * hp_increase_bad;
break;
case ManiaHitResult.Ok:
Health.Value += hpIncreaseOk;
Health.Value += hpMultiplier * hp_increase_ok;
break;
case ManiaHitResult.Good:
Health.Value += hpIncreaseGood;
Health.Value += hpMultiplier * hp_increase_good;
break;
case ManiaHitResult.Great:
Health.Value += hpIncreaseGreat;
Health.Value += hpMultiplier * hp_increase_great;
break;
case ManiaHitResult.Perfect:
Health.Value += hpIncreasePerfect;
Health.Value += hpMultiplier * hp_increase_perfect;
break;
}