Files
CalamityModPublic/Projectiles/Healing/RainHeal.cs
T
mountaindrew10 daa48fe357 1 - Spectre Hood set bonus no longer nerfs magic damage.
2 - Destroyer resists Aftershock and Avalanche projectiles by 50%.
3 - PBG hovers 10 tiles closer to the player on the Y axis.
4 - Adjusted Grand Guardian a bit and made the healing orbs home in on their user after a delay.
5 - Removed Chlorophyte Bullet IL edit and overrode the AI instead to make the dust look better and produce less.
6 - Reduced Boss Rush EoW DR.
2024-03-22 17:51:39 -05:00

51 lines
1.7 KiB
C#

using CalamityMod.Items.Weapons.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Healing
{
public class RainHeal : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Healing";
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
private const int TimeLeft = 300;
private const int HomingTime = TimeLeft - 120;
private const int SlowDownTime = TimeLeft - 150;
public override void SetDefaults()
{
Projectile.width = 4;
Projectile.height = 4;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.penetrate = 1;
Projectile.timeLeft = TimeLeft;
Projectile.tileCollide = false;
Projectile.extraUpdates = 3;
}
public override void AI()
{
if (Projectile.timeLeft < HomingTime)
{
if (Projectile.timeLeft > SlowDownTime)
Projectile.velocity *= 0.9f;
else
Projectile.HealingProjectile(GrandGuardian.HealPerOrb, Projectile.owner, 12f, 15f);
}
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.RainbowTorch, 0f, 0f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB));
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f;
Main.dust[dust].position.Y += Projectile.velocity.Y * 0.2f;
}
}
}