Files
CalamityModPublic/Projectiles/Melee/CosmicOrb.cs
T
Andrew Marheine 778c089075 1 - Removed Bloodflare mana star drops.
2 - Increased Bloodflare heart drop timer from 3 to 5 seconds.
3 - Moved Revivify, Daedalus Absorb and Absorber healing to Hurt instead of PreHurt.
4 - Reduced various life steal/healing bonuses, made their caps more strict and increased their cooldowns.
5 - Changed Baleful Harvester to be true melee and increased skull velocity and changed the skull AI.
6 - Nerfed RE weapons but made their ammo sold by the Arms Dealer and not drop from bosses.
7 - Adjusted more OOA armors by moving stats from the armor pieces to the set bonuses.
8 - Buffed Relic of Convergence healing, because it wasn't good.
9 - Adjusted DoG phase 2 AI to transition phases at different HP intervals, teleport rift creates a fireball explosion when DoG teleports to it when he's below 60% HP.
10 - Hive Cyst, Perforator Cyst and ??? no longer spawn while the pillars are active.
11 - Nerfed some Malice Mode AIs again and buffed others.
12 - Added new Perforator Hive spore attack, it's scuffed as fuck atm because it's using a placeholder sprite and projectile lol.
13 - Polter movement changed when lining up a charge.
14 - Nerfed Event Horizon homing range and black hole duration.
15 - Nerfed several other projectile homing ranges.
16 - Reduced Venom Staff buff from 66% to 33%.
2021-05-09 19:19:47 -05:00

89 lines
2.9 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class CosmicOrb : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Orb");
}
public override void SetDefaults()
{
projectile.extraUpdates = 0;
projectile.width = 14;
projectile.height = 14;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.melee = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, new Vector3(0.075f, 0.5f, 0.15f));
projectile.velocity *= 0.985f;
projectile.rotation += projectile.velocity.X * 0.2f;
if (projectile.velocity.X > 0f)
{
projectile.rotation += 0.08f;
}
else
{
projectile.rotation -= 0.08f;
}
projectile.ai[1] += 1f;
if (projectile.ai[1] > 30f)
{
projectile.alpha += 10;
if (projectile.alpha >= 255)
{
projectile.alpha = 255;
projectile.Kill();
return;
}
}
CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 8f, 5, ModContent.ProjectileType<CosmicBolt>());
}
public override void Kill(int timeLeft)
{
Main.PlaySound(SoundID.Item54, projectile.position);
for (int i = 0; i < 10; i++)
{
int num192 = (int)(10f * projectile.scale);
int d = Dust.NewDust(projectile.Center - Vector2.One * (float)num192, num192 * 2, num192 * 2, 242, 0f, 0f, 0, default, 1f);
Dust dust = Main.dust[d];
Vector2 offset = Vector2.Normalize(dust.position - projectile.Center);
dust.position = projectile.Center + offset * (float)num192 * projectile.scale;
if (i < 30)
{
dust.velocity = offset * dust.velocity.Length();
}
else
{
dust.velocity = offset * Main.rand.NextFloat(4.5f, 9f);
}
dust.color = Main.hslToRgb(0.95f, 0.41f + Main.rand.NextFloat() * 0.2f, 0.93f);
dust.color = Color.Lerp(dust.color, Color.White, 0.3f);
dust.noGravity = true;
dust.scale = 0.7f;
}
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(200 - projectile.alpha, 200 - projectile.alpha, 200 - projectile.alpha, 200 - projectile.alpha);
}
}
}