diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index e33fae728e..47dc13d52e 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items { ItemID.BeeKeeper, Do(UseTurn, ScaleRatio(1.5f), DamageExact(60)) }, { ItemID.BeesKnees, Do(PointBlank, DamageExact(18), UseExact(38)) }, { ItemID.BladedGlove, Do(DamageExact(15), UseExact(7)) }, - { ItemID.BladeofGrass, Do(AutoReuse, UseTurn, ScaleRatio(1.8f), DamageExact(45), UseExact(33)) }, + { ItemID.BladeofGrass, Do(AutoReuse, UseTurn, ScaleRatio(1.8f), DamageExact(35)) }, { ItemID.Bladetongue, Do(UseTurn, UseRatio(0.8f), DamageExact(120), ScaleRatio(1.75f)) }, { ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) }, { ItemID.BloodButcherer, Do(AutoReuse, UseTurn, DamageRatio(1.66f), ScaleRatio(1.4f)) }, @@ -188,7 +188,7 @@ namespace CalamityMod.Items { ItemID.Excalibur, Do(UseTurn, ScaleRatio(1.5f), UseRatio(0.8f), DamageExact(125), UseAnimationExact(45)) }, { ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, { ItemID.FalconBlade, Do(UseTurn, ScaleRatio(1.5f), DamageExact(35), UseExact(15)) }, - { ItemID.FieryGreatsword, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(90), UseExact(45)) }, + { ItemID.FieryGreatsword, Do(AutoReuse, UseTurn, ScaleRatio(1.5f), DamageExact(72), UseExact(45)) }, { ItemID.FireWhip, autoReuse }, // Unsure what to do with Celebration. Should it be treated as a serious weapon or not? Currently not changing it from vanilla. // { ItemID.FireworksLauncher, Do(DamageRatio(2f)) }, // Celebration diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs index 4aefa9a03f..4d4e957344 100644 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.width = 43; Item.height = 24; Item.DamageType = DamageClass.Magic; - Item.damage = 43; + Item.damage = 50; Item.knockBack = 1f; Item.useTime = 2; Item.useAnimation = 2; diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.cs b/Items/Weapons/DraedonsArsenal/GaussPistol.cs index a665a73bdd..9a30797144 100644 --- a/Items/Weapons/DraedonsArsenal/GaussPistol.cs +++ b/Items/Weapons/DraedonsArsenal/GaussPistol.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.height = 22; Item.DamageType = DamageClass.Magic; Item.mana = 6; - Item.damage = 110; + Item.damage = 150; Item.knockBack = 11f; Item.useTime = Item.useAnimation = 20; Item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/MatterModulator.cs b/Items/Weapons/DraedonsArsenal/MatterModulator.cs index 4391a4c42e..4ca22fd0c1 100644 --- a/Items/Weapons/DraedonsArsenal/MatterModulator.cs +++ b/Items/Weapons/DraedonsArsenal/MatterModulator.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.width = 40; Item.height = 22; Item.DamageType = DamageClass.Ranged; - Item.damage = 84; + Item.damage = 100; Item.knockBack = 11f; Item.useTime = Item.useAnimation = 33; Item.autoReuse = true; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 7f; + Item.shootSpeed = 12f; modItem.UsesCharge = true; modItem.MaxCharge = 85f; diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index 250bd4543a..464540877a 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.height = 26; Item.DamageType = DamageClass.Summon; Item.sentry = true; - Item.damage = 100; + Item.damage = 150; Item.knockBack = 0f; Item.mana = 10; Item.useTime = Item.useAnimation = 24; diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index bfaaf9a316..f395d1a752 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal CalamityGlobalItem modItem = Item.Calamity(); Item.shootSpeed = 10f; - Item.damage = 36; + Item.damage = 65; Item.mana = 12; Item.width = 38; Item.height = 24; diff --git a/Items/Weapons/Magic/AcidGun.cs b/Items/Weapons/Magic/AcidGun.cs index f56ff7018e..1ac36ecd0f 100644 --- a/Items/Weapons/Magic/AcidGun.cs +++ b/Items/Weapons/Magic/AcidGun.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 17; + Item.damage = 28; Item.DamageType = DamageClass.Magic; Item.mana = 9; Item.width = 42; @@ -41,10 +41,30 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - for (int i = 0; i < 3; i++) + float angle = MathHelper.Lerp(-0.145f, 0.145f, 1f / 3f); + int acid1 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI); + + angle = MathHelper.Lerp(-0.145f, 0.145f, 2f / 3f); + int acid2 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI); + + angle = MathHelper.Lerp(-0.145f, 0.145f, 1f); + int acid3 = Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI); + + // Keep track of the other 2 acid streams + if (Main.projectile.IndexInRange(acid1)) { - float angle = MathHelper.Lerp(-0.145f, 0.145f, i / 3f); - Projectile.NewProjectile(source, position, velocity.RotatedBy(angle), type, damage, knockback, player.whoAmI); + Main.projectile[acid1].ai[0] = acid2; + Main.projectile[acid1].ai[1] = acid3; + } + if (Main.projectile.IndexInRange(acid2)) + { + Main.projectile[acid2].ai[0] = acid1; + Main.projectile[acid2].ai[1] = acid3; + } + if (Main.projectile.IndexInRange(acid3)) + { + Main.projectile[acid3].ai[0] = acid1; + Main.projectile[acid3].ai[1] = acid2; } return false; } diff --git a/Items/Weapons/Magic/ClothiersWrath.cs b/Items/Weapons/Magic/ClothiersWrath.cs index 167ca07d14..a743739f87 100644 --- a/Items/Weapons/Magic/ClothiersWrath.cs +++ b/Items/Weapons/Magic/ClothiersWrath.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 38; + Item.damage = 80; Item.DamageType = DamageClass.Magic; Item.mana = 15; Item.width = 28; @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item8; Item.autoReuse = true; Item.shoot = ProjectileID.ClothiersCurse; - Item.shootSpeed = 6f; + Item.shootSpeed = 9f; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/FaceMelter.cs b/Items/Weapons/Magic/FaceMelter.cs index c382960e4b..a05aec18fc 100644 --- a/Items/Weapons/Magic/FaceMelter.cs +++ b/Items/Weapons/Magic/FaceMelter.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 140; + Item.damage = 200; Item.DamageType = DamageClass.Magic; Item.mana = 10; Item.width = 56; diff --git a/Items/Weapons/Magic/FrigidflashBolt.cs b/Items/Weapons/Magic/FrigidflashBolt.cs index afd3bbdf78..470dc7fbf3 100644 --- a/Items/Weapons/Magic/FrigidflashBolt.cs +++ b/Items/Weapons/Magic/FrigidflashBolt.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 66; + Item.damage = 80; Item.DamageType = DamageClass.Magic; Item.mana = 13; Item.width = 28; diff --git a/Items/Weapons/Magic/HellwingStaff.cs b/Items/Weapons/Magic/HellwingStaff.cs index 32968ebf0a..04044f7b1a 100644 --- a/Items/Weapons/Magic/HellwingStaff.cs +++ b/Items/Weapons/Magic/HellwingStaff.cs @@ -20,13 +20,13 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 33; + Item.damage = 22; Item.DamageType = DamageClass.Magic; Item.mana = 18; Item.width = 54; Item.height = 52; - Item.useTime = 24; - Item.useAnimation = 24; + Item.useTime = 30; + Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5; diff --git a/Items/Weapons/Magic/Serpentine.cs b/Items/Weapons/Magic/Serpentine.cs index 4395f78c7f..e2f025d9e5 100644 --- a/Items/Weapons/Magic/Serpentine.cs +++ b/Items/Weapons/Magic/Serpentine.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 10; + Item.damage = 14; Item.DamageType = DamageClass.Magic; Item.mana = 20; Item.width = 28; diff --git a/Items/Weapons/Magic/Wingman.cs b/Items/Weapons/Magic/Wingman.cs index b789daef6b..9624e3e4bf 100644 --- a/Items/Weapons/Magic/Wingman.cs +++ b/Items/Weapons/Magic/Wingman.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 49; + Item.damage = 70; Item.DamageType = DamageClass.Magic; Item.mana = 12; Item.width = 42; diff --git a/Items/Weapons/Magic/YharimsCrystal.cs b/Items/Weapons/Magic/YharimsCrystal.cs index 81bc417ec8..2372628920 100644 --- a/Items/Weapons/Magic/YharimsCrystal.cs +++ b/Items/Weapons/Magic/YharimsCrystal.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - Item.damage = 70; + Item.damage = 75; Item.DamageType = DamageClass.Magic; Item.mana = 15; Item.width = 16; diff --git a/Items/Weapons/Melee/CrescentMoon.cs b/Items/Weapons/Melee/CrescentMoon.cs index 65119623f4..ddec72c748 100644 --- a/Items/Weapons/Melee/CrescentMoon.cs +++ b/Items/Weapons/Melee/CrescentMoon.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 16; Item.height = 16; - Item.damage = 300; + Item.damage = 380; Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; diff --git a/Items/Weapons/Melee/FracturedArk.cs b/Items/Weapons/Melee/FracturedArk.cs index 2c4b83d555..d9979dd415 100644 --- a/Items/Weapons/Melee/FracturedArk.cs +++ b/Items/Weapons/Melee/FracturedArk.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee { public float Combo = 1f; public float Charge = 0f; - public static float chargeDamageMultiplier = 1.75f; //Extra damage from charge + public static float chargeDamageMultiplier = 1.5f; //Extra damage from charge public static float beamDamageMultiplier = 0.8f; //Damage multiplier for the charged shots (remember it applies ontop of the charge damage multiplied @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = Item.height = 60; - Item.damage = 80; + Item.damage = 70; Item.DamageType = DamageClass.MeleeNoSpeed; Item.noUseGraphic = true; Item.noMelee = true; diff --git a/Items/Weapons/Melee/GalileoGladius.cs b/Items/Weapons/Melee/GalileoGladius.cs index f459414c46..0502fa7569 100644 --- a/Items/Weapons/Melee/GalileoGladius.cs +++ b/Items/Weapons/Melee/GalileoGladius.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Melee { Item.useStyle = ItemUseStyleID.Rapier; Item.DamageType = TrueMeleeDamageClass.Instance; - Item.useAnimation = 10; - Item.useTime = 10; + Item.useAnimation = 8; + Item.useTime = 8; Item.width = 44; Item.height = 44; Item.damage = 110; @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noUseGraphic = true; Item.noMelee = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 2.4f; + Item.shootSpeed = 0.9f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.rare = ModContent.RarityType(); diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index c8f13151b2..d6782922a1 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee public bool OnHitProc = false; #region stats - public static int BaseDamage = 400; + public static int BaseDamage = 200; public static int WhirlwindAttunement_BaseDamage = 140; public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update diff --git a/Items/Weapons/Melee/TeardropCleaver.cs b/Items/Weapons/Melee/TeardropCleaver.cs index 67ee6bdb18..12011d0ee6 100644 --- a/Items/Weapons/Melee/TeardropCleaver.cs +++ b/Items/Weapons/Melee/TeardropCleaver.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = 56; - Item.damage = 24; + Item.damage = 45; Item.DamageType = DamageClass.Melee; Item.useAnimation = 24; Item.useStyle = ItemUseStyleID.Swing; @@ -27,6 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 66; + Item.scale = 1.5f; Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; } diff --git a/Items/Weapons/Ranged/AntiMaterielRifle.cs b/Items/Weapons/Ranged/AntiMaterielRifle.cs index e384c9cd1c..947bc9e367 100644 --- a/Items/Weapons/Ranged/AntiMaterielRifle.cs +++ b/Items/Weapons/Ranged/AntiMaterielRifle.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 2800; + Item.damage = 1880; Item.DamageType = DamageClass.Ranged; Item.width = 154; Item.height = 40; diff --git a/Items/Weapons/Ranged/ClockworkBow.cs b/Items/Weapons/Ranged/ClockworkBow.cs index d8d2a2b1d9..60165f0a3f 100644 --- a/Items/Weapons/Ranged/ClockworkBow.cs +++ b/Items/Weapons/Ranged/ClockworkBow.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 808; + Item.damage = 770; Item.DamageType = DamageClass.Ranged; Item.width = 48; Item.height = 96; diff --git a/Items/Weapons/Ranged/CrackshotColt.cs b/Items/Weapons/Ranged/CrackshotColt.cs index 8a550fe63e..21c33ff01c 100644 --- a/Items/Weapons/Ranged/CrackshotColt.cs +++ b/Items/Weapons/Ranged/CrackshotColt.cs @@ -1,16 +1,10 @@ using System; -using System.IO; using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; -using Terraria.DataStructures; -using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ModLoader.IO; -using static CalamityMod.CalamityUtils; using CalamityMod.Projectiles.Ranged; namespace CalamityMod.Items.Weapons.Ranged @@ -23,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle BlingHitSound = new("CalamityMod/Sounds/Custom/UltrablingHit") { PitchVariance = 0.5f }; public static float MaxDownwardsAngle4Coin = MathHelper.PiOver4; - public static float RicochetDamageMult = 2f; + public static float RicochetDamageMult = 2.5f; public override void SetStaticDefaults() { @@ -56,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool AltFunctionUse(Player player) => true; public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true; - public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse == 2 ? false : true; + public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse != 2; public override bool CanUseItem(Player player) { diff --git a/Items/Weapons/Ranged/Disseminator.cs b/Items/Weapons/Ranged/Disseminator.cs index d6e4830748..67a67c9530 100644 --- a/Items/Weapons/Ranged/Disseminator.cs +++ b/Items/Weapons/Ranged/Disseminator.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 66; Item.height = 24; - Item.useTime = 23; - Item.useAnimation = 23; + Item.useTime = 30; + Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.5f; diff --git a/Items/Weapons/Ranged/FlakToxicannon.cs b/Items/Weapons/Ranged/FlakToxicannon.cs index 26e59e3193..665ced9a74 100644 --- a/Items/Weapons/Ranged/FlakToxicannon.cs +++ b/Items/Weapons/Ranged/FlakToxicannon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged } public override void SetDefaults() { - Item.damage = 50; + Item.damage = 60; Item.DamageType = DamageClass.Ranged; Item.width = 88; Item.height = 28; @@ -33,16 +33,13 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = SoundID.Item109; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 9f; + Item.shootSpeed = 16f; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { float angle = velocity.ToRotation() + MathHelper.PiOver2; if (angle <= -MathHelper.PiOver4 || angle >= MathHelper.PiOver4) return false; - angle -= MathHelper.PiOver2; - - Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); return false; diff --git a/Items/Weapons/Ranged/Toxibow.cs b/Items/Weapons/Ranged/Toxibow.cs index 87adb73c6e..dcbf2bfc56 100644 --- a/Items/Weapons/Ranged/Toxibow.cs +++ b/Items/Weapons/Ranged/Toxibow.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 5; + Item.damage = 15; Item.DamageType = DamageClass.Ranged; Item.width = 20; Item.height = 54; diff --git a/Items/Weapons/Ranged/Vortexpopper.cs b/Items/Weapons/Ranged/Vortexpopper.cs index 344d235382..2d5aec6788 100644 --- a/Items/Weapons/Ranged/Vortexpopper.cs +++ b/Items/Weapons/Ranged/Vortexpopper.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 46; Item.height = 22; - Item.useTime = 16; - Item.useAnimation = 16; + Item.useTime = 21; + Item.useAnimation = 21; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; diff --git a/Items/Weapons/Summon/BloodClotStaff.cs b/Items/Weapons/Summon/BloodClotStaff.cs index b22d0b5b5b..f8c9811d6c 100644 --- a/Items/Weapons/Summon/BloodClotStaff.cs +++ b/Items/Weapons/Summon/BloodClotStaff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 7; + Item.damage = 16; Item.mana = 10; Item.width = 58; Item.height = 64; diff --git a/Items/Weapons/Summon/DankStaff.cs b/Items/Weapons/Summon/DankStaff.cs index 90f8d3a99a..9f497ad2be 100644 --- a/Items/Weapons/Summon/DankStaff.cs +++ b/Items/Weapons/Summon/DankStaff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 7; + Item.damage = 16; Item.mana = 10; Item.width = 58; Item.height = 58; diff --git a/Items/Weapons/Summon/Perdition.cs b/Items/Weapons/Summon/Perdition.cs index 4000405c2f..e4cdb7d9a9 100644 --- a/Items/Weapons/Summon/Perdition.cs +++ b/Items/Weapons/Summon/Perdition.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 444; + Item.damage = 100; Item.mana = 10; Item.width = Item.height = 56; Item.useTime = Item.useAnimation = 10; // 9 because of useStyle 1 diff --git a/Items/Weapons/Summon/ResurrectionButterfly.cs b/Items/Weapons/Summon/ResurrectionButterfly.cs index 91e5dcc946..99978f5361 100644 --- a/Items/Weapons/Summon/ResurrectionButterfly.cs +++ b/Items/Weapons/Summon/ResurrectionButterfly.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 65; + Item.damage = 55; Item.mana = 10; Item.width = 46; Item.height = 46; diff --git a/Items/Weapons/Summon/TacticalPlagueEngine.cs b/Items/Weapons/Summon/TacticalPlagueEngine.cs index 2907abf72d..9c389d3212 100644 --- a/Items/Weapons/Summon/TacticalPlagueEngine.cs +++ b/Items/Weapons/Summon/TacticalPlagueEngine.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 250; + Item.damage = 200; Item.mana = 10; Item.width = 28; Item.height = 20; diff --git a/Items/Weapons/Summon/WitherBlossomsStaff.cs b/Items/Weapons/Summon/WitherBlossomsStaff.cs index 7e95661189..ea47618675 100644 --- a/Items/Weapons/Summon/WitherBlossomsStaff.cs +++ b/Items/Weapons/Summon/WitherBlossomsStaff.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 61; + Item.damage = 50; Item.mana = 10; Item.width = 52; Item.height = 60; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 094a39c43b..4569acc5a8 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -817,7 +817,7 @@ namespace CalamityMod.NPCs // Cursed Inferno if (npc.onFire2) { - int baseCursedInfernoDoTValue = (int)((npc.oiled ? 62 : 12) * vanillaHeatDamageMult); + int baseCursedInfernoDoTValue = (int)((npc.oiled ? 98 : 48) * vanillaHeatDamageMult); npc.lifeRegen -= baseCursedInfernoDoTValue; if (damage < baseCursedInfernoDoTValue / 4) damage = baseCursedInfernoDoTValue / 4; @@ -983,7 +983,7 @@ namespace CalamityMod.NPCs // Venom if (npc.venom) { - int baseVenomDoTValue = (int)(12 * vanillaSicknessDamageMult); + int baseVenomDoTValue = (int)(60 * vanillaSicknessDamageMult); npc.lifeRegen -= baseVenomDoTValue; if (damage < baseVenomDoTValue / 4) damage = baseVenomDoTValue / 4; @@ -992,7 +992,7 @@ namespace CalamityMod.NPCs // Electrified if (electrified > 0) { - int baseElectrifiedDoTValue = (int)((CalamityPlayer.areThereAnyDamnBosses ? 5 : 10) * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); + int baseElectrifiedDoTValue = (int)(5 * (npc.velocity.X == 0 ? 1 : 4) * electricityDamageMult); ApplyDPSDebuff(baseElectrifiedDoTValue, baseElectrifiedDoTValue / 5, ref npc.lifeRegen, ref damage); } diff --git a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs b/Projectiles/DraedonsArsenal/GatlingLaserShot.cs index fe9360ca7b..10c3653ab9 100644 --- a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs +++ b/Projectiles/DraedonsArsenal/GatlingLaserShot.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -81,11 +81,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.position = Projectile.Center; Projectile.width = Projectile.height = height; Projectile.Center = Projectile.position; - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.Damage(); + Projectile.damage = 0; LaserBurst(2.4f, 4.2f); // 60 dusts diff --git a/Projectiles/Magic/AcidGunStream.cs b/Projectiles/Magic/AcidGunStream.cs index c88d3ca1c9..6250826617 100644 --- a/Projectiles/Magic/AcidGunStream.cs +++ b/Projectiles/Magic/AcidGunStream.cs @@ -1,3 +1,4 @@ +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -27,8 +28,8 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Projectile.ai[1]++; - if (Projectile.ai[1] >= 4f) + Projectile.localAI[1]++; + if (Projectile.localAI[1] >= 4f) { Projectile.tileCollide = true; } @@ -37,12 +38,12 @@ namespace CalamityMod.Projectiles.Magic { Projectile.Kill(); } - if (Projectile.ai[0] <= 3f) + if (Projectile.localAI[0] <= 3f) { - Projectile.ai[0] += 1f; + Projectile.localAI[0] += 1f; return; } - Projectile.velocity.Y = Projectile.velocity.Y + 0.075f; + Projectile.velocity.Y += 0.075f; for (int i = 0; i < 3; i++) { Vector2 positionDelta = Projectile.velocity / 3f * i; @@ -62,5 +63,37 @@ namespace CalamityMod.Projectiles.Magic Main.dust[dustIdx].velocity += Projectile.velocity * 0.5f; } } + + // If any of the streams are destroyed, kill the accompanying acid streams + public override void Kill(int timeLeft) + { + if (Projectile.penetrate > 1) + return; + + if (Main.projectile.IndexInRange((int)Projectile.ai[0])) + { + Projectile proj = Main.projectile[(int)Projectile.ai[0]]; + proj.ai[0] = -1f; + proj.ai[1] = -1f; + proj.Kill(); + } + if (Main.projectile.IndexInRange((int)Projectile.ai[1])) + { + Projectile proj = Main.projectile[(int)Projectile.ai[1]]; + proj.ai[0] = -1f; + proj.ai[1] = -1f; + proj.Kill(); + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } } } diff --git a/Projectiles/Melee/CrescentMoonProj.cs b/Projectiles/Melee/CrescentMoonProj.cs index b75205aaf4..bba8a38c0c 100644 --- a/Projectiles/Melee/CrescentMoonProj.cs +++ b/Projectiles/Melee/CrescentMoonProj.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee } } - CalamityUtils.HomeInOnNPC(Projectile, true, 250f, 12f, 20f); + CalamityUtils.HomeInOnNPC(Projectile, true, 375f, 12f, 20f); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Ranged/SeasSearingSpout.cs b/Projectiles/Ranged/SeasSearingSpout.cs index 07ecbd44fa..20681ef1f8 100644 --- a/Projectiles/Ranged/SeasSearingSpout.cs +++ b/Projectiles/Ranged/SeasSearingSpout.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Ranged Projectile.penetrate = -1; Projectile.alpha = 255; Projectile.timeLeft = 60; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 30; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 30; } public override void AI() diff --git a/Projectiles/Summon/AtlasMunitionsDropPod.cs b/Projectiles/Summon/AtlasMunitionsDropPod.cs index 6ea7986bf0..9445674b41 100644 --- a/Projectiles/Summon/AtlasMunitionsDropPod.cs +++ b/Projectiles/Summon/AtlasMunitionsDropPod.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.frame == 8) { SoundEngine.PlaySound(ThanatosHead.VentSound, Projectile.Top); - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.myPlayer == Projectile.owner) { Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + Vector2.UnitY * 10f, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Top + Vector2.UnitY * 72f, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Projectile.owner); diff --git a/Projectiles/Summon/BloodClotMinion.cs b/Projectiles/Summon/BloodClotMinion.cs index 5d50e1e680..39936b6426 100644 --- a/Projectiles/Summon/BloodClotMinion.cs +++ b/Projectiles/Summon/BloodClotMinion.cs @@ -30,8 +30,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.tileCollide = false; + Projectile.MaxUpdates = 3; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 10; Projectile.DamageType = DamageClass.Summon; } diff --git a/Projectiles/Summon/CosmilampBeam.cs b/Projectiles/Summon/CosmilampBeam.cs index dae8e96b00..dadbf1bc09 100644 --- a/Projectiles/Summon/CosmilampBeam.cs +++ b/Projectiles/Summon/CosmilampBeam.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Summon; Projectile.minionSlots = 0f; - Projectile.penetrate = -1; + Projectile.penetrate = 3; Projectile.MaxUpdates = 3; Projectile.timeLeft = Projectile.MaxUpdates * Lifetime; Projectile.usesLocalNPCImmunity = true; diff --git a/Projectiles/Summon/DankCreeperMinion.cs b/Projectiles/Summon/DankCreeperMinion.cs index 8f861eb609..0292967d8d 100644 --- a/Projectiles/Summon/DankCreeperMinion.cs +++ b/Projectiles/Summon/DankCreeperMinion.cs @@ -30,8 +30,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.tileCollide = false; + Projectile.MaxUpdates = 3; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 10; Projectile.DamageType = DamageClass.Summon; } diff --git a/Projectiles/Summon/IceClasperMinion.cs b/Projectiles/Summon/IceClasperMinion.cs index 46cb8f35c0..dedec97187 100644 --- a/Projectiles/Summon/IceClasperMinion.cs +++ b/Projectiles/Summon/IceClasperMinion.cs @@ -36,6 +36,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.minion = true; Projectile.coldDamage = true; Projectile.DamageType = DamageClass.Summon; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 16; } public override void AI() @@ -81,7 +83,7 @@ namespace CalamityMod.Projectiles.Summon } } - Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 40f, 9f, 4f, new Vector2(0f, -60f), 40f, 9f, true, true); + Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 12f, 9f, 4f, new Vector2(0f, -60f), 12f, 18f, true, true, 2); Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; } diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index d759068f09..28bba5d814 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -133,6 +133,8 @@ namespace CalamityMod.Projectiles.Summon projectile.netSpam = 59; } + projectile.extraUpdates = head.extraUpdates; + MechwormHead headModProj = head.ModProjectile(); if (headModProj.EndRiftGateUUID == -1) { diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index bf6759b1e3..476f211cbb 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -36,9 +36,6 @@ namespace CalamityMod.Projectiles.Summon internal ref float Time => ref Projectile.ai[1]; internal ref float TotalWormSegments => ref Projectile.localAI[0]; - private static bool Use_TML_0_11_7_7_Hacky_Netcode = false; - - // Helper functions because Mechworm does a lot of checking for either itself or its target being near the edge of the world. private static Vector2 WorldTopLeft(int tileDist = 15) => new Vector2(tileDist * 16f); private static Vector2 WorldBottomRight(int tileDist = 15) => new Vector2(Main.maxTilesX - tileDist, Main.maxTilesY - tileDist) * 16f; @@ -73,12 +70,6 @@ namespace CalamityMod.Projectiles.Summon #region Syncing public override void SendExtraAI(BinaryWriter writer) { - // TODO -- remove when TML updates to 0.11.7.8 - // TML 0.11.7.7 SPECIFIC FIX (because they were too slow to update): Write an extra UUID here. - // This is necessary because NetMessage case 27 and MessageBuffer case 27 are out of order with each other. - if (Use_TML_0_11_7_7_Hacky_Netcode) - writer.Write((short)Projectile.projUUID); - byte enumByte = (byte)CurrentAttackState; writer.Write(enumByte); writer.Write(AttackStateTimer); @@ -88,6 +79,7 @@ namespace CalamityMod.Projectiles.Summon writer.Write(EndRiftGateUUID); writer.WriteVector2(TeleportStartingPoint); writer.WriteVector2(TeleportEndingPoint); + writer.Write(Projectile.extraUpdates); } public override void ReceiveExtraAI(BinaryReader reader) @@ -100,12 +92,7 @@ namespace CalamityMod.Projectiles.Summon EndRiftGateUUID = reader.ReadInt32(); TeleportStartingPoint = reader.ReadVector2(); TeleportEndingPoint = reader.ReadVector2(); - - // TODO -- remove when TML updates to 0.11.7.8 - // TML 0.11.7.7 SPECIFIC FIX (because they were too slow to update): Read and dump an extra UUID here. - // This is necessary because NetMessage case 27 and MessageBuffer case 27 are out of order with each other. - if (Use_TML_0_11_7_7_Hacky_Netcode) - _ = reader.ReadInt16(); + Projectile.extraUpdates = reader.ReadInt32(); } #endregion @@ -172,10 +159,10 @@ namespace CalamityMod.Projectiles.Summon } // Mechworm has an extremely generous default aggro range of 2200, but if it's already attacking, its bloodlust is insatiable. - NPC potentialTarget = Projectile.Center.MinionHoming(AttackStateTimer > 0 ? 999999f : 2200f, owner); + NPC potentialTarget = Projectile.Center.MinionHoming(AttackStateTimer > 0 ? 999999f : 2800f, owner); // Teleport to the player if the worm is very far away from them. - if (Projectile.Distance(owner.Center) > 2700f) + if (Projectile.Distance(owner.Center) > 3850f) { Projectile.Center = owner.Center; // Reset the worm's velocity when it returns to the player so that it doesn't instantly yeet off somewhere. @@ -191,6 +178,7 @@ namespace CalamityMod.Projectiles.Summon else PortalAttackMovement(potentialTarget); UpdateAttackStates(); + Projectile.extraUpdates = 1; } // Attacking movement can be canceled, so if it was, run the passive movement instead. else @@ -215,6 +203,8 @@ namespace CalamityMod.Projectiles.Summon private void PlayerFollowMovement(Player owner) { + Projectile.extraUpdates = 0; + // Reset the gate UUID from any previous teleports. if (EndRiftGateUUID != -1) { @@ -250,7 +240,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.velocity.Y -= 0.1f; // The worm's max speed is more strictly capped for the first few seconds. - float maxSpeed = Time < StartupLethargy ? 13f : 25f; + float maxSpeed = Time < StartupLethargy ? 6.5f : 25f; if (Projectile.velocity.Length() > maxSpeed) Projectile.velocity = Vector2.Normalize(Projectile.velocity) * maxSpeed; } diff --git a/Projectiles/Summon/SmallSkeletonMinion.cs b/Projectiles/Summon/SmallSkeletonMinion.cs index 7cd04a1f35..94fa408354 100644 --- a/Projectiles/Summon/SmallSkeletonMinion.cs +++ b/Projectiles/Summon/SmallSkeletonMinion.cs @@ -35,6 +35,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.DamageType = DamageClass.Summon; + Projectile.MaxUpdates = 2; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 15; } public override void SendExtraAI(BinaryWriter writer) { diff --git a/Projectiles/Summon/Spikecrag.cs b/Projectiles/Summon/Spikecrag.cs index 8a23f1eb93..d9e90f8aed 100644 --- a/Projectiles/Summon/Spikecrag.cs +++ b/Projectiles/Summon/Spikecrag.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.ai[1] += 1f; if ((Projectile.ai[1] % 10f) == 0f) { - int amount = Main.rand.Next(5, 8); + int amount = Main.rand.Next(2, 4); for (int i = 0; i < amount; i++) { float velocityX = Main.rand.NextFloat(-10f, 10f);