Files
TerrariaHealingPlugin/Mappings/HealingMappings.cs

45 lines
1.5 KiB
C#

using Terraria.ID;
namespace TerrariaHealingPlugin.Mappings
{
public class HealingMappings : IMappings
{
public Dictionary<int, short> mappings => new()
{
// choosen designated items go here that get a healing boost as an incentive
// ItemID | Healing Amount
{ ItemID.Mushroom, 15 },
{ ItemID.Heart, 20},
{ ItemID.BottledWater, 25 },
{ ItemID.LesserHealingPotion, 50 },
{ ItemID.BottledHoney, 80 },
{ ItemID.LesserRestorationPotion, 80 },
{ ItemID.Eggnog, 80 },
{ ItemID.StrangeBrew, 80 },
{ ItemID.RestorationPotion, 90 },
{ ItemID.HealingPotion, 100 },
{ ItemID.Honeyfin, 120 },
{ ItemID.GreaterHealingPotion, 150 },
{ ItemID.SuperHealingPotion, 200 },
};
public double GetHealingMultiplier(int itemType)
{
return itemType switch
{
ItemID.Mushroom => ((0.1 + 1)),
ItemID.Heart => ((0.1 + 1)),
ItemID.BottledWater => ((0.1 + 1)),
ItemID.LesserHealingPotion => ((0.2 + 1)),
ItemID.LesserRestorationPotion => ((0.2 + 1)),
ItemID.BottledHoney => ((0.2 + 1)),
ItemID.HealingPotion => ((0.5 + 1)),
ItemID.Honeyfin => ((0.5 + 1)),
ItemID.GreaterHealingPotion => ((0.5 + 1)),
ItemID.SuperHealingPotion => ((0.5 + 1)),
_ => 1,
};
}
}
}