-
Notifications
You must be signed in to change notification settings - Fork 0
/
Angler.cs
39 lines (35 loc) · 1 KB
/
Angler.cs
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
using Terraria.GameContent.ItemDropRules;
namespace MerchantsPlus.NPCs;
internal class Angler : BaseMerchant
{
public override void GetChat(NPC npc, ref string chat)
{
if (npc.type != NPCID.Angler) return;
base.GetChat(npc, ref chat);
}
public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
{
if (npc.type == NPCID.Angler)
{
npcLoot.Add(ItemDropRule.Common(ItemID.Fish, 1));
}
}
public override void TownNPCAttackProj(NPC npc, ref int projType, ref int attackDelay)
{
if (npc.type != NPCID.Angler) return;
base.TownNPCAttackProj(npc, ref projType, ref attackDelay);
projType = ProjectileID.FrostDaggerfish;
if (NPC.downedSlimeKing)
{
projType = ProjectileID.IceSickle;
}
if (NPC.downedBoss1)
{
projType = ProjectileID.Blizzard;
}
if (NPC.downedBoss2)
{
projType = ProjectileID.InfluxWaver;
}
}
}