Files
CalamityModPublic/Projectiles/Rogue/HypothermiaChunk.cs
T
mountaindrew10 b2624d86a9 1 - Blazing Star now inflicts Hellfire.
2 - Frostcrush Valari no longer inflicts Frostburn and Crush Depth.
3 - Icebreaker now inflicts Nightwither on stealth strikes for 7 seconds.
4 - Kelvin Catalyst stealth strike now inflicts Glacial State.
5 - Mangrove Chakram now inflicts Acid Venom instead of Cursed Inferno.
6 - Subduction Slicer now inflicts Hellfire instead of On Fire! and the length of the Daybroken debuff on stealth strikes is now 7 seconds.
7 - Elemental Disk no longer inflicts debuffs.
8 - Eradicator now inflicts God Slayer Inferno instead of On Fire! and Frostburn.
9 - Molten Amputator now inflits Holy Flames.
10 - Valediction no longer inflicts Wet.
11 - Gel Darts no longer inflict Slow.
12 - Stormfront Razor now inflicts Electrified.
13 - Cosmic Kunai no longer inflicts God Slayer Inferno.
14 - Jaws of Oblivion no longer inflicts Marked for Death.
15 - Utensil Poker no longer inflicts Bleeding, Burning Blood and Well Fed.
16 - Sludge Splotch now inflicts Slimed instead of Slow.
17 - Web Ball stealth strike Webbed duration increased to 2 seconds.
18 - Tooth Balls now inflict Burning Blood.
19 - Deep Wounder now inflicts Marked for Death on stealth strikes instead of Crush Depth and inflicts Crush Depth with regular hits.
20 - Gacruxian Mollusk sparks now inflict Electrified.
21 - Bloodsoaked Crasher no longer inflicts Brimstone Flames.
22 - Hypothermia stealth strikes now inflict Glacial State.
23 - Seared Pan no longer inflicts Burning Blood and inflicts Daybroken instead of On Fire!
24 - The Reaper now inflicts Irradiated and Sulphuric Poisoning.
2022-12-04 04:45:46 -06:00

94 lines
3.5 KiB
C#

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
using CalamityMod.Buffs.StatDebuffs;
namespace CalamityMod.Projectiles.Rogue
{
public class HypothermiaChunk : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ice Chunk");
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
}
public override void SetDefaults()
{
Projectile.width = 20;
Projectile.height = 20;
Projectile.friendly = true;
Projectile.penetrate = 1;
Projectile.timeLeft = 80;
Projectile.extraUpdates = 4;
Projectile.ignoreWater = true;
Projectile.DamageType = RogueDamageClass.Instance;
Projectile.tileCollide = false;
}
public override void AI()
{
//Rotation
Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt();
Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi);
Lighting.AddLight(Projectile.Center, 0.1f, 0f, 0.5f);
if (Projectile.ai[0] < 0.2f)
{
Projectile.ai[0] += 0.1f;
}
else
{
Projectile.tileCollide = true;
}
if (Main.rand.NextBool(10))
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 191, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 0.8f);
}
}
public override void Kill(int timeLeft)
{
for (int i = 0; i <= 3; i++)
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 191, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f, 0, default, 0.8f);
}
if (Projectile.owner == Main.myPlayer)
{
int numSplits = Main.rand.NextBool() ? 4 : 3;
int type = ModContent.ProjectileType<HypothermiaShard>();
int shardDamage = (int)(Projectile.damage * 0.5f);
float shardKB = Projectile.knockBack * 0.75f;
for (int i = 0; i < numSplits; ++i)
{
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f);
int texID = Main.rand.Next(4);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, type, shardDamage, shardKB, Main.myPlayer, texID, 1f);
}
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.Frostburn, 300);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Frostburn, 300);
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
}
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
return false;
}
}
}