diff --git a/Items/Weapons/Melee/DefiledGreatsword.cs b/Items/Weapons/Melee/DefiledGreatsword.cs index 08e8a12fa0..c08075e5dc 100644 --- a/Items/Weapons/Melee/DefiledGreatsword.cs +++ b/Items/Weapons/Melee/DefiledGreatsword.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public const int TotalProjectiles = 3; - public const float ProjectileFullyVisibleDuration = 32f; + public const float ProjectileFullyVisibleDuration = 40f; public const float ProjectileFullyVisibleDurationIncreasePerAdditionalProjectile = 8f; @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 102; Item.height = 102; - Item.damage = 124; + Item.damage = 119; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 28; Item.useStyle = ItemUseStyleID.Swing; diff --git a/NPCs/Signus/CosmicMine.cs b/NPCs/Signus/CosmicMine.cs index 948709ecfb..7a5e64484a 100644 --- a/NPCs/Signus/CosmicMine.cs +++ b/NPCs/Signus/CosmicMine.cs @@ -36,6 +36,7 @@ namespace CalamityMod.NPCs.Signus NPC.noGravity = true; NPC.noTileCollide = true; NPC.dontTakeDamage = true; + NPC.chaseable = false; NPC.HitSound = SoundID.NPCHit53; NPC.DeathSound = SoundID.NPCDeath44; NPC.Calamity().VulnerableToSickness = false; diff --git a/Projectiles/Melee/BlazingPhantomBlade.cs b/Projectiles/Melee/BlazingPhantomBlade.cs index d26af42ca8..beae80d6f1 100644 --- a/Projectiles/Melee/BlazingPhantomBlade.cs +++ b/Projectiles/Melee/BlazingPhantomBlade.cs @@ -15,11 +15,13 @@ namespace CalamityMod.Projectiles.Melee { public new string LocalizationCategory => "Projectiles.Melee"; - internal const int TimeLeft = 210; - internal const float StartingScale = 1f; internal const float SunlightBladeMaxVelocity = DefiledGreatsword.ShootSpeed * 2f; + internal const int SunlightBladePierce = 10; + + internal const float FadeInTime = 30f; + internal const float FadeOutTime = 30f; public override void SetStaticDefaults() { @@ -37,11 +39,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.DamageType = DamageClass.Melee; Projectile.tileCollide = false; - Projectile.penetrate = 4; + Projectile.penetrate = -1; // Blazing blades and hyper blades hit four times, sunlight blades hit ten times. Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 20; - Projectile.timeLeft = TimeLeft; + Projectile.timeLeft = 220; Projectile.noEnchantmentVisuals = true; Projectile.scale = StartingScale; } @@ -49,25 +51,21 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { // True Night's Edge AI - float fadeInTime = 50f; - float fadeOutTime = 15f; + //float fadeInTime = 30f; + //float fadeOutTime = 30f; // Defiled Greatsword has three variants for this projectile float fullyVisibleDuration = Projectile.ai[1]; bool hyperBlade = fullyVisibleDuration == DefiledGreatsword.ProjectileFullyVisibleDuration + DefiledGreatsword.ProjectileFullyVisibleDurationIncreasePerAdditionalProjectile; bool sunlightBlade = fullyVisibleDuration == DefiledGreatsword.ProjectileFullyVisibleDuration + DefiledGreatsword.ProjectileFullyVisibleDurationIncreasePerAdditionalProjectile * 2f; - float timeBeforeFadeOut = fullyVisibleDuration + fadeInTime; - float projectileDuration = timeBeforeFadeOut + fadeOutTime; - float stopDealingDamageTime = TimeLeft - 20; + float timeBeforeFadeOut = fullyVisibleDuration + FadeInTime; + float projectileDuration = timeBeforeFadeOut + FadeOutTime; if (Projectile.localAI[0] == 0f) SoundEngine.PlaySound(SoundID.Item8, Projectile.Center); Projectile.localAI[0] += 1f; - if (Projectile.damage == 0 && Projectile.localAI[0] < MathHelper.Lerp(timeBeforeFadeOut, projectileDuration, 0.5f)) - Projectile.localAI[0] += 6f; - Projectile.Opacity = Utils.Remap(Projectile.localAI[0], 0f, fullyVisibleDuration, 0f, 1f) * Utils.Remap(Projectile.localAI[0], timeBeforeFadeOut, projectileDuration, 1f, 0f); if (Projectile.localAI[0] >= projectileDuration) { @@ -79,9 +77,6 @@ namespace CalamityMod.Projectiles.Melee Player player = Main.player[Projectile.owner]; Projectile.direction = (Projectile.spriteDirection = (int)Projectile.ai[0]); - if (Projectile.damage != 0 && Projectile.localAI[0] >= stopDealingDamageTime) - Projectile.damage = 0; - Projectile.localAI[1] += 1f; Projectile.rotation += Projectile.ai[0] * MathHelper.TwoPi * (4f + Projectile.Opacity * 4f) / 90f; Projectile.scale = Utils.Remap(Projectile.localAI[0], fullyVisibleDuration + 2f, projectileDuration, 1.12f, 1f) * Projectile.ai[2] * StartingScale; @@ -282,6 +277,14 @@ namespace CalamityMod.Projectiles.Melee { target.AddBuff(BuffID.Venom, 120); target.AddBuff(BuffID.OnFire3, 120); + + bool sunlightBlade = Projectile.ai[1] == DefiledGreatsword.ProjectileFullyVisibleDuration + DefiledGreatsword.ProjectileFullyVisibleDurationIncreasePerAdditionalProjectile * 2f; + if (Projectile.numHits >= (sunlightBlade ? SunlightBladePierce : 3)) + { + Projectile.localAI[0] = Projectile.ai[1] + FadeInTime; + } } + + public override bool? CanDamage() => Projectile.localAI[0] > Projectile.ai[1] + FadeInTime ? false : null; } }