Talk:Brand of the Inferno

Correctness of the buff tooltip
Over the past year, there have been numerous edits regarding the mathematical correctness of the Striking Moment's buff tooltip: Therefore, it would be great to establish a consensus on this page to refer to to avoid changes, removals, and re-additions in the future.
 * 22:28, 3 January 2020 (UTC)
 * 09:54, 19 February 2020 (UTC)
 * 17:45, 19 February 2020 (UTC)
 * 11:23, 21 May 2020 (UTC)
 * 11:27, 21 May 2020 (UTC)
 * 13:02, 24 June 2020 (UTC)
 * 13:05, 24 June 2020 (UTC)
 * 20:41, 15 December 2020 (UTC)
 * 20:59, 15 December 2020 (UTC)
 * 06:07, 28 March 2021 (UTC)

From the 1.4.1.2 source code, I can verify that the melee damage is multiplied by 5. It is evident in two methods, the first one being Terraria.Player.ItemCheck_MeleeHitNPCs, which is used when a regular melee weapon hits an NPC: As it can be seen, the originalDamage (which is copied to num) is multiplied by 5 if the player has the parryDamageBuff and the item that struck the NPC (sItem) is a melee weapon. The buff is then removed from the player. Later on, the ±15% damage randomization is applied to num and it is used in a call to Terraria.NPC.StrikeNPC, where the damage is actually applied to the NPC.

The second method is Terraria.Projectile.Damage, which is called constantly for all projectiles, including those of melee weapons: Here, the num18 (which is the already a bit modified base damage of the projectile) is multiplied by 5 as well, if it is a projectile that is not spawned from an NPC or a trap, deals melee damage, and is allowed to apply the Striking Moment buff, and the player has the buff. Similarly to above, the buff is then removed from the player and num18 is later used in a call to Terraria.NPC.StrikeNPC.

These are the only two locations where Striking Moment has an effect. It is clear that the attack's damage is multiplied by 5, i.e., an attack that would usually do 20 damage will do 100 damage.

Now, the tooltip claims "500% increased damage for next melee strike" – in other words: "Damage is increased by 500%". This is equivalent to: "Damage is multiplied by 6", which can be proven as follows using a very rudimentary proof of induction, sort of:
 * Let $$x$$ be the damage value.
 * Let $$x_0$$ be the damage increased by 0%: $$x_0 = x + (0%*x) = x + (0*\frac{1}{100}*x) = x + (0*x) = 1*x$$
 * Hence: "Increase $$x$$ by 0%" is equivalent to $$1*x$$.
 * Let $$x_1$$ be the damage increased by 100%: $$x_1 = x + (100%*x) = x + (100*\frac{1}{100}*x) = x + (1*x) = 2*x$$
 * Hence: "Increase $$x$$ by 100%" is equivalent to $$2*x$$.
 * Let $$x_5$$ be the damage increased by 500%: $$x_5 = x + (500%*x) = x + (500*\frac{1}{100}*x) = x + (5*x) = 6*x$$
 * Hence: "Increase $$x$$ by 500%" is equivalent to $$6*x$$.
 * Hence: "Increase $$x$$ by 500%" is equivalent to $$6*x$$.

This does not match the effect shown above, which would have to be described as $$5*x$$ – an increase by 400%.

Can this be established as the consensus or are there objections?

--Rye Greenwood (talk) 14:56, 28 March 2021 (UTC)