Add Luck Bonus back to Lucky Modifier
This commit is contained in:
1 parent
36f98f1705
commit
54d4099b16
3 files changed
+23
-8
No files matched your search
@@ -2,7 +2,6 @@
|
||||
using CalamityMod.Prefixes.VanillaPrefixChanges.Stats;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Prefixes.VanillaPrefixChanges
|
||||
{
|
||||
@@ -38,11 +37,7 @@ namespace CalamityMod.Prefixes.VanillaPrefixChanges
|
||||
public override IEnumerator<IVanillaPrefixStat> PopulateStats()
|
||||
{
|
||||
yield return new PrefixCritChanceStat(4);
|
||||
}
|
||||
|
||||
public override void PostModifyTooltip(TooltipLine line)
|
||||
{
|
||||
line.Text += "\n" + GetLuckyPrefixAddedTooltip().Value;
|
||||
yield return new PrefixLuckStat(0.05f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Prefixes.VanillaPrefixChanges.Stats
|
||||
{
|
||||
public struct PrefixLuckStat(float luckBonus) : IVanillaPrefixStat
|
||||
{
|
||||
public float LuckBonus = luckBonus;
|
||||
|
||||
public readonly void ApplyEffects(Player player)
|
||||
{
|
||||
player.Calamity().calamityBonusLuck += LuckBonus;
|
||||
}
|
||||
|
||||
public readonly void ModifyTooltip(TooltipLine line)
|
||||
{
|
||||
line.Text += "\n" + VanillaPrefixChange.GetLuckString(LuckBonus);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,9 +62,9 @@ namespace CalamityMod.Prefixes.VanillaPrefixChanges
|
||||
return GetStatTooltip("DRStat").Format(DR.ToPercent());
|
||||
}
|
||||
|
||||
public static string GetLuckString(float luckP)
|
||||
public static string GetLuckString(float luckBonus)
|
||||
{
|
||||
return GetStatTooltip("LuckStat").Format(luckP.ToPercent());
|
||||
return GetStatTooltip("LuckStat").Format(luckBonus);
|
||||
}
|
||||
|
||||
public static string GetMeleeSpeedString(float meleeSpeedP)
|
||||
|
||||
Reference in new issue
Block a user