Skip to content

Commit

Permalink
Simplify rate of fire checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas committed Jan 20, 2024
1 parent 0b92067 commit 0d626bc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/blueprint/unit.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ luft.describe(

if rateOfFire > 6.6666 then
luft.expect(rateOfFire).to.be.close.to(10)
elseif rateOfFire > 4.0001 then
elseif rateOfFire > 4.0 then
luft.expect(rateOfFire).to.be.close.to(5)
elseif rateOfFire > 2.8571 then
luft.expect(rateOfFire).to.be.close.to(3.333)
Expand All @@ -293,8 +293,13 @@ luft.describe(
luft.expect(rateOfFire).to.be.close.to(1.111)
elseif rateOfFire > 0.9524 then
luft.expect(rateOfFire).to.be.close.to(1.0)
elseif rateOfFire > 0.8696 then
luft.expect(rateOfFire).to.be.close.to(0.909)
elseif rateOfFire > 0.8 then
luft.expect(rateOfFire).to.be.close.to(0.833)
elseif rateOfFire > 0.7407 then
luft.expect(rateOfFire).to.be.close.to(0.769)
end
-- luft.expect(10/firingInterval).to.be.close.to(10/math.floor(firingInterval + 0.5))
end
)
end
Expand Down

0 comments on commit 0d626bc

Please sign in to comment.