From aebf2cec3345dacf8e4e900d20b4759dc7aa2c0b Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Thu, 18 Nov 2021 01:29:40 -0500 Subject: [PATCH] calamitas accepts discounts now --- UI/CalamitasEnchantments/CalamitasEnchantUI.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/CalamitasEnchantments/CalamitasEnchantUI.cs b/UI/CalamitasEnchantments/CalamitasEnchantUI.cs index 91cee2c6a0..f50032b56a 100644 --- a/UI/CalamitasEnchantments/CalamitasEnchantUI.cs +++ b/UI/CalamitasEnchantments/CalamitasEnchantUI.cs @@ -173,6 +173,10 @@ namespace CalamityMod.UI.CalamitasEnchants if (SelectedEnchantment.HasValue && SelectedEnchantment.Value.Name == EnchantmentManager.UpgradeEnchantName) cost = (int)MathHelper.Min(cost, Item.buyPrice(5)) * 5; + // Make it 20% cheaper if the player has the Discount Card or Greedy Ring + if (Main.LocalPlayer.discount) + cost = (int)(cost * 0.8); + // Draw the coin costs. string costText = "Cost: "; Utils.DrawBorderStringFourWay(spriteBatch, Main.fontMouseText, costText, costDrawPositionTopLeft.X, costDrawPositionTopLeft.Y + 45f * Main.UIScale, Color.White * (Main.mouseTextColor / 255f), Color.Black, Vector2.Zero, Main.UIScale);