1 - Made the Astral Probes evenly spaced-out from eachother. 2 - Made the Astral Probes look at the mouse when there's no enemy. 3 - Made the Astral Probes' lasers the cooler version of the Astral Lasers. 4 - Renamed Astral Probe internal from "aProbe" to "astralProbe". 5 - Made the lasers predictive.
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.Summon
|
|
{
|
|
public class AstralProbeBuff : ModBuff
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Astral Probe");
|
|
Description.SetDefault("The astral probe will protect you");
|
|
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<AstralProbeSummon>()] > 0)
|
|
modPlayer.astralProbe = true;
|
|
if (!modPlayer.astralProbe)
|
|
{
|
|
player.DelBuff(buffIndex);
|
|
buffIndex--;
|
|
}
|
|
else
|
|
player.buffTime[buffIndex] = 18000;
|
|
}
|
|
}
|
|
}
|