Files
CalamityModPublic/Projectiles/Ranged/CorrodedShell.cs
T
Storm2103 71fc2c3e56 Applied Done's recent balance changes but with some tweaks
Rubico Prime
1178 -> 1050

Sea's Searing
Now inflicts Venom instead of Sulphuric Poisoning

Corroded Caustibow
88 -> 75
local iframes on the shell 10 -> 12
Auras spawn less often and last half of what they used to (only get one hit and not two)

Infinity
130 -> 120

Phangasm
180 -> 160
155 might be a bit too much

Face Melter
200 -> 165

Yharim's Crystal
85 -> 70
Mana Cost: 15 -> 10
Thanathos resist 40% -> 50%
Ares resist 0% -> 20%
2023-08-19 20:35:14 -06:00

74 lines
2.9 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Dusts;
using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Ranged
{
public class CorrodedShell : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override void SetDefaults()
{
Projectile.width = 14;
Projectile.height = 14;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.Ranged;
Projectile.arrow = true;
Projectile.ignoreWater = true;
Projectile.penetrate = 6;
Projectile.timeLeft = 600;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = 12;
Projectile.aiStyle = ProjAIStyleID.Arrow;
Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration;
}
public override void AI()
{
Projectile.velocity *= 0.9995f;
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
if (Projectile.timeLeft % 5 == 0)
{
if (Projectile.owner == Main.myPlayer)
{
int aura = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<IrradiatedAura>(), (int)(Projectile.damage * 0.15), Projectile.knockBack, Projectile.owner);
if (aura.WithinBounds(Main.maxProjectiles))
{
Main.projectile[aura].DamageType = DamageClass.Ranged;
Main.projectile[aura].timeLeft = 20;
}
}
}
}
public override void Kill(int timeLeft)
{
Projectile.position = Projectile.Center;
Projectile.width = Projectile.height = 32;
Projectile.position = Projectile.position - Projectile.Size / 2f;
Projectile.maxPenetrate = -1;
Projectile.penetrate = -1;
Projectile.Damage();
SoundEngine.PlaySound(SoundID.Item92, Projectile.Center);
int count = Main.rand.Next(6, 15);
for (int i = 0; i < count; i++)
{
int idx = Dust.NewDust(Projectile.Center - Projectile.velocity / 2f, 0, 0, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 2f);
Main.dust[idx].velocity *= 2f;
Main.dust[idx].noGravity = true;
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Irradiated>(), 480);
}
}
}