Damage

Character Damage
A Character's damage is the main factor all other damage scales off.

A multiplier is built and added together: This multiplier is applied to the character's base damage plus their level's damage resulting in the character's damage.
 * 1) +10% for each instance of BoostDamage the character has.
 * 2) -5% for each beetlejuice debuff. Presumed to be the flying bugs from Beetle Queen.
 * 3) The multiplier from the item Shaped Glass

After this, the following reduction and increases are applied in order:
 * 1) If the character is weakened, multiply their damage by 0.6. This means a 40% reduction.
 * 2) If the Spinel Tonic is active, multiply the damage by 2.
 * 3) If the Spinel Tonic isn't active and the character has at least 1 Tonic Affliction, reduce their damage by   where X is the amount of Tonic Afflictions the character has.

Hit Damage
Each hit has damage info. This is scaled (possibly indirectly) from the character's damage. It holds the following properties: the attacker, the damage, if it is a critical strike, the damage type, the Proc Coefficient, the Proc chain(, position and force for knockback related calculations, the damage color and if the damage was rejected for displaying the damage). Upon hitting a character, the following things are done in order:
 * 1) The character applies the damage to themselves. (see: Receiving Damage)
 * 2) The game checks if on hit items need to trigger and DoTs need to be applied. (see: Handling Hits)
 * 3) The game checks if the attack needs to explode. (see: Handling Hits)

Receiving Damage
Note that this is both true for players and enemies.

The game begins by creating a copy of the incoming damage amount, let's call this 'amount', whereas we'll call the old damage 'original amount'.
 * 1) If the character has succeeded the roll for Tougher Times, has just spawned in, or is otherwise invincible, set the damage rejected flag and stop applying any further damage.
 * 2) If the attacker has crowbars and the character is above 90% from their maximum combined health, multiply amount by.
 * 3) If the attacker has Armor-Piercing Rounds and the character is a boss, multiply amount by.
 * 4) If the hit was a critical hit, multiply amount by 2.
 * 5) If the damage doesn't bypass Armor (such as damage from a Shrine of Blood), apply the armor reduction/increase to amount. This can't reduce the amount to less than 1.
 * 6) If the character is a player and amount is bigger than 90% of the character's combined health, reduce the amount to 90% of the character's combined health instead. This is commonly known as One Shot Protection or OSP for short.
 * 7) If applicable, apply certain slows and roots to the character based on the damage type.
 * 8) If the character holds a Brittle Crown, take away money equal to the maximum between    and.
 * 9) Reduce barrier by amount, and amount by the barrier actually removed.
 * 10) Reduce shield by amount, and amount by the shield actually removed.
 * 11) Reduce the health by amount. If this would reduce a character's health below 1 and the damage is of the nonlethal type, such as hellfire tincture self damage and fall damage, set the health to 1 instead.
 * 12) Apply the knockback.
 * 13) (There's possibly a few steps in between here that this editor has not exactly traced to their entire conclusions.)[Verify]
 * 14) If the character isn't player controlled and is frozen, set the execution threshold to 0.3
 * 15) If the character is an elite and the execution threshold is below the execution threshold set by Old Guillotines of the attacker, set the execution threshold to the threshold of the Guillotines.
 * 16) If the character's combined health is below the amount dictated by the execution threshold, set their health to minus 1.
 * 17) If the character is now dead (health less than or equal to 0), tell the game to check for on death effects.
 * 18) If the character has an Old War Stealthkit, roll it with total damage dealt.

Critical Strike
All Survivors have a base of 1% critical chance. Upon Critical strike, damage dealt is twice the amount of a normal attack. See Receiving Damage.

One Shot Protection
A single hit taken can not deal more than  damage. This is checked after damage-reducing effects such as armor are applied. (See: Receiving Damage)

Trivia

 * If you enable Damage Number in Gameplay Settings, the damage will be displayed after rounding up to the nearest integer for a maximum of 990,000,000, truncated as 990M.