Bugfixes
Fixed NOU breaking various holdouts Fixed being able to fire these weapons without having stars Fixed super deep pitch shift if M2ing after losing combo on Starmada Fixed frame perfect dual wielding Properly organized the Starmada projectile names
This commit is contained in:
1 parent
0418261552
commit
d679e0291f
5 files changed
+45
-38
No files matched your search
@@ -5216,6 +5216,13 @@ namespace CalamityMod.CalPlayer
|
||||
private void NOULOL()
|
||||
{
|
||||
Player.ResetEffects();
|
||||
for (int j = 0; j < 1000; j++)
|
||||
{
|
||||
if (!Main.projectile[j].active || Main.projectile[j].owner != Player.whoAmI)
|
||||
continue;
|
||||
|
||||
Player.ownedProjectileCounts[Main.projectile[j].type]++;
|
||||
}
|
||||
Player.head = -1;
|
||||
Player.body = -1;
|
||||
Player.legs = -1;
|
||||
|
||||
@@ -201,15 +201,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ActiveItem().type != ModContent.ItemType<SaharaSlicers>())
|
||||
saharaSlicersBolts = 0;
|
||||
|
||||
// CIT 03OCT2025:
|
||||
// NO U debuff was causing these weapons to spawn a holdout on every frame due to shenanigans with resetting owned projectile counts.
|
||||
// This means the weapon now doesn't spawn at all with NO U, but I consider that preferable.
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0 && !NOU) && !Player.dead)
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0) && !Player.dead)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarfleetHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0 && !NOU) && !Player.dead)
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0) && !Player.dead)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarmadaHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
|
||||
@@ -212,6 +212,8 @@ SputterComet.DisplayName: Sputter Comet
|
||||
SputterCometBig.DisplayName: Sputter Comet
|
||||
SpykerProj.DisplayName: Spyker
|
||||
StarfleetStar.DisplayName: Starfleet Star
|
||||
StarmadaHitProj.DisplayName: Starmada
|
||||
StarmadaStar.DisplayName: Starmada Star
|
||||
StarmageddonBinaryStarCenter.DisplayName: Starmageddon Binary Star Center
|
||||
StarmageddonStar.DisplayName: Starmageddon Star
|
||||
StarmageddonStar2.DisplayName: Starmageddon Star
|
||||
@@ -263,5 +265,3 @@ AcidRocket.DisplayName: Acid Rocket
|
||||
M1GarandBulletCasing.DisplayName: M1 Garand Bullet Casing
|
||||
M1GarandEmptyClip.DisplayName: M1 Garand Empty Clip
|
||||
M1GarandShot.DisplayName: .30-06 Round
|
||||
StarmadaHitProj.DisplayName: Starmada
|
||||
StarmadaStar.DisplayName: Starmada Star
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (lastUseTime == 0 || doingNothing)
|
||||
lastUseTime = Owner.HeldItem.useAnimation;
|
||||
if (!doingNothing)
|
||||
Owner.itemTime = Owner.itemAnimation = 2;
|
||||
Owner.itemTime = Owner.itemAnimation = 5;
|
||||
|
||||
glowIntensity = MathHelper.Lerp(glowIntensity, (float)Math.Pow(Utils.GetLerpValue(recoilTimerMax, 0, shootingCooldown, true), 5), 0.2f);
|
||||
|
||||
@@ -83,8 +83,16 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.Kill();
|
||||
return;
|
||||
}
|
||||
bool leftShootChecks = Main.mouseLeft && !Main.mapFullscreen && !Owner.mouseInterface && shootingCooldown == 0;
|
||||
bool hasAmmo = Owner.PickAmmo(HeldItem, out _, out _, out _, out _, out _, true);
|
||||
bool leftShootChecks = (Main.mouseLeft && !Main.mapFullscreen && !Owner.mouseInterface && shootingCooldown == 0) && hasAmmo;
|
||||
bool rightShootChecks = Owner.Calamity().mouseRight && !Main.mapFullscreen && !Owner.mouseInterface && starburstCooldown == 0 && starburstTimer == 0;
|
||||
|
||||
if (Main.mouseLeft && !hasAmmo && OffsetLengthFromArm >= 24.5f)
|
||||
{
|
||||
OffsetLengthFromArm -= 8;
|
||||
SoundStyle click = new("CalamityMod/Sounds/Item/DudFire");
|
||||
SoundEngine.PlaySound(click with { Volume = .6f, Pitch = -.2f }, Projectile.Center);
|
||||
}
|
||||
if (leftShootChecks)
|
||||
FireShotgun();
|
||||
if (rightShootChecks)
|
||||
|
||||
@@ -4,16 +4,13 @@ using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using log4net.Appender;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Utilities;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ModLoader;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Projectiles.Ranged
|
||||
@@ -87,7 +84,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
if (lastUseTime == 0 || doingNothing)
|
||||
lastUseTime = Owner.HeldItem.useAnimation;
|
||||
if (!doingNothing)
|
||||
Owner.itemTime = Owner.itemAnimation = 2;
|
||||
Owner.itemTime = Owner.itemAnimation = 5;
|
||||
|
||||
glowIntensity = MathHelper.Lerp(glowIntensity, (float)Math.Pow(Utils.GetLerpValue(recoilTimerMax, 0, shootingCooldown, true), 5), 0.2f);
|
||||
attackVisualMult = MathHelper.Lerp(attackVisualMult, (float)Math.Pow(Math.Min(Utils.GetLerpValue(0, starburstPerfectTime - 1, starburstTimer, true), 2) + (gunPower - 1) * 0.25f, 1) * glowIntensity, 0.2f);
|
||||
@@ -99,16 +96,25 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile.Kill();
|
||||
return;
|
||||
}
|
||||
bool leftShootChecks = Main.mouseLeft && !Main.mapFullscreen && !Owner.mouseInterface && shootingCooldown == 0;
|
||||
bool hasAmmo = Owner.PickAmmo(HeldItem, out _, out _, out _, out _, out _, true);
|
||||
bool leftShootChecks = (Main.mouseLeft && !Main.mapFullscreen && !Owner.mouseInterface && shootingCooldown == 0) && hasAmmo;
|
||||
bool rightShootChecks = Owner.Calamity().mouseRight && !Main.mapFullscreen && !Owner.mouseInterface && starburstCooldown == 0 && starburstTimer == 0;
|
||||
|
||||
if (Main.mouseLeft && !hasAmmo && shake < 0.1f)
|
||||
{
|
||||
shake = 0.8f;
|
||||
SoundStyle click = new("CalamityMod/Sounds/Item/DudFire");
|
||||
SoundEngine.PlaySound(click with { Volume = .6f, Pitch = -.2f}, Projectile.Center);
|
||||
}
|
||||
|
||||
if (leftShootChecks)
|
||||
FireShotgun();
|
||||
if (rightShootChecks)
|
||||
{
|
||||
SoundStyle blast1 = new("CalamityMod/Sounds/Item/StarfleetStarburst");
|
||||
AudSlot1 = SoundEngine.PlaySound(blast1 with { Volume = 0.8f, Pitch = 0f, MaxInstances = 8 }, Projectile.Center);
|
||||
AudSlot1 = SoundEngine.PlaySound(blast1 with { Volume = 0.7f + gunPower * 0.1f, Pitch = 0f, MaxInstances = 8 }, Projectile.Center);
|
||||
SoundStyle blast2 = new("CalamityMod/Sounds/Item/StarfleetStarburst");
|
||||
AudSlot2 = SoundEngine.PlaySound(blast2 with { Volume = 0.6f, Pitch = -0.2f + gunPower * 0.2f, MaxInstances = 8 }, Projectile.Center);
|
||||
AudSlot2 = SoundEngine.PlaySound(blast2 with { Volume = 0.5f + gunPower * 0.1f, Pitch = -0.2f + gunPower * 0.2f, MaxInstances = 8 }, Projectile.Center);
|
||||
lastGunPower = gunPower;
|
||||
starburstTimer++;
|
||||
}
|
||||
@@ -137,15 +143,18 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
if (shootingCooldown > 0)
|
||||
{
|
||||
if (SoundEngine.TryGetActiveSound(AudSlot1, out var s1) && s1.IsPlaying && failedChain)
|
||||
if (lastGunPower != gunPower)
|
||||
{
|
||||
s1.Pitch = MathHelper.Lerp(s1.Pitch, -0.7f, 0.05f);
|
||||
s1.Volume = MathHelper.Lerp(s1.Volume, 0.2f, 0.05f);
|
||||
}
|
||||
if (SoundEngine.TryGetActiveSound(AudSlot2, out var s2) && s2.IsPlaying && failedChain)
|
||||
{
|
||||
s2.Pitch = MathHelper.Lerp(s2.Pitch, -0.7f, 0.05f);
|
||||
s2.Volume = MathHelper.Lerp(s2.Volume, 0.2f, 0.05f);
|
||||
if (SoundEngine.TryGetActiveSound(AudSlot1, out var s1) && s1.IsPlaying && failedChain)
|
||||
{
|
||||
s1.Pitch = MathHelper.Lerp(s1.Pitch, -0.7f, 0.07f);
|
||||
s1.Volume = MathHelper.Lerp(s1.Volume, 0.2f, 0.07f);
|
||||
}
|
||||
if (SoundEngine.TryGetActiveSound(AudSlot2, out var s2) && s2.IsPlaying && failedChain)
|
||||
{
|
||||
s2.Pitch = MathHelper.Lerp(s2.Pitch, -0.7f, 0.07f);
|
||||
s2.Volume = MathHelper.Lerp(s2.Volume, 0.2f, 0.07f);
|
||||
}
|
||||
}
|
||||
shootingCooldown--;
|
||||
}
|
||||
@@ -293,20 +302,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), blastCenter, Vector2.Zero, ModContent.ProjectileType<BasicBurst>(), damage, -45, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult);
|
||||
blast.timeLeft = 15;
|
||||
|
||||
/*for (int x = 0; x < Main.maxProjectiles; x++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[x];
|
||||
if (projectile.active && projectile.type == ModContent.ProjectileType<StarmadaHitProj>() && projectile.localAI[2] == 1 && GunTipPosition.Distance(projectile.Center) <= 200)
|
||||
{
|
||||
projectile.localAI[2] = 5;
|
||||
float dist = Utils.GetLerpValue(160, 60, projectile.Center.Distance(GunTipPosition), true);
|
||||
Vector2 vel = Vector2.Lerp(projectile.Center.DirectionFrom(Owner.Center), Projectile.velocity, dist);
|
||||
projectile.velocity = vel * 12;
|
||||
projectile.timeLeft = 300;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
float gunPowerMult = MathHelper.Lerp(lastGunPower, 1, 0.7f);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user