Decimation_Mod/Content/Buffs/Debuffs/Hyperthermic.cs
FyloZ ec4585bed5 - Changed Bloodshot Eye's music to Boss 1 Orchestra ( https://www.youtube.com/watch?time_continue=120&v=r-9nKGc85FQ )
- Added support for animated projectiles
- Refactoring
- Removed useless fields
- Fixed swords not dealing damages
- Added Hour Hand (from Evie's PR)
2020-03-21 00:11:07 -04:00

42 lines
1.2 KiB
C#

using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Decimation.Content.Buffs.Debuffs
{
internal class Hyperthermic : DecimationBuff
{
protected override string DisplayName => "Hyperthermic!";
protected override string Description => "Water, water everywhere but not a drop to drink... \nBlock mana potions use \nLowers defense by 10% \nLowers speed by 5%";
public override bool Debuff => true;
protected override void Init()
{
save = false;
clearable = false;
displayTime = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.statDefense = (int)(player.statDefense * 0.90f);
player.moveSpeed *= 0.95f;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.defense = (int)(npc.defense * 0.90f);
npc.velocity *= 0.95f;
}
}
public class HyperthermicManaBlock : GlobalItem
{
public override bool CanUseItem(Item item, Player player)
{
return !(player.HasBuff(ModContent.BuffType<Hyperthermic>()) && item.healMana > 0);
}
}
}