Archerfish Line Additions + Small Extra Things

(IMPORTANT: Seadragon's explosion is currently broken and doesn't function correctly and is too complex for me to make, I will need someone else to create it for me. Curse Terraria's rectangular hitboxes!)

Gave Influx Waver 1 extra update, people said 2 extra updates looked too fast

Changed Tears of Heaven to use holy fire dust instead of fire and ice dust, as it inflicts holy flames and this thing isn't called "Frigidflash Bolt"

Archerfish Line (Archerfish, Megalodon, and Seadragon) Have all been given a close range projectile that can be used to knock back enemies and deal extra damage, eventually leading into Voidragon's tentacles. More details posted in Dev-Lounge by me on 7/1/2023.

Fixed Seadragon's rocket sound playing on the rocket while its in the air by changing the firing sound to play on the player instead (Grr new sound engine)

Made Seadragon's rockets fire on the 18th shot instead of the 17th shot so that the fire blast can happen in-between rockets on the 9th shot.
This commit is contained in:
Xyk authored and Cameron Ewell committed 2023-07-11 20:47:39 -04:00
1 parent 7deb90c262
commit 6d28322166
13 files changed
+207 -11

No files matched your search

+8
View File
@@ -43,6 +43,14 @@ namespace CalamityMod.Items.Weapons.Ranged
else
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
Projectile.NewProjectile(source,
position,
velocity * 0.5f,
ModContent.ProjectileType<ArcherfishRing>(),
(int)(damage * 0.5f),
knockback * 3f,
player.whoAmI);
return false;
}
}
+9
View File
@@ -53,6 +53,15 @@ namespace CalamityMod.Items.Weapons.Ranged
else
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<ArcherfishShot>(), damage, knockback, player.whoAmI, 0f, 0f);
if (shotType < 3)
Projectile.NewProjectile(source,
position,
velocity.RotatedByRandom(MathHelper.ToRadians(4.5f)) * Main.rand.NextFloat(0.5f, 0.6f),
ModContent.ProjectileType<ArcherfishRing>(),
(int)(damage * 0.5f),
knockback * 4f,
player.whoAmI);
shotType++;
return false;
+27 -1
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public new string LocalizationCategory => "Items.Weapons.Ranged";
private int shotType = 1;
private bool rocket = false;
private bool blast = false; //Melee Explosion every 9th shot out of 18
public override void SetDefaults()
{
@@ -47,18 +48,43 @@ namespace CalamityMod.Items.Weapons.Ranged
float SpeedX = velocity.X + (float)Main.rand.Next(-10, 11) * 0.05f;
float SpeedY = velocity.Y + (float)Main.rand.Next(-10, 11) * 0.05f;
if (shotType > 17)
if (shotType > 18)
{
shotType = 1;
rocket = true;
}
if (shotType > 8) //didn''t let me do "= 9"
{
if (shotType < 10)
{
blast = true;
}
}
if (blast)
Projectile.NewProjectile(source,
position,
velocity.RotatedByRandom(MathHelper.ToRadians(4.5f)) * 0,
ModContent.ProjectileType<SeaDragonFlameburst>(),
(int)(damage * 1.2f),
knockback * 7f,
player.whoAmI);
blast = false;
if (!rocket)
{
if (shotType % 2 == 1)
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0.0f, 0.0f);
else
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<ArcherfishShot>(), damage, knockback, player.whoAmI, 0f, 0f);
if (shotType < 19)
Projectile.NewProjectile(source,
position,
velocity.RotatedByRandom(MathHelper.ToRadians(5.5f)) * Main.rand.NextFloat(0.45f, 0.65f),
ModContent.ProjectileType<ArcherfishRing>(),
(int)(damage * 0.5f),
knockback * 4f,
player.whoAmI);
shotType++;
}
@@ -246,4 +246,6 @@ VeriumBulletProj.DisplayName: Verium Bullet
Voidragon.DisplayName: Blast
VoidragonTentacle.DisplayName: Voidragon Tentacle
WaterSpout.DisplayName: Spout
WulfrumScrapBullet.DisplayName: High Speed Scrap
WulfrumScrapBullet.DisplayName: High Speed Scrap
ArcherfishRing.DisplayName: Archerfish Ring
SeaDragonFlameburst.DisplayName: Sea Dragon Flameburst
@@ -125,6 +125,7 @@ namespace CalamityMod.Projectiles
{ ProjectileID.IchorBullet, standardBulletTweaks },
{ ProjectileID.InfernoHostileBlast, defenseDamage }, // Diabolist inferno fork explosions
{ ProjectileID.IronShortswordStab, trueMelee },
{ ProjectileID.InfluxWaver, Do(ExtraUpdatesExact(1)) },
{ ProjectileID.JavelinHostile, defenseDamage },
{ ProjectileID.JestersArrow, pointBlank },
{ ProjectileID.JoustingLance, trueMelee },
+6 -7
View File
@@ -1,8 +1,9 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Dusts;
namespace CalamityMod.Projectiles.Magic
{
public class TearsofHeavenProjectile : ModProjectile, ILocalizedModType
@@ -41,12 +42,10 @@ namespace CalamityMod.Projectiles.Magic
Projectile.localAI[0] += 1f;
if (Projectile.localAI[0] > 4f)
{
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 175, 0f, 0f, 100, default, 1f);
Main.dust[num469].noGravity = true;
int num96 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 174, 0f, 0f, 100, default, 1f);
Main.dust[num96].noGravity = true;
int num102 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 92, 0f, 0f, 100, default, 1f);
Main.dust[num102].noGravity = true;
int Smalldust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 1f);
Main.dust[Smalldust].noGravity = true;
int Bigdust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f);
Main.dust[Bigdust].noGravity = true;
}
CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 8f, 20f);
+74
View File
@@ -0,0 +1,74 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.DataStructures;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Ranged
{
public class ArcherfishRing : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public override void SetDefaults()
{
Projectile.width = 60;
Projectile.height = 34;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.Ranged;
Projectile.ignoreWater = true;
Projectile.penetrate = 2;
Projectile.tileCollide = false;
Projectile.alpha = 115;
Projectile.timeLeft = 300;
Projectile.MaxUpdates = 3;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration;
}
public override void AI()
{
//The ring expanding slowing while increasing opacity until it disappears at max size
if (Projectile.ai[0] == 0)
{
Projectile.scale = 0.2f;
Projectile.ai[0]++;
}
if (Projectile.scale <= 1.5f)
{
Projectile.scale *= 1.035f;
}
if (Projectile.velocity.X > -0.8f && Projectile.velocity.X < 0.8f &
Projectile.velocity.Y > -0.8f && Projectile.velocity.Y < 0.8f)
{
Projectile.alpha += 10;
}
if (Projectile.alpha >= 255)
{
Projectile.Kill();
}
else
{
Projectile.velocity *= 0.95f;
}
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
//Audio feedback for hitting the ring
Player user = Main.player[Projectile.owner];
SoundEngine.PlaySound(SoundID.Item21, Projectile.position);
target.AddBuff(BuffID.Wet, 240);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
using CalamityMod.Dusts;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
+76
View File
@@ -0,0 +1,76 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.DataStructures;
using Terraria.ModLoader;
using Terraria.Audio;
namespace CalamityMod.Projectiles.Ranged
{
public class SeaDragonFlameburst : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Ranged";
public int frameX = 0;
public int frameY = 0;
public int currentFrame => frameY + frameX * 4;
public override void SetDefaults() //Mostly Copied from ArcherfishRing
{
Projectile.width = 322;
Projectile.height = 81;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.Ranged;
Projectile.ignoreWater = true;
Projectile.penetrate = -1;
Projectile.tileCollide = false;
Projectile.alpha = 225;
Projectile.timeLeft = 20;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration;
}
public override void AI() //Mostly Copied from SubductionFlameburst and ArcherfishRing
{
//2-6
Projectile.frameCounter += 1;
if (Projectile.frameCounter % 7 == 6)
{
frameY += 1;
if (frameY >= 4)
{
frameX += 1;
frameY = 0;
}
if (frameX >= 3)
{
Projectile.Kill();
}
}
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
public override bool PreDraw(ref Color lightColor)
{
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
Rectangle frame = new Rectangle(frameX * Projectile.width, frameY * Projectile.height, Projectile.width, Projectile.height);
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
return false;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
//Audio feedback for hitting the blast
Player user = Main.player[Projectile.owner];
SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode, Projectile.position);
target.AddBuff(BuffID.OnFire3, 240);
target.AddBuff(BuffID.Daybreak, 420);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

+2 -1
View File
@@ -8,6 +8,7 @@ namespace CalamityMod.Projectiles.Ranged
{
public class SeaDragonRocket : ModProjectile, ILocalizedModType
{
public Player owner => Main.player[Projectile.owner];
public new string LocalizationCategory => "Projectiles.Ranged";
public override void SetDefaults()
{
@@ -34,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged
}
}
Projectile.ai[1] = 1f;
SoundEngine.PlaySound(SoundID.Item109, Projectile.position);
SoundEngine.PlaySound(SoundID.Item109, owner.Center);
}
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
if (Projectile.owner == Main.myPlayer && Projectile.timeLeft <= 3)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB