From 86ffbb9c6c80fa88c565dab8d800797e11a5f9e2 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 10 Jul 2020 10:41:38 -0400 Subject: [PATCH] adjusted final dawn --- CalPlayer/CalamityPlayer.cs | 8 +++++++- Projectiles/Rogue/FinalDawnFireSlash.cs | 2 +- Projectiles/Rogue/FinalDawnHorizontalSlash.cs | 4 ++-- Projectiles/Rogue/FinalDawnProjectile.cs | 10 ++++++---- Projectiles/Rogue/FinalDawnThrow.cs | 2 +- Projectiles/Rogue/FinalDawnThrow2.cs | 4 ++-- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f84c23571a..677691a490 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -10729,8 +10729,14 @@ namespace CalamityMod.CalPlayer private float UpdateStealthGenStats() { + int finalDawnProjCount = player.ownedProjectileCounts[ModContent.ProjectileType()] + + player.ownedProjectileCounts[ModContent.ProjectileType()] + + player.ownedProjectileCounts[ModContent.ProjectileType()] + + player.ownedProjectileCounts[ModContent.ProjectileType()] + + player.ownedProjectileCounts[ModContent.ProjectileType()]; + // If you are actively using an item, you cannot gain stealth. - if (player.itemAnimation > 0) + if (player.itemAnimation > 0 || finalDawnProjCount > 0) return 0f; // Penumbra Potion provides various boosts to rogue stealth generation diff --git a/Projectiles/Rogue/FinalDawnFireSlash.cs b/Projectiles/Rogue/FinalDawnFireSlash.cs index 18e059abb4..ff28601aa3 100644 --- a/Projectiles/Rogue/FinalDawnFireSlash.cs +++ b/Projectiles/Rogue/FinalDawnFireSlash.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue { Player player = Main.player[projectile.owner]; - if (player.dead || player is null || Main.myPlayer != projectile.owner) + if (player.dead || player is null) projectile.Kill(); player.direction = projectile.direction; diff --git a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs index 5ed9d58eea..63e04254e4 100644 --- a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs +++ b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue { Player player = Main.player[projectile.owner]; - if (player.dead || player is null || Main.myPlayer != projectile.owner) + if (player.dead || player is null) projectile.Kill(); projectile.Center = player.Center; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; Main.PlaySound(SoundID.Item71, projectile.position); - if(projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer) { Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage / 2, 0f, projectile.owner); } diff --git a/Projectiles/Rogue/FinalDawnProjectile.cs b/Projectiles/Rogue/FinalDawnProjectile.cs index a7e799af8d..6eba4bb801 100644 --- a/Projectiles/Rogue/FinalDawnProjectile.cs +++ b/Projectiles/Rogue/FinalDawnProjectile.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue { Player player = Main.player[projectile.owner]; - if (player.dead || player is null || Main.myPlayer != projectile.owner) + if (player.dead || player is null) projectile.Kill(); if (Main.myPlayer == player.whoAmI) @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.NewProjectile(player.Center, player.DirectionTo(Main.MouseWorld) * 38f, ModContent.ProjectileType(), - (int)(projectile.damage * 2.5f), + (int)(projectile.damage * 1.5f), projectile.knockBack, projectile.owner); player.Calamity().ConsumeStealthByAttacking(); @@ -111,6 +111,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.DirectionTo(Main.MouseWorld) * 38f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); + player.Calamity().ConsumeStealthByAttacking(); } } // Close range attack @@ -122,17 +123,18 @@ namespace CalamityMod.Projectiles.Rogue Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), - (int)(projectile.damage * 2.5f), + (int)(projectile.damage * 1.5f), projectile.knockBack, projectile.owner); player.Calamity().ConsumeStealthByAttacking(); } else { + //This one doesn't consume stealth since it replenishes stealth on hits Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), - (int)(projectile.damage * 1.5f), + projectile.damage, projectile.knockBack, projectile.owner); } diff --git a/Projectiles/Rogue/FinalDawnThrow.cs b/Projectiles/Rogue/FinalDawnThrow.cs index 9151e544a7..d09dc8400f 100644 --- a/Projectiles/Rogue/FinalDawnThrow.cs +++ b/Projectiles/Rogue/FinalDawnThrow.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Rogue { Player player = Main.player[projectile.owner]; - if (player.dead || player is null || Main.myPlayer != projectile.owner) + if (player.dead || player is null) projectile.Kill(); if (projectile.localAI[0] == 0) diff --git a/Projectiles/Rogue/FinalDawnThrow2.cs b/Projectiles/Rogue/FinalDawnThrow2.cs index 80aa357634..6bb8d51475 100644 --- a/Projectiles/Rogue/FinalDawnThrow2.cs +++ b/Projectiles/Rogue/FinalDawnThrow2.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = Utils.NextVector2Circular(Main.rand, 7.2f, 7.2f); Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), - (int)(projectile.damage * 0.8), projectile.knockBack, projectile.owner, 0f, + (int)(projectile.damage * 0.3), projectile.knockBack, projectile.owner, 0f, target.whoAmI); } HasHitEnemy = true; @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue { Player player = Main.player[projectile.owner]; - if (player.dead || player is null || Main.myPlayer != projectile.owner) + if (player.dead || player is null) projectile.Kill(); if (projectile.localAI[0] == 0)