forked from Exxo-Avalon/AvalonTesting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAvalonGlobalNPCInstance.cs
More file actions
44 lines (39 loc) · 1.2 KB
/
AvalonGlobalNPCInstance.cs
File metadata and controls
44 lines (39 loc) · 1.2 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
using Terraria;
using Terraria.ModLoader;
namespace Avalon;
public class AvalonGlobalNPCInstance : GlobalNPC
{
public override bool InstancePerEntity => true;
public bool AstigSpawned { get; set; }
public int BleedStacks { get; set; } = 1;
public int BreathCd { get; set; } = 45;
public bool DlBreath { get; set; }
public bool Electrified { get; set; }
public bool Frozen { get; set; }
public bool InfernaSpawned { get; set; }
public bool JugRunOnce { get; set; }
public bool LavaWalk { get; set; }
public bool Malaria { get; set; }
public bool NoOneHitKill { get; set; }
public int ORebirth { get; set; }
public bool Silenced { get; set; }
public int SlimeHitCounter { get; set; }
public bool Slowed { get; set; }
public int SpikeTimer { get; set; }
public override void ResetEffects(NPC npc) => Malaria = false;
public override void UpdateLifeRegen(NPC npc, ref int damage)
{
if (Malaria)
{
if (npc.lifeRegen > 0)
{
npc.lifeRegen = 0;
}
npc.lifeRegen -= 30;
if (damage < 2)
{
damage = 2;
}
}
}
}