Files
CalamityModPublic/Projectiles/Boss/PhantomMine.cs
T
Andrew Marheine 0ca092bee0 1 - Reworked Ethereal Extorter to not be complicated as hell.
2 - Reduced Old Die damage variance.
3 - Reduced Silva true melee damage bonus from 5x to 2x but made it trigger all the time.
4 - Reduced God Slayer ranged crit bonus damage.
5 - Removed Venerated Locket, Unstable Prism, Luxor's Gift, Dynamo Stem Cells, Moon Crown, Dragon Scales and Prismatic Regalia softcaps.
6 - Buffed Plasma Rifle left click, Viscera damage, Gilded Proboscis damage and Plasma Caster projectile speed.
7 - Nerfed Thunderstorm, Aether's Whisper, Viscera healing and Deep Sea Dumbbell flex.
2021-01-21 21:29:13 -06:00

83 lines
3.1 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Boss
{
public class PhantomMine : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phantom Orb");
}
public override void SetDefaults()
{
projectile.Calamity().canBreakPlayerDefense = true;
projectile.width = 30;
projectile.height = 30;
projectile.hostile = true;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.ignoreWater = true;
projectile.timeLeft = 480;
cooldownSlot = 1;
}
public override void AI()
{
if (projectile.velocity.Length() < projectile.ai[0])
projectile.velocity *= 1.05f;
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(200, 200, 200, projectile.alpha);
}
public override bool CanHitPlayer(Player target) => projectile.velocity.Length() >= projectile.ai[0];
public override void Kill(int timeLeft)
{
Main.PlaySound(SoundID.Item14, projectile.position);
projectile.position.X = projectile.position.X + (projectile.width / 2);
projectile.position.Y = projectile.position.Y + (projectile.height / 2);
projectile.width = 150;
projectile.height = 150;
projectile.position.X = projectile.position.X - (projectile.width / 2);
projectile.position.Y = projectile.position.Y - (projectile.height / 2);
for (int num621 = 0; num621 < 15; num621++)
{
int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 180, 0f, 0f, 100, default, 1.2f);
Main.dust[num622].velocity *= 3f;
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.5f;
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 30; num623++)
{
int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 180, 0f, 0f, 100, default, 1.7f);
Main.dust[num624].noGravity = true;
Main.dust[num624].velocity *= 5f;
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 60, 0f, 0f, 100, default, 1f);
Main.dust[num624].velocity *= 2f;
}
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}