From 2ff49d461634fcf46c7f8642e895e980bb517533 Mon Sep 17 00:00:00 2001 From: Shucks Date: Fri, 18 Oct 2019 18:44:56 -0500 Subject: [PATCH] Typos, buff, nerfs, fixes, what have you --- CalPlayer/CalamityPlayer.cs | 23 ++---- ...veOfPrecicion.png => GloveOfPrecision.png} | Bin Items/Accessories/GloveOfRecklessness.cs | 3 +- Items/Accessories/GloveofPrecision.cs | 5 +- Items/Accessories/MomentumCapacitor.cs | 2 +- Items/Accessories/OldDie.cs | 2 +- Items/Fishing/PolarisParrotfish.cs | 1 + Items/Fishing/UrsaSergeant.cs | 3 +- Items/Weapons/Melee/WindBlade.cs | 1 + Items/Weapons/Rogue/BlastBarrel.cs | 3 +- Items/Weapons/Rogue/CalamityDamageItem.cs | 11 +-- Items/Weapons/Rogue/EnchantedAxe.cs | 6 +- Items/Weapons/Rogue/GacruxianMollusk.cs | 8 +- Items/Weapons/Rogue/Kylie.cs | 14 +--- Items/Weapons/Rogue/MonkeyDarts.cs | 7 +- Items/Weapons/Rogue/UtensilPoker.cs | 5 +- Items/Weapons/Summon/BlackHawkRemote.cs | 3 +- Projectiles/CalamityGlobalProjectile.cs | 18 ++++- Projectiles/Ranged/PolarStar.cs | 10 ++- Projectiles/Rogue/BlastBarrelProjectile.cs | 4 + Projectiles/Rogue/GacruxianProj.cs | 3 +- Projectiles/Rogue/KylieBoomerang.cs | 5 +- Projectiles/Rogue/MonkeyDart.cs | 3 + Projectiles/Rogue/MoonSigil.cs | 70 +++++++++++++++++- Projectiles/Summon/BlackHawkSummon.cs | 1 + Projectiles/Typeless/MomentumCapacitorOrb.cs | 6 ++ 26 files changed, 153 insertions(+), 64 deletions(-) rename Items/Accessories/{GloveOfPrecicion.png => GloveOfPrecision.png} (100%) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f4adcbce44..c9b2308665 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1702,10 +1702,10 @@ namespace CalamityMod.CalPlayer #region HotKeys public override void ProcessTriggers(TriggersSet triggersSet) { - if (CalamityMod.MomentumCapacitatorHotkey.JustPressed && momentumCapacitor && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f && + if (CalamityMod.MomentumCapacitatorHotkey.JustPressed && momentumCapacitor && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.3f && CalamityUtils.CountProjectiles(ModContent.ProjectileType()) == 0) { - player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f; + player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.3f; Vector2 fieldSpawnCenter = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition; Projectile.NewProjectile(fieldSpawnCenter, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); } @@ -4548,16 +4548,6 @@ namespace CalamityMod.CalPlayer player.Calamity().throwingVelocity += 0.1f; } } - if (gloveOfPrecision) - { - player.Calamity().throwingCrit += 12; - player.Calamity().throwingVelocity *= 1.2f; - } - if (gloveOfRecklessness) - { - player.Calamity().throwingVelocity *= 1.2f; - player.Calamity().throwingDamage *= 0.9f; - } if (tarraSummon) { int lifeCounter = 0; @@ -4802,7 +4792,7 @@ namespace CalamityMod.CalPlayer Rectangle rect = nPC.getRect(); if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) { - if (Main.rand.Next(0, 10) == 0) + if (Main.rand.Next(0, 10) == 0 && player.immuneTime <= 0) { AbyssMirrorEvade(); EclipseMirrorEvade(); @@ -4896,8 +4886,8 @@ namespace CalamityMod.CalPlayer } if (ursaSergeant) { - runAccMult *= 0.8f; - runSpeedMult *= 0.8f; + runAccMult *= 0.65f; + runSpeedMult *= 0.65f; } if (elysianGuard) { @@ -9686,8 +9676,7 @@ namespace CalamityMod.CalPlayer // Stealth gen acceleration float stealthScaleCap = eclipseMirror ? 40f : 25f; - - if (standstill && (eclipseMirror || darkGodSheath)) + if (standstill && (eclipseMirror || darkGodSheath) && player.itemAnimation == 0) { if (eclipseMirror) stealthGenAcceleration = stealthGenAcceleration < stealthScaleCap ? stealthGenAcceleration * 1.2f : stealthScaleCap; diff --git a/Items/Accessories/GloveOfPrecicion.png b/Items/Accessories/GloveOfPrecision.png similarity index 100% rename from Items/Accessories/GloveOfPrecicion.png rename to Items/Accessories/GloveOfPrecision.png diff --git a/Items/Accessories/GloveOfRecklessness.cs b/Items/Accessories/GloveOfRecklessness.cs index 3c5ff22ad2..6c27c0906c 100644 --- a/Items/Accessories/GloveOfRecklessness.cs +++ b/Items/Accessories/GloveOfRecklessness.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Glove Of Recklessness"); - Tooltip.SetDefault("Increases rogue speed by 20% but decreases damage by 10%\n" + + Tooltip.SetDefault("Increases rogue attack speed by 20% but decreases damage by 10%\n" + "Adds inaccuracy to rogue weapons"); } @@ -26,6 +26,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.gloveOfRecklessness = true; + modPlayer.throwingDamage *= 0.9f; } } } diff --git a/Items/Accessories/GloveofPrecision.cs b/Items/Accessories/GloveofPrecision.cs index 6abb1314da..166de56d3c 100644 --- a/Items/Accessories/GloveofPrecision.cs +++ b/Items/Accessories/GloveofPrecision.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Glove Of Precision"); - Tooltip.SetDefault("Decreases rogue speed by 20% but increases damage and crit by 12% and velocity by 25%"); + Tooltip.SetDefault("Decreases rogue attack speed by 20% but increases damage and crit by 12% and velocity by 25%"); } public override void SetDefaults() @@ -25,6 +25,9 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.gloveOfPrecision = true; + modPlayer.throwingDamage *= 1.12f; + modPlayer.throwingCrit += 12; + modPlayer.throwingVelocity *= 1.2f; } } } diff --git a/Items/Accessories/MomentumCapacitor.cs b/Items/Accessories/MomentumCapacitor.cs index d7caef070e..91f1b39353 100644 --- a/Items/Accessories/MomentumCapacitor.cs +++ b/Items/Accessories/MomentumCapacitor.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Momentum Capacitor"); - Tooltip.SetDefault("Pressing U, for the cost of 25% of max stealth, causes an energy field to appear at the cursor position\n" + + Tooltip.SetDefault("Pressing U, for the cost of 30% of max stealth, causes an energy field to appear at the cursor position\n" + "Rogue projectiles that enter the field get a constant acceleration and 15% damage boost\n" + "These boosts can only happen to a projectile once\n" + "There can only be one field"); diff --git a/Items/Accessories/OldDie.cs b/Items/Accessories/OldDie.cs index 05b3a9126f..95d1c6260a 100644 --- a/Items/Accessories/OldDie.cs +++ b/Items/Accessories/OldDie.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Old Die"); Tooltip.SetDefault("Increases randomness of attack damage \n" + - "'Lucky for you, the curse doesn't affect you.Mostly.'"); + "'Lucky for you, the curse doesn't affect you. Mostly.'"); } public override void SetDefaults() diff --git a/Items/Fishing/PolarisParrotfish.cs b/Items/Fishing/PolarisParrotfish.cs index d72bc48560..3be9c8186a 100644 --- a/Items/Fishing/PolarisParrotfish.cs +++ b/Items/Fishing/PolarisParrotfish.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Ranged; namespace CalamityMod.Items.Fishing { diff --git a/Items/Fishing/UrsaSergeant.cs b/Items/Fishing/UrsaSergeant.cs index 24133b0690..c9f4f88cf0 100644 --- a/Items/Fishing/UrsaSergeant.cs +++ b/Items/Fishing/UrsaSergeant.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ModLoader; +using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Items.Fishing { public class UrsaSergeant : ModItem @@ -8,7 +9,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { DisplayName.SetDefault("Ursa Sergeant"); - Tooltip.SetDefault("+20 defense but 20% reduced movement speed\n" + + Tooltip.SetDefault("+20 defense but 35% reduced movement speed\n" + "Immune to Astral Infection and Feral Bite\n" + "Increased regeneration at lower health"); } diff --git a/Items/Weapons/Melee/WindBlade.cs b/Items/Weapons/Melee/WindBlade.cs index 5ff2a5dcd0..6dd3be9ba5 100644 --- a/Items/Weapons/Melee/WindBlade.cs +++ b/Items/Weapons/Melee/WindBlade.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Projectiles.Melee; namespace CalamityMod.Items.Weapons.Melee { diff --git a/Items/Weapons/Rogue/BlastBarrel.cs b/Items/Weapons/Rogue/BlastBarrel.cs index 21f7256eb6..8340a42432 100644 --- a/Items/Weapons/Rogue/BlastBarrel.cs +++ b/Items/Weapons/Rogue/BlastBarrel.cs @@ -2,12 +2,13 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { public class BlastBarrel : RogueWeapon { - public const int BaseDamage = 60; + public const int BaseDamage = 45; public override void SetStaticDefaults() { DisplayName.SetDefault("Blast Barrel"); diff --git a/Items/Weapons/Rogue/CalamityDamageItem.cs b/Items/Weapons/Rogue/CalamityDamageItem.cs index 7e4365a494..e90767aedf 100644 --- a/Items/Weapons/Rogue/CalamityDamageItem.cs +++ b/Items/Weapons/Rogue/CalamityDamageItem.cs @@ -33,13 +33,14 @@ namespace CalamityMod.Items.Weapons.Rogue { crit = item.crit + player.Calamity().throwingCrit; } - public override void MeleeEffects(Player player, Rectangle hitbox) + public override float UseTimeMultiplier(Player player) { + float rogueAS = 1f; if (player.Calamity().gloveOfPrecision) - { - item.useTime = (int)(item.useTime * 0.8f); - item.useAnimation = (int)(item.useAnimation * 0.8f); - } + rogueAS -= 0.2f; + if (player.Calamity().gloveOfRecklessness) + rogueAS += 0.2f; + return rogueAS; } // Not needed because the weapon is now internally thrown instead of ranged /* diff --git a/Items/Weapons/Rogue/EnchantedAxe.cs b/Items/Weapons/Rogue/EnchantedAxe.cs index a436aa72d6..0fc58d1b7e 100644 --- a/Items/Weapons/Rogue/EnchantedAxe.cs +++ b/Items/Weapons/Rogue/EnchantedAxe.cs @@ -2,6 +2,8 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { @@ -18,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 40; - item.damage = 30; + item.damage = 23; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 15; @@ -32,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.value = 1000; item.rare = 3; item.value = Item.buyPrice(0, 4, 0, 0); - item.shoot = ModContent.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/GacruxianMollusk.cs b/Items/Weapons/Rogue/GacruxianMollusk.cs index 4b89716459..e8a01880f0 100644 --- a/Items/Weapons/Rogue/GacruxianMollusk.cs +++ b/Items/Weapons/Rogue/GacruxianMollusk.cs @@ -2,12 +2,12 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; - +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { public class GacruxianMollusk : RogueWeapon { - public static int BaseDamage = 39; + public static int BaseDamage = 38; public static float Knockback = 5f; public static float Speed = 15f; @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue item.rare = 4; item.knockBack = Knockback; item.autoReuse = true; - item.useTime = 15; - item.useAnimation = 15; + item.useTime = 22; + item.useAnimation = 22; item.useStyle = 1; item.width = 24; item.height = 22; diff --git a/Items/Weapons/Rogue/Kylie.cs b/Items/Weapons/Rogue/Kylie.cs index 999928cda9..1d597ffc3c 100644 --- a/Items/Weapons/Rogue/Kylie.cs +++ b/Items/Weapons/Rogue/Kylie.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { @@ -54,18 +55,5 @@ namespace CalamityMod.Items.Weapons.Rogue } return true; } - - public override bool CanUseItem(Player player) - { - //If you have more than one boomerang, you cant shoot another - int MAX = 1; - int launched = 0; - foreach (Projectile projectile in Main.projectile) - if (projectile.type == item.shoot && projectile.owner == item.owner && projectile.active) - { - launched++; - } - return (launched >= MAX) ? false : true; - } } } diff --git a/Items/Weapons/Rogue/MonkeyDarts.cs b/Items/Weapons/Rogue/MonkeyDarts.cs index 067f7c4a61..76af20898d 100644 --- a/Items/Weapons/Rogue/MonkeyDarts.cs +++ b/Items/Weapons/Rogue/MonkeyDarts.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.damage = 50; + item.damage = 130; item.knockBack = 4; item.crit = 18; item.noMelee = true; @@ -26,8 +27,8 @@ namespace CalamityMod.Items.Weapons.Rogue item.height = 27; item.useStyle = 1; item.UseSound = SoundID.Item1; - item.useTime = 30; - item.useAnimation = 30; + item.useTime = 20; + item.useAnimation = 20; item.value = Item.buyPrice(0, 0, 1, 0); item.rare = 3; item.shootSpeed = 10.5f; diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index 06d90bfa8b..9613184368 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Items.Weapons.Rogue { @@ -19,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue { item.width = 44; item.height = 66; - item.damage = 500; + item.damage = 575; item.Calamity().rogue = true; item.knockBack = 8f; item.noMelee = true; @@ -41,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int p = Projectile.NewProjectile(position.X, position.Y, (int)((double)speedX * 1.2), (int)((double)speedY * 1.2), ModContent.ProjectileType(), (int)((double)damage * 3), knockBack, Main.myPlayer); + int p = Projectile.NewProjectile(position.X, position.Y, (int)((double)speedX * 1.2), (int)((double)speedY * 1.2), ModContent.ProjectileType(), (int)(damage * 1.8), knockBack, Main.myPlayer); Main.projectile[p].Calamity().stealthStrike = true; if (Main.rand.NextBool(3)) { diff --git a/Items/Weapons/Summon/BlackHawkRemote.cs b/Items/Weapons/Summon/BlackHawkRemote.cs index d49220df7b..e74032c5d8 100644 --- a/Items/Weapons/Summon/BlackHawkRemote.cs +++ b/Items/Weapons/Summon/BlackHawkRemote.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Projectiles.Summon; namespace CalamityMod.Items.Weapons.Summon { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 30; + item.damage = 36; item.mana = 10; item.width = 46; item.height = 28; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 7209095ab7..713aca33c0 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -5,6 +5,16 @@ using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Healing; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles { @@ -553,8 +563,8 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ProjectileID.Mushroom] < 30) { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || - projectile.type == ModContent.ProjectileType() || projectile.type == ProjectileID.SolarWhipSword) + if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() || projectile.type == ProjectileID.SolarWhipSword) { Vector2 vector24 = Main.OffsetsPlayerOnhand[Main.player[projectile.owner].bodyFrame.Y / 56] * 2f; if (Main.player[projectile.owner].direction != 1) @@ -629,7 +639,7 @@ namespace CalamityMod.Projectiles //will always be friendly and rogue if it has this boost if (Main.player[projectile.owner].Calamity().momentumCapacitor && projectile.Calamity().momentumCapacitatorBoost) { - if (projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType() && + if (projectile.type != ModContent.ProjectileType() && projectile.type != ModContent.ProjectileType() && projectile.velocity.Length() < 3f) projectile.velocity *= 1.025f; } @@ -655,7 +665,7 @@ namespace CalamityMod.Projectiles //Summon moon sigils infrequently if (Main.rand.NextBool(300) && projectile.type != ModContent.ProjectileType()) { - Projectile.NewProjectile(projectile.position, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.05), 0, projectile.owner); + Projectile.NewProjectile(projectile.position, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.2), 0, projectile.owner); } } } diff --git a/Projectiles/Ranged/PolarStar.cs b/Projectiles/Ranged/PolarStar.cs index fe0a6206f6..73c15746f8 100644 --- a/Projectiles/Ranged/PolarStar.cs +++ b/Projectiles/Ranged/PolarStar.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; +using CalamityMod.Buffs.StatBuffs; namespace CalamityMod.Projectiles.Ranged { public class PolarStar : ModProjectile @@ -204,9 +205,16 @@ namespace CalamityMod.Projectiles.Ranged } } + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(projectile.position + projectile.velocity, projectile.velocity, projectile.width, projectile.height); + Main.PlaySound(0, projectile.position); + return true; + } + public override void Kill(int timeLeft) { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62); + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 62,0.5f); if (projectile.ai[1] == 1f) //Boost two { int projectiles = Main.rand.Next(2, 5); diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index e6ce305d13..7901f06824 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -4,6 +4,7 @@ using System; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Items.Weapons.Rogue; namespace CalamityMod.Projectiles.Rogue { @@ -84,6 +85,9 @@ namespace CalamityMod.Projectiles.Rogue BlastBarrel.BaseDamage, 1f, projectile.owner); Main.projectile[fireIndex].thrown = false; Main.projectile[fireIndex].Calamity().rogue = true; + Main.projectile[fireIndex].penetrate = -1; + Main.projectile[fireIndex].usesLocalNPCImmunity = true; + Main.projectile[fireIndex].localNPCHitCooldown = -1; } } projectile.ai[1]--; diff --git a/Projectiles/Rogue/GacruxianProj.cs b/Projectiles/Rogue/GacruxianProj.cs index c15819efaa..56cb3641e8 100644 --- a/Projectiles/Rogue/GacruxianProj.cs +++ b/Projectiles/Rogue/GacruxianProj.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Dusts; +using CalamityMod.Projectiles.Melee; namespace CalamityMod.Projectiles.Rogue { @@ -36,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike == true) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.75), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.3), projectile.knockBack, projectile.owner, 0f, 0f); } else { diff --git a/Projectiles/Rogue/KylieBoomerang.cs b/Projectiles/Rogue/KylieBoomerang.cs index 61013c2504..4b7fd44fd9 100644 --- a/Projectiles/Rogue/KylieBoomerang.cs +++ b/Projectiles/Rogue/KylieBoomerang.cs @@ -3,6 +3,7 @@ using System; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Items.Weapons.Rogue; namespace CalamityMod.Projectiles.Rogue { @@ -52,9 +53,9 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = true; //Decide the range of the boomerang depending on stealth if (projectile.Calamity().stealthStrike) - ReboundTime = 25f; + ReboundTime = 27f; else - ReboundTime = 50f; + ReboundTime = 55f; // ai[0] stores whether the boomerang is returning. If 0, it isn't. If 1, it is. if (projectile.ai[0] == 0f) diff --git a/Projectiles/Rogue/MonkeyDart.cs b/Projectiles/Rogue/MonkeyDart.cs index 5e33e05e0e..414589bd5b 100644 --- a/Projectiles/Rogue/MonkeyDart.cs +++ b/Projectiles/Rogue/MonkeyDart.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Items.Weapons.Rogue; namespace CalamityMod.Projectiles.Rogue { @@ -24,6 +25,8 @@ namespace CalamityMod.Projectiles.Rogue drawOffsetX = -10; drawOriginOffsetY = 0; drawOriginOffsetX = 0; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 40; projectile.extraUpdates = 1; projectile.Calamity().rogue = true; } diff --git a/Projectiles/Rogue/MoonSigil.cs b/Projectiles/Rogue/MoonSigil.cs index 37b856e5da..47f621db03 100644 --- a/Projectiles/Rogue/MoonSigil.cs +++ b/Projectiles/Rogue/MoonSigil.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; +using System; namespace CalamityMod.Projectiles.Rogue { public class MoonSigil : ModProjectile @@ -22,14 +23,77 @@ namespace CalamityMod.Projectiles.Rogue projectile.ignoreWater = true; projectile.timeLeft = 250; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 2; + projectile.localNPCHitCooldown = 10; projectile.Calamity().rogue = true; } public override void AI() { - if (projectile.timeLeft < 25) - { projectile.alpha += 10; } + if (projectile.timeLeft < 52) + { + projectile.alpha += 5; + projectile.scale -= 0.013f; + } + if (projectile.alpha >= 255) + { + projectile.alpha = 255; + projectile.Kill(); + return; + } + + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 600f; + bool flag17 = false; + for (int num475 = 0; num475 < 200; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + if (flag17) + { + float num483 = 8f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + } + } + + public override void Kill(int timeLeft) + { + float dustSp = 0.2f; + int dustD = 0; + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 5; j++) + { + Vector2 dustspeed = new Vector2(dustSp, dustSp).RotatedBy(MathHelper.ToRadians(dustD)); + int d = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 31, dustspeed.X, dustspeed.Y, 200, new Color(213, 242, 232, 200), 1f); + Main.dust[d].noGravity = true; + Main.dust[d].position = projectile.Center; + Main.dust[d].velocity = dustspeed; + dustSp += 0.2f; + } + dustD += 90; + dustSp = 0.2f; + } } public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index 40a7744d87..fefab71f13 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -4,6 +4,7 @@ using System; using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Buffs.Summon; namespace CalamityMod.Projectiles.Summon { public class BlackHawkSummon : ModProjectile diff --git a/Projectiles/Typeless/MomentumCapacitorOrb.cs b/Projectiles/Typeless/MomentumCapacitorOrb.cs index 9f912f6f4b..87a2b09518 100644 --- a/Projectiles/Typeless/MomentumCapacitorOrb.cs +++ b/Projectiles/Typeless/MomentumCapacitorOrb.cs @@ -1,6 +1,8 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Rogue; namespace CalamityMod.Projectiles.Typeless { public class MomentumCapacitorOrb : ModProjectile @@ -24,6 +26,10 @@ namespace CalamityMod.Projectiles.Typeless } public override void AI() { + Player player = Main.player[Main.myPlayer]; + CalamityPlayer modPlayer = player.Calamity(); + if (!modPlayer.momentumCapacitor) + projectile.Kill(); if (Main.rand.NextBool(4)) { float numDust = MathHelper.TwoPi * Radius / 5f;