Even More Modifiers  1.0.0.0
A mod for rolling various bonus stats on items
WeaponModifier.cs
Go to the documentation of this file.
1 using Loot.Api.Core;
2 using Loot.Api.Ext;
3 using Terraria;
4 
5 namespace Loot.Modifiers.Base
6 {
11  public abstract class WeaponModifier : Modifier
12  {
13  public static bool HasVanillaDamage(Item item)
14  => item.magic || item.melee || item.ranged || item.summon || item.thrown;
15 
16  public override bool CanRoll(ModifierContext ctx)
17  => ctx.Item.IsWeapon();
18  }
19 }
Defines a modifier, which is an unloaded GlobalItem Making it a GlobalItem gives easy access to all h...
Definition: Modifier.cs:21
Defines a context in which a Modifier might be rolled Which fields are available (not null) depends o...
Defines a modifier that can roll on a weapon item You can use this class and add to CanRoll by callin...