mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 12:22:54 +08:00
Add basic (new) hp calculations.
This commit is contained in:
parent
95908af677
commit
ca08011734
@ -60,14 +60,17 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
private int maxTotalHits;
|
private int maxTotalHits;
|
||||||
private int totalHits;
|
private int totalHits;
|
||||||
|
|
||||||
private double hpIncreaseBad;
|
private double hpMultiplier = 1;
|
||||||
private double hpIncreaseOk;
|
private const double hp_increase_bad = 0.005;
|
||||||
private double hpIncreaseGood;
|
private const double hp_increase_ok = 0.010;
|
||||||
private double hpIncreaseGreat;
|
private const double hp_increase_good = 0.035;
|
||||||
private double hpIncreasePerfect;
|
private const double hp_increase_tick = 0.040;
|
||||||
private double hpIncreaseTick;
|
private const double hp_increase_great = 0.055;
|
||||||
private double hpIncreaseTickMiss;
|
private const double hp_increase_perfect = 0.065;
|
||||||
private double hpIncreaseMiss;
|
|
||||||
|
private double hpMissMultiplier = 1;
|
||||||
|
private const double hp_increase_tick_miss = -0.025;
|
||||||
|
private const double hp_increase_miss = -0.125;
|
||||||
|
|
||||||
public ManiaScoreProcessor()
|
public ManiaScoreProcessor()
|
||||||
{
|
{
|
||||||
@ -79,6 +82,8 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void ComputeTargets(Beatmap<ManiaHitObject> beatmap)
|
protected override void ComputeTargets(Beatmap<ManiaHitObject> beatmap)
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
{
|
{
|
||||||
foreach (var obj in beatmap.HitObjects)
|
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;
|
maxTotalHits = totalHits;
|
||||||
maxComboPortion = comboPortion;
|
maxComboPortion = comboPortion;
|
||||||
}
|
}
|
||||||
@ -132,14 +146,14 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
if (isTick)
|
if (isTick)
|
||||||
Health.Value += hpIncreaseTickMiss;
|
Health.Value += hpMissMultiplier * hp_increase_tick_miss;
|
||||||
else
|
else
|
||||||
Health.Value += hpIncreaseMiss;
|
Health.Value += hpMissMultiplier * hp_increase_miss;
|
||||||
break;
|
break;
|
||||||
case HitResult.Hit:
|
case HitResult.Hit:
|
||||||
if (isTick)
|
if (isTick)
|
||||||
{
|
{
|
||||||
Health.Value += hpIncreaseTick;
|
Health.Value += hpMultiplier * hp_increase_tick;
|
||||||
bonusScore += judgement.ResultValueForScore;
|
bonusScore += judgement.ResultValueForScore;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -147,19 +161,19 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
|||||||
switch (judgement.ManiaResult)
|
switch (judgement.ManiaResult)
|
||||||
{
|
{
|
||||||
case ManiaHitResult.Bad:
|
case ManiaHitResult.Bad:
|
||||||
Health.Value += hpIncreaseBad;
|
Health.Value += hpMultiplier * hp_increase_bad;
|
||||||
break;
|
break;
|
||||||
case ManiaHitResult.Ok:
|
case ManiaHitResult.Ok:
|
||||||
Health.Value += hpIncreaseOk;
|
Health.Value += hpMultiplier * hp_increase_ok;
|
||||||
break;
|
break;
|
||||||
case ManiaHitResult.Good:
|
case ManiaHitResult.Good:
|
||||||
Health.Value += hpIncreaseGood;
|
Health.Value += hpMultiplier * hp_increase_good;
|
||||||
break;
|
break;
|
||||||
case ManiaHitResult.Great:
|
case ManiaHitResult.Great:
|
||||||
Health.Value += hpIncreaseGreat;
|
Health.Value += hpMultiplier * hp_increase_great;
|
||||||
break;
|
break;
|
||||||
case ManiaHitResult.Perfect:
|
case ManiaHitResult.Perfect:
|
||||||
Health.Value += hpIncreasePerfect;
|
Health.Value += hpMultiplier * hp_increase_perfect;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user