iron and lead armor effects
This commit is contained in:
1 parent
4b74bdecd6
commit
a199c8a2b4
2 files changed
+43
-6
No files matched your search
@@ -1,3 +1,4 @@
|
||||
using System.Text;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
|
||||
@@ -15,13 +16,30 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
|
||||
public override string ArmorSetName => "Iron";
|
||||
|
||||
public const int MiningSpeedPercentSetBonus = 25;
|
||||
public const float ArmorPieceDR = 0.03f;
|
||||
public const float SetBonusDR = 0.06f;
|
||||
public const int SetBonusLifeRegen = 2;
|
||||
public const int SetBonusMiningSpeedPercent = 25;
|
||||
|
||||
public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR;
|
||||
|
||||
public override void ApplyBodyPieceEffect(Player player) => player.endurance += ArmorPieceDR;
|
||||
|
||||
public override void ApplyLegPieceEffect(Player player) => player.endurance += ArmorPieceDR;
|
||||
|
||||
public override void UpdateSetBonusText(ref string setBonusText)
|
||||
{
|
||||
setBonusText += CalamityGlobalItem.MiningSpeedString(MiningSpeedPercentSetBonus);
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
sb.Append("Reduces damage taken by 6%, +2 life regen\n");
|
||||
sb.Append(CalamityGlobalItem.MiningSpeedString(SetBonusMiningSpeedPercent));
|
||||
setBonusText += sb.ToString();
|
||||
}
|
||||
|
||||
public override void ApplyArmorSetBonus(Player player) => player.pickSpeed -= MiningSpeedPercentSetBonus * 0.01f;
|
||||
public override void ApplyArmorSetBonus(Player player)
|
||||
{
|
||||
player.endurance += SetBonusDR;
|
||||
player.lifeRegen += SetBonusLifeRegen;
|
||||
player.pickSpeed -= SetBonusMiningSpeedPercent * 0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Text;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
|
||||
@@ -13,13 +14,31 @@ namespace CalamityMod.Items.VanillaArmorChanges
|
||||
|
||||
public override string ArmorSetName => "Lead";
|
||||
|
||||
public const int MiningSpeedPercentSetBonus = 20;
|
||||
public const float ArmorPieceDR = 0.03f;
|
||||
public const float SetBonusDR = 0.03f;
|
||||
public const int SetBonusLifeRegen = 1;
|
||||
public const int SetBonusMiningSpeedPercent = 25;
|
||||
|
||||
public override void ApplyHeadPieceEffect(Player player) => player.endurance += ArmorPieceDR;
|
||||
|
||||
public override void ApplyBodyPieceEffect(Player player) => player.endurance += ArmorPieceDR;
|
||||
|
||||
public override void ApplyLegPieceEffect(Player player) => player.endurance += ArmorPieceDR;
|
||||
|
||||
public override void UpdateSetBonusText(ref string setBonusText)
|
||||
{
|
||||
setBonusText += CalamityGlobalItem.MiningSpeedString(MiningSpeedPercentSetBonus);
|
||||
StringBuilder sb = new StringBuilder(256);
|
||||
sb.Append("Reduces damage taken by 3%, +1 life regen\nGrants immunity to knockback\n");
|
||||
sb.Append(CalamityGlobalItem.MiningSpeedString(SetBonusMiningSpeedPercent));
|
||||
setBonusText += sb.ToString();
|
||||
}
|
||||
|
||||
public override void ApplyArmorSetBonus(Player player) => player.pickSpeed -= MiningSpeedPercentSetBonus * 0.01f;
|
||||
public override void ApplyArmorSetBonus(Player player)
|
||||
{
|
||||
player.endurance += SetBonusDR;
|
||||
player.lifeRegen += SetBonusLifeRegen;
|
||||
player.noKnockback = true;
|
||||
player.pickSpeed -= SetBonusMiningSpeedPercent * 0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user