equation

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

DECLARE @troopstrength INT = 180000
DECLARE @troopbonushealth REAL = 245 + 8
DECLARE @troopbonusstrength REAL = 211 + 50
DECLARE @troopbonusstrength2 INT = 0
DECLARE @troopnumber INT = 6
/*
--level 17 inferno
DECLARE @enemy1strength REAL = 9900 * 1.6
DECLARE @enemy1number INT   = 57
DECLARE @enemy2strength INT = 270
DECLARE @enemy2number INT   = 1600
*/
--level 17 undead

DECLARE @enemy1strength real = 1100
DECLARE @enemy1number INT   = 1100
DECLARE @enemy2strength real = 720 * 1.50 -- archers has bonus vs my troops
DECLARE @enemy2number INT   = 710
/*

--level 17 barb
DECLARE @enemy1strength real = 360*1.45
DECLARE @enemy1number INT   =  2700
DECLARE @enemy2strength real = 150 -- archers has bonus vs my troops
DECLARE @enemy2number INT   =  2700
*/


SELECT
  case when @enemy1strength * @enemy1number + @enemy2strength * @enemy2number < (@troopbonushealth + 100)/100*@troopstrength*3 then 'SAFE' ELSE 'KILL' END status,
  case when @troopstrength * (@troopbonusstrength + @troopbonusstrength2 + 100)/100*@troopnumber <@enemy1strength * @enemy1number * 3 then 'not killing monster1' else 'ok' end,
  case when @troopstrength * (@troopbonusstrength + 100)/100*@troopnumber < @enemy2strength * @enemy2number * 3 then 'not killing monster2' else 'ok' end,
  mydamage1   = @troopstrength * (@troopbonusstrength + @troopbonusstrength2 + 100)/100*@troopnumber,
  mydamage2   = @troopstrength * (@troopbonusstrength + 100)/100*@troopnumber,
  monster1health = @enemy1strength * @enemy1number * 3 ,
  monster2health = @enemy2strength * @enemy2number * 3 ,
  monster1damage = @enemy1strength * @enemy1number,
  monster2damage = @enemy2strength * @enemy2number,
  totaldamage = @enemy1strength * @enemy1number + @enemy2strength * @enemy2number,
  myhealth   = (@troopbonushealth + 100)/100*@troopstrength*3

Enter Parameters

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