Skip to content

Commit

Permalink
Fix yobot sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
acaly committed Feb 5, 2021
1 parent 73e2d56 commit 2ebcd16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Algorithm/YobotSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ public int Convert(YobotChallenge c)
{
if (_stageStartLaps[i] > c.Cycle - 1)
{
ret += (c.Cycle - 1 - _stageStartLaps[i - 1]) * _bosses[i - 1].Count;
return (ret + c.BossNum - 1, _bosses[i - 1][c.BossNum - 1].hp);
}
ret += (_stageStartLaps[i] - _stageStartLaps[i - 1]) * _bosses[i - 1].Count;
}
ret += (c.Cycle - 1 - _stageStartLaps[^1]) * _bosses[^1].Count;
return (ret + c.BossNum - 1, _bosses[^1][c.BossNum - 1].hp);
}
}
Expand Down Expand Up @@ -372,7 +374,7 @@ private static YobotChallenge[] ProcessDailyData(IEnumerable<YobotChallenge> inp
_dailyDataBuilder.Add(cont.Damage > c.Damage ? cont : c);
cont = null;
}
else if (c.IsContinue)
else if (c.HealthRemain == 0 && !c.IsContinue)
{
cont = c;
}
Expand Down

0 comments on commit 2ebcd16

Please sign in to comment.