- Profaned Soul Artifact no longer breaks other mod's infinite potions - Polterghast is now neutral to all debuff types instead of just resistant to sickness - Signus Cosmic lanterns take 3 hits to kill
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.Summon
|
|
{
|
|
public class ProfanedSoulGuardians : ModBuff
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.buffNoTimeDisplay[Type] = true;
|
|
Main.buffNoSave[Type] = true;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
if (player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] <= 0 || modPlayer.profanedCrystalBuffs)
|
|
{
|
|
player.DelBuff(buffIndex);
|
|
buffIndex--;
|
|
}
|
|
else
|
|
player.buffTime[buffIndex] = 18000;
|
|
}
|
|
|
|
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
|
|
{
|
|
Player player = Main.LocalPlayer;
|
|
if (player.Calamity().profanedCrystal && !player.Calamity().profanedCrystalBuffs)
|
|
tip = this.GetLocalizedValue("VanityDescription");
|
|
}
|
|
}
|
|
}
|