Wave Skipper fixes.

1. Fixed Stealth Striked being miss-aligned with the mouse.
2. Put a legacy name on the projectile.
This commit is contained in:
Memes committed 2023-06-19 17:43:41 +02:00
1 parent 1271f1f770
commit f18eddc570
3 files changed
+12 -10

No files matched your search

+7 -7
View File
@@ -9,10 +9,12 @@ using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
{
[LegacyName("DuneHopper")]
public class WaveSkipper : RogueWeapon
{
public static int SpreadAngle = 8;
public override void SetDefaults()
{
Item.width = 44;
@@ -27,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue
Item.height = 44;
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
Item.rare = ItemRarityID.Pink;
Item.shoot = ModContent.ProjectileType<DuneHopperProjectile>();
Item.shoot = ModContent.ProjectileType<WaveSkipperProjectile>();
Item.shootSpeed = 12f;
Item.DamageType = RogueDamageClass.Instance;
}
@@ -36,12 +38,10 @@ namespace CalamityMod.Items.Weapons.Rogue
{
if (player.Calamity().StealthStrikeAvailable())
{
int numProj = 3;
float rotation = MathHelper.ToRadians(3);
for (int i = 0; i < numProj; i++)
for (int i = -SpreadAngle; i < SpreadAngle * 2; i += SpreadAngle)
{
Vector2 perturbedSpeed = new Vector2(velocity.X - 3f, velocity.Y - 3f).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1)));
int stealth = Projectile.NewProjectile(source, position, perturbedSpeed, ModContent.ProjectileType<DuneHopperProjectile>(), damage, knockback, player.whoAmI);
Vector2 spreadVelocity = player.SafeDirectionTo(Main.MouseWorld).RotatedBy(MathHelper.ToRadians(i)) * Item.shootSpeed;
int stealth = Projectile.NewProjectile(source, position, spreadVelocity, ModContent.ProjectileType<WaveSkipperProjectile>(), damage, knockback, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
Main.projectile[stealth].Calamity().stealthStrike = true;
}
@@ -80,7 +80,6 @@ DestructionStar.DisplayName: Star of Destruction
DragonShit.DisplayName: Fire
DukesDecapitatorBubble.DisplayName: Bubble
DukesDecapitatorProj.DisplayName: Decapitator
DuneHopperProjectile.DisplayName: Scourge
DuststormCloud.DisplayName: Dust Cloud
DuststormCloudStealth.DisplayName: Dust Cloud
DuststormInABottleProj.DisplayName: Duststorm
@@ -322,4 +321,5 @@ WebBallBol.DisplayName: Web Ball
WrathwingCinder.DisplayName: Wrathwing Eruption
WrathwingFireball.DisplayName: Wrathwing Fireball
WrathwingSpear.DisplayName: Wrathwing
WulfrumKnifeProj.DisplayName: Knife
WulfrumKnifeProj.DisplayName: Knife
WaveSkipperProjectile.DisplayName: Scourge
@@ -2,9 +2,11 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class DuneHopperProjectile : ModProjectile, ILocalizedModType
[LegacyName("DuneHopperProjectile")]
public class WaveSkipperProjectile : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Rogue";
public override string Texture => "CalamityMod/Items/Weapons/Rogue/WaveSkipper";