equation

0

Please login or register to vote for this query.

(click on this box to dismiss)

Reverse Engineering Meta

Q&A about the site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation

DECLARE @troopstrength INT = 1050
DECLARE @troopbonushealth REAL = 234.5 + 51-- +25+0-- + 2+3+1
DECLARE @troopbonusstrength REAL = 139.5
DECLARE @troopbonusstrength2 INT = 0
DECLARE @troopnumber INT = 79


/*
-- elf 24
DECLARE @enemy1strength INT = 2600
DECLARE @enemy1number INT   = 6000
DECLARE @enemy2strength INT = 28
DECLARE @enemy2number INT   = 240000
*/
/*
-- inferno 23
DECLARE @enemy1strength INT = 3100
DECLARE @enemy1number INT   = 4100
DECLARE @enemy2strength INT = 50
DECLARE @enemy2number INT   = 110000
*/
-- elf 23
DECLARE @enemy1strength INT = 800
DECLARE @enemy1number INT   = 237
DECLARE @enemy2strength INT = 400
DECLARE @enemy2number INT   = 657

--undead 23
--DECLARE @enemy1strength INT = 1100
--DECLARE @enemy1number INT   = 8100
--DECLARE @enemy2strength INT = 28
--DECLARE @enemy2number INT   = 140000

SELECT 
--*,
--damage * @troopnumber totaldamage,
--iif(damage * @troopnumber > m1health, 0, cast(m1health- damage * @troopnumber as int)+1)*3/ health monster1kill, 
cast(@enemy1strength * @enemy1number * 3 / damage as int)+1 neededtokill,
cast(@enemy1strength * @enemy1number / health as int) kills1,
cast(@enemy2strength * @enemy2number / health as int) kills2,
cast((@enemy1strength * @enemy1number + @enemy2strength * @enemy2number)/ health as int) maxkills
FROM
(SELECT 
  damage   = @troopstrength * (@troopbonusstrength + @troopbonusstrength2 + 100)/100,
  m1health = @enemy1strength * @enemy1number * 3 ,
  m2health = @enemy2strength * @enemy2number * 3 ,
  health   = (@troopbonushealth + 100)/100*@troopstrength*3 
)x

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results