Files
CalamityModPublic/Projectiles/Magic/VenusianBolt.cs
T
mountaindrew10 4626974709 1 - Inferna Cutter now inflicts Hellfire instead of On Fire! and no longer inflicts Brimstone Flames.
2 - Mantis Claws now inflict Hellfire.
3 - Vulcanite Lance now inflicts Hellfire instead of On Fire!
4 - Fault Line now inflicts Hellfire instead of On Fire!
5 - Blood Bath now inflicts Burning Blood.
6 - Shaderain Staff no longer inflicts any debuffs.
7 - Icicle Trident no longer inflicts Glacial State.
8 - Infernal Rift now inflicts Hellfire instead of Brimstone Flames.
9 - Vesuvius no longer buffs the player with Molten and now inflicts Hellfire.
10 - Deathhail Staff now inflicts God Slayer Inferno instead of On Fire! and Frostburn.
11 - Divine Retribution no longer inflicts Crush Depth.
12 - Elemental Ray no longer inflicts any debuffs.
13 - Helium Flash no longer inflicts Irradiated.
14 - Ice Barrage no longer inflicts Exo Freeze.
15 - Sanguine Flare no longer inflicts any debuffs.
16 - Soul Piercer now inflicts God Slayer Inferno.
17 - Staff of Blushie now only inflicts Daybroken.
18 - Ultra Liquidator no longer inflicts any debuffs and no longer requires Ichor/Cursed Flames to craft.
19 - Venusian Trident now inflicts Daybroken instead of On Fire!
20 - The Wand now only inflicts Dragonfire.
21 - Gatling Laser no longer inflicts any debuffs.
22 - Ion Blaster no longer inflicts any debuffs.
23 - Lazhar now inflicts Daybroken instead of On Fire!
24 - Aetherflux Cannon now inflicts Holy Flames.
25 - Apoctosis Array no longer inflicts any debuffs.
26 - Plasma Caster no longer inflicts any debuffs.
27 - Purge Guzzler no longer inflicts On Fire!
28 - Death Valley Duster now inflicts Armor Crunch.
29 - Forbidden Sun now inflicts Hellfire instead of On Fire!
30 - Frigidflash Bolt now inflicts Hellfire instead of On Fire!
31 - Poseidon now inflicts Eutrophication.
32 - Primordial Earth now inflicts Armor Crunch.
33 - Seething Discharge now inflicts Brimstone Flames.
34 - Tome of Fates no longer inflicts Brimstone Flames.
35 - Apotheosis no longer inflicts Armor Crunch, Demon Flames and Exo Freeze, but now inflicts Whispering Death.
36 - Augur of the Elements no longer inflicts any debuffs.
37 - Event Horizon no longer inflicts any debuffs.
38 - Nuclear Fury no longer inflicts any debuffs.
39 - Primordial Ancient now inflicts Armor Crunch.
40 - Recitation of the Beast no longer inflicts any debuffs.
41 - Arctic Bear Paw no longer inflicts Confused.
42 - Mad Alchemist's Cocktail Glove no longer inflicts Poisoned, On Fire!, Cursed Inferno, Shadowflame and Frostburn, but now inflicts Electrified and the debuff durations have been doubled.
43 - Yharim's Crystal now inflicts Dragonfire.
2022-12-05 02:47:40 -06:00

90 lines
3.5 KiB
C#

using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Magic
{
public class VenusianBolt : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bolt");
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
}
public override void SetDefaults()
{
Projectile.width = 20;
Projectile.height = 20;
Projectile.friendly = true;
Projectile.penetrate = 1;
Projectile.extraUpdates = 1;
Projectile.timeLeft = 600;
Projectile.DamageType = DamageClass.Magic;
}
public override void AI()
{
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + MathHelper.ToRadians(45);
Lighting.AddLight(Projectile.Center, 0.25f, 0.2f, 0f);
if (Projectile.wet && !Projectile.lavaWet)
{
Projectile.Kill();
}
if (Projectile.localAI[0] == 0f)
{
SoundEngine.PlaySound(SoundID.Item73, Projectile.position);
Projectile.localAI[0] += 1f;
}
for (int num457 = 0; num457 < 3; num457++)
{
int num458 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 55, 0f, 0f, 100, default, 1.2f);
Main.dust[num458].noGravity = true;
Main.dust[num458].velocity *= 0.5f;
Main.dust[num458].velocity += Projectile.velocity * 0.1f;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.Daybreak, 300);
}
public override void Kill(int timeLeft)
{
if (Projectile.owner == Main.myPlayer)
{
int explosionDamage = Projectile.damage;
float explosionKB = 6f;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<VenusianExplosion>(), explosionDamage, explosionKB, Projectile.owner);
int cinderDamage = (int)(Projectile.damage * 0.75);
float cinderKB = 0f;
Vector2 cinderPos = Projectile.oldPosition + 0.5f * Projectile.Size;
int numCinders = Main.rand.Next(7, 10);
for (int i = 0; i < numCinders; i++)
{
Vector2 cinderVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
while (cinderVel.X == 0f && cinderVel.Y == 0f)
{
cinderVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
}
cinderVel.Normalize();
cinderVel *= Main.rand.Next(70, 101) * 0.1f;
Projectile.NewProjectile(Projectile.GetSource_FromThis(), cinderPos, cinderVel, ModContent.ProjectileType<VenusianFlame>(), cinderDamage, cinderKB, Projectile.owner);
}
}
}
public override bool PreDraw(ref Color lightColor)
{
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
return false;
}
}
}