Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
33 lines
890 B
C#
33 lines
890 B
C#
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.StatDebuffs
|
|
{
|
|
public class Enraged : ModBuff
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
DisplayName.SetDefault("Enraged");
|
|
Description.SetDefault("All damage taken is increased by 25%");
|
|
Main.debuff[Type] = true;
|
|
Main.pvpBuff[Type] = true;
|
|
Main.buffNoSave[Type] = false;
|
|
longerExpertDebuff = false;
|
|
canBeCleared = false;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
player.Calamity().enraged = true;
|
|
}
|
|
|
|
public override void Update(NPC npc, ref int buffIndex)
|
|
{
|
|
if (npc.Calamity().enraged < npc.buffTime[buffIndex])
|
|
npc.Calamity().enraged = npc.buffTime[buffIndex];
|
|
npc.DelBuff(buffIndex);
|
|
buffIndex--;
|
|
}
|
|
}
|
|
}
|