-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCalTestHelpersGlobalItem.cs
More file actions
63 lines (60 loc) · 2.35 KB
/
CalTestHelpersGlobalItem.cs
File metadata and controls
63 lines (60 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using CalamityMod.World;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Utilities;
using ReLogic.Content;
using Terraria.Audio;
using Terraria.GameContent;
using Terraria.GameContent.Bestiary;
using Terraria.GameContent.Events;
using Terraria.GameContent.Personalities;
using Terraria.Localization;
using CalamityMod.Items.SummonItems;
using CalamityMod.Items.Placeables.FurnitureDriftwood;
using CalamityMod.Items.Placeables.Abyss;
namespace CalTestHelpers
{
public partial class CalTestHelpersGlobalItem : GlobalItem
{
public override bool ReforgePrice(Item item, ref int reforgePrice, ref bool canApplyDiscount)
{
if (CalTestHelperConfig.Instance.FreeReforges == true )
{
reforgePrice = 0;
}
return false;
}
/*
public override void PostReforge(Item item)
{
// Calculate the item's reforge cost.
int value = item.value;
Player p = Main.LocalPlayer;
ItemLoader.ReforgePrice(item, ref value, ref p.discountAvailable);
//Clear Bandit's money since you are getting it back
CalamityWorld.MoneyStolenByBandit = 0;
//Become back your money
int[] coinCounts = Utils.CoinsSplit(value);
if (coinCounts[0] > 0)
Item.NewItem(Main.LocalPlayer.GetSource_Loot(), Main.LocalPlayer.Center, ItemID.CopperCoin, coinCounts[0]);
if (coinCounts[1] > 0)
Item.NewItem(Main.LocalPlayer.GetSource_Loot(), Main.LocalPlayer.Center, ItemID.SilverCoin, coinCounts[1]);
if (coinCounts[2] > 0)
Item.NewItem(Main.LocalPlayer.GetSource_Loot(), Main.LocalPlayer.Center, ItemID.GoldCoin, coinCounts[2]);
if (coinCounts[3] > 0)
Item.NewItem(Main.LocalPlayer.GetSource_Loot(), Main.LocalPlayer.Center, ItemID.PlatinumCoin, coinCounts[3]);
}
*/
public override void AddRecipes()
{
Recipe r = Recipe.Create(ModContent.ItemType<NaiadsWarhorn>());
r.AddIngredient(ItemID.SharkFin, 10);
r.AddIngredient(ItemID.SeafoodDinner, 2);
r.AddIngredient<Driftwood>(10);
r.AddIngredient<AbyssGravel>(15);
r.AddCondition(Condition.NearWater);
r.Register();
}
}
}