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.
83 lines
3.7 KiB
C#
83 lines
3.7 KiB
C#
using CalamityMod.Projectiles.BaseProjectiles;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using ReLogic.Content;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Magic
|
|
{
|
|
public class StardustElementalBeam : BaseLaserbeamProjectile
|
|
{
|
|
public override float MaxScale => 0.85f;
|
|
public override float MaxLaserLength => 1000f;
|
|
public override float Lifetime => 30f;
|
|
public override Color LightCastColor => Color.White;
|
|
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayStart", AssetRequestMode.ImmediateLoad).Value;
|
|
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayMid", AssetRequestMode.ImmediateLoad).Value;
|
|
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd", AssetRequestMode.ImmediateLoad).Value;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Beam");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = Projectile.height = 20;
|
|
Projectile.friendly = true;
|
|
Projectile.DamageType = DamageClass.Magic;
|
|
Projectile.penetrate = 10;
|
|
Projectile.usesLocalNPCImmunity = true;
|
|
Projectile.localNPCHitCooldown = 13;
|
|
Projectile.tileCollide = false;
|
|
Projectile.timeLeft = (int)Lifetime;
|
|
}
|
|
|
|
public override void ExtraBehavior()
|
|
{
|
|
// Generate 2 stars from the side.
|
|
if (Main.myPlayer == Projectile.owner && Time == 5f)
|
|
{
|
|
int type = ModContent.ProjectileType<BeamStar>();
|
|
|
|
int damage = (int)(Projectile.damage * 0.75);
|
|
for (int i = 0; i < 2; i++)
|
|
{
|
|
Vector2 starSpeed = Projectile.velocity.RotatedBy(MathHelper.PiOver2 * i) * 5f;
|
|
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, starSpeed, type, damage, Projectile.knockBack, Projectile.owner);
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void DetermineScale() => Projectile.scale = Projectile.timeLeft / Lifetime * MaxScale;
|
|
|
|
|
|
public override bool PreDraw(ref Color lightColor)
|
|
{
|
|
DrawBeamWithColor(Color.Lerp(Color.CornflowerBlue * 1.1f, Color.Transparent, 0.3f), Projectile.scale);
|
|
DrawBeamWithColor(Color.Lerp(Color.Cyan, Color.Transparent, 0.3f), Projectile.scale * 0.5f);
|
|
DrawBeamWithColor(Color.Lerp(Color.White, Color.Transparent, 0.3f), Projectile.scale * 0.2f);
|
|
return false;
|
|
}
|
|
|
|
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
|
{
|
|
if (!Main.rand.NextBool(7))
|
|
return;
|
|
|
|
float spawnOffsetSpread = Main.rand.NextFloat(MathHelper.ToRadians(36f), MathHelper.ToRadians(64f));
|
|
float baseOffsetAngle = Main.rand.NextFloat(-0.6f, 0.6f);
|
|
int type = ModContent.ProjectileType<BeamStar>();
|
|
damage = (int)(Projectile.damage * 0.7);
|
|
for (int i = 0; i < 4; i++)
|
|
{
|
|
float spawnOffsetAngle = MathHelper.Lerp(spawnOffsetSpread * -0.5f, spawnOffsetSpread * 0.5f, i / 4f) + baseOffsetAngle;
|
|
Vector2 spawnPosition = target.Top - Vector2.UnitY.RotatedBy(spawnOffsetAngle) * 65f;
|
|
Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPosition, -Vector2.UnitY.RotatedBy(spawnOffsetAngle) * 2f, type, damage, knockback, Projectile.owner);
|
|
}
|
|
}
|
|
}
|
|
}
|