Goldenrevolver
Terrarian
a little question about the math of terraria. according to the wiki the lets say accessory damage bonuses are added together first right? (http://terraria.wiki.gg/Damage_types). why is it then when i for example call this in globalitem
that the damage when equipping the sniper scope changes like it would multiplicately instead of deleting the sniperscope 10% boost? is tmodloaders hook somewhere different than i thought? how does it handle the damage boosts that
isnt the same as
or why does it completely
up when i go like
does it handle each boost on it own and then read what to do next? is the wiki wrong? can i not remove or change vanilla item damage boosts like sniper scope to 0% or avenger emblem to 15% because as the tooltip says 12%+3% is not 15% even though the wiki says they are added first.
Code:
public override void UpdateAccessory(Item item, Player player, bool hide)
{
if (item.type == ItemID.SniperScope)
{
player.rangedDamage -= 0.1f;
}
}
Code:
public override void UpdateAccessory(Item item, Player player, bool hide)
{
if (item.type == ItemID.SniperScope)
{
player.rangedDamage += 0.1f;
player.rangedDamage += 0.1f;
}
}
Code:
public override void UpdateAccessory(Item item, Player player, bool hide)
{
if (item.type == ItemID.SniperScope)
{
player.rangedDamage += 0.2f;
}
}

Code:
public override void UpdateAccessory(Item item, Player player, bool hide)
{
if (item.type == ItemID.SniperScope)
{
player.rangedDamage += 0.1f;
player.rangedDamage -= 0.1f;
player.rangedDamage += 0.1f;
player.rangedDamage -= 0.1f;
player.rangedDamage += 0.1f;
player.rangedDamage -= 0.1f;
player.rangedDamage += 0.1f;
player.rangedDamage -= 0.1f;
}
}