Damage (EU2012)

From UFOpaedia
Jump to navigation Jump to search

Damage Function

Damage is defined through the following function in XGItemCards class, XComGame.upk file:

	{
		kItemCard.m_iBaseDamage = kWeapon.iDamage;
		kItemCard.m_iBaseDamageMax = -1;
		kItemCard.m_iBaseCritChance = -1;
		kItemCard.m_iCritDamage = -1;
		kItemCard.m_iCritDamageMax = -1;
 	}
 	// End:0x471
	else
	{
		minDamage = int(FMax(1.00, float(kWeapon.iDamage - 1)));
		maxDamage = int(FMax(1.00, float(kWeapon.iDamage + 1)));
		kItemCard.m_iBaseDamage = minDamage;
		kItemCard.m_iBaseDamageMax = maxDamage;
		kItemCard.m_iBaseCritChance = kWeapon.iCritical;
		minCrit = int(FMax(1.00, float(int(float(maxDamage) * 1.50) - 1)));
		maxCrit = int(FMax(1.00, float(int(float(maxDamage) * 1.50) + 1)));
		kItemCard.m_iCritDamage = minCrit;
		kItemCard.m_iCritDamageMax = maxCrit;
	}


Damage System

  • Regarding the different numbers seen in the Armory info and the actual game values, it seems that the Base Damage range can vary, i.e. a weapon listed with a 9 damage can vary between 8 and 10 and you see the Maximum Damage listed onscreen during the game before firing.
  • If the shot is a hit the game will then check to see its Critical Chance.
  • If the Critical Chance roll is successful, the game will then calculate the Critical Damage.
  • In addition, there are also specific Class perks that can increase Damage (both Base and Crit), such as:
    • Headshot (Sniper) +2/4/6 Damage to Sniper Rifle, depending on weapon tech value
    • Gunslinger (Sniper) +2 Damage to pistols
    • Shredder (Heavy) +33% Damage from all sources to the target
    • HEAT Ammo (Heavy) +100% Damage against robotic enemies(has been lowered to 50% damage in Enemy Within)
    • Mayhem (Heavy) +1 to +3 Damage, depending on the weapon tech level
    • Bring 'Em On +1 to +5 bonus Critical Damage, depending on the number of enemies
    • Killer Instinct +50% Critical Damage
  • Damage is rounded down.
    • For example rocket to shredded target will do 6*1.33=7.98 -> 7 damage, and Mindfray to stimmed target will do 5*0.5 = 2.5 -> 2 damage.
  • There seems to be a Damage cap (at least for explosives) - Rocket Launchers will deal 16 max damage using HEAT and Mayhem, regardless of using Shredder rockets or not.

Critical Damage

The game code that calculates Critical Damage is:

if(bCritical)
{
	iDamage += 1;
 	iDamage = int(float(iDamage) * 1.50);
	iDamage += class'XComEngine'.static.SyncRand(3, string(Name) @ string(GetStateName()) @ string(GetFuncName())) - 1;
	return iDamage;
}
  • Critical Damage is simply calculated by increasing the iDamage (Base Damage) roll by a factor of 1.5 before applying the bonuses/penalties from abilities/perks.
  • The range for the actual iDamage seems to be a random roll with a range of -1 to apparently the integer that precedes the Critical Damage value. Thus, Base Damage from an Assault Rifle can vary between 3 and 4 while with a Plasma Sniper Rifle it can vary between 8 and 12.


Damage Values

Weapon Base Damage Crit Damage
Pistol
Pistol (III)
Laser Pistol
1 2
Pistol
Pistol (III)
Assault Rifle
Laser Pistol
Laser Pistol (III)

Plasma Pistol
2 3
Pistol (III)
Assault Rifle
LMG
Sniper Rifle
Shotgun
Laser Pistol
Laser Pistol (III)

Plasma Pistol
Plasma Pistol (III)

3 4
Assault Rifle
LMG
Sniper Rifle
Shotgun
Laser Pistol (III)
Laser Rifle

Plasma Pistol
Plasma Pistol (III)
Plasma Light Rifle
4 6
LMG
Sniper Rifle
Shotgun
Laser Rifle
Heavy Laser
Laser Sniper Rifle
Laser Scatter

Plasma Pistol (III)
Plasma Light Rifle
5 7
Laser Rifle
Heavy Laser
Laser Sniper Rifle
Laser Scatter

Plasma Light Rifle
Plasma Rifle
6 9
Heavy Laser
Laser Sniper Rifle
Laser Scatter

Plasma Rifle
7 10
Plasma Rifle
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
8 12
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
9 13
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
10 15
  • Damage can vary between -1 and +1 of the value listed on the Armory. Maximum damage is listed during missions.
  • The results for the other perks can be deduced from this table by calculating the corresponding additions, i.e. Gunslinger will add +2 to Pistol iDamage, Bring 'Em On will also add a variable number, while Shredder will add 33% to the end Damage value.
  • Headshot adds +2/4/6 damage to Sniper Rifle shots, depending on its tech level.

Weapons Kill Table

  • Based on the above model, the tables below indicate how many shots (Base or Critical) are usually required to take down the aliens.
  • BASE = alien can be killed with 1 shot dealing average (non-critical) damage
  • CRIT = alien requires either 2 base shots or 1 critical hit with close to maximum critical damage.

Classic

Weapon Base Damage Crit Damage Max Damage Critical Chance Tier 1 (3-7 HP) Tier 2 (8-13 HP) Tier 3 (14+ HP)
Pistol 0-2 0-1 3 0
Pistol (III)
Laser Pistol
1-3 0-1 4 10 CRIT CRIT CRIT
Laser Pistol (III)
Plasma Pistol
Assault Rifle
2-4 1-2 6 10
0
10
BASE CRIT CRIT
Plasma Pistol (III)
LMG
Sniper Rifle
Shotgun
3-5 1-2 7 20
0
25
20
BASE BASE
Laser Rifle
Light Plasma Rifle
4-6 2-3 9 10 BASE BASE CRIT
Heavy Laser
Laser Sniper Rifle
Scatter Laser
5-7 2-3 10 10
30
20
BASE BASE BASE
Plasma Rifle 6-8 3-4 12 12 BASE BASE BASE
Heavy Plasma
Plasma Sniper Rifle
Alloy Cannon
8-10 4-5 15 10
35
20
BASE BASE BASE

Back To