added consumables and buff healing bonuses

This commit is contained in:
2025-08-27 22:15:33 -04:00
parent 5aea4453b0
commit 7b0c9f22ec
7 changed files with 289 additions and 18 deletions

31
Mappings/EquipMappings.cs Normal file
View File

@@ -0,0 +1,31 @@
using Terraria.ID;
namespace TerrariaHealingPlugin.Mappings
{
public class EquipMappings : IMappings
{
public Dictionary<int, short> mappings => new()
{
// FIXME: NOT AT ALL COMPLETED
// choosen designated equipment pieces go here that get a healing boost as an incentive
// ItemID | Healing Amount
{ ItemID.FleshKnuckles, 20 },
{ ItemID.PaladinsShield, 20 },
{ ItemID.MedicatedBandage, 20 },
{ ItemID.LifeforcePotion, 80 },
{ ItemID.WormScarf, 10 },
{ ItemID.CelestialShell, 10 },
{ ItemID.CelestialCuffs, 10 },
};
public double GetHealingMultiplier(int itemType)
{
return itemType switch
{
// nothing here, yet ;)
_ => 1,
};
}
}
}

View File

@@ -0,0 +1,44 @@
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,
};
}
}
}

5
Mappings/IMappings.cs Normal file
View File

@@ -0,0 +1,5 @@
public interface IMappings
{
public Dictionary<int, short> mappings { get; }
public double GetHealingMultiplier(int itemType);
}