@@ -191,8 +191,8 @@ describe("TestAttacks", function()
191191 runCallback (" OnFrame" )
192192
193193 local genericEfficiencyCost = build .calcsTab .mainOutput .ManaCost
194- -- Test actual behavior: 12/1.25 = 9.6 (not rounded)
195- assert .True ( math.abs ( genericEfficiencyCost - 9.6 ) < 0.001 )
194+ -- 12/1.25 = 9.6
195+ assert .equals ( 10 , genericEfficiencyCost )
196196
197197 -- Test multiple efficiency sources stacking additively
198198 build .configTab .input .customMods = " 25% increased Cost Efficiency\n 25% increased Mana Cost Efficiency"
@@ -213,7 +213,7 @@ describe("TestAttacks", function()
213213 runCallback (" OnFrame" )
214214
215215 local finalCost = build .calcsTab .mainOutput .ManaCost
216- assert .True ( math.abs ( finalCost - 12 ) < 0.1 ) -- floor(12 * 1.5) / 1.5
216+ assert .equals ( 12 , finalCost )
217217 end )
218218
219219 it (" Test flat cost is added before cost efficiency" , function ()
@@ -227,7 +227,7 @@ describe("TestAttacks", function()
227227
228228 local finalCost = build .calcsTab .mainOutput .ManaCost
229229 -- (12 + 10) / 1.5 = 14.667
230- assert .True ( math.abs ( finalCost - 22 / 1.5 ) < 0.001 )
230+ assert .equals ( 15 , finalCost )
231231 end )
232232 it (" Test flat cost is added before cost efficiency for life costs" , function ()
233233 build .skillsTab :PasteSocketGroup (" Hydrosphere 1/0 1\n " )
@@ -238,7 +238,7 @@ describe("TestAttacks", function()
238238 runCallback (" OnFrame" )
239239
240240 -- (12 + 10) / 1.5 = 14.667
241- assert .True ( math.abs ( build .calcsTab .mainOutput .LifeCost - 22 / 1.5 ) < 0.001 )
241+ assert .equals ( 15 , build .calcsTab .mainOutput .LifeCost )
242242 end )
243243
244244 it (" Test flat cost is added before cost efficiency for energy shield costs (#10003)" , function ()
@@ -250,7 +250,7 @@ describe("TestAttacks", function()
250250 runCallback (" OnFrame" )
251251
252252 -- (12 + 10) / 1.5 = 14.667
253- assert .True ( math.abs ( build .calcsTab .mainOutput .ESCost - 22 / 1.5 ) < 0.001 )
253+ assert .equals ( 15 , build .calcsTab .mainOutput .ESCost )
254254 end )
255255 it (" Test mana cost efficiency with support gems" , function ()
256256 -- Test interaction between cost efficiency and cost multipliers
0 commit comments