Even More Modifiers  1.0.0.0
A mod for rolling various bonus stats on items
DamagePlus.cs
Go to the documentation of this file.
1 using Loot.Api.Core;
2 using Loot.Modifiers.Base;
3 using Terraria;
4 
5 namespace Loot.Modifiers.WeaponModifiers
6 {
7  public class DamagePlus : WeaponModifier
8  {
10  {
11  return base.GetTooltip()
12  .WithPositive($"+{Properties.RoundedPower}% damage");
13  }
14 
16  {
17  return base.GetModifierProperties(item)
18  .WithMaxMagnitude(10f);
19  }
20 
21  public override void ModifyWeaponDamage(Item item, Player player, ref float add, ref float mult, ref float flat)
22  {
23  base.ModifyWeaponDamage(item, player, ref add, ref mult, ref flat);
24  add += Properties.RoundedPower / 100f;
25  }
26  }
27 }
The ModifierPropertiesBuilder implements the builder pattern for ModifierProperties It provides a str...
Defines a modifier that can roll on a weapon item You can use this class and add to CanRoll by callin...
override void ModifyWeaponDamage(Item item, Player player, ref float add, ref float mult, ref float flat)
Definition: DamagePlus.cs:21
override ModifierProperties.ModifierPropertiesBuilder GetModifierProperties(Item item)
Definition: DamagePlus.cs:15
Defines the properties of a modifier
override ModifierTooltipLine.ModifierTooltipBuilder GetTooltip()
Definition: DamagePlus.cs:9
Defines a tooltip line of a modifier A modifier can have multiple lines