Skip to content

Commit

Permalink
Fix hitpoint test
Browse files Browse the repository at this point in the history
  • Loading branch information
GregHib committed May 30, 2024
1 parent 9239afb commit c8b634a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ internal class HitpointRestorationTest : WorldTest() {
fun `Hitpoints shouldn't restore if dead`() {
val player = createPlayer("player")
player.experience.set(Skill.Constitution, Level.experience(Skill.Constitution, 990))
player.levels.set(Skill.Constitution, 990)
player.levels.set(Skill.Constitution, 980)

val drained = player.levels.drain(Skill.Constitution, 990)
assertEquals(-980, drained)
assertTrue(player.softTimers.contains("restore_hitpoints"))
assertEquals(-990, drained)
assertEquals(0, player.levels.get(Skill.Constitution))
tick(11)
assertFalse(player.softTimers.contains("restore_hitpoints"))
Expand Down

0 comments on commit c8b634a

Please sign in to comment.