This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
36 lines
944 B
C#
36 lines
944 B
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.Summon
|
|
{
|
|
public class Phantom : ModBuff
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.buffNoTimeDisplay[Type] = true;
|
|
Main.buffNoSave[Type] = true;
|
|
//Main.persistentBuff[Type] = true;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
if (player.ownedProjectileCounts[ModContent.ProjectileType<PhantomGuy>()] > 0)
|
|
{
|
|
modPlayer.pGuy = true;
|
|
}
|
|
if (!modPlayer.pGuy)
|
|
{
|
|
player.DelBuff(buffIndex);
|
|
buffIndex--;
|
|
}
|
|
else
|
|
{
|
|
player.buffTime[buffIndex] = 18000;
|
|
}
|
|
}
|
|
}
|
|
}
|