From e7c8a4dda4992911cec73fcbaf5a1dc4fbfc57ee Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 4 Nov 2024 15:28:33 -0800 Subject: [PATCH] Artifacts are CLASSIST against summoners --- Items/Weapons/Typeless/RelicOfDeliverance.cs | 5 +++-- .../Mods.CalamityMod.Items.Weapons.Typeless.hjson | 9 +++++---- NPCs/CalamityGlobalNPC.cs | 3 +++ Projectiles/CalamityGlobalProjectile.cs | 3 +++ Projectiles/Typeless/RelicOfConvergenceCrystal.cs | 9 --------- Projectiles/Typeless/RelicOfDeliveranceSpear.cs | 10 ++++++---- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Items/Weapons/Typeless/RelicOfDeliverance.cs b/Items/Weapons/Typeless/RelicOfDeliverance.cs index b7eaf469db..67bae541da 100644 --- a/Items/Weapons/Typeless/RelicOfDeliverance.cs +++ b/Items/Weapons/Typeless/RelicOfDeliverance.cs @@ -12,10 +12,11 @@ namespace CalamityMod.Items.Weapons.Typeless { Item.width = 32; Item.height = 46; - Item.damage = 1350; - Item.useAnimation = Item.useTime = 25; + Item.damage = 3333; + Item.useAnimation = Item.useTime = 35; Item.reuseDelay = 15; Item.useStyle = ItemUseStyleID.Shoot; + Item.DamageType = AverageDamageClass.Instance; Item.UseSound = SoundID.Item46; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson index 2bfe2fdd4f..91163af6aa 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson @@ -30,10 +30,11 @@ RelicOfDeliverance: { DisplayName: Relic of Deliverance Tooltip: ''' -Press to grab hold of the spear and steer it -Press again to while flying on the spear to drift, slowing your velocity but charging an extremley fast dash released when you let go of -If you loose too much velocity before releasing the charge, you will reset to minimum speed -The spear can take you through walls but will warp you to the last open space if you are inside them too long + Press to grab hold of the spear and steer it + Press again to while flying on the spear to drift, slowing your velocity but charging an extremley fast dash released when you let go of + If you loose too much velocity before releasing the charge, you will reset to minimum speed + The spear can take you through walls but will warp you to the last open space if you are inside them too long + Holding out the spear heavily reduces the damage of all summons ''' } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 95e6f82210..89bffe9f3d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6323,6 +6323,9 @@ namespace CalamityMod.NPCs if (modPlayer.camper && !player.StandingStill()) modifiers.SourceDamage *= 0.1f; + if ((projectile.minion || ProjectileID.Sets.MinionShot[projectile.type] || projectile.sentry || ProjectileID.Sets.SentryShot[projectile.type]) && (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 || player.ownedProjectileCounts[ModContent.ProjectileType()] > 0)) + modifiers.SourceDamage *= 0.1f; + if (projectile.minion || ProjectileID.Sets.MinionShot[projectile.type] || projectile.sentry || ProjectileID.Sets.SentryShot[projectile.type]) EditWhipTagDamage(projectile, npc, ref modifiers); } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index da6acb39cd..b608f3ea6e 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -3427,6 +3427,9 @@ namespace CalamityMod.Projectiles if (modPlayer.camper && !player.StandingStill()) projectile.damage = (int)(projectile.damage * 0.1); + if ((projectile.minion || ProjectileID.Sets.MinionShot[projectile.type] || projectile.sentry || ProjectileID.Sets.SentryShot[projectile.type]) && (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 || player.ownedProjectileCounts[ModContent.ProjectileType()] > 0)) + projectile.damage = (int)(projectile.damage * 0.1); + if (projectile.CountsAsClass() && stealthStrike) { int gloveArmorPenAmt = modPlayer.nanotech ? 15 : 8; diff --git a/Projectiles/Typeless/RelicOfConvergenceCrystal.cs b/Projectiles/Typeless/RelicOfConvergenceCrystal.cs index a656f8e85d..32caf8bbfa 100644 --- a/Projectiles/Typeless/RelicOfConvergenceCrystal.cs +++ b/Projectiles/Typeless/RelicOfConvergenceCrystal.cs @@ -48,8 +48,6 @@ namespace CalamityMod.Projectiles.Typeless return; } - player.GetDamage() -= 1f; // This is a summoner moment and a half - UpdatePlayerVisuals(player); // Make a constant "magical" sound. @@ -74,13 +72,6 @@ namespace CalamityMod.Projectiles.Typeless fade = 1; } - // Make a sound when fully charged. - if (time == CrystalsDrawTime) - { - //SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact, Projectile.Center); - //SoundStyle h = new("CalamityMod/Sounds/Item/MeldShoot"); - //SoundEngine.PlaySound(h with { Volume = 0.4f, PitchVariance = 0.7f * completion }, Projectile.Center); - } // Create a circle of dust. The circle expands outward at first until it reaches its "destination" radius. // Once the circle is at its maximum size, some of the dust moves inward. if (time >= CrystalsDrawTime) diff --git a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs index 99089a7911..358c2aef15 100644 --- a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs +++ b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 20; - Projectile.extraUpdates = 25; + Projectile.extraUpdates = 40 * Projectile.MaxUpdates; } public override void AI() { @@ -159,7 +159,7 @@ namespace CalamityMod.Projectiles.Typeless driftPower = 1; driftTimer = (int)(MathHelper.Clamp(driftTimer * 0.94f, 1, 300)); } - Projectile.velocity *= 0.98f; + Projectile.velocity *= (1f - 0.02f * (CalamityPlayer.areThereAnyDamnBosses ? 0.5f : 1)); } Projectile.extraUpdates = 3; @@ -292,7 +292,7 @@ namespace CalamityMod.Projectiles.Typeless if (time % Projectile.MaxUpdates == 0) respawnTimer++; - if (respawnTimer >= 180 && respawnPoint != Vector2.Zero) + if (respawnTimer >= 180) { Projectile.Center = respawnPoint; Owner.Center = respawnPoint; @@ -314,6 +314,8 @@ namespace CalamityMod.Projectiles.Typeless KillProj(); } + if (respawnPoint == Vector2.Zero) + respawnPoint = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 60; if (SoundEngine.TryGetActiveSound(digSoundSlot, out var zound) && zound.IsPlaying) { @@ -411,7 +413,7 @@ namespace CalamityMod.Projectiles.Typeless modifiers.SourceDamage *= damageMult; } public override bool? CanDamage() => (Projectile.velocity == Vector2.Zero || drifting) ? false : null; - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 30, 50, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 30 * driftPowerScaling, 60 * driftPowerScaling, targetHitbox); public override bool PreDraw(ref Color lightColor) { Vector2 drawPos = Owner.MountedCenter + (drifting ? idealVel : Projectile.velocity).SafeNormalize(Vector2.UnitX) * (55 - 35 * Utils.GetLerpValue(0, 25, driftTimer, true));