Banshee Hook, Floodtide, Terror Blade projectiles

This commit is contained in:
CongratsIsTrash committed 2023-12-23 11:11:52 -05:00
1 parent 5672cca969
commit 3b42f05954
7 files changed
+40 -13

No files matched your search

+3 -5
View File
@@ -1,7 +1,7 @@
using Terraria.DataStructures;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Melee;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<MiniSharkron>();
Item.shoot = ModContent.ProjectileType<FloodtideShark>();
Item.shootSpeed = 18f;
}
@@ -42,9 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
float SpeedX = velocity.X + (float)Main.rand.Next(-20, 21) * 0.05f;
float SpeedY = velocity.Y + (float)Main.rand.Next(-20, 21) * 0.05f;
int proj = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].DamageType = DamageClass.Melee;
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f);
}
return false;
}
@@ -121,6 +121,7 @@ FallenPaladinsHammerEcho.DisplayName: Fallen Paladin's Hammer Echo
FallenPaladinsHammerProj.DisplayName: Fallen Paladin's Hammer
Feather.DisplayName: Feather
Flarefrost.DisplayName: Flarefrost
FloodtideShark.DisplayName: SHORK
ForbiddenOathbladeProjectile.DisplayName: Oathblade
GaelExplosion.DisplayName: Gael Explosion
GaelSkull.DisplayName: No Longer Ark of the Cosmos' Superior Cousin
Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 558 B

+33
View File
@@ -0,0 +1,33 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Melee
{
public class FloodtideShark : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Melee";
public override void SetDefaults()
{
Projectile.width = 66;
Projectile.height = 28;
Projectile.aiStyle = ProjAIStyleID.Arrow;
AIType = ProjectileID.MiniSharkron;
Projectile.friendly = true;
Projectile.alpha = 255;
Projectile.ignoreWater = true;
Projectile.DamageType = DamageClass.Melee;
}
public override void OnKill(int timeLeft)
{
for (int d = 0; d < 15; ++d)
{
int idx = Dust.NewDust(Projectile.Center - Vector2.One * 10f, 50, 50, DustID.Blood, 0f, -2f, 0, default, 1f);
Dust dust = Main.dust[idx];
dust.velocity /= 2f;
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

+3 -8
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Melee;
using Microsoft.Xna.Framework;
using System;
using Terraria;
@@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee
public override void SetDefaults()
{
Projectile.width = 16;
Projectile.height = 16;
Projectile.width = 32;
Projectile.height = 32;
Projectile.friendly = true;
Projectile.DamageType = DamageClass.Melee;
Projectile.penetrate = 4;
@@ -87,11 +87,6 @@ namespace CalamityMod.Projectiles.Melee
Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 0.785f;
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(255, 0, 0, Projectile.alpha);
}
public override bool PreDraw(ref Color lightColor)
{
if (Projectile.timeLeft > 595)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 468 B