diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8eb43856ef..d45ba904e2 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -621,9 +621,7 @@ namespace CalamityMod.CalPlayer public bool featherCrownDraw = false; public bool moonCrown = false; public bool moonCrownDraw = false; - public int featherCrownCooldown = 0; - public int moonCrownCooldown = 0; - public int nanoFlareCooldown = 0; + public int rogueCrownCooldown = 0; public bool dragonScales = false; public bool gloveOfPrecision = false; public bool gloveOfRecklessness = false; @@ -2235,9 +2233,7 @@ namespace CalamityMod.CalPlayer theBeeCooldown = 0; nCoreCooldown = 0; killSpikyBalls = false; - moonCrownCooldown = 0; - featherCrownCooldown = 0; - nanoFlareCooldown = 0; + rogueCrownCooldown = 0; fleshTotemCooldown = false; sandCloakCooldown = false; icicleCooldown = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4e587946c0..63fe76338f 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1231,12 +1231,8 @@ namespace CalamityMod.CalPlayer modPlayer.silvaMageCooldown--; if (modPlayer.tarraMageHealCooldown > 0) modPlayer.tarraMageHealCooldown--; - if (modPlayer.featherCrownCooldown > 0) - modPlayer.featherCrownCooldown--; - if (modPlayer.moonCrownCooldown > 0) - modPlayer.moonCrownCooldown--; - if (modPlayer.nanoFlareCooldown > 0) - modPlayer.nanoFlareCooldown--; + if (modPlayer.rogueCrownCooldown > 0) + modPlayer.rogueCrownCooldown--; if (modPlayer.spectralVeilImmunity > 0) modPlayer.spectralVeilImmunity--; if (modPlayer.jetPackCooldown > 0) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 03bee7d667..4f254b5b5e 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -533,45 +533,47 @@ namespace CalamityMod.CalPlayer } } - if (modPlayer.nanotech && modProj.stealthStrike && modPlayer.nanoFlareCooldown <= 0 && modProj.stealthStrikeHitCount < 5) + if (modProj.stealthStrike && modPlayer.rogueCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5) { - for (int i = 0; i < 3; i++) + bool spawnedFeathers = false; + if (modPlayer.nanotech) { - Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); - Vector2 velocity = (position - source) / 40f; - Projectile.NewProjectile(source, velocity, ProjectileType(), (int)(120 * player.RogueDamage()), 3f, proj.owner); - modPlayer.nanoFlareCooldown = 60; + for (int i = 0; i < 3; i++) + { + Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); + Vector2 velocity = (position - source) / 40f; + Projectile.NewProjectile(source, velocity, ProjectileType(), (int)(120 * player.RogueDamage()), 3f, proj.owner); + } } - } - else if (modPlayer.moonCrown && modProj.stealthStrike && modPlayer.moonCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5) - { - int lunarFlareDamage = (int)(MoonstoneCrown.BaseDamage * player.RogueDamage()); - float lunarFlareKB = 3f; - for (int i = 0; i < 3; i++) + else if (modPlayer.moonCrown) { - Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); - Vector2 velocity = (position - source) / 10f; - int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner); - if (flare.WithinBounds(Main.maxProjectiles)) - Main.projectile[flare].Calamity().forceTypeless = true; + int lunarFlareDamage = (int)(MoonstoneCrown.BaseDamage * player.RogueDamage()); + float lunarFlareKB = 3f; + for (int i = 0; i < 3; i++) + { + Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); + Vector2 velocity = (position - source) / 10f; + int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner); + if (flare.WithinBounds(Main.maxProjectiles)) + Main.projectile[flare].Calamity().forceTypeless = true; + } } - - modPlayer.moonCrownCooldown = 60; - } - else if (modPlayer.featherCrown && modProj.stealthStrike && modPlayer.featherCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5) - { - for (int i = 0; i < 3; i++) + else if (modPlayer.featherCrown) { - Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); - float speedX = (position.X - source.X) / 30f; - float speedY = (position.Y - source.Y) * 8; - Vector2 velocity = new Vector2(speedX, speedY); - int featherDamage = (int)(15 * player.RogueDamage()); - int feather = Projectile.NewProjectile(source, velocity, ProjectileType(), featherDamage, 3f, proj.owner); - if (feather.WithinBounds(Main.maxProjectiles)) - Main.projectile[feather].Calamity().forceTypeless = true; - modPlayer.featherCrownCooldown = 15; + for (int i = 0; i < 3; i++) + { + Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); + float speedX = (position.X - source.X) / 30f; + float speedY = (position.Y - source.Y) * 8; + Vector2 velocity = new Vector2(speedX, speedY); + int featherDamage = (int)(15 * player.RogueDamage()); + int feather = Projectile.NewProjectile(source, velocity, ProjectileType(), featherDamage, 3f, proj.owner); + if (feather.WithinBounds(Main.maxProjectiles)) + Main.projectile[feather].Calamity().forceTypeless = true; + } + spawnedFeathers = true; } + modPlayer.rogueCrownCooldown = spawnedFeathers ? 15 : 60; } if (modPlayer.forbiddenCirclet && modProj.stealthStrike && modPlayer.forbiddenCooldown <= 0 && modProj.stealthStrikeHitCount < 5)