- Added support for animated projectiles - Refactoring - Removed useless fields - Fixed swords not dealing damages - Added Hour Hand (from Evie's PR)
28 lines
824 B
C#
28 lines
824 B
C#
namespace Decimation.Lib.Items
|
|
{
|
|
public abstract class DecimationTool : DecimationItem
|
|
{
|
|
protected virtual int MeleeDamages { get; } = 0;
|
|
protected virtual int PickaxePower { get; } = 0;
|
|
protected virtual int AxePower { get; } = 0;
|
|
protected virtual int HammerPower { get; } = 0;
|
|
|
|
protected abstract void InitTool();
|
|
|
|
protected override void Init()
|
|
{
|
|
item.autoReuse = true;
|
|
this.item.useTurn = true;
|
|
this.item.maxStack = 1;
|
|
|
|
InitTool();
|
|
|
|
this.item.damage = this.MeleeDamages;
|
|
this.item.pick = this.PickaxePower;
|
|
this.item.axe = this.AxePower;
|
|
this.item.hammer = this.HammerPower;
|
|
|
|
if (this.MeleeDamages > 0) this.item.melee = true;
|
|
}
|
|
}
|
|
} |