diff --git a/Balancing/IBalancingRule.cs b/Balancing/IBalancingRule.cs index 0c61b1cae3..daaffe5eed 100644 --- a/Balancing/IBalancingRule.cs +++ b/Balancing/IBalancingRule.cs @@ -8,4 +8,4 @@ namespace CalamityMod.Balancing void ApplyBalancingChange(NPC npc, ref int damage); } -} \ No newline at end of file +} diff --git a/Buffs/DamageOverTime/Shred.cs b/Buffs/DamageOverTime/Shred.cs index a631ae11cb..191ab15d18 100644 --- a/Buffs/DamageOverTime/Shred.cs +++ b/Buffs/DamageOverTime/Shred.cs @@ -9,11 +9,11 @@ namespace CalamityMod.Buffs.DamageOverTime public class Shred : ModBuff { internal const int StackFalloffFrames = 320; - + // 75 DPS (15x5) per stack may seem low, but it gets boosted by ranged stats and can supercrit. internal static int BaseDamage = 15; internal static int FramesPerDamageTick = 12; - + public override void SetDefaults() { DisplayName.SetDefault("Shred"); diff --git a/Buffs/DamageOverTime/SulphuricPoisoning.cs b/Buffs/DamageOverTime/SulphuricPoisoning.cs index 3ce4eab8ad..9868b44a29 100644 --- a/Buffs/DamageOverTime/SulphuricPoisoning.cs +++ b/Buffs/DamageOverTime/SulphuricPoisoning.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.DamageOverTime public override void SetDefaults() { DisplayName.SetDefault("Sulphuric Poisoning"); - Description.SetDefault("The acidic water burns away your flesh"); + Description.SetDefault("The acidic water burns away your flesh"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; diff --git a/Buffs/DamageOverTime/VulnerabilityHex.cs b/Buffs/DamageOverTime/VulnerabilityHex.cs index 46d814c744..c7a9bbab20 100644 --- a/Buffs/DamageOverTime/VulnerabilityHex.cs +++ b/Buffs/DamageOverTime/VulnerabilityHex.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Buffs.DamageOverTime public const int CalamityDuration = 24; public const int AflameDuration = 120; - + public override void SetDefaults() { DisplayName.SetDefault("Vulnerability Hex"); diff --git a/Buffs/Pets/LittleLightBuff.cs b/Buffs/Pets/LittleLightBuff.cs index e1d860ee05..ecce8e35fd 100644 --- a/Buffs/Pets/LittleLightBuff.cs +++ b/Buffs/Pets/LittleLightBuff.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Buffs.Pets player.Calamity().littleLightPet = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; - if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) + if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) Projectile.NewProjectile(player.Center, -Vector2.UnitY * 10f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); } } diff --git a/Buffs/Pets/ReaverOrbBuff.cs b/Buffs/Pets/ReaverOrbBuff.cs index b6c243e9aa..93a3e04085 100644 --- a/Buffs/Pets/ReaverOrbBuff.cs +++ b/Buffs/Pets/ReaverOrbBuff.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Buffs.Pets } } } -} \ No newline at end of file +} diff --git a/Buffs/Potions/BaguetteBuff.cs b/Buffs/Potions/BaguetteBuff.cs index b37c916aa0..3fa791524d 100644 --- a/Buffs/Potions/BaguetteBuff.cs +++ b/Buffs/Potions/BaguetteBuff.cs @@ -20,4 +20,4 @@ namespace CalamityMod.Buffs.Potions player.Calamity().baguette = true; } } -} \ No newline at end of file +} diff --git a/Buffs/StatBuffs/ProfanedCrystalBuff.cs b/Buffs/StatBuffs/ProfanedCrystalBuff.cs index 66222340ed..1f879de370 100644 --- a/Buffs/StatBuffs/ProfanedCrystalBuff.cs +++ b/Buffs/StatBuffs/ProfanedCrystalBuff.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Buffs.StatBuffs { - public class ProfanedCrystalBuff : ModBuff + public class ProfanedCrystalBuff : ModBuff { public override void SetDefaults() { @@ -42,7 +42,7 @@ namespace CalamityMod.Buffs.StatBuffs bool offense = (Main.dayTime && !player.wet) || player.lavaWet; bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5); tip = "You are an emissary of the profaned goddess now!\n" + - (offense ? "The " + (Main.dayTime ? "light of the sun" : "heat of the lava") + " empowers your offensive capabilities" : + (offense ? "The " + (Main.dayTime ? "light of the sun" : "heat of the lava") + " empowers your offensive capabilities" : "The " + (player.wet ? (player.honeyWet ? "honey cools" : "water douses") : "darkness of night cools") + " your flames, empowering your defensive capabilities") + (enrage ? "\nYour weakened life force fuels your desperate attacks" : ""); } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 81c24bf49f..55ea23bc60 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2742,7 +2742,7 @@ namespace CalamityMod.CalPlayer ZoneAbyssLayer4 = ZoneAbyss && point.Y > (Main.rockLayer + y * 0.26); - + ZoneSulphur = (CalamityWorld.sulphurTiles >= 300 || (player.ZoneOverworldHeight && sulphurPosX)) && !ZoneAbyss; //Overriding 1.4's ass req boosts @@ -3244,7 +3244,7 @@ namespace CalamityMod.CalPlayer rage = 0f; gaelRageAttackCooldown = CalamityUtils.SecondsToFrames(GaelsGreatsword.SkullsplosionCooldownSeconds); } - + // Activating Rage Mode if (rage >= rageMax && !rageModeActive) { @@ -4398,7 +4398,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxProjectiles; i++) { Projectile projectile = Main.projectile[i]; - if ((projectile.minionSlots <= 0f && !CalamityLists.ZeroMinionSlotExceptionList.Contains(projectile.type)) || !projectile.minion || + if ((projectile.minionSlots <= 0f && !CalamityLists.ZeroMinionSlotExceptionList.Contains(projectile.type)) || !projectile.minion || projectile.owner != player.whoAmI || !projectile.active || CalamityLists.MinionsToNotResurrectList.Contains(projectile.type)) continue; @@ -4713,7 +4713,7 @@ namespace CalamityMod.CalPlayer PendingProjectilesToRespawn[i].SummonCopy(player.whoAmI); - + // Apply vanilla buffs as usual to the player. if (VanillaMinionBuffRelationship.ContainsKey(PendingProjectilesToRespawn[i].Type)) player.AddBuff(VanillaMinionBuffRelationship[PendingProjectilesToRespawn[i].Type], 3600); @@ -5782,7 +5782,7 @@ namespace CalamityMod.CalPlayer if (daedalusReflect && !disableAllDodges && !projRefRare && !player.HasCooldown(GlobalDodge.ID)) projectileDamageReduction += 0.5; } - + if (beeResist) { @@ -9060,7 +9060,7 @@ namespace CalamityMod.CalPlayer * DGS = (100% + 1% * T) * EM = (100% + 1% * T) * 1.0084^T * BOTH = (100% + 1.5% * T) * 1.0084^T - * + * * DGS alone caps in 100 frames * EM alone caps in 41 frames * Both together caps in 32 frames @@ -10106,7 +10106,7 @@ namespace CalamityMod.CalPlayer private int HandlePSCAnimationFrames(AnimationType newType) { - int key = profanedCrystalAnimCounter.Key; //0-based indexing + int key = profanedCrystalAnimCounter.Key; //0-based indexing int value = profanedCrystalAnimCounter.Value - 1; AnimationType currentType = key < 8 ? AnimationType.Idle : key == 8 ? AnimationType.Jump : AnimationType.Walk; diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 9ead663ca7..49e334fc06 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -97,7 +97,7 @@ namespace CalamityMod.CalPlayer Player drawPlayer = drawInfo.drawPlayer; CalamityPlayer modPlayer = drawPlayer.Calamity(); - + modPlayer.ProvidenceBurnEffectDrawer.DrawSet(drawPlayer.Bottom - Vector2.UnitY * 10f); modPlayer.ProvidenceBurnEffectDrawer.SpawnAreaCompactness = 18f; modPlayer.ProvidenceBurnEffectDrawer.RelativePower = 0.4f; @@ -405,7 +405,7 @@ namespace CalamityMod.CalPlayer currentlyHeldItem.type == ModContent.ItemType() || currentlyHeldItem.type == ModContent.ItemType() || currentlyHeldItem.type == ModContent.ItemType() || - currentlyHeldItem.type == ModContent.ItemType() || + currentlyHeldItem.type == ModContent.ItemType() || (currentlyHeldItem.type == ModContent.ItemType() && currentlyHeldItem.useStyle == ItemUseStyleID.SwingThrow)) { Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/ExcelsusGlow"); @@ -542,7 +542,7 @@ namespace CalamityMod.CalPlayer } } }); - + public static readonly PlayerLayer ForbiddenCircletSign = new PlayerLayer("CalamityMod", "ForbiddenSigil", PlayerLayer.BackAcc, drawInfo => { DrawData drawData = new DrawData(); @@ -680,10 +680,10 @@ namespace CalamityMod.CalPlayer (itemDrawPosition - Main.screenPosition + drawOffset).Floor(), new Rectangle?(rectangle), Color.White, - drawPlayer.itemRotation, + drawPlayer.itemRotation, origin, drawPlayer.inventory[drawPlayer.selectedItem].scale, - effect, + effect, 0)); } }); @@ -850,7 +850,7 @@ namespace CalamityMod.CalPlayer list[list.IndexOf(PlayerLayer.ShoeAcc)].visible = false; if (player.Calamity().fab || player.Calamity().crysthamyr || player.Calamity().onyxExcavator) - AddPlayerLayer(list, clAfterAll, list[list.Count - 1], false); + AddPlayerLayer(list, clAfterAll, list[list.Count - 1], false); if (player.heldProj != -1 && Main.projectile[player.heldProj].active && Main.projectile[player.heldProj].type == ModContent.ProjectileType()) list.Insert(list.IndexOf(PlayerLayer.Arms), DrawRancorBookManually); diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 0048966e4a..548ab962e3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3885,7 +3885,7 @@ namespace CalamityMod.CalPlayer // 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50% if (player.endurance > 0f) player.endurance = 1f - (1f / (1f + player.endurance)); - + // Do not apply reduced aggro if there are any bosses alive and it's singleplayer if (areThereAnyDamnBosses && Main.netMode == NetmodeID.SinglePlayer) { @@ -3950,8 +3950,8 @@ namespace CalamityMod.CalPlayer armorPenetrationStat = player.armorPenetration; moveSpeedStat = (int)((player.moveSpeed - 1f) * 100f); wingFlightTimeStat = player.wingTimeMax / 60f; - float trueJumpSpeedBoost = player.jumpSpeedBoost + - (player.wereWolf ? 0.2f : 0f) + + float trueJumpSpeedBoost = player.jumpSpeedBoost + + (player.wereWolf ? 0.2f : 0f) + (player.jumpBoost ? 0.75f : 0f); jumpSpeedStat = trueJumpSpeedBoost * 20f; rageDamageStat = (int)(100D * RageDamageBoost); diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 4f36a12ce2..8d84629f6f 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -377,4 +377,4 @@ namespace CalamityMod } } } -} \ No newline at end of file +} diff --git a/CalamityNetcode.cs b/CalamityNetcode.cs index 5115279d57..2ed44b4f9b 100644 --- a/CalamityNetcode.cs +++ b/CalamityNetcode.cs @@ -143,9 +143,9 @@ namespace CalamityMod (Main.npc[npcIndex4].modNPC as Providence).challenge = reader.ReadBoolean(); break; - // + // // General syncs for entities - // + // case CalamityModMessageType.SpawnNPCOnPlayer: x = reader.ReadInt32(); @@ -241,9 +241,9 @@ namespace CalamityMod CalamityWorld.encounteredOldDuke = reader.ReadBoolean(); break; - // + // // Draedon Summoner stuff - // + // case CalamityModMessageType.CodebreakerSummonStuff: CalamityWorld.DraedonSummonCountdown = reader.ReadInt32(); CalamityWorld.DraedonSummonPosition = reader.ReadVector2(); diff --git a/Cooldowns/AquaticHeartIceShield.cs b/Cooldowns/AquaticHeartIceShield.cs index 9f2511c275..80b191881e 100644 --- a/Cooldowns/AquaticHeartIceShield.cs +++ b/Cooldowns/AquaticHeartIceShield.cs @@ -14,4 +14,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(124, 195, 214); public override Color CooldownEndColor => new Color(147, 230, 253); } -} \ No newline at end of file +} diff --git a/Cooldowns/BloodflareFrenzy.cs b/Cooldowns/BloodflareFrenzy.cs index 0e1b133306..8a1ac1191f 100644 --- a/Cooldowns/BloodflareFrenzy.cs +++ b/Cooldowns/BloodflareFrenzy.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => Color.Lerp(new Color(149, 127, 109), new Color(220, 101, 101), 1 - instance.Completion); public override Color CooldownEndColor => Color.Lerp(new Color(149, 127, 109), new Color(220, 101, 101), 1 - instance.Completion); } -} \ No newline at end of file +} diff --git a/Cooldowns/BloodflareRangedSet.cs b/Cooldowns/BloodflareRangedSet.cs index 0844a47ccb..c66ea5aa46 100644 --- a/Cooldowns/BloodflareRangedSet.cs +++ b/Cooldowns/BloodflareRangedSet.cs @@ -15,4 +15,4 @@ namespace CalamityMod.Cooldowns public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/BloodflareRangerRecharge"); } -} \ No newline at end of file +} diff --git a/Cooldowns/BrimflameFrenzy.cs b/Cooldowns/BrimflameFrenzy.cs index df0606856b..11d5bd4e7f 100644 --- a/Cooldowns/BrimflameFrenzy.cs +++ b/Cooldowns/BrimflameFrenzy.cs @@ -29,4 +29,4 @@ namespace CalamityMod.Cooldowns spriteBatch.Draw(sprite, position, null, Color.Crimson * opacity * (1 - instance.Completion), 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f); } } -} \ No newline at end of file +} diff --git a/Cooldowns/ChaosState.cs b/Cooldowns/ChaosState.cs index 52778ebc5b..e8a9aecc9a 100644 --- a/Cooldowns/ChaosState.cs +++ b/Cooldowns/ChaosState.cs @@ -49,4 +49,4 @@ namespace CalamityMod.Cooldowns } } } -} \ No newline at end of file +} diff --git a/Cooldowns/Cooldown.cs b/Cooldowns/Cooldown.cs index f5d43fca4d..8c674a4b6e 100644 --- a/Cooldowns/Cooldown.cs +++ b/Cooldowns/Cooldown.cs @@ -19,7 +19,7 @@ netID = nid; } } - + // Cooldowns are nothing other than identifiers. They serve as a minimal identification interface that is netcode compatible. // Everything else is handled by one of the following two types: // - CooldownInstance (if a player has a cooldown, this is what they have) diff --git a/Cooldowns/CooldownInstance.cs b/Cooldowns/CooldownInstance.cs index 213f104be2..510fcb7bb8 100644 --- a/Cooldowns/CooldownInstance.cs +++ b/Cooldowns/CooldownInstance.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Cooldowns /// This is used to look up gameplay behavior and rendering behavior as the cooldown instance is used in the game engine. /// internal ushort netID; - + /// /// The player that the cooldown is applying to /// diff --git a/Cooldowns/CounterScarf.cs b/Cooldowns/CounterScarf.cs index ff69ffd9ce..4ba9512cfc 100644 --- a/Cooldowns/CounterScarf.cs +++ b/Cooldowns/CounterScarf.cs @@ -15,4 +15,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(194, 75, 97); public override Color CooldownEndColor => new Color(255, 76, 76); } -} \ No newline at end of file +} diff --git a/Cooldowns/DivineBless.cs b/Cooldowns/DivineBless.cs index 8d093c57b8..e96f272f46 100644 --- a/Cooldowns/DivineBless.cs +++ b/Cooldowns/DivineBless.cs @@ -21,4 +21,4 @@ namespace CalamityMod.Cooldowns Projectile.NewProjectile(instance.player.Center, Vector2.Zero, ProjectileType(), 0, 0f, instance.player.whoAmI); } } -} \ No newline at end of file +} diff --git a/Cooldowns/DivingSuitCooldowns.cs b/Cooldowns/DivingSuitCooldowns.cs index 84ce6daf71..04d1fd7df5 100644 --- a/Cooldowns/DivingSuitCooldowns.cs +++ b/Cooldowns/DivingSuitCooldowns.cs @@ -64,4 +64,4 @@ namespace CalamityMod.Cooldowns public override void OnCompleted() => instance.player.Calamity().abyssalDivingSuitPlateHits = 0; } -} \ No newline at end of file +} diff --git a/Cooldowns/DraconicElixir.cs b/Cooldowns/DraconicElixir.cs index 42d0a5295f..79df9026f2 100644 --- a/Cooldowns/DraconicElixir.cs +++ b/Cooldowns/DraconicElixir.cs @@ -14,4 +14,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(165, 22, 46); public override Color CooldownEndColor => new Color(216, 103, 43); } -} \ No newline at end of file +} diff --git a/Cooldowns/EvasionScarf.cs b/Cooldowns/EvasionScarf.cs index 32a8648673..7e18ddbd0b 100644 --- a/Cooldowns/EvasionScarf.cs +++ b/Cooldowns/EvasionScarf.cs @@ -14,4 +14,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(132, 23, 32); public override Color CooldownEndColor => new Color(164, 52, 45); } -} \ No newline at end of file +} diff --git a/Cooldowns/FleshTotem.cs b/Cooldowns/FleshTotem.cs index 4df01c3cf7..5017618e7b 100644 --- a/Cooldowns/FleshTotem.cs +++ b/Cooldowns/FleshTotem.cs @@ -40,4 +40,4 @@ namespace CalamityMod.Cooldowns } } } -} \ No newline at end of file +} diff --git a/Cooldowns/GlobalDodge.cs b/Cooldowns/GlobalDodge.cs index e599a96a73..531ec92aba 100644 --- a/Cooldowns/GlobalDodge.cs +++ b/Cooldowns/GlobalDodge.cs @@ -47,4 +47,4 @@ namespace CalamityMod.Cooldowns } } } -} \ No newline at end of file +} diff --git a/Cooldowns/GodSlayerDash.cs b/Cooldowns/GodSlayerDash.cs index 0370312ec1..debdec7110 100644 --- a/Cooldowns/GodSlayerDash.cs +++ b/Cooldowns/GodSlayerDash.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(252, 109, 202); public override Color CooldownEndColor => new Color(119, 254, 254); } -} \ No newline at end of file +} diff --git a/Cooldowns/InkBomb.cs b/Cooldowns/InkBomb.cs index cbdc1a2042..18eadd5b89 100644 --- a/Cooldowns/InkBomb.cs +++ b/Cooldowns/InkBomb.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => Color.Lerp(new Color(177, 147, 89), new Color(105, 103, 126), instance.Completion); public override Color CooldownEndColor => Color.Lerp(new Color(177, 147, 89), new Color(105, 103, 126), instance.Completion); } -} \ No newline at end of file +} diff --git a/Cooldowns/LionHeartShield.cs b/Cooldowns/LionHeartShield.cs index 554712f2e1..48a8c375dd 100644 --- a/Cooldowns/LionHeartShield.cs +++ b/Cooldowns/LionHeartShield.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(17, 242, 244); public override Color CooldownEndColor => Color.White; } -} \ No newline at end of file +} diff --git a/Cooldowns/NebulousCore.cs b/Cooldowns/NebulousCore.cs index be4be151ab..8b5d321d65 100644 --- a/Cooldowns/NebulousCore.cs +++ b/Cooldowns/NebulousCore.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(148, 62, 216); public override Color CooldownEndColor => new Color(255, 187, 207); } -} \ No newline at end of file +} diff --git a/Cooldowns/OmegaBlue.cs b/Cooldowns/OmegaBlue.cs index 56109c292d..a17b00e389 100644 --- a/Cooldowns/OmegaBlue.cs +++ b/Cooldowns/OmegaBlue.cs @@ -64,4 +64,4 @@ namespace CalamityMod.Cooldowns spriteBatch.Draw(overlay, position + Vector2.UnitY * lostHeight * scale, crop, OutlineColor * opacity * 0.9f, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f); } } -} \ No newline at end of file +} diff --git a/Cooldowns/PermafrostConcoction.cs b/Cooldowns/PermafrostConcoction.cs index e96c337e97..d70268ba8f 100644 --- a/Cooldowns/PermafrostConcoction.cs +++ b/Cooldowns/PermafrostConcoction.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(144, 184, 205); public override Color CooldownEndColor => new Color(232, 246, 254); } -} \ No newline at end of file +} diff --git a/Cooldowns/PlagueBlackout.cs b/Cooldowns/PlagueBlackout.cs index d0f6c8cabe..95855a894a 100644 --- a/Cooldowns/PlagueBlackout.cs +++ b/Cooldowns/PlagueBlackout.cs @@ -64,4 +64,4 @@ namespace CalamityMod.Cooldowns spriteBatch.Draw(overlay, position + Vector2.UnitY * lostHeight * scale, crop, OutlineColor * opacity * 0.9f, 0, sprite.Size() * 0.5f, scale, SpriteEffects.None, 0f); } } -} \ No newline at end of file +} diff --git a/Cooldowns/PotionSickness.cs b/Cooldowns/PotionSickness.cs index f437962176..686ed97449 100644 --- a/Cooldowns/PotionSickness.cs +++ b/Cooldowns/PotionSickness.cs @@ -14,4 +14,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownEndColor => Color.Lerp(new Color(208, 234, 255), new Color(231, 3, 54), instance.Completion); public override LegacySoundStyle EndSound => instance.player.Calamity().mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/AbilitySounds/PotionSicknessOver"); } -} \ No newline at end of file +} diff --git a/Cooldowns/PrismaticLaser.cs b/Cooldowns/PrismaticLaser.cs index 690536ad99..2ba1c72ccb 100644 --- a/Cooldowns/PrismaticLaser.cs +++ b/Cooldowns/PrismaticLaser.cs @@ -16,4 +16,4 @@ namespace CalamityMod.Cooldowns internal Color rainbowMode => MulticolorLerp(Main.GlobalTime * 0.3f % 1, new Color[] { new Color(103, 244, 251), new Color(255, 167, 236), new Color(255, 225, 136) }); } -} \ No newline at end of file +} diff --git a/Cooldowns/ProfanedSoulArtifact.cs b/Cooldowns/ProfanedSoulArtifact.cs index 654df37380..9d08a8b25e 100644 --- a/Cooldowns/ProfanedSoulArtifact.cs +++ b/Cooldowns/ProfanedSoulArtifact.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(181, 136, 177); public override Color CooldownEndColor => new Color(255, 194, 161); } -} \ No newline at end of file +} diff --git a/Cooldowns/RelicOfResilience.cs b/Cooldowns/RelicOfResilience.cs index dbcd412105..d25ba1d9fe 100644 --- a/Cooldowns/RelicOfResilience.cs +++ b/Cooldowns/RelicOfResilience.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(122, 66, 59); public override Color CooldownEndColor => new Color(165, 103, 87); } -} \ No newline at end of file +} diff --git a/Cooldowns/RogueBooster.cs b/Cooldowns/RogueBooster.cs index 0d67ab4daa..86cfe1e6e6 100644 --- a/Cooldowns/RogueBooster.cs +++ b/Cooldowns/RogueBooster.cs @@ -40,4 +40,4 @@ namespace CalamityMod.Cooldowns } } } -} \ No newline at end of file +} diff --git a/Cooldowns/SandCloak.cs b/Cooldowns/SandCloak.cs index fe7eae98fb..0168f43fe3 100644 --- a/Cooldowns/SandCloak.cs +++ b/Cooldowns/SandCloak.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => new Color(100, 64, 44); public override Color CooldownEndColor => new Color(132, 95, 54); } -} \ No newline at end of file +} diff --git a/Cooldowns/SilvaRevive.cs b/Cooldowns/SilvaRevive.cs index d69b8f5719..73e5990c26 100644 --- a/Cooldowns/SilvaRevive.cs +++ b/Cooldowns/SilvaRevive.cs @@ -15,4 +15,4 @@ namespace CalamityMod.Cooldowns public override bool CanTickDown => !CalamityPlayer.areThereAnyDamnBosses && !CalamityPlayer.areThereAnyDamnEvents; } -} \ No newline at end of file +} diff --git a/Cooldowns/TarragonCloak.cs b/Cooldowns/TarragonCloak.cs index 8fce56add2..7dfbe6f059 100644 --- a/Cooldowns/TarragonCloak.cs +++ b/Cooldowns/TarragonCloak.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion); public override Color CooldownEndColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion); } -} \ No newline at end of file +} diff --git a/Cooldowns/TarragonImmunity.cs b/Cooldowns/TarragonImmunity.cs index 98b0061b75..c16888c257 100644 --- a/Cooldowns/TarragonImmunity.cs +++ b/Cooldowns/TarragonImmunity.cs @@ -12,4 +12,4 @@ namespace CalamityMod.Cooldowns public override Color CooldownStartColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion); public override Color CooldownEndColor => Color.Lerp(new Color(171, 106, 49), new Color(215, 182, 82), 1 - instance.Completion); } -} \ No newline at end of file +} diff --git a/Cooldowns/UniverseSplitter.cs b/Cooldowns/UniverseSplitter.cs index 69ddc859d2..04db54dc32 100644 --- a/Cooldowns/UniverseSplitter.cs +++ b/Cooldowns/UniverseSplitter.cs @@ -16,4 +16,4 @@ namespace CalamityMod.Cooldowns internal Color rainbowMode => MulticolorLerp(Main.GlobalTime * 0.3f % 1, new Color[] { new Color(236, 202, 255), new Color(192, 245, 255), new Color(255, 194, 205) }); } -} \ No newline at end of file +} diff --git a/CustomRecipes/ArsenalTierGatedRecipe.cs b/CustomRecipes/ArsenalTierGatedRecipe.cs index 56f5c42233..acbfd15a89 100644 --- a/CustomRecipes/ArsenalTierGatedRecipe.cs +++ b/CustomRecipes/ArsenalTierGatedRecipe.cs @@ -52,4 +52,4 @@ namespace CalamityMod.CustomRecipes return false; } } -} \ No newline at end of file +} diff --git a/CustomRecipes/RecipeUnlockHandler.cs b/CustomRecipes/RecipeUnlockHandler.cs index dc1660ba86..2d2d263f2c 100644 --- a/CustomRecipes/RecipeUnlockHandler.cs +++ b/CustomRecipes/RecipeUnlockHandler.cs @@ -85,4 +85,4 @@ namespace CalamityMod.CustomRecipes HasFoundIceSchematic = flags2[1]; } } -} \ No newline at end of file +} diff --git a/CustomRecipes/SchematicRecipe.cs b/CustomRecipes/SchematicRecipe.cs index f097834200..269cc22f16 100644 --- a/CustomRecipes/SchematicRecipe.cs +++ b/CustomRecipes/SchematicRecipe.cs @@ -30,4 +30,4 @@ namespace CalamityMod.CustomRecipes return false; } } -} \ No newline at end of file +} diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index d094db976e..e63692b51b 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -827,4 +827,4 @@ namespace CalamityMod.DataStructures } #endregion -} \ No newline at end of file +} diff --git a/DataStructures/BezierCurve.cs b/DataStructures/BezierCurve.cs index d814ab2e43..a97725294e 100644 --- a/DataStructures/BezierCurve.cs +++ b/DataStructures/BezierCurve.cs @@ -33,7 +33,7 @@ namespace CalamityMod.DataStructures points = nextPoints; } - + return Vector2.Lerp(points[0], points[1], T); } } diff --git a/Dusts/CalamityDusts.cs b/Dusts/CalamityDusts.cs index debcec0fd6..8a296ee119 100644 --- a/Dusts/CalamityDusts.cs +++ b/Dusts/CalamityDusts.cs @@ -17,4 +17,4 @@ namespace CalamityMod.Dusts // This is what God Slayer Slugs use, at least. I'm not sure about other Cosmilite stuff, didn't bother to check. BlueCosmilite = 180, } -} \ No newline at end of file +} diff --git a/Dusts/FinalFlame.cs b/Dusts/FinalFlame.cs index 7616ac40c8..80bf5dd36d 100644 --- a/Dusts/FinalFlame.cs +++ b/Dusts/FinalFlame.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Dusts public override bool Update(Dust dust) { dust.position += dust.velocity; - dust.scale *= 0.94f; + dust.scale *= 0.94f; dust.velocity *= 0.90f; Lighting.AddLight(dust.position, 0.255f, 0.185f, 0.094f); if (dust.scale < 0.4f) @@ -30,4 +30,4 @@ namespace CalamityMod.Dusts public override Color? GetAlpha(Dust dust, Color lightColor) => new Color(Color.White.R, Color.White.G, Color.White.B, dust.alpha); } -} \ No newline at end of file +} diff --git a/Dusts/RosePiece.cs b/Dusts/RosePiece.cs index 701f12d271..b995413d7b 100644 --- a/Dusts/RosePiece.cs +++ b/Dusts/RosePiece.cs @@ -37,4 +37,4 @@ namespace CalamityMod.Dusts public override Color? GetAlpha(Dust dust, Color lightColor) => lightColor; } -} \ No newline at end of file +} diff --git a/Enums/AndromedaPlayerState.cs b/Enums/AndromedaPlayerState.cs index 6fd05f6445..b6c37530b3 100644 --- a/Enums/AndromedaPlayerState.cs +++ b/Enums/AndromedaPlayerState.cs @@ -7,4 +7,4 @@ LargeRobot, SpecialAttack } -} \ No newline at end of file +} diff --git a/Enums/AnimationType.cs b/Enums/AnimationType.cs index 7cca596920..5aa77c2f05 100644 --- a/Enums/AnimationType.cs +++ b/Enums/AnimationType.cs @@ -6,4 +6,4 @@ Jump, Walk } -} \ No newline at end of file +} diff --git a/Enums/CalamityRarity.cs b/Enums/CalamityRarity.cs index 6c28e8ed3a..a20ae26d07 100644 --- a/Enums/CalamityRarity.cs +++ b/Enums/CalamityRarity.cs @@ -11,4 +11,4 @@ Rainbow = CalamityUtils.RainbowRarityValue, DraedonRust = CalamityUtils.DraedonRustRarityValue, } -} \ No newline at end of file +} diff --git a/Enums/ClassType.cs b/Enums/ClassType.cs index f7c2bc2d61..21a0310755 100644 --- a/Enums/ClassType.cs +++ b/Enums/ClassType.cs @@ -8,4 +8,4 @@ Summon = 3, Rogue = 4 } -} \ No newline at end of file +} diff --git a/Enums/ConvertType.cs b/Enums/ConvertType.cs index 07d62230d1..ebea6267a6 100644 --- a/Enums/ConvertType.cs +++ b/Enums/ConvertType.cs @@ -7,4 +7,4 @@ Crimson, Hallow } -} \ No newline at end of file +} diff --git a/Enums/Season.cs b/Enums/Season.cs index a765d915c9..5cdf7097ef 100644 --- a/Enums/Season.cs +++ b/Enums/Season.cs @@ -7,4 +7,4 @@ Summer, Fall } -} \ No newline at end of file +} diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index be29873dcb..6b4c074af1 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -440,7 +440,7 @@ namespace CalamityMod.Events // Increase cooldown post-Fishron. if (BossRushStage >= Bosses.FindIndex(boss => boss.EntityID == NPCID.DukeFishron)) BossRushSpawnCountdown += 300; - + // Override the spawn countdown if specified. if (BossRushStage < Bosses.Count - 1 && Bosses[BossRushStage + 1].SpecialSpawnCountdown != -1) BossRushSpawnCountdown = Bosses[BossRushStage + 1].SpecialSpawnCountdown; @@ -448,7 +448,7 @@ namespace CalamityMod.Events // Change time as necessary. if (Bosses[BossRushStage].ToChangeTimeTo != TimeChangeContext.None) CalamityUtils.ChangeTime(Bosses[BossRushStage].ToChangeTimeTo == TimeChangeContext.Day); - + // Play the typical boss roar sound. if (!Bosses[BossRushStage].UsesSpecialSound) Main.PlaySound(SoundID.Roar, Main.player[ClosestPlayerToWorldCenter].position, 0); diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 5e400d45bc..01f4fc4942 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -644,9 +644,9 @@ namespace CalamityMod.ILEditing /// 355, /// 358 /// }); - /// - /// to - /// + /// + /// to + /// /// var arr = new short[2] /// { /// 355, @@ -654,7 +654,7 @@ namespace CalamityMod.ILEditing /// }); /// arr = arr.ToList().Add(id).ToArray(); /// num8 = Utils.SelectRandom(Main.rand, arr); - /// + /// /// /// private static void AddTwinklersToStatue(ILContext il) diff --git a/Items/Accessories/BlunderBooster.cs b/Items/Accessories/BlunderBooster.cs index 0ed514b024..834da37238 100644 --- a/Items/Accessories/BlunderBooster.cs +++ b/Items/Accessories/BlunderBooster.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories Tooltip.SetDefault("12% increased rogue damage and 15% increased rogue projectile velocity\n" + "Stealth generates 10% faster\n" + "Summons a red lightning aura to surround the player and electrify nearby enemies\n" + - "TOOLTIP LINE HERE" + + "TOOLTIP LINE HERE" + "This effect has a 1 second cooldown before it can be used again"); } diff --git a/Items/Accessories/CorrosiveSpine.cs b/Items/Accessories/CorrosiveSpine.cs index e1c7028937..07b43fb060 100644 --- a/Items/Accessories/CorrosiveSpine.cs +++ b/Items/Accessories/CorrosiveSpine.cs @@ -51,4 +51,4 @@ namespace CalamityMod.Items.Accessories } } } -} \ No newline at end of file +} diff --git a/Items/Accessories/DaawnlightSpiritOrigin.cs b/Items/Accessories/DaawnlightSpiritOrigin.cs index bdf7f25687..34f4872c7a 100644 --- a/Items/Accessories/DaawnlightSpiritOrigin.cs +++ b/Items/Accessories/DaawnlightSpiritOrigin.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories float slowWeaponBonus = MathHelper.Lerp(0f, MaxSlowWeaponBonus, useTimeInterpolant); return baseCritMult * (1f + convertedCritBonus + slowWeaponBonus); } - + public override void SetStaticDefaults() { DisplayName.SetDefault("Daawnlight Spirit Origin"); diff --git a/Items/Accessories/HeartofDarkness.cs b/Items/Accessories/HeartofDarkness.cs index bb0ffb733d..284475c3fd 100644 --- a/Items/Accessories/HeartofDarkness.cs +++ b/Items/Accessories/HeartofDarkness.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories { // The percentage of a full Rage bar that is gained every second with Heart of Darkness equipped. public const float RagePerSecond = 0.01f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Heart of Darkness"); diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 7fbe73fb44..4880dd710b 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories { // Base damage of lunar flares on stealth strikes. Increased by rogue damage stats, but not stealth damage. internal const int BaseDamage = 85; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Moonstone Crown"); diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs index 126ba1c937..63c95db409 100644 --- a/Items/Accessories/MutatedTruffle.cs +++ b/Items/Accessories/MutatedTruffle.cs @@ -40,9 +40,9 @@ namespace CalamityMod.Items.Accessories const int damage = 1200; if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - Projectile.NewProjectile(player.Center, Vector2.Zero, + Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), - (int)(damage * player.MinionDamage()), + (int)(damage * player.MinionDamage()), 6.5f, Main.myPlayer, 0f, 0f); } } diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index d27af32c5f..de7c44d171 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public class OrnateShield : ModItem { public const int ShieldSlamIFrames = 4; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Ornate Shield"); diff --git a/Items/Accessories/PlaguedFuelPack.cs b/Items/Accessories/PlaguedFuelPack.cs index d15586ba3f..1719a4282f 100644 --- a/Items/Accessories/PlaguedFuelPack.cs +++ b/Items/Accessories/PlaguedFuelPack.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Plagued Fuel Pack"); Tooltip.SetDefault("5% increased rogue damage and 15% increased rogue projectile velocity\n" + "Stealth generates 10% faster\n" + - "TOOLTIP LINE HERE" + + "TOOLTIP LINE HERE" + "This effect has a 1 second cooldown before it can be used again"); } diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 6c2653185e..faa110e948 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Items.Accessories if (line.Name == "Tooltip0") { index = tooltips.IndexOf(line); - } + } else { line.text = ""; @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Accessories { line.text = ""; } - + } string rejectionReason = (!draedon) ? "[c/f05a5a:The soul within this crystal has been defiled by overwhelming energy waves from dangerous mechanations]" : "[c/f05a5a:The soul within this crystal has been defiled by the powerful magic of a supreme witch]"; //there might be a better way to word the draedon line, not sure tooltips.Insert(index+1, new TooltipLine(CalamityMod.Instance, "Tooltip1", rejectionReason + "\nMerchants will reject a defiled soul such as this.")); diff --git a/Items/Accessories/SandCloak.cs b/Items/Accessories/SandCloak.cs index 8e268b3be1..cd39a3e57e 100644 --- a/Items/Accessories/SandCloak.cs +++ b/Items/Accessories/SandCloak.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Sand Cloak"); Tooltip.SetDefault("+1 defense and 5% increased movement speed\n" + - "TOOLTIP LINE HERE\n" + + "TOOLTIP LINE HERE\n" + "This effect has a 30 second cooldown before it can be used again"); } diff --git a/Items/Ammo/HolyFireBullet.cs b/Items/Ammo/HolyFireBullet.cs index fc909a1901..f2fe00676a 100644 --- a/Items/Ammo/HolyFireBullet.cs +++ b/Items/Ammo/HolyFireBullet.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Items.Ammo public class HolyFireBullet : ModItem { internal const float ExplosionMultiplier = 0.33f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Holy Fire Bullet"); diff --git a/Items/Armor/FathomSwarmerBoots.cs b/Items/Armor/FathomSwarmerBoots.cs index 9d87b0f939..559632249b 100644 --- a/Items/Armor/FathomSwarmerBoots.cs +++ b/Items/Armor/FathomSwarmerBoots.cs @@ -56,4 +56,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/FathomSwarmerBreastplate.cs b/Items/Armor/FathomSwarmerBreastplate.cs index 3d2a3215f2..adfd4f13c9 100644 --- a/Items/Armor/FathomSwarmerBreastplate.cs +++ b/Items/Armor/FathomSwarmerBreastplate.cs @@ -52,4 +52,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/FathomSwarmerVisage.cs b/Items/Armor/FathomSwarmerVisage.cs index dec553deec..c49c15b949 100644 --- a/Items/Armor/FathomSwarmerVisage.cs +++ b/Items/Armor/FathomSwarmerVisage.cs @@ -77,4 +77,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/FearmongerGreaves.cs b/Items/Armor/FearmongerGreaves.cs index c131b591bf..fd28f06b18 100644 --- a/Items/Armor/FearmongerGreaves.cs +++ b/Items/Armor/FearmongerGreaves.cs @@ -47,4 +47,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/FearmongerPlateMail.cs b/Items/Armor/FearmongerPlateMail.cs index 3cb9a6fb12..1744dba575 100644 --- a/Items/Armor/FearmongerPlateMail.cs +++ b/Items/Armor/FearmongerPlateMail.cs @@ -45,4 +45,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/GemTechHeadgear.cs b/Items/Armor/GemTechHeadgear.cs index 20f4d2d339..fc7cb59a54 100644 --- a/Items/Armor/GemTechHeadgear.cs +++ b/Items/Armor/GemTechHeadgear.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Items.Armor $"When a gem is lost, it breaks off and homes towards the nearest enemy or boss, if one is present, dealing a base of {GemDamage} damage\n" + $"Gems have a {GemRegenTime / 60} second delay before they appear again\n" + redGemText + - yellowGemText + + yellowGemText + greenGemText + blueGemText + purpleGemText + diff --git a/Items/Armor/PlaguebringerCarapace.cs b/Items/Armor/PlaguebringerCarapace.cs index 6c26edd8f2..5771218478 100644 --- a/Items/Armor/PlaguebringerCarapace.cs +++ b/Items/Armor/PlaguebringerCarapace.cs @@ -46,4 +46,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/PlaguebringerPistons.cs b/Items/Armor/PlaguebringerPistons.cs index d954ee5252..f10129ed7b 100644 --- a/Items/Armor/PlaguebringerPistons.cs +++ b/Items/Armor/PlaguebringerPistons.cs @@ -149,4 +149,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/PlaguebringerVisor.cs b/Items/Armor/PlaguebringerVisor.cs index ccb41bec14..d2d3b07e0d 100644 --- a/Items/Armor/PlaguebringerVisor.cs +++ b/Items/Armor/PlaguebringerVisor.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor public class PlaguebringerVisor : ModItem { public const int PlagueDashIFrames = 4; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Plaguebringer Visor"); @@ -82,4 +82,4 @@ namespace CalamityMod.Items.Armor recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Armor/SnowRuffianMask.cs b/Items/Armor/SnowRuffianMask.cs index aa2b58c5a6..9461de6580 100644 --- a/Items/Armor/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffianMask.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Armor player.velocity.X *= 1.1f; shouldBoost = false; } - + } else if (!shouldBoost && player.velocity.Y == 0) { diff --git a/Items/Armor/SulfurHelmet.cs b/Items/Armor/SulfurHelmet.cs index bbc72af071..2c18bd8e51 100644 --- a/Items/Armor/SulfurHelmet.cs +++ b/Items/Armor/SulfurHelmet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor item.height = 26; item.value = Item.buyPrice(0, 1, 0, 0); item.rare = ItemRarityID.Green; - item.defense = 5; + item.defense = 5; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 16a451725a..1523bc5445 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1040,7 +1040,7 @@ namespace CalamityMod.Items #region Equip Changes public override void UpdateEquip(Item item, Player player) - { + { switch (item.type) { case ItemID.MagicHat: @@ -1422,7 +1422,7 @@ namespace CalamityMod.Items * Post-DoG = 3 * Post-Yharon = 4 */ - + if (CalamityWorld.downedYharon) player.statDefense += 3; else if (CalamityWorld.downedPolterghast || CalamityWorld.downedDoG) @@ -1443,7 +1443,7 @@ namespace CalamityMod.Items * Post-DoG = 6 * Post-Yharon = 8 */ - + if (CalamityWorld.downedYharon) player.statDefense += 6; else if (CalamityWorld.downedDoG) @@ -1468,7 +1468,7 @@ namespace CalamityMod.Items * Post-DoG = 9 * Post-Yharon = 11 */ - + if (CalamityWorld.downedYharon) player.statDefense += 8; else if (CalamityWorld.downedDoG) @@ -1495,7 +1495,7 @@ namespace CalamityMod.Items * Post-DoG = 12 * Post-Yharon = 15 */ - + if (CalamityWorld.downedYharon) player.statDefense += 11; else if (CalamityWorld.downedDoG) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index f9027f861e..7d0ff17a65 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -802,7 +802,7 @@ namespace CalamityMod.Items } } internal static IItemTweak MaxStack(int stk) => new MaxStackRule(stk); - + internal class PickPowerRule : IItemTweak { internal readonly int newPickPower = 0; @@ -824,7 +824,7 @@ namespace CalamityMod.Items public void ApplyTweak(Item it) => it.Calamity().canFirePointBlankShots = true; } internal static IItemTweak PointBlank => new PointBlankRule(); - + #region Scale (True Melee) internal class ScaleDeltaRule : IItemTweak { @@ -938,7 +938,7 @@ namespace CalamityMod.Items public void ApplyTweak(Item it) => it.tileBoost = newTileBoost; } internal static IItemTweak TileBoostExact(int tb) => new TileBoostExactRule(tb); - + internal class TrueMeleeRule : IItemTweak { public bool AppliesTo(Item it) => IsMelee(it); @@ -1000,7 +1000,7 @@ namespace CalamityMod.Items } } internal static IItemTweak UseRatio(float f) => new UseRatioRule(f); - + internal class UseAnimationDeltaRule : IItemTweak { internal readonly int delta = 0; diff --git a/Items/DifficultyItems/Malice.cs b/Items/DifficultyItems/Malice.cs index e7e2137db2..def10a1466 100644 --- a/Items/DifficultyItems/Malice.cs +++ b/Items/DifficultyItems/Malice.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.DifficultyItems // Misc lines "Nerfs the effectiveness of life steal a bit more.\n" + - + // Boss lines "Enrages all bosses and gives them far more aggressive AI.\n" + "Bosses and their projectiles deal 25% more damage.\n" + diff --git a/Items/Dyes/AerialiteDye.cs b/Items/Dyes/AerialiteDye.cs index 056bf6e549..85dc95695c 100644 --- a/Items/Dyes/AerialiteDye.cs +++ b/Items/Dyes/AerialiteDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/AstralBlueDye.cs b/Items/Dyes/AstralBlueDye.cs index ff8dd5a82e..7fad119062 100644 --- a/Items/Dyes/AstralBlueDye.cs +++ b/Items/Dyes/AstralBlueDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/AstralOrangeDye.cs b/Items/Dyes/AstralOrangeDye.cs index f93cfbc463..a5c9a75795 100644 --- a/Items/Dyes/AstralOrangeDye.cs +++ b/Items/Dyes/AstralOrangeDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/AstralSwirlDye.cs b/Items/Dyes/AstralSwirlDye.cs index c7a0c6a7ca..fead19d169 100644 --- a/Items/Dyes/AstralSwirlDye.cs +++ b/Items/Dyes/AstralSwirlDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/AuricDye.cs b/Items/Dyes/AuricDye.cs index 4f08a25dcd..5fe8dbcf4d 100644 --- a/Items/Dyes/AuricDye.cs +++ b/Items/Dyes/AuricDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/BaseDye.cs b/Items/Dyes/BaseDye.cs index cabca9dac2..56a029cebd 100644 --- a/Items/Dyes/BaseDye.cs +++ b/Items/Dyes/BaseDye.cs @@ -39,4 +39,4 @@ namespace CalamityMod.Items.Dyes { } } -} \ No newline at end of file +} diff --git a/Items/Dyes/BloodflareDye.cs b/Items/Dyes/BloodflareDye.cs index 4f4cfb7ab9..101fdc53a4 100644 --- a/Items/Dyes/BloodflareDye.cs +++ b/Items/Dyes/BloodflareDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/BlueCosmicFlameDye.cs b/Items/Dyes/BlueCosmicFlameDye.cs index 1318af35e0..e42c24501d 100644 --- a/Items/Dyes/BlueCosmicFlameDye.cs +++ b/Items/Dyes/BlueCosmicFlameDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/BlueStatigelDye.cs b/Items/Dyes/BlueStatigelDye.cs index 32f1febfb4..6902b1886b 100644 --- a/Items/Dyes/BlueStatigelDye.cs +++ b/Items/Dyes/BlueStatigelDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/CalamitousDye.cs b/Items/Dyes/CalamitousDye.cs index ebe80492e2..452842c54a 100644 --- a/Items/Dyes/CalamitousDye.cs +++ b/Items/Dyes/CalamitousDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/CeaselessDye.cs b/Items/Dyes/CeaselessDye.cs index 699b6b7cee..a32ad66b6c 100644 --- a/Items/Dyes/CeaselessDye.cs +++ b/Items/Dyes/CeaselessDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/CryonicDye.cs b/Items/Dyes/CryonicDye.cs index 2c3df3a373..893212e432 100644 --- a/Items/Dyes/CryonicDye.cs +++ b/Items/Dyes/CryonicDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/DefiledFlameDye.cs b/Items/Dyes/DefiledFlameDye.cs index 07a1fff7b0..b22c299536 100644 --- a/Items/Dyes/DefiledFlameDye.cs +++ b/Items/Dyes/DefiledFlameDye.cs @@ -21,4 +21,4 @@ namespace CalamityMod.Items.Dyes item.value = CalamityGlobalItem.Rarity4BuyPrice; } } -} \ No newline at end of file +} diff --git a/Items/Dyes/DragonSoulDye.cs b/Items/Dyes/DragonSoulDye.cs index 2ff97c2abb..77cb8d8940 100644 --- a/Items/Dyes/DragonSoulDye.cs +++ b/Items/Dyes/DragonSoulDye.cs @@ -32,4 +32,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/ElementalDye.cs b/Items/Dyes/ElementalDye.cs index c38efef92e..24f87755bc 100644 --- a/Items/Dyes/ElementalDye.cs +++ b/Items/Dyes/ElementalDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/EndothermicDye.cs b/Items/Dyes/EndothermicDye.cs index 2e6500a4c3..f12699e796 100644 --- a/Items/Dyes/EndothermicDye.cs +++ b/Items/Dyes/EndothermicDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/HairDye/AdrenalineHairDye.cs b/Items/Dyes/HairDye/AdrenalineHairDye.cs index a4e00b13a9..b3cf023f30 100644 --- a/Items/Dyes/HairDye/AdrenalineHairDye.cs +++ b/Items/Dyes/HairDye/AdrenalineHairDye.cs @@ -26,4 +26,4 @@ namespace CalamityMod.Items.Dyes.HairDye item.consumable = true; } } -} \ No newline at end of file +} diff --git a/Items/Dyes/HairDye/RageHairDye.cs b/Items/Dyes/HairDye/RageHairDye.cs index 660ab09519..95e3a33dd1 100644 --- a/Items/Dyes/HairDye/RageHairDye.cs +++ b/Items/Dyes/HairDye/RageHairDye.cs @@ -26,4 +26,4 @@ namespace CalamityMod.Items.Dyes.HairDye item.consumable = true; } } -} \ No newline at end of file +} diff --git a/Items/Dyes/HairDye/StealthHairDye.cs b/Items/Dyes/HairDye/StealthHairDye.cs index 8f1c076db1..ac3b1cac76 100644 --- a/Items/Dyes/HairDye/StealthHairDye.cs +++ b/Items/Dyes/HairDye/StealthHairDye.cs @@ -26,4 +26,4 @@ namespace CalamityMod.Items.Dyes.HairDye item.consumable = true; } } -} \ No newline at end of file +} diff --git a/Items/Dyes/HairDye/WingTimeHairDye.cs b/Items/Dyes/HairDye/WingTimeHairDye.cs index b399be8623..cd731018ff 100644 --- a/Items/Dyes/HairDye/WingTimeHairDye.cs +++ b/Items/Dyes/HairDye/WingTimeHairDye.cs @@ -26,4 +26,4 @@ namespace CalamityMod.Items.Dyes.HairDye item.consumable = true; } } -} \ No newline at end of file +} diff --git a/Items/Dyes/NightmareDye.cs b/Items/Dyes/NightmareDye.cs index ff27568820..1c6c26701f 100644 --- a/Items/Dyes/NightmareDye.cs +++ b/Items/Dyes/NightmareDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/PhantoplasmDye.cs b/Items/Dyes/PhantoplasmDye.cs index 34103a178d..74f44065b1 100644 --- a/Items/Dyes/PhantoplasmDye.cs +++ b/Items/Dyes/PhantoplasmDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/PinkCosmicFlameDye.cs b/Items/Dyes/PinkCosmicFlameDye.cs index a51f323caf..c5885581f5 100644 --- a/Items/Dyes/PinkCosmicFlameDye.cs +++ b/Items/Dyes/PinkCosmicFlameDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/PinkStatigelDye.cs b/Items/Dyes/PinkStatigelDye.cs index 8432a6e900..dd09159291 100644 --- a/Items/Dyes/PinkStatigelDye.cs +++ b/Items/Dyes/PinkStatigelDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/ProfanedFlameDye.cs b/Items/Dyes/ProfanedFlameDye.cs index fa9173298f..16bc32c50f 100644 --- a/Items/Dyes/ProfanedFlameDye.cs +++ b/Items/Dyes/ProfanedFlameDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/ProfanedMoonlightDye.cs b/Items/Dyes/ProfanedMoonlightDye.cs index 7c925e4997..6610e130b3 100644 --- a/Items/Dyes/ProfanedMoonlightDye.cs +++ b/Items/Dyes/ProfanedMoonlightDye.cs @@ -20,4 +20,4 @@ namespace CalamityMod.Items.Dyes item.value = Item.sellPrice(0, 10, 0, 0); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/ReaverDye.cs b/Items/Dyes/ReaverDye.cs index aedee4f776..4cdc7d4b41 100644 --- a/Items/Dyes/ReaverDye.cs +++ b/Items/Dyes/ReaverDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/ShadowspecDye.cs b/Items/Dyes/ShadowspecDye.cs index c977e60376..4d16a78120 100644 --- a/Items/Dyes/ShadowspecDye.cs +++ b/Items/Dyes/ShadowspecDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/SlimeGodDye.cs b/Items/Dyes/SlimeGodDye.cs index e7230c2d37..a378642373 100644 --- a/Items/Dyes/SlimeGodDye.cs +++ b/Items/Dyes/SlimeGodDye.cs @@ -34,4 +34,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/StratusDye.cs b/Items/Dyes/StratusDye.cs index 61dbd4e940..cf220ac8f7 100644 --- a/Items/Dyes/StratusDye.cs +++ b/Items/Dyes/StratusDye.cs @@ -37,4 +37,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Dyes/SwirlingCosmicFlameDye.cs b/Items/Dyes/SwirlingCosmicFlameDye.cs index 118909462e..5d63f7ead5 100644 --- a/Items/Dyes/SwirlingCosmicFlameDye.cs +++ b/Items/Dyes/SwirlingCosmicFlameDye.cs @@ -33,4 +33,4 @@ namespace CalamityMod.Items.Dyes recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Mounts/OnyxExcavator.cs b/Items/Mounts/OnyxExcavator.cs index 1de6b2eaa3..6f934de24d 100644 --- a/Items/Mounts/OnyxExcavator.cs +++ b/Items/Mounts/OnyxExcavator.cs @@ -205,7 +205,7 @@ namespace CalamityMod.Items.Mounts bool f = 1 == 2; bool canBreakTileCheck = TileLoader.CanKillTile(x, y, tile.type, ref t) && TileLoader.CanKillTile(x, y, tile.type, ref f); List tileExcludeList = new List() - { + { ModContent.TileType(), ModContent.TileType(), TileID.DemonAltar, diff --git a/Items/Placeables/AstralFossil.cs b/Items/Placeables/AstralFossil.cs index aba66f1ec7..168a08d587 100644 --- a/Items/Placeables/AstralFossil.cs +++ b/Items/Placeables/AstralFossil.cs @@ -46,10 +46,10 @@ namespace CalamityMod.Items.Placeables When Astrum Deus has been defeated, it will give Astral Ore */ - bool twoMechsDowned = - (NPC.downedMechBoss1 && NPC.downedMechBoss2 && !NPC.downedMechBoss3) || - (NPC.downedMechBoss2 && NPC.downedMechBoss3 && !NPC.downedMechBoss1) || - (NPC.downedMechBoss3 && NPC.downedMechBoss1 && !NPC.downedMechBoss2) || + bool twoMechsDowned = + (NPC.downedMechBoss1 && NPC.downedMechBoss2 && !NPC.downedMechBoss3) || + (NPC.downedMechBoss2 && NPC.downedMechBoss3 && !NPC.downedMechBoss1) || + (NPC.downedMechBoss3 && NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3); float val = Main.rand.NextFloat(100); diff --git a/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs index b042032cbc..0ce6d227cd 100644 --- a/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs +++ b/Items/Placeables/FurnitureCosmilite/CosmiliteBasin.cs @@ -37,4 +37,4 @@ namespace CalamityMod.Items.Placeables.FurnitureCosmilite recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Potions/Alcohol/RedWine.cs b/Items/Potions/Alcohol/RedWine.cs index 8630bccb2e..30a542e2de 100644 --- a/Items/Potions/Alcohol/RedWine.cs +++ b/Items/Potions/Alcohol/RedWine.cs @@ -42,4 +42,4 @@ Reduces life regen by 1"); player.AddBuff(ModContent.BuffType(), 900); } } -} \ No newline at end of file +} diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index e5911650da..5ddc85de55 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items // A custom packet must be sent so that the deletion can be done on the server. This hook does not run there. // Why? Well, netUpdate/MessageID.SyncNPC packets do not send data to the server. They only send data to other clients. What this means is that prior to this fix // what would happen was every client EXCEPT THE SERVER would be told by this player that the dummies disappeared. - // However, since the server isn't notified, it is inevitable that the server will do a sync of its own, unaware that the + // However, since the server isn't notified, it is inevitable that the server will do a sync of its own, unaware that the // dummies are gone, and cause them to reappear, making the deletion moot. else { diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index 6345574661..ffa3f9db69 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Items.Tools item.autoReuse = false; item.noMelee = true; } - } + } public override void ModifyTooltips(List list) { diff --git a/Items/Tools/FellerofEvergreens.cs b/Items/Tools/FellerofEvergreens.cs index c1ee741d67..9b8ac0a508 100644 --- a/Items/Tools/FellerofEvergreens.cs +++ b/Items/Tools/FellerofEvergreens.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Tools item.height = 36; item.scale = 1.5f; item.useTurn = true; - item.useStyle = ItemUseStyleID.SwingThrow; + item.useStyle = ItemUseStyleID.SwingThrow; item.value = Item.buyPrice(0, 2, 0, 0); item.rare = ItemRarityID.Green; item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs index 106d9c07af..689902e303 100644 --- a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs +++ b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal DisplayName.SetDefault("Galvanizing Glaive"); Tooltip.SetDefault("Its use as a tool is to quickly separate a single object into two\n" + "That is also its use as a weapon\n" + - "Swings a spear which envelops struck foes in an energy field\n" + + "Swings a spear which envelops struck foes in an energy field\n" + "When done swinging, the spear discharges an extra pulse of energy"); } @@ -37,11 +37,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.knockBack = 9f; item.UseSound = SoundID.Item1; item.autoReuse = true; - + item.rare = ItemRarityID.Red; modItem.customRarity = CalamityRarity.DraedonRust; item.value = CalamityGlobalItem.Rarity8BuyPrice; - + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 21f; diff --git a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs index ce4b271b01..1148220120 100644 --- a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs +++ b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { // This is the amount of charge consumed every frame the holdout projectile is summoned, i.e. the weapon is in use. public const float HoldoutChargeUse = 0.002f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Hydraulic Volt Crasher"); diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs index a0ec9f4015..5d01cf180b 100644 --- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs +++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal if (projectile.owner != player.whoAmI) continue; float completionRatio = currentScannerIndex / (float)totalOwnedScanners; - + // ai[0] is the angular offset relative to the projectile's owner. // For the first 15 summons, wrap around the player angularly, but not at a perfect angle, a bit like the Dazzling Stabbers when idle. // But once the total summon count is greater than 15, just create a perfect circle depending on the total amount of summons. diff --git a/Items/Weapons/DraedonsArsenal/SystemBane.cs b/Items/Weapons/DraedonsArsenal/SystemBane.cs index 115c81c338..597a0cfba2 100644 --- a/Items/Weapons/DraedonsArsenal/SystemBane.cs +++ b/Items/Weapons/DraedonsArsenal/SystemBane.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public class SystemBane : RogueWeapon { public const int MaxDeployedProjectiles = 5; - + public override void SetStaticDefaults() { DisplayName.SetDefault("System Bane"); diff --git a/Items/Weapons/Magic/AbyssShocker.cs b/Items/Weapons/Magic/AbyssShocker.cs index eab64db7c8..984a2e011c 100644 --- a/Items/Weapons/Magic/AbyssShocker.cs +++ b/Items/Weapons/Magic/AbyssShocker.cs @@ -8,13 +8,13 @@ namespace CalamityMod.Items.Weapons.Magic { public class AbyssShocker : ModItem { - public override void SetStaticDefaults() + public override void SetStaticDefaults() { DisplayName.SetDefault("Abyss Shocker"); Tooltip.SetDefault("Fires an erratic lightning bolt that arcs and bounces between enemies"); } - public override void SetDefaults() + public override void SetDefaults() { item.damage = 28; item.noMelee = true; @@ -44,4 +44,4 @@ namespace CalamityMod.Items.Weapons.Magic public override Vector2? HoldoutOffset() => new Vector2(-14, 0); } -} \ No newline at end of file +} diff --git a/Items/Weapons/Magic/Eternity.cs b/Items/Weapons/Magic/Eternity.cs index 6234807a9f..3fe47c2742 100644 --- a/Items/Weapons/Magic/Eternity.cs +++ b/Items/Weapons/Magic/Eternity.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Magic tt2.text = $"[" + DisoHex + "There's pictures of ponies in the book]"; } public static string DisoHex => "c/" + - ((int)(156 + Main.DiscoR * 99f / 255f)).ToString("X2") + ((int)(156 + Main.DiscoR * 99f / 255f)).ToString("X2") + 108.ToString("X2") + 251.ToString("X2") + ":"; public override void AddRecipes() { @@ -73,4 +73,4 @@ namespace CalamityMod.Items.Weapons.Magic recipe.AddRecipe(); } } -} \ No newline at end of file +} diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 0b3976a8f8..ca35862db6 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Magic public class HeliumFlash : ModItem { internal const float ExplosionDamageMultiplier = 0.125f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Helium Flash"); diff --git a/Items/Weapons/Magic/Heresy.cs b/Items/Weapons/Magic/Heresy.cs index cba4b87e94..d8dd154d14 100644 --- a/Items/Weapons/Magic/Heresy.cs +++ b/Items/Weapons/Magic/Heresy.cs @@ -41,4 +41,4 @@ namespace CalamityMod.Items.Weapons.Magic public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; } -} \ No newline at end of file +} diff --git a/Items/Weapons/Magic/Judgement.cs b/Items/Weapons/Magic/Judgement.cs index a2285e9054..b344f46bd7 100644 --- a/Items/Weapons/Magic/Judgement.cs +++ b/Items/Weapons/Magic/Judgement.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic { public const int HitsPerFlash = 300; public const int FlashBaseDamage = 16000; - + private const float SpawnAngleSpread = 0.4f * MathHelper.Pi; private const float SpeedRandomness = 0.08f; private const float Inaccuracy = 0.04f; diff --git a/Items/Weapons/Magic/Purge.cs b/Items/Weapons/Magic/Purge.cs index 2e8aa1f232..9063216e79 100644 --- a/Items/Weapons/Magic/Purge.cs +++ b/Items/Weapons/Magic/Purge.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Magic public class Purge : ModItem { public const int UseTime = 20; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Nano Purge"); diff --git a/Items/Weapons/Magic/T1000.cs b/Items/Weapons/Magic/T1000.cs index 9b75fcc018..bdc4b5f221 100644 --- a/Items/Weapons/Magic/T1000.cs +++ b/Items/Weapons/Magic/T1000.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public class T1000 : ModItem { public const int UseTime = 36; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Aetherflux Cannon"); diff --git a/Items/Weapons/Magic/Vehemenc.cs b/Items/Weapons/Magic/Vehemenc.cs index 417ad6f889..c8dddb28fe 100644 --- a/Items/Weapons/Magic/Vehemenc.cs +++ b/Items/Weapons/Magic/Vehemenc.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Magic { public const int BaseDamage = 5185; public const float SkullRatio = 0.08f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Vehemence"); diff --git a/Items/Weapons/Melee/ArkoftheAncients.cs b/Items/Weapons/Melee/ArkoftheAncients.cs index 0155be0f6f..42fdd1be19 100644 --- a/Items/Weapons/Melee/ArkoftheAncients.cs +++ b/Items/Weapons/Melee/ArkoftheAncients.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CloneNewInstances => true; - const string ParryTooltip = "Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" + + const string ParryTooltip = "Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" + "You can also parry projectiles and temporarily make them deal 100 less damage\n" + "Parrying will empower the next 10 swings of the sword, boosting their damage and letting them throw projectiles out"; diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index 6b53c99e87..19ffcb0853 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float SnapBoltsDamageMultiplier = 0.1f; public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier - public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets + public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder public static float SwirlBoltAmount = 6f; //The amount of cosmic bolts produced during hte swirl attack @@ -152,7 +152,7 @@ namespace CalamityMod.Items.Weapons.Melee Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, scissorState, Charge); - //Shoot projectiles + //Shoot projectiles if (scissorState != 2) { Vector2 throwVector = new Vector2(speedX, speedY); diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index 991716e4b2..3269041524 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float glassStarDamageMultiplier = 0.2f; //Damage multiplier for the homing glass stars (4 glass stars per shot) public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier - public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets + public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee "Releasing the mouse while the blade is out will throw the second half towards it, making the scissors snap\n" + "Snapping the scissors together increase their damage and empower your next two swings"; - const string ParryTooltip = "Using RMB will snip out the scissor blades in front of you\n" + + const string ParryTooltip = "Using RMB will snip out the scissor blades in front of you\n" + "Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" + "You can also parry projectiles and temporarily make them deal 200 less damage\n" + "Parrying will empower the next 10 swings of the sword, letting you use both blades at once"; @@ -141,12 +141,12 @@ namespace CalamityMod.Items.Weapons.Melee float scissorState = Combo == ComboLenght ? 2 : Combo % 2; Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, scissorState, Charge); - + Combo += 1; if (Combo > ComboLenght) Combo = 0; - + //Shoot projectiles every upwards swing diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index db71ea2451..d49f34d298 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int EvilAttunement_BounceIFrames = 10; public static int ColdAttunement_BaseDamage = 58; - public static float ColdAttunement_SecondSwingBoost = 1.14f; + public static float ColdAttunement_SecondSwingBoost = 1.14f; public static float ColdAttunement_ThirdSwingBoost = 1.4f; public static int HotAttunement_BaseDamage = 70; @@ -112,7 +112,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 30; item.useTurn = true; item.useStyle = ItemUseStyleID.SwingThrow; - item.shoot = ProjectileID.PurificationPowder; + item.shoot = ProjectileID.PurificationPowder; item.knockBack = 5f; item.autoReuse = true; item.value = Item.buyPrice(0, 4, 0, 0); @@ -136,7 +136,7 @@ namespace CalamityMod.Items.Weapons.Melee #region Saving and syncing attunements public override bool CloneNewInstances => true; - public override ModItem Clone(Item item) + public override ModItem Clone(Item item) { var clone = base.Clone(item); @@ -283,8 +283,8 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || - n.type == ProjectileType() || + (n.type == ProjectileType() || + n.type == ProjectileType() || n.type == ProjectileType())); } diff --git a/Items/Weapons/Melee/Chaotrix.cs b/Items/Weapons/Melee/Chaotrix.cs index 055650767e..0c9a41b895 100644 --- a/Items/Weapons/Melee/Chaotrix.cs +++ b/Items/Weapons/Melee/Chaotrix.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = true; item.noUseGraphic = true; item.noMelee = true; - + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; diff --git a/Items/Weapons/Melee/ExoGladius.cs b/Items/Weapons/Melee/ExoGladius.cs index 85fdb44c5b..89c89c2695 100644 --- a/Items/Weapons/Melee/ExoGladius.cs +++ b/Items/Weapons/Melee/ExoGladius.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public class ExoGladius : ModItem { public const int OnHitIFrames = 3; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Exo Gladius"); diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 40d3770f96..f91ea3db3f 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 15f; item.useStyle = ItemUseStyleID.SwingThrow; } - + public override Vector2? HoldoutOffset() => new Vector2(12, 12); public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Melee/GrandGuardian.cs b/Items/Weapons/Melee/GrandGuardian.cs index 61b0bdd9d7..cd69c1fcb0 100644 --- a/Items/Weapons/Melee/GrandGuardian.cs +++ b/Items/Weapons/Melee/GrandGuardian.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void UseStyle(Player player) { player.itemLocation += new Vector2(-32f * player.direction, 12f * player.gravDir).RotatedBy(player.itemRotation); - } + } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { diff --git a/Items/Weapons/Melee/Lucrecia.cs b/Items/Weapons/Melee/Lucrecia.cs index 174947d53b..0b39dd316a 100644 --- a/Items/Weapons/Melee/Lucrecia.cs +++ b/Items/Weapons/Melee/Lucrecia.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public class Lucrecia : ModItem { public const int OnHitIFrames = 5; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Lucrecia"); diff --git a/Items/Weapons/Melee/Oracle.cs b/Items/Weapons/Melee/Oracle.cs index 9d66061a01..6af86b608a 100644 --- a/Items/Weapons/Melee/Oracle.cs +++ b/Items/Weapons/Melee/Oracle.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee public const int YoyoBaseDamage = 170; public const int AuraBaseDamage = 100; public const int AuraMaxDamage = 220; - + public override void SetStaticDefaults() { DisplayName.SetDefault("The Oracle"); diff --git a/Items/Weapons/Melee/PhosphorescentGauntlet.cs b/Items/Weapons/Melee/PhosphorescentGauntlet.cs index 3fce375e59..2678487564 100644 --- a/Items/Weapons/Melee/PhosphorescentGauntlet.cs +++ b/Items/Weapons/Melee/PhosphorescentGauntlet.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Melee public class PhosphorescentGauntlet : ModItem { public const int OnHitIFrames = 15; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Phosphorescent Gauntlet"); diff --git a/Items/Weapons/Melee/TerrorBlade.cs b/Items/Weapons/Melee/TerrorBlade.cs index 51cd4ad815..0f134e8ae2 100644 --- a/Items/Weapons/Melee/TerrorBlade.cs +++ b/Items/Weapons/Melee/TerrorBlade.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public class TerrorBlade : ModItem { internal const float TerrorBlastMultiplier = 0.3f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Terror Blade"); diff --git a/Items/Weapons/Melee/TheBurningSky.cs b/Items/Weapons/Melee/TheBurningSky.cs index acde388e3f..62946d2afd 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Melee { // Every time the item spawns more meteors, play a violent, bass heavy sound to add onto Star Wrath's use sound. Main.PlaySound(SoundID.Item70, player.Center); - + Vector2 originalVelocity = new Vector2(speedX, speedY); float speed = originalVelocity.Length(); for (int i = 0; i < ProjectilesPerBarrage; ++i) diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index d6a735e2a7..58f37c20c7 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float glassStarDamageMultiplier = 0.4f; //Damage multiplier for the glass stars it shoots (Shoots 3x glass stars when not charged, shoots 2x glass stars + one beam when charged) public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier - public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets + public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 9c4b94b953..fc811c35c8 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -355,7 +355,7 @@ namespace CalamityMod.Items.Weapons.Melee spriteBatch.Draw(itemTexture, position, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); return false; } - + // Draw all particles. @@ -381,7 +381,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D itemTexture = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); //Use the "projectile" sprite which is flipped so its consistent in lighting with the rest of the line, since its actual sprite is flipped so the swings may look normal + Texture2D itemTexture = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); //Use the "projectile" sprite which is flipped so its consistent in lighting with the rest of the line, since its actual sprite is flipped so the swings may look normal spriteBatch.Draw(itemTexture, item.Center - Main.screenPosition, null, lightColor, rotation, item.Size * 0.5f, scale, SpriteEffects.None, 0f); return false; } diff --git a/Items/Weapons/Ranged/ChickenCannon.cs b/Items/Weapons/Ranged/ChickenCannon.cs index 9f57cedd25..6b400dc45b 100644 --- a/Items/Weapons/Ranged/ChickenCannon.cs +++ b/Items/Weapons/Ranged/ChickenCannon.cs @@ -45,8 +45,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-20, 0); public override bool AltFunctionUse(Player player) => true; - - // Right click doesn't use ammo because it's a detonation signal. + + // Right click doesn't use ammo because it's a detonation signal. public override bool ConsumeAmmo(Player player) => player.altFunctionUse != 2; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 || player.altFunctionUse == 2; diff --git a/Items/Weapons/Ranged/ClaretCannon.cs b/Items/Weapons/Ranged/ClaretCannon.cs index 25c03cf826..3e657a1138 100644 --- a/Items/Weapons/Ranged/ClaretCannon.cs +++ b/Items/Weapons/Ranged/ClaretCannon.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Claret Cannon"); - Tooltip.SetDefault("Fires strings of 3 bullets\n" + + Tooltip.SetDefault("Fires strings of 3 bullets\n" + "Converts musket balls into bloody tears that drain enemy health"); } diff --git a/Items/Weapons/Ranged/ClockworkBow.cs b/Items/Weapons/Ranged/ClockworkBow.cs index 6444bbd7dd..c004344a71 100644 --- a/Items/Weapons/Ranged/ClockworkBow.cs +++ b/Items/Weapons/Ranged/ClockworkBow.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Ranged recipe.AddRecipe(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; - + public override float UseTimeMultiplier(Player player) { return 1f; diff --git a/Items/Weapons/Ranged/Condemnation.cs b/Items/Weapons/Ranged/Condemnation.cs index f7cbbdd097..1fa7699a38 100644 --- a/Items/Weapons/Ranged/Condemnation.cs +++ b/Items/Weapons/Ranged/Condemnation.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Ranged public class Condemnation : ModItem { public const int MaxLoadedArrows = 8; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Condemnation"); diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index 5fc7c0519c..d97854384d 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Ranged Vector2 vel = new Vector2(speedX, speedY); int[] bulletIDs = new int[PelletsPerShot]; float spreadFactor = 1f; - + // Right click full auto: Randomly intermix three regular bullets and three Dragon's Breath Rounds in a wider spread if (player.altFunctionUse == 2) { diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index 444132b718..cc4148c454 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ranged public class Drataliornus : ModItem { private const double RightClickDamageRatio = 0.6; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Drataliornus"); diff --git a/Items/Weapons/Ranged/HalibutCannon.cs b/Items/Weapons/Ranged/HalibutCannon.cs index 755a102e17..e05478b1ad 100644 --- a/Items/Weapons/Ranged/HalibutCannon.cs +++ b/Items/Weapons/Ranged/HalibutCannon.cs @@ -6,7 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Ranged { public class HalibutCannon : ModItem - { + { public override void SetStaticDefaults() { DisplayName.SetDefault("Halibut Cannon"); diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index 1b5fce7058..8b0be3da8a 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public const float NormalArrowDamageMult = 1.25f; private static int[] ExoArrows; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Heavenly Gale"); diff --git a/Items/Weapons/Ranged/Megalodon.cs b/Items/Weapons/Ranged/Megalodon.cs index b88dcbbbbf..9606eef67f 100644 --- a/Items/Weapons/Ranged/Megalodon.cs +++ b/Items/Weapons/Ranged/Megalodon.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged if (shotType == 1) Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); - else + else Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); shotType++; diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index 9816fe5208..faed226645 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -97,7 +97,7 @@ namespace CalamityMod.Items.Weapons.Ranged finalShot = false; } - + return false; } diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 607d55c0b9..32dafa8eb0 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public const float AmmoNotConsumeChance = 0.9f; private const float AltFireShootSpeed = 17f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Photoviscerator"); diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index f934440104..1919b50e8c 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -58,18 +58,18 @@ namespace CalamityMod.Items.Weapons.Ranged shotType = 1; rocket = true; } - + if (!rocket) { if (shotType % 2 == 1) Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); else Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); - + shotType++; } else - { + { Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(damage * 5), knockBack, player.whoAmI, 0f, 0f); rocket = false; } diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index 76da0f3d66..66532b46c4 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ranged public class SomaPrime : ModItem { private static readonly float XYInaccuracy = 0.32f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Soma Prime"); diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 938a5f388f..eecf7c2c8f 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Rogue return true; } - + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -61,6 +61,6 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.SetResult(this, 1); recipe.AddRecipe(); } - + } } diff --git a/Items/Weapons/Rogue/BurningStrife.cs b/Items/Weapons/Rogue/BurningStrife.cs index 84a5bcbdc2..765ab79438 100644 --- a/Items/Weapons/Rogue/BurningStrife.cs +++ b/Items/Weapons/Rogue/BurningStrife.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Burning Strife"); - Tooltip.SetDefault("Throws a shadowflame spiky ball that bursts into flames\n" + + Tooltip.SetDefault("Throws a shadowflame spiky ball that bursts into flames\n" + "Stealth Strikes make the ball linger and explode more violently\n" + "'Definitely not pocket safe'"); } @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shootSpeed = 8f; item.shoot = ModContent.ProjectileType(); - item.Calamity().rogue = true; + item.Calamity().rogue = true; } // Terraria seems to really dislike high crit values in SetDefaults @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Rogue if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles)) { Main.projectile[proj].Calamity().stealthStrike = true; - Main.projectile[proj].penetrate = 5; + Main.projectile[proj].penetrate = 5; } return false; } diff --git a/Items/Weapons/Rogue/Eradicator.cs b/Items/Weapons/Rogue/Eradicator.cs index a1acb6d860..ca7fc7209e 100644 --- a/Items/Weapons/Rogue/Eradicator.cs +++ b/Items/Weapons/Rogue/Eradicator.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Rogue public class Eradicator : RogueWeapon { public static float Speed = 10.5f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Eradicator"); diff --git a/Items/Weapons/Rogue/FinalDawn.cs b/Items/Weapons/Rogue/FinalDawn.cs index 2d4aa405b1..53eb33ad6b 100644 --- a/Items/Weapons/Rogue/FinalDawn.cs +++ b/Items/Weapons/Rogue/FinalDawn.cs @@ -46,4 +46,4 @@ namespace CalamityMod.Items.Weapons.Rogue player.ownedProjectileCounts[ProjectileType()] + player.ownedProjectileCounts[ProjectileType()] <= 0; } -} \ No newline at end of file +} diff --git a/Items/Weapons/Rogue/HeavenfallenStardisk.cs b/Items/Weapons/Rogue/HeavenfallenStardisk.cs index f44c9b2865..c50f14c3b2 100644 --- a/Items/Weapons/Rogue/HeavenfallenStardisk.cs +++ b/Items/Weapons/Rogue/HeavenfallenStardisk.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Rogue else { Projectile.NewProjectile(position.X, position.Y, 0f, -10f, type, damage, knockBack, player.whoAmI); - } + } return false; } } diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index daa44fd7eb..7814dc3772 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue { // For more consistent DPS, always alternates between throwing 1 and 2 instead of picking randomly private bool throwTwo = true; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Hypothermia"); diff --git a/Items/Weapons/Rogue/MoltenAmputator.cs b/Items/Weapons/Rogue/MoltenAmputator.cs index 30055ef004..38696d21fa 100644 --- a/Items/Weapons/Rogue/MoltenAmputator.cs +++ b/Items/Weapons/Rogue/MoltenAmputator.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Rogue public class MoltenAmputator : RogueWeapon { public const float Speed = 21f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Molten Amputator"); diff --git a/Items/Weapons/Rogue/Nychthemeron.cs b/Items/Weapons/Rogue/Nychthemeron.cs index fd837b4049..a5eda8dcd4 100644 --- a/Items/Weapons/Rogue/Nychthemeron.cs +++ b/Items/Weapons/Rogue/Nychthemeron.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Rogue { int pIndex = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f); int pID = Main.projectile[pIndex].identity; - + CreateOrbs(position, orbDamage, knockBack, pID, player, false); } return false; diff --git a/Items/Weapons/Rogue/Penumbra.cs b/Items/Weapons/Rogue/Penumbra.cs index 6a70ba8894..6b0ef572b0 100644 --- a/Items/Weapons/Rogue/Penumbra.cs +++ b/Items/Weapons/Rogue/Penumbra.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void GetWeaponCrit(Player player, ref int crit) => crit += 16; public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { + { if (player.Calamity().StealthStrikeAvailable()) { Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); diff --git a/Items/Weapons/Rogue/Plaguenade.cs b/Items/Weapons/Rogue/Plaguenade.cs index a61e384869..ab158c5f4d 100644 --- a/Items/Weapons/Rogue/Plaguenade.cs +++ b/Items/Weapons/Rogue/Plaguenade.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Plaguenade"); - Tooltip.SetDefault("Releases a swarm of angry plague bees\n" + + Tooltip.SetDefault("Releases a swarm of angry plague bees\n" + "Stealth strikes spawn more bees and generate a larger explosion"); } diff --git a/Items/Weapons/Rogue/TerrorTalons.cs b/Items/Weapons/Rogue/TerrorTalons.cs index 0f650af1bd..2bb1be56b2 100644 --- a/Items/Weapons/Rogue/TerrorTalons.cs +++ b/Items/Weapons/Rogue/TerrorTalons.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Rogue public class TerrorTalons : RogueWeapon { private float sign = 1f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Terror Talons"); diff --git a/Items/Weapons/Summon/MidnightSunBeacon.cs b/Items/Weapons/Summon/MidnightSunBeacon.cs index 5af2a918a0..7bdf3ca282 100644 --- a/Items/Weapons/Summon/MidnightSunBeacon.cs +++ b/Items/Weapons/Summon/MidnightSunBeacon.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Summon public class MidnightSunBeacon : ModItem { public const float MachineGunRate = 18f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Midnight Sun Beacon"); diff --git a/Items/Weapons/Summon/PrototypeAndromechaRing.cs b/Items/Weapons/Summon/PrototypeAndromechaRing.cs index 78f2cbb50e..4ad2c5cef3 100644 --- a/Items/Weapons/Summon/PrototypeAndromechaRing.cs +++ b/Items/Weapons/Summon/PrototypeAndromechaRing.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Summon { for (int i = 0; i < Main.projectile.Length; i++) { - if (Main.projectile[i].active && + if (Main.projectile[i].active && Main.projectile[i].type == item.shoot && Main.projectile[i].owner == player.whoAmI) { diff --git a/Items/Weapons/Summon/ScabRipper.cs b/Items/Weapons/Summon/ScabRipper.cs index 46619e3fa4..708433fd6d 100644 --- a/Items/Weapons/Summon/ScabRipper.cs +++ b/Items/Weapons/Summon/ScabRipper.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Summon } return false; } - + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/Summon/VileFeeder.cs b/Items/Weapons/Summon/VileFeeder.cs index d0ffa427e6..eee049dd82 100644 --- a/Items/Weapons/Summon/VileFeeder.cs +++ b/Items/Weapons/Summon/VileFeeder.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Summon } return false; } - + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Localization/CalamityLocalization.cs b/Localization/CalamityLocalization.cs index 10c3cd54c1..23bf802fc9 100644 --- a/Localization/CalamityLocalization.cs +++ b/Localization/CalamityLocalization.cs @@ -145,7 +145,7 @@ namespace CalamityMod.Localization new [] { "HardmodeOreTier2Text", "Your world has been blessed with Mythril and Orichalcum!" }, new [] { "HardmodeOreTier3Text", "Your world has been blessed with Adamantite and Titanium!" }, new [] { "HardmodeOreTier4Text", "The hallow has been blessed with consecrated stone!" }, - + new [] { "BloodMoonText", "The Blood Moon is rising..." }, new [] { "DargonBossText", "The dark sun awaits." }, diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 61f6aefc5b..43c11cd18e 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -92,7 +92,7 @@ namespace CalamityMod case "cryogen": return CalamityWorld.downedCryogen; - + case "acid rain 2": case "acidrain 2": case "acidrain2": @@ -105,7 +105,7 @@ namespace CalamityMod case "acidrainscourge": case "acidrainaquaticscourge": return CalamityWorld.downedAquaticScourgeAcidRain; - + case "aquaticscourge": case "aquatic scourge": return CalamityWorld.downedAquaticScourge; @@ -540,7 +540,7 @@ namespace CalamityMod public static float AddRogueVelocity(Player p, float add) => p is null ? 1f : (p.Calamity().throwingVelocity += add); public static float GetCurrentStealth(Player p) => p?.Calamity()?.rogueStealth ?? 0f; - + public static float GetMaxStealth(Player p) => p?.Calamity()?.rogueStealthMax ?? 0f; public static float AddMaxStealth(Player p, float add) => p is null ? 0f : (p.Calamity().rogueStealthMax += add); @@ -1853,7 +1853,7 @@ namespace CalamityMod AcidRainEvent.UpdateInvasion(false); } return true; - + // This is intentionally separate from the above because it will stop other events when they are added. case "AbominationnClearEvents": bool eventActive = CalamityWorld.rainingAcid; @@ -1953,8 +1953,8 @@ namespace CalamityMod // In the following two mod calls, the first argument is the NPC type, the second is the time change context (-1 being night, 0 being nothing, and 1 being day), // the third being the boss spawning function, the fourth being the overriding countdown to use, the fifth being whether the boss uses a special sound on spawning, - // the sixth being the dimness factor that Boss Rush should become once the boss is currently present, the seventh being the array of NPCs present in the battle that - // should not be deleted by the Boss Rush itself, and the eight being the potential NPCs that will end up killing, assuming the initial boss isn't + // the sixth being the dimness factor that Boss Rush should become once the boss is currently present, the seventh being the array of NPCs present in the battle that + // should not be deleted by the Boss Rush itself, and the eight being the potential NPCs that will end up killing, assuming the initial boss isn't // that (such as P1 Hive Mind turning into its second form and you being expected to kill that). case "GetBossRushEntries": var entries = new List<(int, int, Action, int, bool, float, int[], int[])>(); diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index b4e452ef27..6d825ef3d2 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -619,7 +619,7 @@ namespace CalamityMod AddBoss(bossChecklist, calamity, "Adult Eidolon Wyrm", order, type, DownedAdultEidolonWyrm, summon, loot, collection, instructions, despawn, bossLogTex); } } - + private static void AddCalamityInvasions(Mod bossChecklist, Mod calamity) { // Initial Acid Rain diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index 9ca6903c5e..b8325fe278 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.AcidRain { waterAbove = true; break; - } + } } if (waterAbove) @@ -156,7 +156,7 @@ namespace CalamityMod.NPCs.AcidRain if (npc.velocity.Length() > 1.5f) CalamityGlobalNPC.DrawAfterimage(npc, spriteBatch, drawColor, Color.Transparent, directioning: true); } - + public override void HitEffect(int hitDirection, double damage) { for (int k = 0; k < 8; k++) diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index 7517105795..c11a5c0c2b 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.AcidRain } // Randomly prepare to shoot a laser. - if (Main.netMode != NetmodeID.MultiplayerClient && Math.Abs(Target.Center.X - npc.Center.X) < 250f && Target.Center.X < npc.Center.X && + if (Main.netMode != NetmodeID.MultiplayerClient && Math.Abs(Target.Center.X - npc.Center.X) < 250f && Target.Center.X < npc.Center.X && LaserShootCountdown == 0f && Main.rand.NextBool(110) && !Target.npcTypeNoAggro[npc.type]) { LaserShootCountdown = 600f; diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index 9d7717b6d9..abefc16534 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.AcidRain } public override void AI() - { + { Lighting.AddLight(npc.Center, 0.3f, 1.5f, 0.3f); int auraSize = 200; //roughly 12 blocks (half the size of Wither Beast aura) @@ -101,7 +101,7 @@ namespace CalamityMod.NPCs.AcidRain { try { - } + } catch { return; diff --git a/NPCs/AcidRain/SulfurousSkater.cs b/NPCs/AcidRain/SulfurousSkater.cs index 6f6dfe5763..78e6190089 100644 --- a/NPCs/AcidRain/SulfurousSkater.cs +++ b/NPCs/AcidRain/SulfurousSkater.cs @@ -134,7 +134,7 @@ namespace CalamityMod.NPCs.AcidRain else npc.knockBackResist = 0f; } - + public void DoFlyMovement() { npc.knockBackResist = 0.5f; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index b23ccc6df1..7f95d73ba6 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.AquaticScourge else if (npc.localAI[3] > 0f) color = Color.Lerp(color, Color.SandyBrown, MathHelper.Clamp(npc.localAI[3] / 90f, 0f, 1f)); } - + spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); return false; diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 854ec1ab93..00eda7a84d 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -2955,7 +2955,7 @@ namespace CalamityMod.NPCs npc.localAI[1] += 1f; if (death) npc.localAI[2] += 1f + 0.33f * (1f - lifeRatio); - + if (phase3) { npc.localAI[1] += 1f; @@ -6903,7 +6903,7 @@ namespace CalamityMod.NPCs { Projectile.NewProjectile(vectorCenter, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 15f, i * offsetAngle); } - + totalProjectiles = 16; chains = 4; float velocityTimer = 90f / (totalProjectiles / chains); diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 9d155b31a6..667c88bc19 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs } /// - /// Causes an NPC to run on the X axis until it hits the maximum speed and decclerates as needed. + /// Causes an NPC to run on the X axis until it hits the maximum speed and decclerates as needed. /// Works best with fighter AI based NPCs. /// /// The NPC to manipulate @@ -314,7 +314,7 @@ namespace CalamityMod.NPCs } if (npcType == NPCID.CultistArcherBlue || npcType == NPCID.CultistArcherWhite) { - // Pissed off + // Pissed off if (npc.ai[3] < 0f) { npc.damage = 0; @@ -1063,7 +1063,7 @@ namespace CalamityMod.NPCs // This variable means so many fucking things for different NPCs // Such as npc spawn timer, projectile timer, ect // From what I can gather, the ai2 value's max for spawning things also varies - // As a result, I'll just leave this as flag7. If anyone has + // As a result, I'll just leave this as flag7. If anyone has // Ideas for a better variable name, please change it bool flag7 = npc.ai[2] <= 0f; if (npcType <= NPCID.RayGunner) @@ -1098,7 +1098,7 @@ namespace CalamityMod.NPCs { goto PrepareToShoot; } - // If anyone can give me an explanation of the real noticable differences between + // If anyone can give me an explanation of the real noticable differences between //& and && (same with | and ||) with booleans, // I'd greatly appreciate it PrepareToShoot: @@ -5498,9 +5498,9 @@ namespace CalamityMod.NPCs npc.type == NPCID.VoodooDemon || npc.type == NPCID.GiantBat || npc.type == NPCID.IlluminantBat || - npc.type == NPCID.IceBat || - npc.type == NPCID.Lavabat || - npc.type == NPCID.GiantFlyingFox || + npc.type == NPCID.IceBat || + npc.type == NPCID.Lavabat || + npc.type == NPCID.GiantFlyingFox || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType()) { @@ -5557,8 +5557,8 @@ namespace CalamityMod.NPCs // Turn back into a walking bat when possible if (npc.type == NPCID.VampireBat && Main.netMode != NetmodeID.MultiplayerClient) { - if (npc.Distance(Main.player[npc.target].Center) < 200f && - npc.Center.Y < Main.player[npc.target].Center.Y && + if (npc.Distance(Main.player[npc.target].Center) < 200f && + npc.Center.Y < Main.player[npc.target].Center.Y && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { npc.Transform(NPCID.Vampire); @@ -6018,7 +6018,7 @@ namespace CalamityMod.NPCs npc.ai[0] = 1f; return false; } - // Collision + // Collision // Turn around on X collision if (npc.collideX) { @@ -8959,9 +8959,9 @@ namespace CalamityMod.NPCs // Make it rain float minXRainDistance = 150f; - if (npc.Center.X > Main.player[npc.target].position.X - minXRainDistance && + if (npc.Center.X > Main.player[npc.target].position.X - minXRainDistance && npc.position.X < Main.player[npc.target].Center.X + minXRainDistance && - npc.Center.Y < Main.player[npc.target].position.Y && + npc.Center.Y < Main.player[npc.target].position.Y && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && Main.netMode != NetmodeID.MultiplayerClient) { @@ -9510,7 +9510,7 @@ namespace CalamityMod.NPCs return false; } - // If a player is below and nearby the probe, become active + // If a player is below and nearby the probe, become active if (distanceFromPlayer < 440f && Main.player[playerIndex].Center.Y > npc.Center.Y) { npc.ai[0] = 1f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 59cff5306d..81e2b86095 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1231,7 +1231,7 @@ namespace CalamityMod.NPCs { if (CalamityWorld.death) npc.lifeMax = (int)(npc.lifeMax * 2.0); - + npc.scale = CalamityWorld.death ? 2f : 1.2f; } else if (npc.type == NPCID.SkeletronPrime) @@ -2218,7 +2218,7 @@ namespace CalamityMod.NPCs 0f); } - public static void DrawAfterimage(NPC npc, SpriteBatch spriteBatch, Color startingColor, Color endingColor, Texture2D texture = null, + public static void DrawAfterimage(NPC npc, SpriteBatch spriteBatch, Color startingColor, Color endingColor, Texture2D texture = null, Func rotationCalculation = null, bool directioning = false, bool invertedDirection = false) { if (NPCID.Sets.TrailingMode[npc.type] != 1) @@ -2235,7 +2235,7 @@ namespace CalamityMod.NPCs spriteEffects ^= SpriteEffects.FlipHorizontally; // Same as x XOR 1, or x XOR TRUE, which inverts the bit. In this case, this reverses the horizontal flip } - // Set the rotation calculation to a predefined value. The null default is solely so that + // Set the rotation calculation to a predefined value. The null default is solely so that if (rotationCalculation is null) { rotationCalculation = (nPC, afterimageIndex) => nPC.rotation; @@ -3369,7 +3369,7 @@ namespace CalamityMod.NPCs { CalamityGlobalAI.DD2PortalAI(npc); return false; - } + } return true; } @@ -4036,7 +4036,7 @@ namespace CalamityMod.NPCs if (CalamityLists.pierceResistList.Contains(npc.type)) PierceResistGlobal(projectile, npc, ref damage); - + if (modPlayer.camper && !player.StandingStill()) damage = (int)(damage * 0.1); } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 0a2ea75d99..09986773f9 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -968,7 +968,7 @@ namespace CalamityMod.NPCs DropHelper.DropItemChance(npc, ItemID.SharkToothNecklace, Main.expertMode ? 15 : 25); DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 15 : 25); break; - + case NPCID.IchorSticker: DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 15 : 25); break; diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index e6ab48db33..c6a81b4876 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -216,7 +216,7 @@ namespace CalamityMod.NPCs { alreadySet = true; return currentName; - } + } alreadySet = true; int index = Main.rand.Next(numVanillaNames + patreonNames.Length); @@ -860,7 +860,7 @@ namespace CalamityMod.NPCs } else if (Main.LocalPlayer.Calamity().gDefense && Main.LocalPlayer.Calamity().gOffense) { - chat = "Aww, they're so cute, do they have names?"; + chat = "Aww, they're so cute, do they have names?"; } } break; diff --git a/NPCs/CalamityVanillaMinibossesAI.cs b/NPCs/CalamityVanillaMinibossesAI.cs index 33dd3645a4..d22a445f42 100644 --- a/NPCs/CalamityVanillaMinibossesAI.cs +++ b/NPCs/CalamityVanillaMinibossesAI.cs @@ -186,7 +186,7 @@ namespace CalamityMod.NPCs npc.ai[3] = 0f; npc.netUpdate = true; } - + npc.spriteDirection = npc.direction = (npc.velocity.X > 0).ToDirectionInt(); npc.rotation = (npc.rotation * 4f + npc.velocity.X * 0.025f) / 5f; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 6da5539912..e82c50d84c 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.DevourerofGods DevourerofGodsHead modNPC = head?.ModNPC() ?? null; if (head is null || modNPC.AwaitingPhase2Teleport || !modNPC.Phase2Started) return; - + rotation = npc.rotation; } @@ -205,7 +205,7 @@ namespace CalamityMod.NPCs.DevourerofGods { if (Main.npc[(int)npc.ai[2]].ModNPC()?.AttemptingToEnterPortal ?? false) { - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile portal = Main.projectile[Main.npc[(int)npc.ai[2]].ModNPC().PortalIndex]; float newOpacity = 1f - Utils.InverseLerp(270f, 100f, npc.Distance(portal.Center), true); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 28e91e2729..9a8de1565a 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -457,7 +457,7 @@ namespace CalamityMod.NPCs.DevourerofGods npc.netUpdate = true; } - // Dialogue the moment the second phase starts + // Dialogue the moment the second phase starts if (CalamityWorld.DoGSecondStageCountdown == 60) { string key = "Mods.CalamityMod.EdgyBossText10"; @@ -1994,7 +1994,7 @@ namespace CalamityMod.NPCs.DevourerofGods } Vector2 newPosition = GetRiftLocation(true); - + if ((!AwaitingPhase2Teleport && (player.dead || !player.active)) || newPosition == default) return; @@ -2080,7 +2080,7 @@ namespace CalamityMod.NPCs.DevourerofGods }; for (int i = 0; i < Main.maxNPCs; i++) { - if (segments.Contains(Main.npc[i].type) && Main.npc[i].active && + if (segments.Contains(Main.npc[i].type) && Main.npc[i].active && (Main.npc[i].type == segments[1] || Main.npc[i].ModNPC().SegmentIndex == index)) { for (int j = 0; j < 20; j++) diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 40ab6d7d1e..221c29eee6 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -152,7 +152,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo npc.Calamity().VulnerableToSickness = false; npc.Calamity().VulnerableToElectricity = true; } - + public override void BossHeadSlot(ref int index) { if (SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune) diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index cae3f83555..28d8eee726 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -340,7 +340,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares revenge ? AresBody.deathrayTelegraphDuration_Rev : expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal; // Variable to disable deathray firing - bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || + bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || (calamityGlobalNPC_Body.newAI[2] >= deathraySpiralTelegraphDuration + AresBody.deathrayDuration - 10 && fireNormalLasers) || (calamityGlobalNPC_Body.newAI[3] == 0f && fireNormalLasers); diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 681151d7ed..5c36e1db2c 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -346,7 +346,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares revenge ? AresBody.deathrayTelegraphDuration_Rev : expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal; // Variable to cancel plasma bolt firing - bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || + bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || (calamityGlobalNPC_Body.newAI[2] >= deathrayTelegraphDuration + AresBody.deathrayDuration - 10 && calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays) || (calamityGlobalNPC_Body.newAI[3] == 0f && calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 498db632fa..56c3038e61 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.Calamity().newAI[i] = reader.ReadSingle(); } - public float GetSlowdownAreaEdgeRadius(bool lastMechAlive) => + public float GetSlowdownAreaEdgeRadius(bool lastMechAlive) => ((CalamityWorld.malice || BossRushEvent.BossRushActive) ? 400f : CalamityWorld.death ? 600f : CalamityWorld.revenge ? 700f : Main.expertMode ? 800f : 1000f) * (lastMechAlive ? 0.6f : 1f); public int CheckForOtherMechs(ref Player target, out bool exoPrimeAlive, out bool exoTwinsAlive) diff --git a/NPCs/HiveMind/HiveCyst.cs b/NPCs/HiveMind/HiveCyst.cs index 6ae83db4e5..6abbf53083 100644 --- a/NPCs/HiveMind/HiveCyst.cs +++ b/NPCs/HiveMind/HiveCyst.cs @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.HiveMind bool corrupt = TileID.Sets.Corrupt[spawnInfo.spawnTileType] || spawnInfo.spawnTileType == TileID.Demonite && spawnInfo.player.ZoneCorrupt; if (anyBossElements || spawnInfo.playerSafe || !corrupt) return 0f; - + if (NPC.downedBoss2 && !CalamityWorld.downedHiveMind) return 1.5f; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 748e91192e..b5f56cbb7a 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.HiveMind Vector2 center = npc.Center - Main.screenPosition; spriteBatch.Draw(texture, center, frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); - + return false; } diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index f7c2e87cf9..a5e0ce1fd4 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.NormalNPCs { npc.ai[0] = (int)value; npc.netUpdate = true; - } + } } } public bool Phase2 => npc.life < npc.lifeMax * 0.5f; diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 6f06582e7b..16bea12d70 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.OldDuke Main.npcFrameCount[npc.type] = 7; NPCID.Sets.TrailingMode[npc.type] = 1; } - + public override void SetDefaults() { npc.width = 150; @@ -425,7 +425,7 @@ namespace CalamityMod.NPCs.OldDuke { player.AddBuff(ModContent.BuffType(), 480); } - + public override void HitEffect(int hitDirection, double damage) { if (npc.life > 0) diff --git a/NPCs/OldDuke/OldDukeSharkron.cs b/NPCs/OldDuke/OldDukeSharkron.cs index f0673d5b3a..ae7528c6b5 100644 --- a/NPCs/OldDuke/OldDukeSharkron.cs +++ b/NPCs/OldDuke/OldDukeSharkron.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.OldDuke DisplayName.SetDefault("Sulphurous Sharkron"); NPCID.Sets.TrailingMode[npc.type] = 1; } - + public override void SetDefaults() { npc.Calamity().canBreakPlayerDefense = true; @@ -306,4 +306,4 @@ namespace CalamityMod.NPCs.OldDuke } } } -} \ No newline at end of file +} diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index 871f938250..cabb69ee2b 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.OldDuke { DisplayName.SetDefault("Tooth Ball"); } - + public override void SetDefaults() { npc.Calamity().canBreakPlayerDefense = true; @@ -273,4 +273,4 @@ namespace CalamityMod.NPCs.OldDuke } } } -} \ No newline at end of file +} diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index ff28bc3ac2..9d75b25728 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians inertia *= 0.8f; float num1006 = 0.111111117f * inertia; - + if (npc.ai[0] == 0f) { if (Math.Abs(npc.Center.X - player.Center.X) > 10f) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 8b1b57f177..73caffc915 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1540,7 +1540,7 @@ namespace CalamityMod.NPCs.Providence if (Main.netMode == NetmodeID.SinglePlayer) { Main.NewText(Language.GetTextValue("Mods.CalamityMod.ProfanedBossText4"), Color.DarkOrange); - } + } } // Mark Providence as dead diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index 14754917c3..c00a0b32aa 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -63,7 +63,7 @@ namespace CalamityMod.NPCs.Ravager npc.damage = (int)(npc.defDamage * 1.5); else npc.damage = npc.defDamage; - } + } if (npc.ai[0] == 0f) { diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 64bc94e317..645e9e8c92 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -288,7 +288,7 @@ namespace CalamityMod.NPCs.StormWeaver for (int num957 = 0; num957 < Main.maxNPCs; num957++) { - if (Main.npc[num957].active && (Main.npc[num957].type == ModContent.NPCType() + if (Main.npc[num957].active && (Main.npc[num957].type == ModContent.NPCType() || Main.npc[num957].type == ModContent.NPCType() || Main.npc[num957].type == ModContent.NPCType())) { diff --git a/NPCs/SupremeCalamitas/SCalWormArm.cs b/NPCs/SupremeCalamitas/SCalWormArm.cs index 7f295d7f67..0232c2878a 100644 --- a/NPCs/SupremeCalamitas/SCalWormArm.cs +++ b/NPCs/SupremeCalamitas/SCalWormArm.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Center = center; Rotation = rotation; } - + public void SendData(BinaryWriter writer) { writer.WritePackedVector2(Center); diff --git a/NPCs/SupremeCalamitas/SCalWormHead.cs b/NPCs/SupremeCalamitas/SCalWormHead.cs index 8edf90966e..5479877912 100644 --- a/NPCs/SupremeCalamitas/SCalWormHead.cs +++ b/NPCs/SupremeCalamitas/SCalWormHead.cs @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } else lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); - + // Create arms. if (i >= 3 && i % 4 == 0) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index 8090e02681..0124e498ba 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class CultistAI { // Master Mode changes - // 1 - Use more dangerous attacks more often, + // 1 - Use more dangerous attacks more often, // 2 - Cycles between attacks faster public static bool BuffedCultistAI(NPC npc, Mod mod) { @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + // Phases bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -1070,7 +1070,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining for Cultist or Eidolon Wyrm float lifeRatio = Main.npc[(int)npc.ai[0]].life / (float)Main.npc[(int)npc.ai[0]].lifeMax; - + bool phase2 = lifeRatio < 0.7f; bool phase3 = lifeRatio < (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType() ? 0.6f : 0.55f); bool phase4 = lifeRatio < 0.4f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index 5cdcd96566..341d0f6a50 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + // Phases based on life percentage bool phase2 = lifeRatio < 0.85f; bool phase3 = lifeRatio < 0.7f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs index 37d3e1faa6..8b08797b4d 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs @@ -11,8 +11,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class DukeFishronAI { // Master Mode changes - // 1 - Cycles between attacks faster, - // 2 - Moves faster, + // 1 - Cycles between attacks faster, + // 2 - Moves faster, // 3 - Bigger tornadoes public static bool BuffedDukeFishronAI(NPC npc, Mod mod) { @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + // Variables bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs index 1c2c8afc10..bbe4a670b2 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; bool phase2 = lifeRatio < 0.75f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs b/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs index f6dc049fb7..489ec3d289 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs @@ -11,8 +11,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class GolemAI { // Master Mode changes - // 1 - Allow fists to travel further and faster, - // 2 - More projectiles, + // 1 - Allow fists to travel further and faster, + // 2 - More projectiles, // 3 - Fists can no longer be broken public static bool BuffedGolemAI(NPC npc, Mod mod) { @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + // Phases bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index fa305112fb..a51fd90ae1 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -12,9 +12,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class PlanteraAI { // Master Mode changes - // 1 - Spawns multiple tentacle rings that now rotate, - // 2 - Spawns far more tentacles to protect herself in phase 2 and they resist piercing, - // 3 - Spore gas spreads out far more, + // 1 - Spawns multiple tentacle rings that now rotate, + // 2 - Spawns far more tentacles to protect herself in phase 2 and they resist piercing, + // 3 - Spore gas spreads out far more, // 4 - Plantera is larger public static bool BuffedPlanteraAI(NPC npc, Mod mod) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs index fcfbb5bf4a..15ddce130d 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + // Phases bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.5f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs index 67b2ce8b84..7700f0cc37 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs @@ -11,7 +11,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class SkeletronAI { // Master Mode changes - // 1 - Arms are immune to damage and Skeletron no longer has increased defense while the arms are alive, + // 1 - Arms are immune to damage and Skeletron no longer has increased defense while the arms are alive, // 2 - Moves far more aggressively public static bool BuffedSkeletronAI(NPC npc, Mod mod) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs index c771a76d03..cfd4e05022 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs @@ -13,8 +13,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class SkeletronPrimeAI { // Master Mode changes - // 1 - Charges far quicker, - // 2 - Arms and head accelerate extremely fast, + // 1 - Charges far quicker, + // 2 - Arms and head accelerate extremely fast, // 3 - Arms remain closer to the head and resist piercing public static bool BuffedSkeletronPrimeAI(NPC npc, Mod mod) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs index cb2b91417a..0f05238a92 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs @@ -323,8 +323,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses #endregion // Master Mode changes - // 1 - Retinazer fires spreads of death lasers, moves and charges more often and faster, cycles attacks faster, - // 2 - Spazmatism moves and charges more often and faster, cycles attacks faster, + // 1 - Retinazer fires spreads of death lasers, moves and charges more often and faster, cycles attacks faster, + // 2 - Spazmatism moves and charges more often and faster, cycles attacks faster, // 3 - Retinazer is slightly smaller and Spazmatism is slightly larger #region Twins AI public static bool BuffedRetinazerAI(NPC npc, Mod mod) diff --git a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs index 61b46127fa..72b0903658 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs @@ -11,9 +11,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses public static class WallOfFleshAI { // Master Mode changes - // 1 - Hungries spawn detached and have more health, - // 2 - Moves quicker overall, - // 3 - Mouth vomits a tight spread of 3 demon scythes at the same time as its leech vomit, + // 1 - Hungries spawn detached and have more health, + // 2 - Moves quicker overall, + // 3 - Mouth vomits a tight spread of 3 demon scythes at the same time as its leech vomit, // 4 - Eyes become immune to damage and stop firing when the wall drops below 15% health public static bool BuffedWallofFleshAI(NPC npc, Mod mod) { @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - + // Clamp life ratio to prevent bad velocity math. lifeRatio = MathHelper.Clamp(lifeRatio, 0f, 1f); diff --git a/NPCs/VanillaNPCOverrides/RegularEnemies/SlimeAI.cs b/NPCs/VanillaNPCOverrides/RegularEnemies/SlimeAI.cs index 74ef42c487..fef07d2bfe 100644 --- a/NPCs/VanillaNPCOverrides/RegularEnemies/SlimeAI.cs +++ b/NPCs/VanillaNPCOverrides/RegularEnemies/SlimeAI.cs @@ -324,7 +324,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies if (isLavaSlime) verticalJumpSpeed += 2f; } - + // Perform the jump. npc.velocity.Y = -verticalJumpSpeed; npc.velocity.X += horizontalJumpSpeed * npc.direction; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 1dc5313f28..ceaa69f780 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -1992,9 +1992,9 @@ namespace CalamityMod.NPCs.Yharon npc.rotation += pie; npc.velocity = vector3 * spinPhaseVelocity; - + npc.localAI[3] = Main.rand.Next(2); - + break; } case 7: //fast charge diff --git a/Particles/AresCannonChargeParticleSet.cs b/Particles/AresCannonChargeParticleSet.cs index 5211b1a935..fdee9b8d30 100644 --- a/Particles/AresCannonChargeParticleSet.cs +++ b/Particles/AresCannonChargeParticleSet.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Particles public void DrawBloom(Vector2 basePosition) { - if (bloom != null) + if (bloom != null) { bloom.CustomDraw(Main.spriteBatch, basePosition); } @@ -112,4 +112,4 @@ namespace CalamityMod.Particles } } } -} \ No newline at end of file +} diff --git a/Particles/BaseParticleSet.cs b/Particles/BaseParticleSet.cs index 09ec9c137e..060fcfa356 100644 --- a/Particles/BaseParticleSet.cs +++ b/Particles/BaseParticleSet.cs @@ -98,4 +98,4 @@ namespace CalamityMod.Particles } } } -} \ No newline at end of file +} diff --git a/Particles/BloomLineVFX.cs b/Particles/BloomLineVFX.cs index 6ce3d3c175..49c371b71b 100644 --- a/Particles/BloomLineVFX.cs +++ b/Particles/BloomLineVFX.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Particles Rotation = 0; } - public override void CustomDraw(SpriteBatch spriteBatch) + public override void CustomDraw(SpriteBatch spriteBatch) { Texture2D tex = GeneralParticleHandler.GetTexture(Type); float rot = LineVector.ToRotation() + MathHelper.PiOver2; @@ -49,7 +49,7 @@ namespace CalamityMod.Particles spriteBatch.Draw(cap, Position + LineVector - Main.screenPosition, null, Color, rot, origin, scale, SpriteEffects.None, 0); } - + } } } diff --git a/Particles/ChargeUpLineVFX.cs b/Particles/ChargeUpLineVFX.cs index b1f1a7476f..0f57dd1d31 100644 --- a/Particles/ChargeUpLineVFX.cs +++ b/Particles/ChargeUpLineVFX.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Particles RelativeOffset = LineDirection.ToRotationVector2() * MinDistanceFromOrigin; } - public override void CustomDraw(SpriteBatch spriteBatch, Vector2 basePosition) + public override void CustomDraw(SpriteBatch spriteBatch, Vector2 basePosition) { Texture2D tex = ModContent.GetTexture("CalamityMod/Particles/Light"); diff --git a/Particles/EnchantedParticleSet.cs b/Particles/EnchantedParticleSet.cs index 4f4a5d894d..4b216e1ce3 100644 --- a/Particles/EnchantedParticleSet.cs +++ b/Particles/EnchantedParticleSet.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Particles public Color EdgeColor; public Color CenterColor; public override int ParticleLifetime => 50; - public ChargingEnergyParticleSet(int setLifetime, int particleSpawnRate, Color edgeColor, Color centerColor, float interpolationSpeed, float edgeOffset) : + public ChargingEnergyParticleSet(int setLifetime, int particleSpawnRate, Color edgeColor, Color centerColor, float interpolationSpeed, float edgeOffset) : base(setLifetime, particleSpawnRate) { EdgeColor = edgeColor; @@ -21,4 +21,4 @@ namespace CalamityMod.Particles public override Particle SpawnParticle() => new EnchantedParticle(Main.rand.NextVector2CircularEdge(1f, 1f) * EdgeOffset, ParticleLifetime, 0.1f, EdgeColor, CenterColor, InterpolationSpeed, EdgeOffset); } -} \ No newline at end of file +} diff --git a/Particles/FireParticleSet.cs b/Particles/FireParticleSet.cs index c6b51c2898..1efba278ab 100644 --- a/Particles/FireParticleSet.cs +++ b/Particles/FireParticleSet.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Particles public Color DarkColor; public override int ParticleLifetime => 50; - public FireParticleSet(int setLifetime, int particleSpawnRate, Color brightColor, Color darkColor, float spawnAreaCompactness, float relativePower) : + public FireParticleSet(int setLifetime, int particleSpawnRate, Color brightColor, Color darkColor, float spawnAreaCompactness, float relativePower) : base(setLifetime, particleSpawnRate) { BrightColor = brightColor; @@ -22,4 +22,4 @@ namespace CalamityMod.Particles public override Particle SpawnParticle() => new FireParticle(Main.rand.NextVector2Circular(1f, 1f) * SpawnAreaCompactness, ParticleLifetime, 0.06f, RelativePower, BrightColor, DarkColor); } -} \ No newline at end of file +} diff --git a/Particles/FusableParticleRenderLayer.cs b/Particles/FusableParticleRenderLayer.cs index 9d9941d6e1..7f89e6258f 100644 --- a/Particles/FusableParticleRenderLayer.cs +++ b/Particles/FusableParticleRenderLayer.cs @@ -1,6 +1,6 @@ namespace CalamityMod.Particles { - // The order of entries in this enumeration are in line with draw order + // The order of entries in this enumeration are in line with draw order // e.g. the first entry is the first drawn thing, the last entry is the last drawn thing. public enum FusableParticleRenderLayer { diff --git a/Particles/HeavySmoke.cs b/Particles/HeavySmoke.cs index c3bebcb39e..3c26e46aff 100644 --- a/Particles/HeavySmoke.cs +++ b/Particles/HeavySmoke.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Particles static int FrameAmount = 6; public HeavySmokeParticle(Vector2 position, Vector2 velocity, Color color, int lifetime, float scale, float opacity, float rotationSpeed = 0f, bool glowing = false, float hueshift = 0f, bool required = false) - { + { Position = position; Velocity = velocity; Color = color; diff --git a/Particles/LineVFX.cs b/Particles/LineVFX.cs index 783fb4cb0d..a625711be5 100644 --- a/Particles/LineVFX.cs +++ b/Particles/LineVFX.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Particles public Vector2 LineVector; public bool Concave; public bool Telegraph; //Denotes if the line is used as an enemy telegraph. In that case, it'll be marked as important - public float Expansion; + public float Expansion; public LineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, bool concave = false, bool telegraph = false, float expansion = 0f) { @@ -34,7 +34,7 @@ namespace CalamityMod.Particles Lifetime = 2; } - public override void CustomDraw(SpriteBatch spriteBatch) + public override void CustomDraw(SpriteBatch spriteBatch) { Texture2D tex; if (Concave) diff --git a/Particles/MediumMistParticle.cs b/Particles/MediumMistParticle.cs index d96a30f0f6..dd97f2c2c1 100644 --- a/Particles/MediumMistParticle.cs +++ b/Particles/MediumMistParticle.cs @@ -4,7 +4,7 @@ using Terraria; namespace CalamityMod.Particles { - public class MediumMistParticle : Particle + public class MediumMistParticle : Particle { public override string Texture => "CalamityMod/Particles/MediumMist"; public override int FrameVariants => 3; @@ -53,4 +53,4 @@ namespace CalamityMod.Particles } } -} \ No newline at end of file +} diff --git a/Particles/Particle.cs b/Particles/Particle.cs index f69530d024..6c810b140a 100644 --- a/Particles/Particle.cs +++ b/Particles/Particle.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Particles /// /// The ID of the particle inside of the general particle handler's array. This is set automatically when the particle is created /// - public int ID; + public int ID; /// /// The ID of the particle type as registered by the general particle handler. This is set automatically when the particle handler loads /// @@ -84,4 +84,4 @@ namespace CalamityMod.Particles public void Kill() => GeneralParticleHandler.RemoveParticle(this); } -} \ No newline at end of file +} diff --git a/Particles/SeaFoamParticle.cs b/Particles/SeaFoamParticle.cs index e496181cf4..2c6352052f 100644 --- a/Particles/SeaFoamParticle.cs +++ b/Particles/SeaFoamParticle.cs @@ -4,7 +4,7 @@ using Terraria; namespace CalamityMod.Particles { - public class SeaFoamParticle : Particle + public class SeaFoamParticle : Particle { public override string Texture => "CalamityMod/Particles/SeaFoam"; public override int FrameVariants => 3; @@ -41,4 +41,4 @@ namespace CalamityMod.Particles Color = Color.Lerp(ColorStart, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); } } -} \ No newline at end of file +} diff --git a/Particles/SmallSmokeParticle.cs b/Particles/SmallSmokeParticle.cs index 244555699f..6b8bd79945 100644 --- a/Particles/SmallSmokeParticle.cs +++ b/Particles/SmallSmokeParticle.cs @@ -4,7 +4,7 @@ using Terraria; namespace CalamityMod.Particles { - public class SmallSmokeParticle : Particle + public class SmallSmokeParticle : Particle { public override string Texture => "CalamityMod/Particles/SmallSmoke"; @@ -49,4 +49,4 @@ namespace CalamityMod.Particles } } -} \ No newline at end of file +} diff --git a/Particles/SparkParticle.cs b/Particles/SparkParticle.cs index e65d813ed0..3aa35377a0 100644 --- a/Particles/SparkParticle.cs +++ b/Particles/SparkParticle.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Particles public override bool SetLifetime => true; public override bool UseCustomDraw => true; public override bool UseAdditiveBlend => true; - + public override string Texture => "CalamityMod/Projectiles/StarProj"; public SparkParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color) diff --git a/Particles/SquishyLightParticle.cs b/Particles/SquishyLightParticle.cs index ae2ad2fb5f..6495a82e06 100644 --- a/Particles/SquishyLightParticle.cs +++ b/Particles/SquishyLightParticle.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Particles public override void Update() { - Velocity *= (LifetimeCompletion >= 0.34f) ? 0.93f : 1.02f; + Velocity *= (LifetimeCompletion >= 0.34f) ? 0.93f : 1.02f; Opacity = LifetimeCompletion > 0.5f ? (float)Math.Sin(LifetimeCompletion * MathHelper.Pi) * 0.2f + 0.8f : (float)Math.Sin(LifetimeCompletion * MathHelper.Pi); Scale *= 0.95f; @@ -43,7 +43,7 @@ namespace CalamityMod.Particles Color = Main.hslToRgb(Main.rgbToHsl(Color).X + HueShift, Main.rgbToHsl(Color).Y, Main.rgbToHsl(Color).Z); } - public override void CustomDraw(SpriteBatch spriteBatch) + public override void CustomDraw(SpriteBatch spriteBatch) { Texture2D tex = ModContent.GetTexture("CalamityMod/Particles/Light"); Texture2D bloomTex = ModContent.GetTexture("CalamityMod/Particles/BloomCircle"); diff --git a/Particles/ThanatosSmokeParticleSet.cs b/Particles/ThanatosSmokeParticleSet.cs index 48d48ef6db..90c7a59061 100644 --- a/Particles/ThanatosSmokeParticleSet.cs +++ b/Particles/ThanatosSmokeParticleSet.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Particles public float BaseMoveRotation; public float MoveRotationOffset; - public ThanatosSmokeParticleSet(int setLifetime, int particleSpawnRate, float baseMoveRotation, float spawnAreaCompactness, float relativePower) : + public ThanatosSmokeParticleSet(int setLifetime, int particleSpawnRate, float baseMoveRotation, float spawnAreaCompactness, float relativePower) : base(setLifetime, particleSpawnRate) { MoveRotationOffset = Main.rand.NextFloat(-0.36f, 0.36f); @@ -21,4 +21,4 @@ namespace CalamityMod.Particles public override Particle SpawnParticle() => new ThanatosSmokeParticle(Main.rand.NextVector2Circular(1f, 1f) * SpawnAreaCompactness, ParticleLifetime, 0.06f, RelativePower, BaseMoveRotation); } -} \ No newline at end of file +} diff --git a/Particles/WaterGlobParticle.cs b/Particles/WaterGlobParticle.cs index c416c4eb64..32656e707d 100644 --- a/Particles/WaterGlobParticle.cs +++ b/Particles/WaterGlobParticle.cs @@ -4,7 +4,7 @@ using Terraria; namespace CalamityMod.Particles { - public class WaterGlobParticle : Particle + public class WaterGlobParticle : Particle { public override string Texture => "CalamityMod/Particles/WaterGlob"; @@ -35,4 +35,4 @@ namespace CalamityMod.Particles } } -} \ No newline at end of file +} diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs index cfce2c0cf2..8f39a39418 100644 --- a/Prefixes/AccessoryPrefix.cs +++ b/Prefixes/AccessoryPrefix.cs @@ -76,4 +76,4 @@ namespace CalamityMod.Prefixes Camouflaged, Silent } -} \ No newline at end of file +} diff --git a/Prefixes/RoguePrefix.cs b/Prefixes/RoguePrefix.cs index 2e5ed4fb9d..130c3ad2b6 100644 --- a/Prefixes/RoguePrefix.cs +++ b/Prefixes/RoguePrefix.cs @@ -109,4 +109,4 @@ namespace CalamityMod.Prefixes Unbalanced, Atrocious } -} \ No newline at end of file +} diff --git a/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs b/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs index 67a42fe367..fb2740cabd 100644 --- a/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles if (projectile.scale > MaxScale) projectile.scale = MaxScale; } - + /// /// Handles direct attachment to things. The projectile.ai[1] array index is reserved for this. Does nothing by default. /// diff --git a/Projectiles/BaseProjectiles/BaseSpearProjectile.cs b/Projectiles/BaseProjectiles/BaseSpearProjectile.cs index fa3b703f08..0bb95b3261 100644 --- a/Projectiles/BaseProjectiles/BaseSpearProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSpearProjectile.cs @@ -116,10 +116,10 @@ namespace CalamityMod.Projectiles.BaseProjectiles // The motion moves in an imaginary circle, but the cane does not because it relies on // its ai[0] X multiplier, giving it the "swiping" motion. - Vector2 flatVelocity = Vector2.UnitX.RotatedBy(MathHelper.Pi + inverseAnimationCompletion * MathHelper.TwoPi) * + Vector2 flatVelocity = Vector2.UnitX.RotatedBy(MathHelper.Pi + inverseAnimationCompletion * MathHelper.TwoPi) * new Vector2(originalVelocitySpeed, projectile.ai[0]); - projectile.position += flatVelocity.RotatedBy(originalVelocityDirection) + + projectile.position += flatVelocity.RotatedBy(originalVelocityDirection) + new Vector2(originalVelocitySpeed + TravelSpeed, 0f).RotatedBy(originalVelocityDirection); // Determine how to rotate. The larger the 40 value is, the more rapidly the projectile rotates. @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles public override void AI() { Behavior(); - if ((SpearAiType == SpearType.GhastlyGlaiveSpear && !Main.player[projectile.owner].frozen) || + if ((SpearAiType == SpearType.GhastlyGlaiveSpear && !Main.player[projectile.owner].frozen) || SpearAiType == SpearType.TypicalSpear) { ExtraBehavior(); diff --git a/Projectiles/BaseProjectiles/BaseWhipProjectile.cs b/Projectiles/BaseProjectiles/BaseWhipProjectile.cs index b99eefe670..aa7a8415b6 100644 --- a/Projectiles/BaseProjectiles/BaseWhipProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseWhipProjectile.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles { direction *= -1f; } - // As ai[0], the timer, goes up, + // As ai[0], the timer, goes up, Vector2 velocityAdditive = (direction * (projectile.ai[0] / 30f * MathHelper.TwoPi - MathHelper.PiOver2)).ToRotationVector2(); // ai[1] = A starting rotation value. With a min of 0 and a max of pi/4 @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles DrawHandleSprite(in lightColor); Vector2 normalizedVelocity = Vector2.Normalize(projectile.velocity); - + float speed = projectile.velocity.Length() + 16f - 40f * projectile.scale; Vector2 bodyDrawPosition = projectile.Center.Floor() + normalizedVelocity * projectile.scale * 20f; @@ -283,7 +283,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles whipEndPosition - Main.screenPosition + Vector2.UnitY * Main.player[projectile.owner].gfxOffY, new Rectangle?(tailFrame), lightColor, - projectile.rotation + MathHelper.Pi, + projectile.rotation + MathHelper.Pi, FlailTexture.Frame(1, 1, 0, 0).Top(), projectile.scale, SpriteEffects.None, diff --git a/Projectiles/Boss/AresDeathBeamStart.cs b/Projectiles/Boss/AresDeathBeamStart.cs index 7bd92fb7ac..2a2fff5417 100644 --- a/Projectiles/Boss/AresDeathBeamStart.cs +++ b/Projectiles/Boss/AresDeathBeamStart.cs @@ -237,7 +237,7 @@ namespace CalamityMod.Projectiles.Boss public override bool CanHitPlayer(Player target) => projectile.scale >= 0.5f; - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/AresGaussNukeProjectileBoom.cs b/Projectiles/Boss/AresGaussNukeProjectileBoom.cs index 0789392486..8aa3256b55 100644 --- a/Projectiles/Boss/AresGaussNukeProjectileBoom.cs +++ b/Projectiles/Boss/AresGaussNukeProjectileBoom.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss //It only fades out near the end else opacity = (float)Math.Cos(((completion - 0.8f) / 0.2f * MathHelper.Pi) / 2f); ; - + return opacity * 0.85f; } public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Projectiles/Boss/AresLaserBeamStart.cs b/Projectiles/Boss/AresLaserBeamStart.cs index c706a73f42..ed442219f4 100644 --- a/Projectiles/Boss/AresLaserBeamStart.cs +++ b/Projectiles/Boss/AresLaserBeamStart.cs @@ -225,7 +225,7 @@ namespace CalamityMod.Projectiles.Boss } return false; } - + public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(ModContent.BuffType(), 300); @@ -233,7 +233,7 @@ namespace CalamityMod.Projectiles.Boss public override bool CanHitPlayer(Player target) => projectile.scale >= 0.5f; - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ArtemisLaser.cs b/Projectiles/Boss/ArtemisLaser.cs index 898539d08a..ee8073910d 100644 --- a/Projectiles/Boss/ArtemisLaser.cs +++ b/Projectiles/Boss/ArtemisLaser.cs @@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/AstralShot2.cs b/Projectiles/Boss/AstralShot2.cs index 124a1a84ff..cbee93a53e 100644 --- a/Projectiles/Boss/AstralShot2.cs +++ b/Projectiles/Boss/AstralShot2.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Boss } if (projectile.frame > 3) projectile.frame = 0; - + if (projectile.alpha > 0) projectile.alpha -= 25; if (projectile.alpha < 0) diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index c2516b8e0c..c70da72c51 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Boss return false; } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneFireblast.cs b/Projectiles/Boss/BrimstoneFireblast.cs index fa4ac4d058..2db0c21062 100644 --- a/Projectiles/Boss/BrimstoneFireblast.cs +++ b/Projectiles/Boss/BrimstoneFireblast.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneGigaBlast.cs b/Projectiles/Boss/BrimstoneGigaBlast.cs index 3886930607..42e38f1086 100644 --- a/Projectiles/Boss/BrimstoneGigaBlast.cs +++ b/Projectiles/Boss/BrimstoneGigaBlast.cs @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index 9f3543d6fc..dea8ba0639 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index da60ef8d7f..be62921dde 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 120); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index 8fe2b635ac..6ccca78a49 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -185,7 +185,7 @@ namespace CalamityMod.Projectiles.Boss drawCacheProjsBehindNPCs.Add(index); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneRay.cs b/Projectiles/Boss/BrimstoneRay.cs index 5db4e22cae..b3aebb5516 100644 --- a/Projectiles/Boss/BrimstoneRay.cs +++ b/Projectiles/Boss/BrimstoneRay.cs @@ -227,7 +227,7 @@ namespace CalamityMod.Projectiles.Boss public override bool CanHitPlayer(Player target) => projectile.scale >= 0.5f; - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/BrimstoneWave.cs b/Projectiles/Boss/BrimstoneWave.cs index 1b8fb238bc..78b8680e2d 100644 --- a/Projectiles/Boss/BrimstoneWave.cs +++ b/Projectiles/Boss/BrimstoneWave.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 120, true); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/DarkEnergyBall.cs b/Projectiles/Boss/DarkEnergyBall.cs index 36834e2f6a..757797f134 100644 --- a/Projectiles/Boss/DarkEnergyBall.cs +++ b/Projectiles/Boss/DarkEnergyBall.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/DarkOrb.cs b/Projectiles/Boss/DarkOrb.cs index 54a311961d..7da6fe6e87 100644 --- a/Projectiles/Boss/DarkOrb.cs +++ b/Projectiles/Boss/DarkOrb.cs @@ -559,7 +559,7 @@ namespace CalamityMod.Projectiles.Boss return false; } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/DoGBeam.cs b/Projectiles/Boss/DoGBeam.cs index 7ce0438753..51b6a9bf84 100644 --- a/Projectiles/Boss/DoGBeam.cs +++ b/Projectiles/Boss/DoGBeam.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Boss return new Color(255, 255, 255, 100); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/DoGBeamPortal.cs b/Projectiles/Boss/DoGBeamPortal.cs index 20709402a9..febe8acc94 100644 --- a/Projectiles/Boss/DoGBeamPortal.cs +++ b/Projectiles/Boss/DoGBeamPortal.cs @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Boss return new Color(255, 255, 255, 100); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/DoGDeath.cs b/Projectiles/Boss/DoGDeath.cs index 286027d931..690c25ec7e 100644 --- a/Projectiles/Boss/DoGDeath.cs +++ b/Projectiles/Boss/DoGDeath.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss return new Color(255, 255, 255, projectile.alpha); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/DoGFire.cs b/Projectiles/Boss/DoGFire.cs index ba3ac281f0..90e9aa682f 100644 --- a/Projectiles/Boss/DoGFire.cs +++ b/Projectiles/Boss/DoGFire.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss projectile.Damage(); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/EssenceDust.cs b/Projectiles/Boss/EssenceDust.cs index 9df3720440..69f9b9f4dc 100644 --- a/Projectiles/Boss/EssenceDust.cs +++ b/Projectiles/Boss/EssenceDust.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/FlareBomb.cs b/Projectiles/Boss/FlareBomb.cs index 05b142830d..6d9e2f1e96 100644 --- a/Projectiles/Boss/FlareBomb.cs +++ b/Projectiles/Boss/FlareBomb.cs @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/FlareDust.cs b/Projectiles/Boss/FlareDust.cs index c6e4f1ab90..0612388481 100644 --- a/Projectiles/Boss/FlareDust.cs +++ b/Projectiles/Boss/FlareDust.cs @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/FlareDust2.cs b/Projectiles/Boss/FlareDust2.cs index ee3eb1fd64..c66fa249a2 100644 --- a/Projectiles/Boss/FlareDust2.cs +++ b/Projectiles/Boss/FlareDust2.cs @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/Flarenado.cs b/Projectiles/Boss/Flarenado.cs index a39f126e40..98b0569004 100644 --- a/Projectiles/Boss/Flarenado.cs +++ b/Projectiles/Boss/Flarenado.cs @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 300); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index f574a34143..cbda9a2b87 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 240); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/HolyBomb.cs b/Projectiles/Boss/HolyBomb.cs index 733c4bc343..c58a5e474d 100644 --- a/Projectiles/Boss/HolyBomb.cs +++ b/Projectiles/Boss/HolyBomb.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/HolyFire.cs b/Projectiles/Boss/HolyFire.cs index c5f6f83c21..fc1cfb8040 100644 --- a/Projectiles/Boss/HolyFire.cs +++ b/Projectiles/Boss/HolyFire.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 120); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/HolyFire2.cs b/Projectiles/Boss/HolyFire2.cs index 412ac64605..a3c1cd43a4 100644 --- a/Projectiles/Boss/HolyFire2.cs +++ b/Projectiles/Boss/HolyFire2.cs @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 120); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/HolyFlare.cs b/Projectiles/Boss/HolyFlare.cs index 264cbc2a2e..db52145ceb 100644 --- a/Projectiles/Boss/HolyFlare.cs +++ b/Projectiles/Boss/HolyFlare.cs @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 120); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/HolySpear.cs b/Projectiles/Boss/HolySpear.cs index 4cf4f31e20..f415d72c53 100644 --- a/Projectiles/Boss/HolySpear.cs +++ b/Projectiles/Boss/HolySpear.cs @@ -178,7 +178,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/Infernado.cs b/Projectiles/Boss/Infernado.cs index 72ab89fd2d..a441b3afeb 100644 --- a/Projectiles/Boss/Infernado.cs +++ b/Projectiles/Boss/Infernado.cs @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 420); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/Infernado2.cs b/Projectiles/Boss/Infernado2.cs index 7314962449..edd1c8edcd 100644 --- a/Projectiles/Boss/Infernado2.cs +++ b/Projectiles/Boss/Infernado2.cs @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 420); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/InfernadoRevenge.cs b/Projectiles/Boss/InfernadoRevenge.cs index 969f9107cf..3d43085a08 100644 --- a/Projectiles/Boss/InfernadoRevenge.cs +++ b/Projectiles/Boss/InfernadoRevenge.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Boss drawPosition += (angle + Main.GlobalTime * i / 16f).ToRotationVector2() * 6f; spriteBatch.Draw(vortexTexture, drawPosition, null, drawColor, angle + MathHelper.PiOver2, vortexTexture.Size() * 0.5f, 0.9f, SpriteEffects.None, 0f); } - + return false; } @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 420); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index 383a60bf3c..960fe3ea1e 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 240); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/MoltenBlob.cs b/Projectiles/Boss/MoltenBlob.cs index 4ab9c88a4c..954996abb3 100644 --- a/Projectiles/Boss/MoltenBlob.cs +++ b/Projectiles/Boss/MoltenBlob.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(buffType, 90); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/OldDukeVortex.cs b/Projectiles/Boss/OldDukeVortex.cs index af168c3860..d6e3385db7 100644 --- a/Projectiles/Boss/OldDukeVortex.cs +++ b/Projectiles/Boss/OldDukeVortex.cs @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Boss for (int i = 0; i < Main.maxPlayers; i++) { Player player = Main.player[i]; - + float distance = Vector2.Distance(player.Center, projectile.Center); if (distance < distanceRequired && player.grappling[0] == -1) { diff --git a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs index 7aff492bd8..1c37cf8093 100644 --- a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs +++ b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Boss if (projectile.ai[0] % 10f == 9f) { Vector2 velocity = new Vector2(0f, -18f).RotatedByRandom(0.7f); - Projectile.NewProjectile(projectile.Top + new Vector2(Main.rand.NextFloat(-80f, 80f), 100f), velocity, + Projectile.NewProjectile(projectile.Top + new Vector2(Main.rand.NextFloat(-80f, 80f), 100f), velocity, ModContent.ProjectileType(), 65, 2f); } if (projectile.ai[0] % 35f == 34f) diff --git a/Projectiles/Boss/PhantomBlast.cs b/Projectiles/Boss/PhantomBlast.cs index 18fe425b25..99ddc38122 100644 --- a/Projectiles/Boss/PhantomBlast.cs +++ b/Projectiles/Boss/PhantomBlast.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/PhantomBlast2.cs b/Projectiles/Boss/PhantomBlast2.cs index 10d0a35932..6943e5185b 100644 --- a/Projectiles/Boss/PhantomBlast2.cs +++ b/Projectiles/Boss/PhantomBlast2.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/PhantomGhostShot.cs b/Projectiles/Boss/PhantomGhostShot.cs index 5682367455..942ba58515 100644 --- a/Projectiles/Boss/PhantomGhostShot.cs +++ b/Projectiles/Boss/PhantomGhostShot.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss return new Color(100, 250, 250, projectile.alpha); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/PhantomHookShot.cs b/Projectiles/Boss/PhantomHookShot.cs index acff7b3bf2..0e678a61dc 100644 --- a/Projectiles/Boss/PhantomHookShot.cs +++ b/Projectiles/Boss/PhantomHookShot.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss return new Color(100, 250, 250, projectile.alpha); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/PhantomMine.cs b/Projectiles/Boss/PhantomMine.cs index 39862c65f3..c5e099b1f9 100644 --- a/Projectiles/Boss/PhantomMine.cs +++ b/Projectiles/Boss/PhantomMine.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/PhantomShot.cs b/Projectiles/Boss/PhantomShot.cs index 110b26de04..eeb39b50b1 100644 --- a/Projectiles/Boss/PhantomShot.cs +++ b/Projectiles/Boss/PhantomShot.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 120); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/PhantomShot2.cs b/Projectiles/Boss/PhantomShot2.cs index 763eb4d753..3f676d115f 100644 --- a/Projectiles/Boss/PhantomShot2.cs +++ b/Projectiles/Boss/PhantomShot2.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 120); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ProfanedSpear.cs b/Projectiles/Boss/ProfanedSpear.cs index 844179f27c..2ae91f8ab1 100644 --- a/Projectiles/Boss/ProfanedSpear.cs +++ b/Projectiles/Boss/ProfanedSpear.cs @@ -93,8 +93,8 @@ namespace CalamityMod.Projectiles.Boss { target.AddBuff(ModContent.BuffType(), 180); } - - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ProvidenceCrystal.cs b/Projectiles/Boss/ProvidenceCrystal.cs index de744ad3ee..331fd09af9 100644 --- a/Projectiles/Boss/ProvidenceCrystal.cs +++ b/Projectiles/Boss/ProvidenceCrystal.cs @@ -142,7 +142,7 @@ namespace CalamityMod.Projectiles.Boss return false; } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ProvidenceCrystalShard.cs b/Projectiles/Boss/ProvidenceCrystalShard.cs index bcd328f006..cb0805a5f0 100644 --- a/Projectiles/Boss/ProvidenceCrystalShard.cs +++ b/Projectiles/Boss/ProvidenceCrystalShard.cs @@ -203,7 +203,7 @@ namespace CalamityMod.Projectiles.Boss return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ProvidenceHolyRay.cs b/Projectiles/Boss/ProvidenceHolyRay.cs index d0d69441b5..026984a1be 100644 --- a/Projectiles/Boss/ProvidenceHolyRay.cs +++ b/Projectiles/Boss/ProvidenceHolyRay.cs @@ -210,7 +210,7 @@ namespace CalamityMod.Projectiles.Boss public override bool CanHitPlayer(Player target) => projectile.scale >= 0.5f; - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/RedLightningFeather.cs b/Projectiles/Boss/RedLightningFeather.cs index 411ff4119a..3cac749a34 100644 --- a/Projectiles/Boss/RedLightningFeather.cs +++ b/Projectiles/Boss/RedLightningFeather.cs @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(BuffID.Electrified, 60); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/SignusScythe.cs b/Projectiles/Boss/SignusScythe.cs index 840d5b1e30..ea0378a9d8 100644 --- a/Projectiles/Boss/SignusScythe.cs +++ b/Projectiles/Boss/SignusScythe.cs @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/SkyFlare.cs b/Projectiles/Boss/SkyFlare.cs index 13a7ee2894..2a02612547 100644 --- a/Projectiles/Boss/SkyFlare.cs +++ b/Projectiles/Boss/SkyFlare.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/SkyFlareRevenge.cs b/Projectiles/Boss/SkyFlareRevenge.cs index 30472d4cd3..47dd276a9b 100644 --- a/Projectiles/Boss/SkyFlareRevenge.cs +++ b/Projectiles/Boss/SkyFlareRevenge.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/SupremeCataclysmFist.cs b/Projectiles/Boss/SupremeCataclysmFist.cs index ecc52365fe..360777bebb 100644 --- a/Projectiles/Boss/SupremeCataclysmFist.cs +++ b/Projectiles/Boss/SupremeCataclysmFist.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 120, true); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/SupremeCatastropheSlash.cs b/Projectiles/Boss/SupremeCatastropheSlash.cs index ebacc36022..dce91a90f5 100644 --- a/Projectiles/Boss/SupremeCatastropheSlash.cs +++ b/Projectiles/Boss/SupremeCatastropheSlash.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 120, true); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ThanatosBeamStart.cs b/Projectiles/Boss/ThanatosBeamStart.cs index 0379b817e3..c9fe6bbf9b 100644 --- a/Projectiles/Boss/ThanatosBeamStart.cs +++ b/Projectiles/Boss/ThanatosBeamStart.cs @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Boss public override bool CanHitPlayer(Player target) => OwnerIsValid && projectile.scale >= 0.5f; - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/ThanatosLaser.cs b/Projectiles/Boss/ThanatosLaser.cs index 4383f72132..df08e52a1b 100644 --- a/Projectiles/Boss/ThanatosLaser.cs +++ b/Projectiles/Boss/ThanatosLaser.cs @@ -245,7 +245,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/YharonFireball.cs b/Projectiles/Boss/YharonFireball.cs index 403d399537..79b55fde34 100644 --- a/Projectiles/Boss/YharonFireball.cs +++ b/Projectiles/Boss/YharonFireball.cs @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/Boss/YharonFireball2.cs b/Projectiles/Boss/YharonFireball2.cs index a0a7156cd4..78792c1ccc 100644 --- a/Projectiles/Boss/YharonFireball2.cs +++ b/Projectiles/Boss/YharonFireball2.cs @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 180); } - public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) { target.Calamity().lastProjectileHit = projectile; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index eec174d461..f57d02ddab 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -346,7 +346,7 @@ namespace CalamityMod.Projectiles projectile.usesLocalNPCImmunity = true; projectile.usesIDStaticNPCImmunity = false; break; - + case ProjectileID.FlowerPetal: projectile.MaxUpdates = 4; projectile.localNPCHitCooldown = 10; @@ -1866,7 +1866,7 @@ namespace CalamityMod.Projectiles projectile.damage = defDamage + 30; } } - + if (CalamityWorld.downedDoG && (Main.pumpkinMoon || Main.snowMoon || Main.eclipse)) { if (CalamityLists.eventProjectileBuffList.Contains(projectile.type)) @@ -2296,13 +2296,13 @@ namespace CalamityMod.Projectiles #endregion #region Grappling Hooks - public override void GrapplePullSpeed(Projectile projectile, Player player, ref float speed) + public override void GrapplePullSpeed(Projectile projectile, Player player, ref float speed) { if (player.Calamity().reaverSpeed) speed *= 1.1f; } - public override void GrappleRetreatSpeed(Projectile projectile, Player player, ref float speed) + public override void GrappleRetreatSpeed(Projectile projectile, Player player, ref float speed) { if (player.Calamity().reaverSpeed) speed *= 1.1f; @@ -2317,7 +2317,7 @@ namespace CalamityMod.Projectiles if (modPlayer.rottenDogTooth && projectile.Calamity().stealthStrike) target.AddBuff(BuffType(), RottenDogtooth.ArmorCrunchDebuffTime); - + if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj) target.AddBuff(BuffType(), VulnerabilityHex.AflameDuration); diff --git a/Projectiles/Damageable/DamageableProjectile.cs b/Projectiles/Damageable/DamageableProjectile.cs index 55c4a7b67f..7545c99a14 100644 --- a/Projectiles/Damageable/DamageableProjectile.cs +++ b/Projectiles/Damageable/DamageableProjectile.cs @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Damageable { if (DeathSound != null) { - Main.PlaySound(DeathSound, projectile.Center); + Main.PlaySound(DeathSound, projectile.Center); } DamageKillEffect(); projectile.Kill(); diff --git a/Projectiles/DraedonsArsenal/GaussPistolShot.cs b/Projectiles/DraedonsArsenal/GaussPistolShot.cs index db8e8b43f9..229a753ef4 100644 --- a/Projectiles/DraedonsArsenal/GaussPistolShot.cs +++ b/Projectiles/DraedonsArsenal/GaussPistolShot.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void AI() { Time++; - + if (Time < ChargeTime && OldVelocity == Vector2.Zero) { OldVelocity = projectile.velocity; diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index df7da2377f..42f1731ca3 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (player.channel && modItem.Charge >= HydraulicVoltCrasher.HoldoutChargeUse) { modItem.Charge -= HydraulicVoltCrasher.HoldoutChargeUse; - + float speed = player.inventory[player.selectedItem].shootSpeed * projectile.scale; Vector2 toPointTo = Main.MouseWorld; if (player.gravDir == -1f) diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs b/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs index 2f681bf321..5840828ce3 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.height = 120; projectile.scale = 0.5f; projectile.Size *= projectile.scale; - + projectile.friendly = true; projectile.penetrate = 3; projectile.melee = true; diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index 3217040cf9..ccfa0743a3 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal return swordItem.ChargeRatio < Phaseslayer.SizeChargeThreshold; } } - + // ai[0] wrapper. Stores a rolling lerped average of angular momentum which is used as the swing speed damage multiplier. public float AngularDamageFactor { diff --git a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs index 626294f5e8..9a6df6f5e5 100644 --- a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs +++ b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override string Texture => "CalamityMod/Items/Weapons/DraedonsArsenal/PlasmaGrenade"; private static readonly float Gravity = 0.09f; - + public float Time { get => projectile.ai[0]; diff --git a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs index cba32c5bc6..c98eb5018a 100644 --- a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs +++ b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i < Main.projectile.Length; i++) { if (Main.projectile[i].type == projectile.type && - Main.projectile[i].active && + Main.projectile[i].active && projectile.Distance(Main.projectile[i].Center) < 40f) { PoleWarperSummon otherPole = (PoleWarperSummon)Main.projectile[i].modProjectile; diff --git a/Projectiles/DraedonsArsenal/PulseTurret.cs b/Projectiles/DraedonsArsenal/PulseTurret.cs index f536de6fa5..f4f5c18479 100644 --- a/Projectiles/DraedonsArsenal/PulseTurret.cs +++ b/Projectiles/DraedonsArsenal/PulseTurret.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal spriteBatch.Draw(ModContent.GetTexture(Texture), projectile.Center - ((standTexture.Height / 2 + 6f) * Vector2.UnitY) - Main.screenPosition, null, - lightColor, + lightColor, projectile.rotation, projectile.Size * 0.5f, projectile.scale, diff --git a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs index 9a026d96d2..745388d114 100644 --- a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs +++ b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // Remember, && doesn't evaluate future statements if the statement it just evaluated is true. // This means that null problems should never happen, since it wouldn't pass the potentialTarget != null check. NPC potentialTarget = projectile.Center.MinionHoming(800f, player); - if (potentialTarget != null && + if (potentialTarget != null && Math.Abs(potentialTarget.Center.X - projectile.Center.X) < 320f && Math.Sign(potentialTarget.Center.Y - projectile.Center.Y) == -1 && Math.Abs(potentialTarget.Center.Y - projectile.Center.Y) < 160f && diff --git a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs index 4f6a62b50c..d18af01eda 100644 --- a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs +++ b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs @@ -104,11 +104,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { if (targetCount >= MaxLaserCountPerShot) break; - Projectile laser = Projectile.NewProjectileDirect(projectile.Center, - projectile.SafeDirectionTo(target.Center) * 4f, + Projectile laser = Projectile.NewProjectileDirect(projectile.Center, + projectile.SafeDirectionTo(target.Center) * 4f, ModContent.ProjectileType(), damage, - projectile.knockBack, + projectile.knockBack, projectile.owner, 1f); laser.scale *= 1.6f; diff --git a/Projectiles/DraedonsArsenal/UnstableMatter.cs b/Projectiles/DraedonsArsenal/UnstableMatter.cs index e68fff574c..7f63ae3e6a 100644 --- a/Projectiles/DraedonsArsenal/UnstableMatter.cs +++ b/Projectiles/DraedonsArsenal/UnstableMatter.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (Time >= 10f) GenerateIdleDust(); } - + public void GenerateIdleDust() { if (Main.dedServ) diff --git a/Projectiles/Enemy/LightningCloud.cs b/Projectiles/Enemy/LightningCloud.cs index a7096d76e6..0635540f0b 100644 --- a/Projectiles/Enemy/LightningCloud.cs +++ b/Projectiles/Enemy/LightningCloud.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Enemy projectile.frameCounter = 0; projectile.frame++; - int maxFrame = projectile.timeLeft < 60 ? 6 : 3; + int maxFrame = projectile.timeLeft < 60 ? 6 : 3; if (projectile.frame >= maxFrame) projectile.frame = 0; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Enemy } } - if (projectile.timeLeft < 30) + if (projectile.timeLeft < 30) projectile.Opacity = MathHelper.Lerp(projectile.Opacity, 0f, 0.14f); else projectile.Opacity = MathHelper.Lerp(projectile.Opacity, 1f, 0.33f); diff --git a/Projectiles/Healing/PhantomicHeart.cs b/Projectiles/Healing/PhantomicHeart.cs index 2f92d5ab33..077ab144fc 100644 --- a/Projectiles/Healing/PhantomicHeart.cs +++ b/Projectiles/Healing/PhantomicHeart.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Healing { DisplayName.SetDefault("Phantomic Heart"); Main.projFrames[projectile.type] = 4; - + } public override void SetDefaults() diff --git a/Projectiles/Magic/AetherfluxCannonHoldout.cs b/Projectiles/Magic/AetherfluxCannonHoldout.cs index 6f2d65e5c4..4de0982e8b 100644 --- a/Projectiles/Magic/AetherfluxCannonHoldout.cs +++ b/Projectiles/Magic/AetherfluxCannonHoldout.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic private Player Owner => Main.player[projectile.owner]; private bool OwnerCanShoot => Owner.channel && Owner.HasAmmo(Owner.ActiveItem(), true) && !Owner.noItems && !Owner.CCed; - + private ref float DeployedFrames => ref projectile.ai[0]; private ref float AnimationRate => ref projectile.ai[1]; private ref float LastShootAttemptTime => ref projectile.localAI[0]; diff --git a/Projectiles/Magic/ApotheosisWorm.cs b/Projectiles/Magic/ApotheosisWorm.cs index 7fb7cdf9c4..c498678a27 100644 --- a/Projectiles/Magic/ApotheosisWorm.cs +++ b/Projectiles/Magic/ApotheosisWorm.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; - + // Initialization. if (projectile.localAI[0] == 0f) { @@ -168,9 +168,9 @@ namespace CalamityMod.Projectiles.Magic } } - // This variant of segment attachment incorporates rotation. + // This variant of segment attachment incorporates rotation. // Given the fact that all segments will execute this code is succession, the - // result across the entire worm will exponentially decay over each segment, + // result across the entire worm will exponentially decay over each segment, // allowing for smooth rotations. This code is what the stardust dragon and mechworm use for their segmenting. if (aheadSegmentRotation != Segments[segmentIndex].Rotation) { diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index c660e1aaf4..c1e2a02cf8 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -266,4 +266,4 @@ namespace CalamityMod.Projectiles.Magic // The star itself does not do contact damage. public override bool CanDamage() => false; } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/BeamStar.cs b/Projectiles/Magic/BeamStar.cs index 0dcac1aa6e..514bbaba9f 100644 --- a/Projectiles/Magic/BeamStar.cs +++ b/Projectiles/Magic/BeamStar.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Magic if (potentialTarget != null) { float destinationDeltaAngle = MathHelper.WrapAngle(projectile.AngleTo(potentialTarget.Center) - projectile.velocity.ToRotation()); - + // If the angle is <0, meaning it's to the left, the sine will return a negative number, // and a positive number if >0, because WrapAngle constricts to angle to a bound of // -pi and pi, which are where a sine's wave restarts anew. diff --git a/Projectiles/Magic/BloodRay.cs b/Projectiles/Magic/BloodRay.cs index 2fb86fb15e..af08b03798 100644 --- a/Projectiles/Magic/BloodRay.cs +++ b/Projectiles/Magic/BloodRay.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { // Just doing damage = (int)(damage * scalar) wouldn't work here. - // The exponential base would be too small for a weapon like this, and the + // The exponential base would be too small for a weapon like this, and the // cast (which removes the fractional part) would overtake any increases before the damage can rise. if (InitialDamage == 0f) { diff --git a/Projectiles/Magic/BlueBubble.cs b/Projectiles/Magic/BlueBubble.cs index 16697b8ef8..faf7544aad 100644 --- a/Projectiles/Magic/BlueBubble.cs +++ b/Projectiles/Magic/BlueBubble.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic num745 += MathHelper.TwoPi; projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; - + if (projectile.timeLeft < 90) CalamityGlobalProjectile.HomeInOnNPC(projectile, !projectile.tileCollide, 400f, 8f, 20f); } diff --git a/Projectiles/Magic/ClamorNoctusWyvern.cs b/Projectiles/Magic/ClamorNoctusWyvern.cs index a7b10636ea..2216332957 100644 --- a/Projectiles/Magic/ClamorNoctusWyvern.cs +++ b/Projectiles/Magic/ClamorNoctusWyvern.cs @@ -64,4 +64,4 @@ namespace CalamityMod.Projectiles.Magic return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/Crescent.cs b/Projectiles/Magic/Crescent.cs index d453a2f80f..310db9486a 100644 --- a/Projectiles/Magic/Crescent.cs +++ b/Projectiles/Magic/Crescent.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { Projectile parent = Main.projectile[(int)projectile.ai[0]]; - if (!parent.active) + if (!parent.active) projectile.Kill(); projectile.rotation += 0.7f; @@ -53,4 +53,4 @@ namespace CalamityMod.Projectiles.Magic } } } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/EnormousConsumingVortex.cs b/Projectiles/Magic/EnormousConsumingVortex.cs index 94556fafce..40cacc26cc 100644 --- a/Projectiles/Magic/EnormousConsumingVortex.cs +++ b/Projectiles/Magic/EnormousConsumingVortex.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Magic subsumingHentai.tileCollide = false; } - + public void TargetingMovement() { NPC potentialTarget = projectile.Center.ClosestNPCAt(600f, true, true); diff --git a/Projectiles/Magic/EternityCircle.cs b/Projectiles/Magic/EternityCircle.cs index c88d994190..27cc1bd27a 100644 --- a/Projectiles/Magic/EternityCircle.cs +++ b/Projectiles/Magic/EternityCircle.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Magic { projectile.active = false; } - + // Assign an offset angle if it has a default value. if (SinusoidalOffsetAngle == 0f) { @@ -94,4 +94,4 @@ namespace CalamityMod.Projectiles.Magic dust.noGravity = true; } } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/EternityCrystal.cs b/Projectiles/Magic/EternityCrystal.cs index b825c50b4f..021d5a2555 100644 --- a/Projectiles/Magic/EternityCrystal.cs +++ b/Projectiles/Magic/EternityCrystal.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Magic projectile.Kill(); return; } - + if (TargetIndex >= Main.npc.Length || TargetIndex < 0) { DeathDust(); @@ -181,4 +181,4 @@ namespace CalamityMod.Projectiles.Magic return true; } } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/EternityHoming.cs b/Projectiles/Magic/EternityHoming.cs index 3863480df1..58aeaba512 100644 --- a/Projectiles/Magic/EternityHoming.cs +++ b/Projectiles/Magic/EternityHoming.cs @@ -52,4 +52,4 @@ namespace CalamityMod.Projectiles.Magic dust.noGravity = true; } } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/GhastlyBlast.cs b/Projectiles/Magic/GhastlyBlast.cs index 97815317ce..a2cd42e9b5 100644 --- a/Projectiles/Magic/GhastlyBlast.cs +++ b/Projectiles/Magic/GhastlyBlast.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Magic private const float DriftVelocity = 10f; private const float FramesBeforeSlowing = 8f; private const float MaximumWaitFrames = 360f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Ghast Blast"); @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic } } - // Grow and slow down + // Grow and slow down if (projectile.ai[0] >= FramesBeforeSlowing * projectile.MaxUpdates) { projectile.velocity *= 0.977f; diff --git a/Projectiles/Magic/IceBarrageMain.cs b/Projectiles/Magic/IceBarrageMain.cs index 8fd54fc4a9..1d018e1415 100644 --- a/Projectiles/Magic/IceBarrageMain.cs +++ b/Projectiles/Magic/IceBarrageMain.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Magic Main.dust[d1].velocity = Dspeed; Main.dust[d1].noGravity = true; } - + } else if (projectile.ai[0] == 140f) { diff --git a/Projectiles/Magic/LightningArc.cs b/Projectiles/Magic/LightningArc.cs index 8177fa87d1..3271b0cb84 100644 --- a/Projectiles/Magic/LightningArc.cs +++ b/Projectiles/Magic/LightningArc.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic NPC npc = null; bool pastNPC = false; if (projectile.timeLeft < 18) - { + { for (int k = 0; k < Main.maxNPCs; k++) { if (Main.npc[k].active && !Main.npc[k].dontTakeDamage && !Main.npc[k].friendly && Main.npc[k].lifeMax > 5 && !shockedbefore.Contains(Main.npc[k])) @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Magic npc = pastnpc; pastNPC = true; } - } + } } @@ -91,13 +91,13 @@ namespace CalamityMod.Projectiles.Magic //AdjustMagnitude(ref move); //AdjustMagnitude(ref projectile.velocity); //projectile.velocity = (10 * projectile.velocity + move) / 11f; - + move+= new Vector2(Main.rand.Next(-10, 10), Main.rand.Next(-10, 10))*distance/30; if (pastNPC) { prevX++; move += new Vector2(Main.rand.Next(-10, 10), Main.rand.Next(-10, 10)) * prevX; } - + } else { @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Magic { projectile.timeLeft -= 12; }*/ - + } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Magic/MadAlchemistsCocktailGasCloud.cs b/Projectiles/Magic/MadAlchemistsCocktailGasCloud.cs index 89421c9f01..4b293f2b44 100644 --- a/Projectiles/Magic/MadAlchemistsCocktailGasCloud.cs +++ b/Projectiles/Magic/MadAlchemistsCocktailGasCloud.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Magic projectile.ignoreWater = true; projectile.tileCollide = false; projectile.penetrate = -1; - + // Only one gas cloud can hit at once. projectile.usesIDStaticNPCImmunity = true; projectile.idStaticNPCHitCooldown = 9; diff --git a/Projectiles/Magic/MagneticOrb.cs b/Projectiles/Magic/MagneticOrb.cs index b5a7d0edce..939d7704fc 100644 --- a/Projectiles/Magic/MagneticOrb.cs +++ b/Projectiles/Magic/MagneticOrb.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Magic { private const int Lifetime = 120; private const float FramesPerBeam = 12f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Magnetic Orb"); diff --git a/Projectiles/Magic/MeteorStarExplosion.cs b/Projectiles/Magic/MeteorStarExplosion.cs index 4d5daf07cf..38aea62884 100644 --- a/Projectiles/Magic/MeteorStarExplosion.cs +++ b/Projectiles/Magic/MeteorStarExplosion.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Magic damage /= 2; } } - + public override void OnHitPlayer(Player target, int damage, bool crit) { target.GiveIFrames(target.longInvince ? 100 : 60, true); diff --git a/Projectiles/Magic/NanoPurgeLaser.cs b/Projectiles/Magic/NanoPurgeLaser.cs index 4690723997..46940c5d2d 100644 --- a/Projectiles/Magic/NanoPurgeLaser.cs +++ b/Projectiles/Magic/NanoPurgeLaser.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Magic { private const float LaserLength = 40f; private const float LaserLengthChangeRate = 1.5f; - + public override string Texture => "CalamityMod/Projectiles/LaserProj"; public override void SetStaticDefaults() diff --git a/Projectiles/Magic/RainbowRocket.cs b/Projectiles/Magic/RainbowRocket.cs index 66e52ea44c..32d6ae872c 100644 --- a/Projectiles/Magic/RainbowRocket.cs +++ b/Projectiles/Magic/RainbowRocket.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Magic if (TrailDrawer is null) TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction); - projectile.oldPos[0] = projectile.position + projectile.velocity.SafeNormalize(Vector2.Zero) * 50f; + projectile.oldPos[0] = projectile.position + projectile.velocity.SafeNormalize(Vector2.Zero) * 50f; TrailDrawer.Draw(projectile.oldPos, projectile.Size * 0.5f - Main.screenPosition + projectile.velocity, 80); Texture2D rocketTexture = ModContent.GetTexture(Texture); diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index 426351fddc..a845214d2b 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Magic private Color PrimitiveColorFunction(float completionRatio) { Color vibrantColor = Color.Lerp(Color.Blue, Color.Red, (float)Math.Cos(Main.GlobalTime * 0.67f - completionRatio / LaserLength * 29f) * 0.5f + 0.5f); - float opacity = projectile.Opacity * Utils.InverseLerp(0.97f, 0.9f, completionRatio, true) * + float opacity = projectile.Opacity * Utils.InverseLerp(0.97f, 0.9f, completionRatio, true) * Utils.InverseLerp(0f, MathHelper.Clamp(15f / LaserLength, 0f, 0.5f), completionRatio, true) * (float)Math.Pow(Utils.InverseLerp(60f, 270f, LaserLength, true), 3D); return Color.Lerp(vibrantColor, Color.White, 0.5f) * opacity * 2f; diff --git a/Projectiles/Magic/SlitheringEelProjectile.cs b/Projectiles/Magic/SlitheringEelProjectile.cs index 710548eb54..bebbfb4063 100644 --- a/Projectiles/Magic/SlitheringEelProjectile.cs +++ b/Projectiles/Magic/SlitheringEelProjectile.cs @@ -79,9 +79,9 @@ namespace CalamityMod.Projectiles.Magic { Vector2 offsetToDestination = aheadPosition - Segments[i].CurrentPosition; - // This variant of segment attachment incorporates rotation. + // This variant of segment attachment incorporates rotation. // Given the fact that all segments will execute this code is succession, the - // result across the entire worm will exponentially decay over each segment, + // result across the entire worm will exponentially decay over each segment, // allowing for smooth rotations. This code is what the stardust dragon uses for its segmenting. if (aheadRotation != projectile.rotation) { diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs index 2b32176d25..c55910c8b6 100644 --- a/Projectiles/Magic/SpiritCongregation.cs +++ b/Projectiles/Magic/SpiritCongregation.cs @@ -280,7 +280,7 @@ namespace CalamityMod.Projectiles.Magic Vector2 origin = frame.Size() * 0.5f; Color auraColor = Color.Lerp(Color.Fuchsia, Color.Black, 0.55f); SpriteEffects direction = Math.Cos(projectile.rotation) > 0f ? SpriteEffects.None : SpriteEffects.FlipVertically; - + // Draw the outline aura below everything else. spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); ; diff --git a/Projectiles/Magic/StratusSphereProj.cs b/Projectiles/Magic/StratusSphereProj.cs index 19bc800952..271e4eb865 100644 --- a/Projectiles/Magic/StratusSphereProj.cs +++ b/Projectiles/Magic/StratusSphereProj.cs @@ -133,4 +133,4 @@ namespace CalamityMod.Projectiles.Magic } } } -} \ No newline at end of file +} diff --git a/Projectiles/Magic/TerraBeam.cs b/Projectiles/Magic/TerraBeam.cs index 345605cc44..f6e5c99754 100644 --- a/Projectiles/Magic/TerraBeam.cs +++ b/Projectiles/Magic/TerraBeam.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Magic int totalShards = (int)MathHelper.Lerp(1, 4, MathHelper.Clamp(lengthFromStart / MaxLaserLength * 1.4f, 0f, 1f)); int shardType = ModContent.ProjectileType(); int shardDamage = (int)(projectile.damage * 0.6); - for (int i = 0; i < totalShards; i++) + for (int i = 0; i < totalShards; i++) { int tries = 0; Vector2 spawnOffset; diff --git a/Projectiles/Magic/ValkyrieRayBeam.cs b/Projectiles/Magic/ValkyrieRayBeam.cs index ee1764c40a..d702c915b2 100644 --- a/Projectiles/Magic/ValkyrieRayBeam.cs +++ b/Projectiles/Magic/ValkyrieRayBeam.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic { private const int Lifetime = 24; private const int BeamDustID = 73; - + private const float MaxBeamScale = 1.2f; private const float MaxBeamLength = 2400f; @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Magic // If the beam doesn't have a defined projection vector or hasn't yet had its velocity set to zero, don't draw anything. if (beamVector == Vector2.Zero || projectile.velocity != Vector2.Zero) return false; - + Texture2D tex = Main.projectileTexture[projectile.type]; float beamLength = projectile.ai[0]; Vector2 centerFloored = projectile.Center.Floor() + beamVector * projectile.scale * BeamRenderTileOffset; diff --git a/Projectiles/Magic/WyvernProjectile.cs b/Projectiles/Magic/WyvernProjectile.cs index cc41e0a057..243b10458e 100644 --- a/Projectiles/Magic/WyvernProjectile.cs +++ b/Projectiles/Magic/WyvernProjectile.cs @@ -63,4 +63,4 @@ namespace CalamityMod.Projectiles.Magic return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/AncientBeam.cs b/Projectiles/Melee/AncientBeam.cs index d7d6b3c405..06aaacdc6f 100644 --- a/Projectiles/Melee/AncientBeam.cs +++ b/Projectiles/Melee/AncientBeam.cs @@ -107,4 +107,4 @@ namespace CalamityMod.Projectiles.Melee } } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/AncientStar.cs b/Projectiles/Melee/AncientStar.cs index 6ca8020580..3042152bc6 100644 --- a/Projectiles/Melee/AncientStar.cs +++ b/Projectiles/Melee/AncientStar.cs @@ -78,12 +78,12 @@ namespace CalamityMod.Projectiles.Melee Main.gore[starGore].velocity += projectile.velocity * 0.3f; } - if (projectile.velocity.Length() < 2f) + if (projectile.velocity.Length() < 2f) { projectile.Kill(); return; } - + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; CalamityGlobalProjectile.HomeInOnNPC(projectile, !projectile.tileCollide, 200f, 12f, 20f); diff --git a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs index a66c1954b4..9f325a813b 100644 --- a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee if (proj.active && proj.hostile && proj.damage > 1 && //Only parry harmful projectiles proj.velocity.Length() * (proj.extraUpdates + 1) > 1f && //Only parry projectiles that move semi-quickly - proj.Size.Length() < 300 && //Only parry projectiles that aren't too large + proj.Size.Length() < 300 && //Only parry projectiles that aren't too large Collision.CheckAABBvLineCollision(proj.Hitbox.TopLeft(), proj.Hitbox.Size(), Owner.Center + DistanceFromPlayer, Owner.Center + DistanceFromPlayer + (projectile.velocity * bladeLenght), 24, ref collisionPoint)) { GeneralParryEffects(); @@ -212,4 +212,4 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs b/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs index 242d0d6600..50dad42950 100644 --- a/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = projectile.velocity.ToRotation() + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, SwingRatio()); - projectile.scale = 1.4f + ((float)Math.Sin(SwingRatio() * MathHelper.Pi) * 0.6f) + (Charge / 10f) * 0.6f; + projectile.scale = 1.4f + ((float)Math.Sin(SwingRatio() * MathHelper.Pi) * 0.6f) + (Charge / 10f) * 0.6f; if (Owner.whoAmI == Main.myPlayer && SwingRatio() > 0.5f && HasFired == 0f && Charge > 0) { @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? sword.Width : 0f , sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[projectile.type]) + if (CalamityConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[projectile.type]) { for (int i = 0; i < projectile.oldRot.Length; ++i) { @@ -159,4 +159,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs b/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs index 69ff99bb08..911fc05de7 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs @@ -348,4 +348,4 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs index 48f408ba15..6ce7fd879d 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Melee if (Timer > ParryTime) return; - + float collisionPoint = 0f; float bladeLenght = 142f * projectile.scale; @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Melee break; } } - + //Make the owner look like theyre holding the sword bla bla Owner.heldProj = projectile.whoAmI; @@ -242,4 +242,4 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs index 6a89f77cd2..ec0f7cf08c 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation projectile.Center = Owner.Center + DistanceFromPlayer; - //Baby swing + //Baby swing if (!SwirlSwing) { projectile.rotation = projectile.velocity.ToRotation() + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, SwingRatio()); @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Melee //Really important to use projectile.timeLeft -1 instead of simply projectile.timeLeft because if it spawns a bolt on its last frame of existence the primitive drawer will break and shit itself or something idk if (Owner.whoAmI == Main.myPlayer && (projectile.timeLeft - 1) % Math.Ceiling(MaxSwingTime / ArkoftheCosmos.SwirlBoltAmount) == 0f) { - //Slightly shift the blasts up so the final close shots don't go BELOW the cursor and instead go right on it. + //Slightly shift the blasts up so the final close shots don't go BELOW the cursor and instead go right on it. float adjustedBlastRotation = projectile.rotation - MathHelper.PiOver4 * 1.15f * Owner.direction; Projectile blast = Projectile.NewProjectileDirect(Owner.Center + adjustedBlastRotation.ToRotationVector2() * 10f, adjustedBlastRotation.ToRotationVector2() * 20f, ProjectileType(), (int)(ArkoftheCosmos.SwirlBoltDamageMultiplier / ArkoftheCosmos.SwirlBoltAmount * projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.05f); @@ -561,7 +561,7 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Draw(afterimage, drawOffset, null, color * 0.15f, afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), flip, 0f); } } - + spriteBatch.Draw(backBlade, backScissorDrawPosition, null, lightColor, drawRotation, backScissorOrigin, projectile.scale, flip, 0f); spriteBatch.Draw(backBladeGlow, backScissorDrawPosition, null, Color.Lerp(lightColor, Color.White, 0.75f), drawRotation, backScissorOrigin, projectile.scale, flip, 0f); @@ -598,7 +598,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawPos2 = Vector2.SmoothStep(Owner.Center, projectile.Center, MathHelper.Clamp(SnapEndCompletion + 0.25f, 0f, 1f)); float drawRotation2 = direction.ToRotation() + MathHelper.PiOver4; - Vector2 drawOrigin2 = new Vector2(44, 86); + Vector2 drawOrigin2 = new Vector2(44, 86); spriteBatch.Draw(thrownSword, drawPos2 - Main.screenPosition, null, lightColor, drawRotation2, drawOrigin2, projectile.scale, 0f, 0f); spriteBatch.Draw(thrownGlowmask, drawPos2 - Main.screenPosition, null, Color.Lerp(lightColor, Color.White, 0.75f), drawRotation2, drawOrigin2, projectile.scale, 0f, 0f); @@ -620,7 +620,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D backBladeGlow = GetTexture("CalamityMod/Projectiles/Melee/SunderingScissorsRightGlow"); Vector2 drawPos = projectile.Center; - Vector2 drawOrigin = new Vector2(32, 86); + Vector2 drawOrigin = new Vector2(32, 86); float drawRotation = projectile.rotation + MathHelper.PiOver4; Vector2 drawOrigin2 = new Vector2(44, 86); //Right on the hole @@ -651,4 +651,4 @@ namespace CalamityMod.Projectiles.Melee ThrowReach = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs index a61735a0a8..13551fa408 100644 --- a/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheElements_ParryHoldout.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Melee if (Timer > ParryTime) return; - + float collisionPoint = 0f; float bladeLenght = 142f * projectile.scale; @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Melee break; } } - + //Make the owner look like theyre holding the sword bla bla Owner.heldProj = projectile.whoAmI; @@ -243,4 +243,4 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs b/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs index f27dce2806..fb7eb012f9 100644 --- a/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs +++ b/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs @@ -270,4 +270,4 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs b/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs index 4f7e294f0d..458c73a82e 100644 --- a/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs @@ -382,7 +382,7 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Draw(frontBladeGlow, drawOffset, null, color * 0.15f, afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), flip, 0f); } } - + spriteBatch.Draw(backBlade, backScissorDrawPosition, null, lightColor, backScissorRotation, backScissorOrigin, projectile.scale, flip, 0f); spriteBatch.Draw(backBladeGlow, backScissorDrawPosition, null, Color.Lerp(lightColor, Color.White, 0.75f), backScissorRotation, backScissorOrigin, projectile.scale, flip, 0f); @@ -504,4 +504,4 @@ namespace CalamityMod.Projectiles.Melee ThrowReach = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ArkoftheCosmos_Constellation.cs b/Projectiles/Melee/ArkoftheCosmos_Constellation.cs index eee36d952a..3b31b63d7c 100644 --- a/Projectiles/Melee/ArkoftheCosmos_Constellation.cs +++ b/Projectiles/Melee/ArkoftheCosmos_Constellation.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Kill(); return; } - + if (Timer % ConstellationSwapTime == 0 && projectile.timeLeft >= 20) { Particles.Clear(); @@ -157,4 +157,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BiomeBladeHoldout.cs b/Projectiles/Melee/BiomeBladeHoldout.cs index a20da8372d..5bf259a761 100644 --- a/Projectiles/Melee/BiomeBladeHoldout.cs +++ b/Projectiles/Melee/BiomeBladeHoldout.cs @@ -188,4 +188,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs index d46be744a2..440f03e907 100644 --- a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs +++ b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs @@ -193,4 +193,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs index ff8ed9a4e9..4b27d58436 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs @@ -187,7 +187,7 @@ namespace CalamityMod.Projectiles.Melee Shred += 62; //Augment the shredspeed if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - Owner.GiveIFrames(BiomeBlade.HotAttunement_ShredIFrames); // i framez. + Owner.GiveIFrames(BiomeBlade.HotAttunement_ShredIFrames); // i framez. PogoCooldown = 20; } } @@ -258,4 +258,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs index 636ba6827d..1209c36a55 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation projectile.Center = Owner.Center + (direction * 30); - //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); + //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); float factor = 1 - (float)Math.Pow((double)-(Timer / MaxTime) + 1, 2d); rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER @@ -263,4 +263,4 @@ namespace CalamityMod.Projectiles.Melee rotation = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs index 73e945cf78..914048ff91 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Melee // Bounce off float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); - bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground + bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); CanBounce = 0f; Owner.GiveIFrames(BiomeBlade.EvilAttunement_BounceIFrames); // i frames for free! @@ -157,4 +157,4 @@ namespace CalamityMod.Projectiles.Melee CanBounce = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs index 28befa2b95..0fc79a03de 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee public ref float Reach => ref projectile.localAI[0]; const float MaxTime = 90; - const int coyoteTimeFrames = 15; //How many frames does the whip stay extended + const int coyoteTimeFrames = 15; //How many frames does the whip stay extended const int MaxReach = 400; const int MinReach = 300; const float SnappingPoint = 0.7f; //When does the snap occur. @@ -222,7 +222,7 @@ namespace CalamityMod.Projectiles.Melee controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.2f; controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; } - else //After the whip snaps, make the curve be a wave + else //After the whip snaps, make the curve be a wave { Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; @@ -260,4 +260,4 @@ namespace CalamityMod.Projectiles.Melee Reach = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs index 963d2c4cd0..b89cdbc638 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs @@ -72,4 +72,4 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffType(), debuffTime); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/CosmicDischargeFlail.cs b/Projectiles/Melee/CosmicDischargeFlail.cs index 0ac5525aec..1e39828386 100644 --- a/Projectiles/Melee/CosmicDischargeFlail.cs +++ b/Projectiles/Melee/CosmicDischargeFlail.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Melee Rectangle type1BodyFrame = new Rectangle(0, BodyType1StartY, FlailTexture.Width, BodyType1SectionHeight); Vector2 bodyDrawPosition = projectile.Center.Floor(); bodyDrawPosition += normalizedVelocity * projectile.scale * 33f; - + if (speed > 0f) { float counter = 0f; diff --git a/Projectiles/Melee/CosmicShivBall.cs b/Projectiles/Melee/CosmicShivBall.cs index 2481c6f053..0968618edf 100644 --- a/Projectiles/Melee/CosmicShivBall.cs +++ b/Projectiles/Melee/CosmicShivBall.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Melee } else { - projectile.ai[0]++; + projectile.ai[0]++; projectile.velocity.Y = startingVelocityY + (float)(Math.Cos(projectile.ai[0] / 12D + randomAngleDelta) * 7D); } } @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(ModContent.BuffType(), 60); } // pretty much entirely from the Oracle circular damage code - + private void CircularDamage(float radius) { if (projectile.owner != Main.myPlayer) @@ -145,4 +145,4 @@ namespace CalamityMod.Projectiles.Melee CircularDamage(80f); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/CosmicShivBlade.cs b/Projectiles/Melee/CosmicShivBlade.cs index c92a0abbc4..2ecdbc077d 100644 --- a/Projectiles/Melee/CosmicShivBlade.cs +++ b/Projectiles/Melee/CosmicShivBlade.cs @@ -109,4 +109,4 @@ namespace CalamityMod.Projectiles.Melee return new Color(124, Main.DiscoG, 255, projectile.alpha); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/DemonBlast.cs b/Projectiles/Melee/DemonBlast.cs index ffc2feb58d..84d737c4c3 100644 --- a/Projectiles/Melee/DemonBlast.cs +++ b/Projectiles/Melee/DemonBlast.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee if (tileCheck) dust.noLight = true; - + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.ToRadians(45); } diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index e62a3ff471..245a27dcec 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation -= MathHelper.PiOver2; } } - + projectile.ai[0] += 1f; projectile.rotation += MathHelper.TwoPi * 2f / spinCycleTime * (float)direction; int expectedDirection = (player.SafeDirectionTo(Main.MouseWorld).X > 0f).ToDirectionInt(); diff --git a/Projectiles/Melee/ElementalGlassStar.cs b/Projectiles/Melee/ElementalGlassStar.cs index 82b7773c68..6e89bad527 100644 --- a/Projectiles/Melee/ElementalGlassStar.cs +++ b/Projectiles/Melee/ElementalGlassStar.cs @@ -80,12 +80,12 @@ namespace CalamityMod.Projectiles.Melee Main.gore[starGore].velocity += projectile.velocity * 0.3f; } - if (projectile.velocity.Length() < 2f && projectile.timeLeft < (int)(MaxTime / 2f)) + if (projectile.velocity.Length() < 2f && projectile.timeLeft < (int)(MaxTime / 2f)) { projectile.Kill(); return; } - + projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; CalamityGlobalProjectile.HomeInOnNPC(projectile, !projectile.tileCollide, 350f, 12f, 20f); diff --git a/Projectiles/Melee/EonBolt.cs b/Projectiles/Melee/EonBolt.cs index 14da149785..aad04a6f48 100644 --- a/Projectiles/Melee/EonBolt.cs +++ b/Projectiles/Melee/EonBolt.cs @@ -114,4 +114,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ExoGladComet.cs b/Projectiles/Melee/ExoGladComet.cs index 1be8cf64b1..91a4eee816 100644 --- a/Projectiles/Melee/ExoGladComet.cs +++ b/Projectiles/Melee/ExoGladComet.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Melee } Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.5f); projectile.velocity *= 1.005f; - + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi) + MathHelper.ToRadians(90) * projectile.direction; } diff --git a/Projectiles/Melee/GalaxiaBolt.cs b/Projectiles/Melee/GalaxiaBolt.cs index 8ea77ce22b..491b3220e5 100644 --- a/Projectiles/Melee/GalaxiaBolt.cs +++ b/Projectiles/Melee/GalaxiaBolt.cs @@ -85,4 +85,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/GalaxiaHoldout.cs b/Projectiles/Melee/GalaxiaHoldout.cs index cd8d71677a..f692f54bea 100644 --- a/Projectiles/Melee/GalaxiaHoldout.cs +++ b/Projectiles/Melee/GalaxiaHoldout.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Melee //Switch up the attunements Reattune((FourSeasonsGalaxia)associatedItem.modItem); - //Do particles around the player + //Do particles around the player Color particleColor = (associatedItem.modItem as FourSeasonsGalaxia).mainAttunement.tooltipColor; for (int i = 0; i <= 5; i++) @@ -87,16 +87,16 @@ namespace CalamityMod.Projectiles.Melee { switch (item.mainAttunement.id) { - case AttunementID.Phoenix: //Switching to the aries attunement. + case AttunementID.Phoenix: //Switching to the aries attunement. attunement = Attunement.attunementArray[(int)AttunementID.Aries]; break; - case AttunementID.Aries: //Switching to the polaris attunement. + case AttunementID.Aries: //Switching to the polaris attunement. attunement = Attunement.attunementArray[(int)AttunementID.Polaris]; break; - case AttunementID.Polaris: //Switching to the andromeda attunement. + case AttunementID.Polaris: //Switching to the andromeda attunement. attunement = Attunement.attunementArray[(int)AttunementID.Andromeda]; break; - case AttunementID.Andromeda: //Switching to the phoenix attunement. + case AttunementID.Andromeda: //Switching to the phoenix attunement. default: attunement = Attunement.attunementArray[(int)AttunementID.Phoenix]; break; @@ -106,16 +106,16 @@ namespace CalamityMod.Projectiles.Melee { switch (item.mainAttunement.id) { - case AttunementID.Phoenix: //Switching to the andromeda attunement. + case AttunementID.Phoenix: //Switching to the andromeda attunement. attunement = Attunement.attunementArray[(int)AttunementID.Andromeda]; break; - case AttunementID.Andromeda: //Switching to the polaris attunement. + case AttunementID.Andromeda: //Switching to the polaris attunement. attunement = Attunement.attunementArray[(int)AttunementID.Polaris]; break; - case AttunementID.Polaris: //Switching to the aries attunement. + case AttunementID.Polaris: //Switching to the aries attunement. attunement = Attunement.attunementArray[(int)AttunementID.Aries]; break; - case AttunementID.Aries: //Switching to the phoenix attunement. + case AttunementID.Aries: //Switching to the phoenix attunement. default: attunement = Attunement.attunementArray[(int)AttunementID.Phoenix]; break; @@ -190,4 +190,4 @@ namespace CalamityMod.Projectiles.Melee item.mainAttunement = attunement; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/GalaxiaTropicRing.cs b/Projectiles/Melee/GalaxiaTropicRing.cs index 2a30f03241..1594e7ec59 100644 --- a/Projectiles/Melee/GalaxiaTropicRing.cs +++ b/Projectiles/Melee/GalaxiaTropicRing.cs @@ -113,4 +113,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index 8431e4d24c..3323fc2c3f 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[projectile.owner]; public ref float Charge => ref projectile.ai[0]; //Charge public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" - public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. + public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. public ref float OverCharge => ref projectile.localAI[1]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; @@ -328,4 +328,4 @@ namespace CalamityMod.Projectiles.Melee dashDuration = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs index 0da01899a4..ea55f1e494 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs @@ -170,4 +170,4 @@ namespace CalamityMod.Projectiles.Melee OriginDirection = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_AriesWrath.cs b/Projectiles/Melee/Galaxia_AriesWrath.cs index 11f07d7b3c..307842f2bc 100644 --- a/Projectiles/Melee/Galaxia_AriesWrath.cs +++ b/Projectiles/Melee/Galaxia_AriesWrath.cs @@ -233,4 +233,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs b/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs index 9d2274d402..23cff4b92d 100644 --- a/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs +++ b/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs @@ -154,4 +154,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index ffd7dc1958..76cd533ba6 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.Item80, projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES for (int i = 0; i <= 8; i++) { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); @@ -366,4 +366,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index 4ec60b0933..2115de54ce 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (!initialized) //Initialization. + if (!initialized) //Initialization. { Main.PlaySound(SoundID.Item90, projectile.Center); initialized = true; @@ -321,4 +321,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_PolarisGazeDash.cs b/Projectiles/Melee/Galaxia_PolarisGazeDash.cs index 7ac399fdbf..7c2e204d0d 100644 --- a/Projectiles/Melee/Galaxia_PolarisGazeDash.cs +++ b/Projectiles/Melee/Galaxia_PolarisGazeDash.cs @@ -100,4 +100,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Galaxia_PolarisGazeStar.cs b/Projectiles/Melee/Galaxia_PolarisGazeStar.cs index 4cd97ed537..2018c1c9ba 100644 --- a/Projectiles/Melee/Galaxia_PolarisGazeStar.cs +++ b/Projectiles/Melee/Galaxia_PolarisGazeStar.cs @@ -145,4 +145,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/GalaxyStar.cs b/Projectiles/Melee/GalaxyStar.cs index 5efedec6c9..722a807266 100644 --- a/Projectiles/Melee/GalaxyStar.cs +++ b/Projectiles/Melee/GalaxyStar.cs @@ -54,4 +54,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceMist.cs b/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceMist.cs index 04f550b5a0..47c444c4ed 100644 --- a/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceMist.cs +++ b/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceMist.cs @@ -80,4 +80,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs index 39943ec364..715bec984a 100644 --- a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs +++ b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[projectile.owner]; public ref float Charge => ref projectile.ai[0]; //Charge public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" - public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. + public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. public ref float OverCharge => ref projectile.localAI[1]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; @@ -313,4 +313,4 @@ namespace CalamityMod.Projectiles.Melee dashDuration = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs index 1b17fc3bd9..9d6de4fc66 100644 --- a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs +++ b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs @@ -184,4 +184,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs index cc1d559902..8c3f08516b 100644 --- a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs +++ b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (Math.Abs(HalfTimer / 20f) == 0.5f) + if (Math.Abs(HalfTimer / 20f) == 0.5f) { var splash = new LegacySoundStyle(SoundID.Splash, 0).WithPitchVariance(Main.rand.NextFloat()); Main.PlaySound(splash, projectile.Center); @@ -80,4 +80,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs index cf20d45338..89ca437628 100644 --- a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs +++ b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs @@ -300,4 +300,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_GrovetendersEntanglingVines.cs b/Projectiles/Melee/MendedBiomeBlade_GrovetendersEntanglingVines.cs index 96033e5124..ad89b930de 100644 --- a/Projectiles/Melee/MendedBiomeBlade_GrovetendersEntanglingVines.cs +++ b/Projectiles/Melee/MendedBiomeBlade_GrovetendersEntanglingVines.cs @@ -81,4 +81,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index af7f88d189..36ddf9782a 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Melee CurrentState = 1f; Main.PlaySound(SoundID.Item80, projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES for (int i = 0; i <= 8; i++) { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); @@ -312,4 +312,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs index 695820fd31..95e06729a4 100644 --- a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs +++ b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs @@ -59,4 +59,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs index 2d23217c58..a2a44da2ab 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs @@ -212,7 +212,7 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { Main.PlaySound(SoundID.NPCHit43, projectile.Center); - if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) + if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) { Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.HotAttunement_ShotDamageBoost), projectile.knockBack, Owner.whoAmI, Shred); } @@ -278,4 +278,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs index eb2239aa62..ce63e4841f 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation projectile.Center = Owner.Center + (direction * 30); - //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); + //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); float factor = 1 - (float)Math.Pow((double)-(Timer / MaxTime) + 1, 2d); rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER @@ -260,4 +260,4 @@ namespace CalamityMod.Projectiles.Melee rotation = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs index 15753915b0..9056fd6a04 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs @@ -155,7 +155,7 @@ namespace CalamityMod.Projectiles.Melee // Bounce off float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); - bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground + bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); CanBounce = 0f; Owner.GiveIFrames(TrueBiomeBlade.EvilAttunement_BounceIFrames); // i frames for free! @@ -220,4 +220,4 @@ namespace CalamityMod.Projectiles.Melee ChargedUp = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs index 1cee6bb1be..196977886b 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee public float flipped; const float MaxTime = 90; - const int coyoteTimeFrames = 15; //How many frames does the whip stay extended + const int coyoteTimeFrames = 15; //How many frames does the whip stay extended const int MaxReach = 400; const int MinReach = 300; const float SnappingPoint = 0.55f; //When does the snap occur. @@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.MountedCenter + SwingPosition(ratio); projectile.direction = projectile.spriteDirection = -Owner.direction * (int)flipped; - //MessWithTiles(); + //MessWithTiles(); Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Owner.Calamity().mouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); } @@ -288,7 +288,7 @@ namespace CalamityMod.Projectiles.Melee controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.2f; controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; } - else //After the whip snaps, make the curve be a wave + else //After the whip snaps, make the curve be a wave { Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 155f * Owner.direction; @@ -326,4 +326,4 @@ namespace CalamityMod.Projectiles.Melee Reach = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs index 06faa9297d..b0e2683a76 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs @@ -96,4 +96,4 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffType(), debuffTime); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/MurasamaSlash.cs b/Projectiles/Melee/MurasamaSlash.cs index c185a2a5dd..4b764cd802 100644 --- a/Projectiles/Melee/MurasamaSlash.cs +++ b/Projectiles/Melee/MurasamaSlash.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Melee public int frameX = 0; public int frameY = 0; - public int CurrentFrame + public int CurrentFrame { get => frameX * 7 + frameY; set @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Melee { speed = player.ActiveItem().shootSpeed * projectile.scale; } - Vector2 newVelocity = (Main.MouseWorld - playerRotatedPoint).SafeNormalize(Vector2.UnitX * player.direction) * speed; + Vector2 newVelocity = (Main.MouseWorld - playerRotatedPoint).SafeNormalize(Vector2.UnitX * player.direction) * speed; // Sync if a velocity component changes. if (projectile.velocity.X != newVelocity.X || projectile.velocity.Y != newVelocity.Y) diff --git a/Projectiles/Melee/PhotonRipperProjectile.cs b/Projectiles/Melee/PhotonRipperProjectile.cs index 4ae321e91d..3951e0ea04 100644 --- a/Projectiles/Melee/PhotonRipperProjectile.cs +++ b/Projectiles/Melee/PhotonRipperProjectile.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee { public Player Owner => Main.player[projectile.owner]; public const float ZeroChargeDamageRatio = 0.36f; - public const float ToothDamageRatio = 0.1666667f; + public const float ToothDamageRatio = 0.1666667f; public const int ToothShootRate = 5; // One chainsaw tooth is emitted every this many frames. public const int ChargeUpTime = 150; public ref float Time => ref projectile.ai[0]; diff --git a/Projectiles/Melee/PlagueBeeDust.cs b/Projectiles/Melee/PlagueBeeDust.cs index c4dccab3ec..541c6a0d58 100644 --- a/Projectiles/Melee/PlagueBeeDust.cs +++ b/Projectiles/Melee/PlagueBeeDust.cs @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Melee { projectile.frame = 0; } - } + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Melee/PrismRay.cs b/Projectiles/Melee/PrismRay.cs index 079bbbb8df..75eb6339d0 100644 --- a/Projectiles/Melee/PrismRay.cs +++ b/Projectiles/Melee/PrismRay.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffset = (StartingPosition - projectile.Center) * 0.5f; Vector2 scale = new Vector2(1f, drawOffset.Length() * 2f / texture.Height); float rotation = drawOffset.ToRotation() + MathHelper.PiOver2; - + // This factor causes the opacity to flash rather quickly. float drawFade = MathHelper.Clamp(MathHelper.Distance(Lifetime * 0.5f, Time) / (Lifetime * 0.667f), 0f, 1f); diff --git a/Projectiles/Melee/PwnagehammerEcho.cs b/Projectiles/Melee/PwnagehammerEcho.cs index a07ec9c167..25cc7d9b5a 100644 --- a/Projectiles/Melee/PwnagehammerEcho.cs +++ b/Projectiles/Melee/PwnagehammerEcho.cs @@ -156,4 +156,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/RendingNeedle.cs b/Projectiles/Melee/RendingNeedle.cs index 2364a7fab7..1840a70c51 100644 --- a/Projectiles/Melee/RendingNeedle.cs +++ b/Projectiles/Melee/RendingNeedle.cs @@ -11,7 +11,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class RendingNeedle : ModProjectile + public class RendingNeedle : ModProjectile { internal PrimitiveTrail TrailDrawer; @@ -146,4 +146,4 @@ namespace CalamityMod.Projectiles.Melee } } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/SolarNeedle.cs b/Projectiles/Melee/SolarNeedle.cs index cfab0be86b..6d94186d22 100644 --- a/Projectiles/Melee/SolarNeedle.cs +++ b/Projectiles/Melee/SolarNeedle.cs @@ -12,7 +12,7 @@ using static CalamityMod.CalamityUtils; namespace CalamityMod.Projectiles.Melee { - public class SolarNeedle : ModProjectile + public class SolarNeedle : ModProjectile { public override void SetStaticDefaults() { @@ -145,4 +145,4 @@ namespace CalamityMod.Projectiles.Melee } } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/SoulScytheExplosion.cs b/Projectiles/Melee/SoulScytheExplosion.cs index 42f5c6162c..85ebf68df2 100644 --- a/Projectiles/Melee/SoulScytheExplosion.cs +++ b/Projectiles/Melee/SoulScytheExplosion.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Melee { DisplayName.SetDefault("Explosion"); } - + public override void SetDefaults() { projectile.width = 60; @@ -53,11 +53,11 @@ namespace CalamityMod.Projectiles.Melee } } } - + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 180); target.AddBuff(BuffID.CursedInferno, 90); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/Spears/BansheeHookProj.cs b/Projectiles/Melee/Spears/BansheeHookProj.cs index 3b95119831..021f333c99 100644 --- a/Projectiles/Melee/Spears/BansheeHookProj.cs +++ b/Projectiles/Melee/Spears/BansheeHookProj.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Melee.Spears { Dust dust = Dust.NewDustDirect(projectile.Center, 14, 14, 60, 0f, 0f, 110, default, 1f); dust.velocity = player.SafeDirectionTo(dust.position) * 2f; - dust.position = projectile.Center + + dust.position = projectile.Center + initalVelocity.RotatedBy(completionAsAngle * 2f + i / dustCount * MathHelper.TwoPi) * 10f; dust.scale = 1f + Main.rand.NextFloat(0.6f); dust.velocity += initalVelocity * 3f; @@ -92,8 +92,8 @@ namespace CalamityMod.Projectiles.Melee.Spears Vector2 drawPosition = projectile.position + new Vector2(projectile.width, projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; Texture2D alternateHookTexture = projectile.spriteDirection == -1 ? ModContent.GetTexture("CalamityMod/Projectiles/Melee/Spears/BansheeHookAlt") : Main.projectileTexture[projectile.type]; Vector2 origin = new Vector2(projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); - spriteBatch.Draw(alternateHookTexture, drawPosition, null, - new Color(255, 255, 255, 127), projectile.rotation, + spriteBatch.Draw(alternateHookTexture, drawPosition, null, + new Color(255, 255, 255, 127), projectile.rotation, origin, projectile.scale, SpriteEffects.None, 0f); return false; } diff --git a/Projectiles/Melee/SpineOfThanatosProjectile.cs b/Projectiles/Melee/SpineOfThanatosProjectile.cs index 694936c40a..0c354d7094 100644 --- a/Projectiles/Melee/SpineOfThanatosProjectile.cs +++ b/Projectiles/Melee/SpineOfThanatosProjectile.cs @@ -164,13 +164,13 @@ namespace CalamityMod.Projectiles.Melee // By default, make the prism rays go outward a good amount based on their rotation // to give a fan look. Vector2 prismEndPosition = WhipEnd + rayRotation.ToRotationVector2() * 420f; - + // However, if a potential target is within the general line of sight of the whip, // fire all lasers at it instead. This results in the entire laser spectrum appearing as one // brilliant, blazing laser that does great damage. However, it does take some skill to do. if (potentialTarget != null && targetAimDisparity < MathHelper.Pi * 0.27f) prismEndPosition = potentialTarget.Center + potentialTarget.velocity * 4f; - + int prismRay = Projectile.NewProjectile(prismEndPosition, Vector2.Zero, ModContent.ProjectileType(), rayDamage, projectile.knockBack * 0.2f, projectile.owner); if (Main.projectile.IndexInRange(prismRay)) { diff --git a/Projectiles/Melee/TrueAncientBeam.cs b/Projectiles/Melee/TrueAncientBeam.cs index 87e12a8c39..e953e816c0 100644 --- a/Projectiles/Melee/TrueAncientBeam.cs +++ b/Projectiles/Melee/TrueAncientBeam.cs @@ -129,4 +129,4 @@ namespace CalamityMod.Projectiles.Melee } } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueAncientBlast.cs b/Projectiles/Melee/TrueAncientBlast.cs index 3fcf5d2d26..bf54289480 100644 --- a/Projectiles/Melee/TrueAncientBlast.cs +++ b/Projectiles/Melee/TrueAncientBlast.cs @@ -11,7 +11,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class TrueAncientBlast : ModProjectile + public class TrueAncientBlast : ModProjectile { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(0f, sword.Height); Vector2 drawOffset = Owner.Center + angle.ToRotationVector2() * displace - Main.screenPosition; - float swordSize = 1.4f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); + float swordSize = 1.4f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); spriteBatch.Draw(sword, drawOffset, null, lightColor, drawRotation, drawOrigin, swordSize, 0f, 0f); spriteBatch.Draw(glowmask, drawOffset, null, Color.Lerp(lightColor, Color.White, 0.75f), drawRotation, drawOrigin, swordSize, 0f, 0f); @@ -124,4 +124,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs index dbab7d8edd..e70900f8cf 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee if (proj.active && proj.hostile && proj.damage > 1 && //Only parry harmful projectiles proj.velocity.Length() * (proj.extraUpdates + 1) > 1f && //Only parry projectiles that move semi-quickly - proj.Size.Length() < 300 && //Only parry projectiles that aren't too large + proj.Size.Length() < 300 && //Only parry projectiles that aren't too large Collision.CheckAABBvLineCollision(proj.Hitbox.TopLeft(), proj.Hitbox.Size(), Owner.Center + DistanceFromPlayer, Owner.Center + DistanceFromPlayer + (projectile.velocity * bladeLenght), 24, ref collisionPoint)) { GeneralParryEffects(); @@ -214,4 +214,4 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs b/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs index d8d44f49ed..34fbb9d1a0 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = projectile.velocity.ToRotation() + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, SwingRatio()); - projectile.scale = 1.4f + ((float)Math.Sin(SwingRatio() * MathHelper.Pi) * 0.6f) + (Charge / 10f) * 0.6f; + projectile.scale = 1.4f + ((float)Math.Sin(SwingRatio() * MathHelper.Pi) * 0.6f) + (Charge / 10f) * 0.6f; if (Owner.whoAmI == Main.myPlayer && SwingRatio() > 0.5f && HasFired == 0f && Charge > 0) { @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? sword.Width : 0f , sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[projectile.type]) + if (CalamityConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[projectile.type]) { for (int i = 0; i < projectile.oldRot.Length; ++i) { @@ -175,4 +175,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBladeHoldout.cs b/Projectiles/Melee/TrueBiomeBladeHoldout.cs index fae98f9939..152aec661b 100644 --- a/Projectiles/Melee/TrueBiomeBladeHoldout.cs +++ b/Projectiles/Melee/TrueBiomeBladeHoldout.cs @@ -211,4 +211,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs b/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs index 82571a05f3..d598f860fb 100644 --- a/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs +++ b/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs @@ -183,4 +183,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs b/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs index b246eb8127..51b5181999 100644 --- a/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs +++ b/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs @@ -93,4 +93,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index 74c3d9c698..5e0373893d 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -286,7 +286,7 @@ namespace CalamityMod.Projectiles.Melee return false; } - //TLDR : https://media.discordapp.net/attachments/659100646397575208/933521303443501136/placeholder.gif + //TLDR : https://media.discordapp.net/attachments/659100646397575208/933521303443501136/placeholder.gif private void GenerateCurve(float seed, Vector2 direction, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, float angleShift = 0f, float necessaryOrientation = 1f) { float randomNumber = 0.5f + ((float)Math.Sin(seed * 17.07947) + (float)Math.Sin(seed * 0.2f * 25.13274)) * 0.25f; //Ty dom for the awesome pseudo rng @@ -430,4 +430,4 @@ namespace CalamityMod.Projectiles.Melee whip3 = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs b/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs index 15934e0941..58a899201c 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[projectile.owner]; public ref float Charge => ref projectile.ai[0]; //Charge public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" - public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. + public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. public ref float OverCharge => ref projectile.localAI[1]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; @@ -313,4 +313,4 @@ namespace CalamityMod.Projectiles.Melee dashDuration = reader.ReadSingle(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs index abc4e7d289..847b3866a3 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs +++ b/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.numHits > 0) damage = (int)(damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageFalloff); - + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -239,4 +239,4 @@ namespace CalamityMod.Projectiles.Melee OriginDirection = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs b/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs index a91b2c3671..04750e9252 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs +++ b/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs @@ -107,4 +107,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index cc50223f30..0a9453c690 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -347,4 +347,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs index 9291911a5d..63150b3b16 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs @@ -97,4 +97,4 @@ namespace CalamityMod.Projectiles.Melee return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs index c014ba4234..a5f8d01ab3 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs @@ -125,4 +125,4 @@ namespace CalamityMod.Projectiles.Melee } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index f3ae3321b2..33f130fbb7 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee CurrentState = 1f; Main.PlaySound(SoundID.Item80, projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES for (int i = 0; i <= 8; i++) { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); @@ -385,4 +385,4 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs index a6a105d225..1afeb0110a 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs @@ -113,4 +113,4 @@ namespace CalamityMod.Projectiles.Melee public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)); } -} \ No newline at end of file +} diff --git a/Projectiles/Melee/ViolenceSlashProjectile.cs b/Projectiles/Melee/ViolenceSlashProjectile.cs index a0e34caf8b..40116749b4 100644 --- a/Projectiles/Melee/ViolenceSlashProjectile.cs +++ b/Projectiles/Melee/ViolenceSlashProjectile.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Kill(); return; } - + ManipulatePlayerFields(); DoMovement(); diff --git a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs index 6bb07824e6..c1a52e2bef 100644 --- a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs +++ b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos } else if (!mmmmmm.IsDisposed) CalamityUtils.ApplySoundStats(ref mmmmmm, projectile.Center); - + // Spawn invisible but damaging aura projectile if (projectile.owner == Main.myPlayer && !spawnedAura) { diff --git a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs index 572ad626cf..9f32284807 100644 --- a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos return; Lighting.AddLight(projectile.Center, 0.8f, 0.3f, 1f); - + projectile.localAI[1]++; if (projectile.localAI[1] >= 4 * FramesPerShot) projectile.localAI[1] = 0f; diff --git a/Projectiles/Pets/SirenYoung.cs b/Projectiles/Pets/SirenYoung.cs index c72e0fa4e1..fd7b730d9f 100644 --- a/Projectiles/Pets/SirenYoung.cs +++ b/Projectiles/Pets/SirenYoung.cs @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Pets Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.7f); break; } - + float velAdjustment = 0.2f; float speedLimit = 5f; Vector2 playerVec = player.Center - projectile.Center; diff --git a/Projectiles/Pets/Sparks.cs b/Projectiles/Pets/Sparks.cs index aac9c34336..647af2ae0a 100644 --- a/Projectiles/Pets/Sparks.cs +++ b/Projectiles/Pets/Sparks.cs @@ -478,4 +478,4 @@ namespace CalamityMod.Projectiles.Pets return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Pets/YharonSonPet.cs b/Projectiles/Pets/YharonSonPet.cs index 17334aac24..4261eb2bbd 100644 --- a/Projectiles/Pets/YharonSonPet.cs +++ b/Projectiles/Pets/YharonSonPet.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Pets public int frameX = 0; public int frameY = 0; - public int CurrentFrame + public int CurrentFrame { get => frameX * yFrameAmt + frameY; set @@ -173,7 +173,7 @@ namespace CalamityMod.Projectiles.Pets bool noSolidGround = true; for (int i = (int)projectile.BottomLeft.X / 16; i < (int)projectile.BottomRight.X / 16; i++) { - Tile tileBelow = CalamityUtils.ParanoidTileRetrieval(i, (int)(projectile.Bottom.Y / 16)); + Tile tileBelow = CalamityUtils.ParanoidTileRetrieval(i, (int)(projectile.Bottom.Y / 16)); if (tileBelow.IsTileSolidGround()) { noSolidGround = false; diff --git a/Projectiles/Ranged/AquaBlastToxic.cs b/Projectiles/Ranged/AquaBlastToxic.cs index f001b8e3a0..d717bda51b 100644 --- a/Projectiles/Ranged/AquaBlastToxic.cs +++ b/Projectiles/Ranged/AquaBlastToxic.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 dspeed = -projectile.velocity * Main.rand.NextFloat(0.5f * 0.8f); int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 1f); Main.dust[num458].noGravity = true; - Main.dust[num458].velocity = dspeed; + Main.dust[num458].velocity = dspeed; } } diff --git a/Projectiles/Ranged/AstrealArrow.cs b/Projectiles/Ranged/AstrealArrow.cs index 142292ab27..fbff4391b6 100644 --- a/Projectiles/Ranged/AstrealArrow.cs +++ b/Projectiles/Ranged/AstrealArrow.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged break; } } - + if (Main.rand.NextBool(5)) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); diff --git a/Projectiles/Ranged/BrimstoneBallFriendly.cs b/Projectiles/Ranged/BrimstoneBallFriendly.cs index 23e730493c..5d225898ab 100644 --- a/Projectiles/Ranged/BrimstoneBallFriendly.cs +++ b/Projectiles/Ranged/BrimstoneBallFriendly.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Ranged int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 150, default, 1.5f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; - + } } diff --git a/Projectiles/Ranged/ChargedDartExplosion.cs b/Projectiles/Ranged/ChargedDartExplosion.cs index 126fa5d65a..5aa895414a 100644 --- a/Projectiles/Ranged/ChargedDartExplosion.cs +++ b/Projectiles/Ranged/ChargedDartExplosion.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged { DisplayName.SetDefault("Explosion"); } - + public override void SetDefaults() { projectile.width = 50; @@ -77,10 +77,10 @@ namespace CalamityMod.Projectiles.Ranged } } } - + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 240); } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/ChickenCannonHeld.cs b/Projectiles/Ranged/ChickenCannonHeld.cs index 664a76ab86..df47023c01 100644 --- a/Projectiles/Ranged/ChickenCannonHeld.cs +++ b/Projectiles/Ranged/ChickenCannonHeld.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged { static float FireRate = 33f; //The first shot from the holdout doesnt consume ammo, this is because the ammo is already consumed by the fact the player needs to consume ammo to shoot it - public ref float FreeShotLoaded => ref projectile.ai[0]; + public ref float FreeShotLoaded => ref projectile.ai[0]; public ref float FramesTillNextShot => ref projectile.ai[1]; public override void SetStaticDefaults() diff --git a/Projectiles/Ranged/ClockworkBowHoldout.cs b/Projectiles/Ranged/ClockworkBowHoldout.cs index bf6fa82443..fd8765efb2 100644 --- a/Projectiles/Ranged/ClockworkBowHoldout.cs +++ b/Projectiles/Ranged/ClockworkBowHoldout.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Ranged else { - // Frame 1 effects: Initialize the shoot speed + // Frame 1 effects: Initialize the shoot speed if (FramesToLoadBolt == 0f) { FramesToLoadBolt = Owner.ActiveItem().useAnimation; @@ -253,4 +253,4 @@ namespace CalamityMod.Projectiles.Ranged public override bool CanDamage() => false; } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/DragonsBreathRound.cs b/Projectiles/Ranged/DragonsBreathRound.cs index e9cc439cdb..f824d19528 100644 --- a/Projectiles/Ranged/DragonsBreathRound.cs +++ b/Projectiles/Ranged/DragonsBreathRound.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Ranged dust.velocity += projectile.velocity * 0.1f; dust.position.X -= num93; dust.position.Y -= num94; - + if (Main.rand.NextBool(20)) { int num97 = 4; diff --git a/Projectiles/Ranged/DrizzlefishFire.cs b/Projectiles/Ranged/DrizzlefishFire.cs index 3af6b36b9f..5258eddd04 100644 --- a/Projectiles/Ranged/DrizzlefishFire.cs +++ b/Projectiles/Ranged/DrizzlefishFire.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Ranged public class DrizzlefishFire : ModProjectile { private int splitTimer = 30; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Drizzlefish Flames"); diff --git a/Projectiles/Ranged/EmesisGore.cs b/Projectiles/Ranged/EmesisGore.cs index b36f81b394..08c79013d8 100644 --- a/Projectiles/Ranged/EmesisGore.cs +++ b/Projectiles/Ranged/EmesisGore.cs @@ -5,7 +5,7 @@ using Terraria.ModLoader; using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Ranged -{ +{ public class EmesisGore : ModProjectile { public int HurtCounter = 0; diff --git a/Projectiles/Ranged/FallenStarProj.cs b/Projectiles/Ranged/FallenStarProj.cs index ab39d95531..47af8f1f0e 100644 --- a/Projectiles/Ranged/FallenStarProj.cs +++ b/Projectiles/Ranged/FallenStarProj.cs @@ -128,4 +128,4 @@ namespace CalamityMod.Projectiles.Ranged return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/FungiOrb.cs b/Projectiles/Ranged/FungiOrb.cs index e80949d742..d4867961d9 100644 --- a/Projectiles/Ranged/FungiOrb.cs +++ b/Projectiles/Ranged/FungiOrb.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 56, 0f, 0f, 100, default, 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity = dspeed; - + } } diff --git a/Projectiles/Ranged/GodSlayerSlugProj.cs b/Projectiles/Ranged/GodSlayerSlugProj.cs index 1a47d2a6e3..8cacd3e226 100644 --- a/Projectiles/Ranged/GodSlayerSlugProj.cs +++ b/Projectiles/Ranged/GodSlayerSlugProj.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged // Store the original velocity if it has yet to be initialized. This is needed for the warp. if (projectile.localAI[0] == 0f) projectile.localAI[0] = projectile.velocity.Length(); - + // Rapidly fade into visibility. if (projectile.alpha > 0) projectile.alpha -= 17; diff --git a/Projectiles/Ranged/HyperiusBulletProj.cs b/Projectiles/Ranged/HyperiusBulletProj.cs index 5d2c64a8ce..310fa835b3 100644 --- a/Projectiles/Ranged/HyperiusBulletProj.cs +++ b/Projectiles/Ranged/HyperiusBulletProj.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Ranged public class HyperiusBulletProj : ModProjectile { private Color currentColor = Color.Black; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Hyperius Bullet"); diff --git a/Projectiles/Ranged/HyperiusSplit.cs b/Projectiles/Ranged/HyperiusSplit.cs index 7705520b29..520f3bee4f 100644 --- a/Projectiles/Ranged/HyperiusSplit.cs +++ b/Projectiles/Ranged/HyperiusSplit.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged { public override string Texture => "CalamityMod/Projectiles/Ranged/HyperiusBulletProj"; private Color currentColor = Color.Black; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Hyperius Bad Time"); diff --git a/Projectiles/Ranged/LunarBolt.cs b/Projectiles/Ranged/LunarBolt.cs index ac29dfccb2..abc055a81a 100644 --- a/Projectiles/Ranged/LunarBolt.cs +++ b/Projectiles/Ranged/LunarBolt.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Ranged { //Rotation projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); - projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); - + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + if (projectile.alpha < 170) { for (int d = 0; d < 5; d++) diff --git a/Projectiles/Ranged/MistArrow.cs b/Projectiles/Ranged/MistArrow.cs index b38118d21b..d7eae618d4 100644 --- a/Projectiles/Ranged/MistArrow.cs +++ b/Projectiles/Ranged/MistArrow.cs @@ -55,11 +55,11 @@ namespace CalamityMod.Projectiles.Ranged projectile.localAI[0] += 1f; if (projectile.localAI[0] > 4f) - { + { Vector2 dspeed = -projectile.velocity * Main.rand.NextFloat(0.3f, 0.6f); int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, new Color(237, 242, 242, 200), 1.2f); Main.dust[num469].noGravity = true; - Main.dust[num469].velocity = dspeed; + Main.dust[num469].velocity = dspeed; } } diff --git a/Projectiles/Ranged/Nanomachine.cs b/Projectiles/Ranged/Nanomachine.cs index bdda8883bd..d36f295434 100644 --- a/Projectiles/Ranged/Nanomachine.cs +++ b/Projectiles/Ranged/Nanomachine.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged Main.dust[num137].position.Y = y2; Main.dust[num137].velocity = dspeed; Main.dust[num137].noGravity = true; - + float num138 = (float)Math.Sqrt((double)(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y)); float num139 = projectile.localAI[0]; if (num139 == 0f) diff --git a/Projectiles/Ranged/Nuke.cs b/Projectiles/Ranged/Nuke.cs index 6cdfe88a37..8cc0042cb4 100644 --- a/Projectiles/Ranged/Nuke.cs +++ b/Projectiles/Ranged/Nuke.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 244, 0f, 0f, 100, default, 0.5f); Main.dust[num249].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[num249].velocity *= 0.05f; - + } } diff --git a/Projectiles/Ranged/PrecisionBolt.cs b/Projectiles/Ranged/PrecisionBolt.cs index 2f6b826d7c..fa5685d6d1 100644 --- a/Projectiles/Ranged/PrecisionBolt.cs +++ b/Projectiles/Ranged/PrecisionBolt.cs @@ -56,12 +56,12 @@ namespace CalamityMod.Projectiles.Ranged Lighting.AddLight(projectile.Center, Color.LightSteelBlue.ToVector3()); projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; - if (potentialTarget == null) //(Re)target + if (potentialTarget == null) //(Re)target potentialTarget = projectile.Center.ClosestNPCAt(512f, true); if (potentialTarget != null) { - //Do some funny slight homing just in case + //Do some funny slight homing just in case float angularTurnSpeed = MathHelper.ToRadians(2.5f); float idealDirection = projectile.AngleTo(potentialTarget.Center); float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); @@ -98,4 +98,4 @@ namespace CalamityMod.Projectiles.Ranged } } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/PristineSecondary.cs b/Projectiles/Ranged/PristineSecondary.cs index f42d4753b8..206c2759af 100644 --- a/Projectiles/Ranged/PristineSecondary.cs +++ b/Projectiles/Ranged/PristineSecondary.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Ranged { DisplayName.SetDefault("Fire"); } - + public override void SetDefaults() { projectile.width = 50; @@ -101,4 +101,4 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(ModContent.BuffType(), 240); } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/PumplerGrenadeExplosion.cs b/Projectiles/Ranged/PumplerGrenadeExplosion.cs index 2996df1e70..40f5f07d46 100644 --- a/Projectiles/Ranged/PumplerGrenadeExplosion.cs +++ b/Projectiles/Ranged/PumplerGrenadeExplosion.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Projectiles.Ranged float distanceY = Math.Abs(projectile.Center.Y - target.Hitbox.Center.Y); //If the distance is just too big for the two to intersect, return false - if (distanceX > (target.Hitbox.Width / 2f + blastRadius) || distanceY > (target.Hitbox.Height / 2f + blastRadius)) - return false; + if (distanceX > (target.Hitbox.Width / 2f + blastRadius) || distanceY > (target.Hitbox.Height / 2f + blastRadius)) + return false; //If either distance is too small (aka if the projectile's center is inside of the target's hitbox, return true if (distanceX <= (target.Hitbox.Width / 2f) || distanceY <= (target.Hitbox.Height / 2f)) diff --git a/Projectiles/Ranged/PumplerHoldout.cs b/Projectiles/Ranged/PumplerHoldout.cs index 8d73e44e51..364411e7ea 100644 --- a/Projectiles/Ranged/PumplerHoldout.cs +++ b/Projectiles/Ranged/PumplerHoldout.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged else { - // Frame 1 effects: Initialize the shoot speed + // Frame 1 effects: Initialize the shoot speed if (FramesToLoadNextPumpkin == 0f) { FramesToLoadNextPumpkin = Owner.ActiveItem().useAnimation; @@ -219,7 +219,7 @@ namespace CalamityMod.Projectiles.Ranged spriteBatch.EnterShaderRegion(); if (PumpkinsCharge > 0 && Overfilled == 0f) { - GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(1f - 0.20f * CurrentChargingFrames - 0.1f*(5f-PumpkinsCharge) , 0f, 1f)); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(1f - 0.20f * CurrentChargingFrames - 0.1f*(5f-PumpkinsCharge) , 0f, 1f)); //tint effect is visible if its charging. The more pumpkins are loaded, the more opacity } else @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool CanDamage() => false; - //netcode hell + //netcode hell public override void SendExtraAI(BinaryWriter writer) { writer.Write(Overfilled); diff --git a/Projectiles/Ranged/SputterComet.cs b/Projectiles/Ranged/SputterComet.cs index 9e173eb246..9be340ba81 100644 --- a/Projectiles/Ranged/SputterComet.cs +++ b/Projectiles/Ranged/SputterComet.cs @@ -73,4 +73,4 @@ namespace CalamityMod.Projectiles.Ranged } } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/SputterCometBig.cs b/Projectiles/Ranged/SputterCometBig.cs index 29b9ef17d2..e7c6207fd0 100644 --- a/Projectiles/Ranged/SputterCometBig.cs +++ b/Projectiles/Ranged/SputterCometBig.cs @@ -81,4 +81,4 @@ namespace CalamityMod.Projectiles.Ranged } } } -} \ No newline at end of file +} diff --git a/Projectiles/Ranged/TelluricGlareArrow.cs b/Projectiles/Ranged/TelluricGlareArrow.cs index 523307b605..50b65b243a 100644 --- a/Projectiles/Ranged/TelluricGlareArrow.cs +++ b/Projectiles/Ranged/TelluricGlareArrow.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged if (projectile.timeLeft > 8) projectile.timeLeft = 8; } - + public override void OnHitPlayer(Player target, int damage, bool crit) { RestrictLifetime(); @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Ranged public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item14, projectile.position); - + // Explode into a bunch of holy fire on death. for (int i = 0; i < 10; i++) { diff --git a/Projectiles/Rogue/BettyExplosion.cs b/Projectiles/Rogue/BettyExplosion.cs index e83c29160e..ebf76d4bf5 100644 --- a/Projectiles/Rogue/BettyExplosion.cs +++ b/Projectiles/Rogue/BettyExplosion.cs @@ -59,6 +59,6 @@ namespace CalamityMod.Projectiles.Rogue // Smoke, which counts as a Gore CalamityUtils.ExplosionGores(projectile.Center, 3); } - + } } diff --git a/Projectiles/Rogue/DesecratedBubble.cs b/Projectiles/Rogue/DesecratedBubble.cs index eeaca57c0c..a11e7b7654 100644 --- a/Projectiles/Rogue/DesecratedBubble.cs +++ b/Projectiles/Rogue/DesecratedBubble.cs @@ -94,4 +94,4 @@ namespace CalamityMod.Projectiles.Rogue public override bool CanHitPvp(Player target) => projectile.timeLeft < 100; } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/EradicatorProjectile.cs index 77b6181a0b..4a1dfaaca5 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/EradicatorProjectile.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue // // Boomerang AI copied from Nanoblack Reaper // - + // On the frame the disc begins returning, send a net update. if (projectile.timeLeft == Lifetime - ReboundTime) projectile.netUpdate = true; diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index 2b26425dc2..3aed80bce2 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.aiStyle = 2; + projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = ProjectileID.ThrowingKnife; projectile.Calamity().rogue = true; diff --git a/Projectiles/Rogue/FinalDawnFireSlash.cs b/Projectiles/Rogue/FinalDawnFireSlash.cs index 320dc77293..6a2972d386 100644 --- a/Projectiles/Rogue/FinalDawnFireSlash.cs +++ b/Projectiles/Rogue/FinalDawnFireSlash.cs @@ -120,12 +120,12 @@ namespace CalamityMod.Projectiles.Rogue projectile.scale, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); - Main.spriteBatch.Draw(glowTexture, - drawCenter - Main.screenPosition, - frameRectangle, + Main.spriteBatch.Draw(glowTexture, + drawCenter - Main.screenPosition, + frameRectangle, projectile.GetAlpha(Color.White), projectile.rotation, - frameRectangle.Size() / 2, + frameRectangle.Size() / 2, projectile.scale, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); diff --git a/Projectiles/Rogue/FinalDawnFireball.cs b/Projectiles/Rogue/FinalDawnFireball.cs index c1b55a2186..71782b6b52 100644 --- a/Projectiles/Rogue/FinalDawnFireball.cs +++ b/Projectiles/Rogue/FinalDawnFireball.cs @@ -86,4 +86,4 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(ModContent.BuffType(), 240); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/FinalDawnFlame.cs b/Projectiles/Rogue/FinalDawnFlame.cs index f79beb5073..e5e22fd216 100644 --- a/Projectiles/Rogue/FinalDawnFlame.cs +++ b/Projectiles/Rogue/FinalDawnFlame.cs @@ -149,4 +149,4 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(ModContent.BuffType(), 180); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs index 6680ce4b72..3e164c77ca 100644 --- a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs +++ b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.Center = player.Center; player.heldProj = projectile.whoAmI; projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); - + projectile.ai[0]++; if (projectile.ai[0] >= 4) { @@ -97,4 +97,4 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(ModContent.BuffType(), 300); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/FinalDawnProjectile.cs b/Projectiles/Rogue/FinalDawnProjectile.cs index bf1075525f..4277fea088 100644 --- a/Projectiles/Rogue/FinalDawnProjectile.cs +++ b/Projectiles/Rogue/FinalDawnProjectile.cs @@ -181,4 +181,4 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(ModContent.BuffType(), 300); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/FinalDawnReticle.cs b/Projectiles/Rogue/FinalDawnReticle.cs index eda259e199..b73788a903 100644 --- a/Projectiles/Rogue/FinalDawnReticle.cs +++ b/Projectiles/Rogue/FinalDawnReticle.cs @@ -78,4 +78,4 @@ namespace CalamityMod.Projectiles.Rogue return false; } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/FinalDawnThrow.cs b/Projectiles/Rogue/FinalDawnThrow.cs index cd1c302c00..96c24de412 100644 --- a/Projectiles/Rogue/FinalDawnThrow.cs +++ b/Projectiles/Rogue/FinalDawnThrow.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 desiredVelocity = projectile.SafeDirectionTo(player.Center) * DesiredSpeed; projectile.velocity = Vector2.Lerp(projectile.velocity, desiredVelocity, 1f / InterpolationTime); - + float distance = projectile.Distance(player.Center); if (distance < 64) projectile.Kill(); @@ -97,4 +97,4 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(ModContent.BuffType(), 240); } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/FinalDawnThrow2.cs b/Projectiles/Rogue/FinalDawnThrow2.cs index b7be669383..674b72d802 100644 --- a/Projectiles/Rogue/FinalDawnThrow2.cs +++ b/Projectiles/Rogue/FinalDawnThrow2.cs @@ -143,4 +143,4 @@ namespace CalamityMod.Projectiles.Rogue player.fullRotation = 0; } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/MetalChunk.cs b/Projectiles/Rogue/MetalChunk.cs index 46a2130327..209230b1c6 100644 --- a/Projectiles/Rogue/MetalChunk.cs +++ b/Projectiles/Rogue/MetalChunk.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Rogue } public override void AI() - { - //Gravity + { + //Gravity projectile.velocity.Y += 0.11f; if (projectile.velocity.Y > 16f) projectile.velocity.Y = 16f; diff --git a/Projectiles/Rogue/MetalShard.cs b/Projectiles/Rogue/MetalShard.cs index 503e36eb4b..79ff5c1708 100644 --- a/Projectiles/Rogue/MetalShard.cs +++ b/Projectiles/Rogue/MetalShard.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.localAI[1] = Main.rand.Next(1, 4); switch (projectile.localAI[1]) { - + case 2f: texture = ModContent.GetTexture("CalamityMod/Projectiles/Rogue/MetalShard2"); break; case 3f: texture = ModContent.GetTexture("CalamityMod/Projectiles/Rogue/MetalShard3"); diff --git a/Projectiles/Rogue/MonkeyDart.cs b/Projectiles/Rogue/MonkeyDart.cs index b5f3ad2bc2..cb30ebf317 100644 --- a/Projectiles/Rogue/MonkeyDart.cs +++ b/Projectiles/Rogue/MonkeyDart.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Rogue } public override void SetDefaults() - { + { projectile.width = 14; projectile.height = 14; projectile.friendly = true; diff --git a/Projectiles/Rogue/NanoblackStealthSplit.cs b/Projectiles/Rogue/NanoblackStealthSplit.cs index 23cca9a85e..6802bb97cc 100644 --- a/Projectiles/Rogue/NanoblackStealthSplit.cs +++ b/Projectiles/Rogue/NanoblackStealthSplit.cs @@ -205,4 +205,4 @@ namespace CalamityMod.Projectiles.Rogue } } } -} \ No newline at end of file +} diff --git a/Projectiles/Rogue/PenumbraBomb.cs b/Projectiles/Rogue/PenumbraBomb.cs index 832fc402c3..0278612628 100644 --- a/Projectiles/Rogue/PenumbraBomb.cs +++ b/Projectiles/Rogue/PenumbraBomb.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue } projectile.ai[0] = 0f; } - + } public override void Kill(int timeLeft) diff --git a/Projectiles/Rogue/PhantasmalSoul.cs b/Projectiles/Rogue/PhantasmalSoul.cs index 72646d448f..66b89e1576 100644 --- a/Projectiles/Rogue/PhantasmalSoul.cs +++ b/Projectiles/Rogue/PhantasmalSoul.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Rogue private const int NoHomingFrames = 40; private const int NoHitFrames = 10; private const int NoDrawFrames = 5; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Phantasmal Soul"); diff --git a/Projectiles/Rogue/RadiantExplosion.cs b/Projectiles/Rogue/RadiantExplosion.cs index f455306aaf..0c23cbed94 100644 --- a/Projectiles/Rogue/RadiantExplosion.cs +++ b/Projectiles/Rogue/RadiantExplosion.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.ai[0] = 0f; updatedTime = true; } - + if (projectile.timeLeft >= (updatedTime ? 80 : 6)) { for (int i = 0; i < 5; i++) diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs index 7f44e21d59..3103427fbf 100644 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ b/Projectiles/Rogue/SlickCaneProjectile.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue Math.Sign(projectile.velocity.X) + (projectile.spriteDirection == -1).ToInt() * MathHelper.Pi; float velocityMagnitude = 0f; float scaleFactor = 35f; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + f2.ToRotationVector2() * scaleFactor, (TravelSpeed + 1f) * projectile.scale, ref velocityMagnitude)) { diff --git a/Projectiles/Rogue/SulphuricNukesplosion.cs b/Projectiles/Rogue/SulphuricNukesplosion.cs index e75ad3f627..a8b36a7bb8 100644 --- a/Projectiles/Rogue/SulphuricNukesplosion.cs +++ b/Projectiles/Rogue/SulphuricNukesplosion.cs @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) //custom collision when it's explosion, yes i didn't want to make yet another projectile for the stealth explosion :hdfailure: { if (boomerTime == -1) - projHitbox.Intersects(targetHitbox); + projHitbox.Intersects(targetHitbox); return CalamityUtils.CircularHitboxCollision(projectile.Center, 200f, targetHitbox); } diff --git a/Projectiles/Rogue/TheAtomSplitterProjectile.cs b/Projectiles/Rogue/TheAtomSplitterProjectile.cs index 7798a1947a..1767f7f469 100644 --- a/Projectiles/Rogue/TheAtomSplitterProjectile.cs +++ b/Projectiles/Rogue/TheAtomSplitterProjectile.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue // DO NOT increase this unless you are ABSOLUTELY SURE you know what will happen. private const float NormalSplitMultiplier = 0.7f; private const float StealthSplitMultiplier = 0.144f; - + public ref float HitTargetIndex => ref projectile.ai[0]; public ref float Time => ref projectile.ai[1]; diff --git a/Projectiles/Rogue/UrchinStingerProj.cs b/Projectiles/Rogue/UrchinStingerProj.cs index a6e02c0866..2d6605036f 100644 --- a/Projectiles/Rogue/UrchinStingerProj.cs +++ b/Projectiles/Rogue/UrchinStingerProj.cs @@ -7,7 +7,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue -{ +{ public class UrchinStingerProj : ModProjectile { public override string Texture => "CalamityMod/Items/Weapons/Rogue/UrchinStinger"; diff --git a/Projectiles/Rogue/WrathwingFireball.cs b/Projectiles/Rogue/WrathwingFireball.cs index f9b4741fea..88c7012af2 100644 --- a/Projectiles/Rogue/WrathwingFireball.cs +++ b/Projectiles/Rogue/WrathwingFireball.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue } if (projectile.frame >= Main.projFrames[projectile.type]) projectile.frame = 0; - + // Keep the fireball rotated the correct way because the sheet faces down, not up projectile.rotation += MathHelper.Pi; } diff --git a/Projectiles/Rogue/WrathwingSpear.cs b/Projectiles/Rogue/WrathwingSpear.cs index 1a21db0aa9..6181fa17fb 100644 --- a/Projectiles/Rogue/WrathwingSpear.cs +++ b/Projectiles/Rogue/WrathwingSpear.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Rogue public class WrathwingSpear : ModProjectile { private const float FireballAngleVariance = 0.07f; - + public override void SetStaticDefaults() { DisplayName.SetDefault("Wrathwing"); @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.owner == Main.myPlayer && projectile.ai[0] <= 0f) { projectile.ai[0] = Main.rand.NextFloat(15f, 19f); - + int fireballID = ModContent.ProjectileType(); int damage = (int)(projectile.damage * 0.8f); float angleDiff = Main.rand.NextFloat(-FireballAngleVariance, FireballAngleVariance); diff --git a/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs b/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs index caa74a719f..6c2ebda104 100644 --- a/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs +++ b/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Summon.AndromedaUI #region Robot Properties public bool LeftBracketActive - { + { get => AttachedRobot.LeftBracketActive; set => AttachedRobot.LeftBracketActive = value; } diff --git a/Projectiles/Summon/ApexShark.cs b/Projectiles/Summon/ApexShark.cs index 723d4203f0..7a0ce2262e 100644 --- a/Projectiles/Summon/ApexShark.cs +++ b/Projectiles/Summon/ApexShark.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Summon float num635 = 2200f; float num636 = 150f; bool flag64 = projectile.type == ModContent.ProjectileType(); - + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(ModContent.BuffType(), 3600); if (flag64) @@ -247,7 +247,7 @@ namespace CalamityMod.Projectiles.Summon } } } - + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -258,7 +258,7 @@ namespace CalamityMod.Projectiles.Summon Main.projectile[sand].Center = projectile.Center; projectile.netUpdate = true; HitCooldown = 20; - + } public override bool? CanHitNPC(NPC target) diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs index d0ad679617..0fb80dcd66 100644 --- a/Projectiles/Summon/AstrageldonSummon.cs +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Summon float disttoobjective = Vector2.Distance(npc.Center, projectile.Center); if ((!gotoenemy && disttoobjective < mindistance) && lineOfSight) { - + mindistance = disttoobjective; objectivepos = npc.Center; gotoenemy = true; @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Summon float disttoobjective = Vector2.Distance(npc.Center, projectile.Center); if ((!gotoenemy && disttoobjective < mindistance) && lineOfSight) { - + mindistance = disttoobjective; objectivepos = npc.Center; gotoenemy = true; diff --git a/Projectiles/Summon/AureusBomber.cs b/Projectiles/Summon/AureusBomber.cs index 7860c6622c..82baa57253 100644 --- a/Projectiles/Summon/AureusBomber.cs +++ b/Projectiles/Summon/AureusBomber.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Summon projectile.spriteDirection = projectile.direction = -1; else if (projectile.velocity.X < 0f) projectile.spriteDirection = projectile.direction = 1; - + //tile collision projectile.tileCollide = true; if (projectile.ai[0] == 1f) diff --git a/Projectiles/Summon/ColdDivinityPointyThing.cs b/Projectiles/Summon/ColdDivinityPointyThing.cs index fd9778f624..eede4514b5 100644 --- a/Projectiles/Summon/ColdDivinityPointyThing.cs +++ b/Projectiles/Summon/ColdDivinityPointyThing.cs @@ -220,7 +220,7 @@ namespace CalamityMod.Projectiles.Summon velocity.Normalize(); velocity *= 20f; Projectile.NewProjectile(projectile.position, velocity, projectile.type, (int)(projectile.damage * 1.05f), projectile.knockBack, projectile.owner, projectile.ai[0], 1f); - + } projectile.netUpdate = projectile.owner == Main.myPlayer; } @@ -256,7 +256,7 @@ namespace CalamityMod.Projectiles.Summon if (Main.projectile[i].active && Main.projectile[i].owner == projectile.owner && Main.projectile[i].type == projectile.type) { ColdDivinityPointyThing pointy = (ColdDivinityPointyThing)Main.projectile[i].modProjectile; - if (Main.projectile[i].ai[1] > 2f) + if (Main.projectile[i].ai[1] > 2f) circlers = circlers + Main.rand.Next(1, 4); } } diff --git a/Projectiles/Summon/DaedalusGolem.cs b/Projectiles/Summon/DaedalusGolem.cs index 2da90b6e5c..f1411879a4 100644 --- a/Projectiles/Summon/DaedalusGolem.cs +++ b/Projectiles/Summon/DaedalusGolem.cs @@ -203,7 +203,7 @@ namespace CalamityMod.Projectiles.Summon } projectile.tileCollide = true; - // Don't bother moving any more if super close to the destination. + // Don't bother moving any more if super close to the destination. // Just slow down and face the player. if (Math.Abs(projectile.Center.X - destination.X) < 55 + Math.Abs(projectile.velocity.X)) { @@ -236,8 +236,8 @@ namespace CalamityMod.Projectiles.Summon // Jump if there's a gap or a wall. if (tileBelow.IsTileSolidGround() || Collision.SolidCollision(projectile.Center, 10, 10)) { - if (Math.Abs(projectile.oldPosition.X - projectile.position.X) < 2f || - Collision.SolidCollision(projectile.Center, 2, 2) || + if (Math.Abs(projectile.oldPosition.X - projectile.position.X) < 2f || + Collision.SolidCollision(projectile.Center, 2, 2) || !Collision.CanHitLine(projectile.position, projectile.width, projectile.height, Owner.position, Owner.width, Owner.height)) { projectile.velocity.Y = -12f - StuckJumpSpeed; diff --git a/Projectiles/Summon/DormantBrimseekerAura.cs b/Projectiles/Summon/DormantBrimseekerAura.cs index 1cfa9318cc..a54d5b88dd 100644 --- a/Projectiles/Summon/DormantBrimseekerAura.cs +++ b/Projectiles/Summon/DormantBrimseekerAura.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon } for (int i = 0; i < Main.maxProjectiles; i++) { - if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && + if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == projectile.owner && Main.projectile[i].localAI[1] == 0f) { if (Main.projectile[i].Distance(projectile.Center) < projectile.localAI[1]) diff --git a/Projectiles/Summon/DormantBrimseekerBab.cs b/Projectiles/Summon/DormantBrimseekerBab.cs index 4b4ed9b1f2..3afad601ac 100644 --- a/Projectiles/Summon/DormantBrimseekerBab.cs +++ b/Projectiles/Summon/DormantBrimseekerBab.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Summon if (potentialTarget == null) { if (projectile.ai[0] != 0f) - { + { projectile.ai[0] = 0f; // Disable charge animation when not attacking } projectile.rotation = projectile.rotation.AngleTowards(0f, 0.1f); @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Summon { projectile.frame = (projectile.localAI[1] == 1f).ToInt() * 4; } - + projectile.MinionAntiClump(0.1f); if (projectile.Distance(player.Center) > 2700f) { diff --git a/Projectiles/Summon/EndoCooperBody.cs b/Projectiles/Summon/EndoCooperBody.cs index 9b1c3bf2c7..dfa8ab78e2 100644 --- a/Projectiles/Summon/EndoCooperBody.cs +++ b/Projectiles/Summon/EndoCooperBody.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Summon } public override void AI() - { + { //dust if (Main.rand.NextBool(15)) { @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Summon float firerate = 30f; Projectile limbs = Main.projectile[LimbID]; - + switch (AttackMode) { case 0: chasespeed1 = 29f; @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Summon case 1: chasespeed1 = 24f; chasespeed2 = 12f; firerate = 200f; - + break; case 2: chasespeed1 = 32f; chasespeed2 = 20f; @@ -265,7 +265,7 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity.X = -0.15f; projectile.velocity.Y = -0.05f; } - + } if (projectile.ai[1] > 0f) @@ -276,12 +276,12 @@ namespace CalamityMod.Projectiles.Summon { projectile.ai[1] = 0f; projectile.netUpdate = true; - } + } if (projectile.ai[0] == 0f) - { + { if (projectile.ai[1] == 0f && gotoenemy && mindistance < 600f) { - + projectile.ai[1] += 1f; if (Main.myPlayer == projectile.owner) { diff --git a/Projectiles/Summon/EndoCooperLimbs.cs b/Projectiles/Summon/EndoCooperLimbs.cs index 43f7be98bb..b3754669ae 100644 --- a/Projectiles/Summon/EndoCooperLimbs.cs +++ b/Projectiles/Summon/EndoCooperLimbs.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Summon } //Keep the limbs in place - + if (body.type != ModContent.ProjectileType() || !body.active) projectile.Kill(); projectile.Center = body.Center; @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[0] = 0f; } - + } public override void Kill(int timeLeft) diff --git a/Projectiles/Summon/EyeOfNightSummon.cs b/Projectiles/Summon/EyeOfNightSummon.cs index 817adc2756..4f794b68e5 100644 --- a/Projectiles/Summon/EyeOfNightSummon.cs +++ b/Projectiles/Summon/EyeOfNightSummon.cs @@ -135,4 +135,4 @@ namespace CalamityMod.Projectiles.Summon public override bool CanDamage() => false; } -} \ No newline at end of file +} diff --git a/Projectiles/Summon/FrostBeam.cs b/Projectiles/Summon/FrostBeam.cs index 295cf25546..3f52561bb2 100644 --- a/Projectiles/Summon/FrostBeam.cs +++ b/Projectiles/Summon/FrostBeam.cs @@ -63,11 +63,11 @@ namespace CalamityMod.Projectiles.Summon float weaveDistanceInner = 0.5f; for (float theta = 0f; theta < MathHelper.TwoPi; theta += 0.05f) { - Vector2 velocity = theta.ToRotationVector2() * - (weaveDistanceMin + + Vector2 velocity = theta.ToRotationVector2() * + (weaveDistanceMin + // The 0.5 in here is to prevent the petal from looping back into itself. With a 0.5 addition, it is perfect, coming back to (0,0) // instead of weaving backwards. - (float)(Math.Sin(thetaDelta + theta * flowerPetalCount) + 0.5f + weaveDistanceInner) * + (float)(Math.Sin(thetaDelta + theta * flowerPetalCount) + 0.5f + weaveDistanceInner) * weaveDistanceOutwardMax); Dust dust = Dust.NewDustPerfect(projectile.Center, 113, velocity); dust.noGravity = true; diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index bfe3e12b62..e16ca33892 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -149,9 +149,9 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity = Vector2.Zero; Vector2 offsetToDestination = segmentAhead.Center - projectile.Center; - // This variant of segment attachment incorporates rotation. + // This variant of segment attachment incorporates rotation. // Given the fact that all segments will execute this code is succession, the - // result across the entire worm will exponentially decay over each segment, + // result across the entire worm will exponentially decay over each segment, // allowing for smooth rotations. This code is what the stardust dragon uses for its segmenting. if (segmentAhead.rotation != projectile.rotation) { diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index 14fead861c..4d55aafefd 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -317,7 +317,7 @@ namespace CalamityMod.Projectiles.Summon Main.PlaySound(SoundID.Item12, projectile.Center); projectile.netUpdate = true; } - + // If neither of the above if-statements trigger, the worm just moves forwards in a straight line and this AI function does nothing. } diff --git a/Projectiles/Summon/MiniGuardianDefense.cs b/Projectiles/Summon/MiniGuardianDefense.cs index 77fba7a6ca..52e74b925d 100644 --- a/Projectiles/Summon/MiniGuardianDefense.cs +++ b/Projectiles/Summon/MiniGuardianDefense.cs @@ -212,7 +212,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { if (Main.player[projectile.owner].Calamity().profanedCrystalBuffs && !Main.player[projectile.owner].Calamity().endoCooper) - { + { CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/PhantomicShield.cs b/Projectiles/Summon/PhantomicShield.cs index 438f62126f..0f5b65f2ee 100644 --- a/Projectiles/Summon/PhantomicShield.cs +++ b/Projectiles/Summon/PhantomicShield.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 pos1 = owner.position; Vector2 pos2 = target.position; projectile.ai[0] = (pos2 - pos1).ToRotation(); - } + } else { projectile.ai[0] -= MathHelper.ToRadians(2f); diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index b09a59c935..116c3d0b09 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -485,7 +485,7 @@ namespace CalamityMod.Projectiles.Summon private void onHit() { - + Main.PlaySound(new LegacySoundStyle(2, 74, Terraria.Audio.SoundType.Sound), (int)projectile.position.X, (int)projectile.position.Y); if (Main.rand.NextBool(2) || Main.rand.NextBool(3)) //so it's not exactly 1 in 2, but it's not more or less consistently either. { @@ -586,7 +586,7 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft = 50; kill = true; } - + float num550 = 40f; Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); float num551 = num535 - vector43.X; @@ -831,7 +831,7 @@ namespace CalamityMod.Projectiles.Summon { projectile.frame = 0; } - if (projectile.ai[0] == 0f) { + if (projectile.ai[0] == 0f) { } projectile.velocity.X *= 1.01f; projectile.velocity.Y *= 1.01f; diff --git a/Projectiles/Summon/SepulcherMinion.cs b/Projectiles/Summon/SepulcherMinion.cs index c0dfb7cefe..bc8adf0f5c 100644 --- a/Projectiles/Summon/SepulcherMinion.cs +++ b/Projectiles/Summon/SepulcherMinion.cs @@ -317,9 +317,9 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < Segments.Length; i++) { Vector2 offsetToDestination = aheadPosition - Segments[i].CurrentPosition; - // This variant of segment attachment incorporates rotation. + // This variant of segment attachment incorporates rotation. // Given the fact that all segments will execute this code is succession, the - // result across the entire worm will exponentially decay over each segment, + // result across the entire worm will exponentially decay over each segment, // allowing for smooth rotations. This code is what the stardust dragon uses for its segmenting. if (aheadRotation != Segments[i].Rotation) { diff --git a/Projectiles/Summon/SkeletalDragonMother.cs b/Projectiles/Summon/SkeletalDragonMother.cs index fd431dbd68..4828d11028 100644 --- a/Projectiles/Summon/SkeletalDragonMother.cs +++ b/Projectiles/Summon/SkeletalDragonMother.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Summon projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; for (int i = 0; i < 2; i++) { - Projectile.NewProjectile(projectile.Center + Utils.RandomVector2(Main.rand, -24f, 24f), + Projectile.NewProjectile(projectile.Center + Utils.RandomVector2(Main.rand, -24f, 24f), Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 4f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, player.whoAmI, projectile.whoAmI); } projectile.localAI[0] = 1f; diff --git a/Projectiles/Summon/SlimePuppet.cs b/Projectiles/Summon/SlimePuppet.cs index 727d75bca2..b740bcb063 100644 --- a/Projectiles/Summon/SlimePuppet.cs +++ b/Projectiles/Summon/SlimePuppet.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon if (Vector2.Dot(projectile.oldVelocity.SafeNormalize(Vector2.Zero), projectile.velocity.SafeNormalize(Vector2.Zero)) < 0.87) projectile.ai[0] = 50f; } - + public void ResetDamage() { // Initialize minion damage values the moment the projectile is spawned. diff --git a/Projectiles/Summon/ViridVanguardBlade.cs b/Projectiles/Summon/ViridVanguardBlade.cs index 3f28c80982..8f86a10d39 100644 --- a/Projectiles/Summon/ViridVanguardBlade.cs +++ b/Projectiles/Summon/ViridVanguardBlade.cs @@ -19,10 +19,10 @@ namespace CalamityMod.Projectiles.Summon public float RedirectAngle; public float FiringTime = 0f; public Vector2 IdealPosition; - public float Angle - { - get => projectile.ai[0]; - set => projectile.ai[0] = value; + public float Angle + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; } public override void SetStaticDefaults() { diff --git a/Projectiles/Summon/VoidConcentrationAura.cs b/Projectiles/Summon/VoidConcentrationAura.cs index 9010ea6a39..6af8a77da8 100644 --- a/Projectiles/Summon/VoidConcentrationAura.cs +++ b/Projectiles/Summon/VoidConcentrationAura.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon projectile.minionSlots = 3f; projectile.timeLeft = 18000; projectile.penetrate = -1; - + projectile.tileCollide = false; projectile.timeLeft *= 5; projectile.minion = true; diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.cs b/Projectiles/Summon/VoidConcentrationBlackhole.cs index 019d5e8e8d..4281fbf8aa 100644 --- a/Projectiles/Summon/VoidConcentrationBlackhole.cs +++ b/Projectiles/Summon/VoidConcentrationBlackhole.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Summon npc.velocity.Y = (velocity.Y * 15f + num552) / 16f; npc.velocity = (velocity / succStrength); } - + private void Death() { if (projectile.scale >= 2.5f) //it's boom o' clock @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Summon } public override bool PreAI() - { + { if (damage == 0) { damage = projectile.damage; @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Summon } int radius = (int)(projectile.scale * 100f); //0.01f; to a max of 2.5f; so radius of 1 to 250 by default if (projectile.scale >= 2f) - radius *= 2; + radius *= 2; int baseWidth = 32; int baseHeight = 34; @@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Summon int newHeight = (int)(baseHeight * projectile.scale); CalamityGlobalProjectile.ExpandHitboxBy(projectile, newWidth, newHeight); - + if (projectile.frameCounter > 6) { @@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Summon ApplySucc(Main.npc[i]); } } - + if (projectile.scale >= 2.5f) //it's boom o' clock { diff --git a/Projectiles/Summon/WitherBolt.cs b/Projectiles/Summon/WitherBolt.cs index 4cd24edad6..bb51c0afe3 100644 --- a/Projectiles/Summon/WitherBolt.cs +++ b/Projectiles/Summon/WitherBolt.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Summon public override void Kill(int timeLeft) { - if (!Main.dedServ) + if (!Main.dedServ) { for (int i = 0; i < projectile.oldPos.Length / 2; i++) { diff --git a/Projectiles/Typeless/BlazingSun.cs b/Projectiles/Typeless/BlazingSun.cs index 3562543342..44fa368b11 100644 --- a/Projectiles/Typeless/BlazingSun.cs +++ b/Projectiles/Typeless/BlazingSun.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Typeless projectile.rotation += 0.025f; //Light Lighting.AddLight(projectile.Center, new Vector3(240, 185, 7) * (3f / 255)); - + //Dust if(projectile.timeLeft > 40) { diff --git a/Projectiles/Typeless/BlazingSun2.cs b/Projectiles/Typeless/BlazingSun2.cs index b20e96dd01..676c01f6e9 100644 --- a/Projectiles/Typeless/BlazingSun2.cs +++ b/Projectiles/Typeless/BlazingSun2.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Typeless } //Rotation projectile.rotation -= 0.025f; - + } } } diff --git a/Projectiles/Typeless/ReaverOrb.cs b/Projectiles/Typeless/ReaverOrb.cs index ac8a57100c..869ce2a71f 100644 --- a/Projectiles/Typeless/ReaverOrb.cs +++ b/Projectiles/Typeless/ReaverOrb.cs @@ -79,4 +79,4 @@ namespace CalamityMod.Projectiles.Typeless public override bool CanDamage() => false; } -} \ No newline at end of file +} diff --git a/Projectiles/Typeless/RelicOfConvergenceCrystal.cs b/Projectiles/Typeless/RelicOfConvergenceCrystal.cs index 47da484d44..1cdfbd8c8f 100644 --- a/Projectiles/Typeless/RelicOfConvergenceCrystal.cs +++ b/Projectiles/Typeless/RelicOfConvergenceCrystal.cs @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 drawPositionOffset = angle.ToRotationVector2() * radius; Vector2 drawPosition = projectile.Center + drawPositionOffset; spriteBatch.Draw(crystalTexture, - drawPosition - Main.screenPosition, + drawPosition - Main.screenPosition, null, Color.White * opacity, projectile.rotation, diff --git a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs index e42d530209..9c42b58359 100644 --- a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs +++ b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { Player player = Main.player[projectile.owner]; - if (player.dead || + if (player.dead || projectile.Center.Y < 200f || projectile.Center.X < 200f || projectile.Center.X > Main.maxTilesX * 16f - 200f) @@ -232,7 +232,7 @@ namespace CalamityMod.Projectiles.Typeless return false; } // Force the spear to have "priority" when drawing so that it draws over the player. - public override void DrawBehind(int index, List drawCacheProjsBehindNPCsAndTiles, + public override void DrawBehind(int index, List drawCacheProjsBehindNPCsAndTiles, List drawCacheProjsBehindNPCs, List drawCacheProjsBehindProjectiles, List drawCacheProjsOverWiresUI) => drawCacheProjsOverWiresUI.Add(index); diff --git a/Projectiles/Typeless/ShadowflameExplosion.cs b/Projectiles/Typeless/ShadowflameExplosion.cs index 72e0e46b74..fadc0d6a12 100644 --- a/Projectiles/Typeless/ShadowflameExplosion.cs +++ b/Projectiles/Typeless/ShadowflameExplosion.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Typeless { projectile.damage = 0; } - + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs index c79932043f..3089dac510 100644 --- a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs +++ b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Typeless return false; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { if (projectile.localAI[1] < 1f) { diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index ab9cc76114..cb41d9bd28 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Typeless { speed = player.ActiveItem().shootSpeed * projectile.scale; } - Vector2 newVelocity = (Main.MouseWorld - playerRotatedPoint).SafeNormalize(Vector2.UnitX * player.direction) * speed; + Vector2 newVelocity = (Main.MouseWorld - playerRotatedPoint).SafeNormalize(Vector2.UnitX * player.direction) * speed; // Sync if a velocity component changes. if (projectile.velocity.X != newVelocity.X || projectile.velocity.Y != newVelocity.Y) diff --git a/Schematics/CalamitySchematicIO.cs b/Schematics/CalamitySchematicIO.cs index 01a6ef935f..88c3f3cd68 100644 --- a/Schematics/CalamitySchematicIO.cs +++ b/Schematics/CalamitySchematicIO.cs @@ -262,7 +262,7 @@ namespace CalamityMod.Schematics } } } - + private static SchematicData ConstructSchematicData(Tile[,] tiles) { int width = tiles.GetLength(0); @@ -334,7 +334,7 @@ namespace CalamityMod.Schematics // IsEmpty does NOT return false for all rectangles with zero area. if (area.Width <= 0 || area.Height <= 0) return ExportResult.ZeroArea; - + Tile[,] tiles = GetTilesInRectangle(area); byte[] renderedStream; diff --git a/Schematics/SchematicManager.cs b/Schematics/SchematicManager.cs index ea5b24af09..6ca01e2121 100644 --- a/Schematics/SchematicManager.cs +++ b/Schematics/SchematicManager.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Schematics PilePlacementMaps = null; } #endregion - + #region Get Schematic Area public static Vector2? GetSchematicArea(string name) { @@ -62,7 +62,7 @@ namespace CalamityMod.Schematics return new Vector2(schematic.GetLength(0), schematic.GetLength(1)); } #endregion Get Schematic Area - + #region Place Schematic public static void PlaceSchematic(string name, Point pos, SchematicAnchor anchorType, ref bool specialCondition, T chestDelegate = null) where T : Delegate { @@ -156,7 +156,7 @@ namespace CalamityMod.Schematics for (int y = 0; y < height; ++y) if (originalTiles[x, y].type != TileID.Containers) WorldGen.KillTile(x + cornerX, y + cornerY); - + // Lay down the schematic. If the schematic calls for it, bring back tiles that are stored in the old tiles array. for (int x = 0; x < width; ++x) for (int y = 0; y < height; ++y) diff --git a/TileEntities/TEBaseTurret.cs b/TileEntities/TEBaseTurret.cs index f51a1c0dc8..2a1461bc78 100644 --- a/TileEntities/TEBaseTurret.cs +++ b/TileEntities/TEBaseTurret.cs @@ -80,7 +80,7 @@ namespace CalamityMod.TileEntities ActiveBehavior(turretPos, TargetPos); FiringTime++; } - + // Otherwise, reset the running "firing timer" and exhibit passive behavior. else { @@ -100,7 +100,7 @@ namespace CalamityMod.TileEntities public virtual void UpdateAngle() { float targetAngle = TargetAngle; - + // WrapAngle clamps things from -pi to pi, not from 0 to 2pi. float deltaAngle = MathHelper.WrapAngle(Angle - targetAngle); bool usingCloseAiming = Math.Abs(deltaAngle) <= Math.Max(CloseAimThreshold, MaxDeltaAnglePerFrame); @@ -175,7 +175,7 @@ namespace CalamityMod.TileEntities // void OnKill() // TagCompound Save() // void Load(TagCompound tag) - // + // // Subclasses can override these TML hooks as they please. The base turret does not need to use them. public override void NetSend(BinaryWriter writer, bool lightSend) diff --git a/TileEntities/TEDraedonLabTurret.cs b/TileEntities/TEDraedonLabTurret.cs index 937c459d73..a4d0c76f92 100644 --- a/TileEntities/TEDraedonLabTurret.cs +++ b/TileEntities/TEDraedonLabTurret.cs @@ -60,7 +60,7 @@ namespace CalamityMod.TileEntities // Store the value that will be set into PlayerTargetIndex here. // This local is used because changing the actual field will trigger a netcode auto-sync. int indexToSet = PlayerTargetIndex; - + // If a player is already targeted, make sure they still exist and aren't dead. if (indexToSet != -1) { diff --git a/TileEntities/TEPowerCellFactory.cs b/TileEntities/TEPowerCellFactory.cs index 535c42e84c..04b91f0f73 100644 --- a/TileEntities/TEPowerCellFactory.cs +++ b/TileEntities/TEPowerCellFactory.cs @@ -36,7 +36,7 @@ namespace CalamityMod.TileEntities return Time % totalCycleTime; } } - + private bool IsCellFrame { get diff --git a/TileEntities/TileEntityTimeHandler.cs b/TileEntities/TileEntityTimeHandler.cs index 255de4a5e8..2a34a9795c 100644 --- a/TileEntities/TileEntityTimeHandler.cs +++ b/TileEntities/TileEntityTimeHandler.cs @@ -51,7 +51,7 @@ namespace CalamityMod.TileEntities { // Perform any client-specific update tasks for this turret. turret.UpdateClient(); - + // Specifically on multiplayer clients, manually update the turret's rotation every frame. This is exactly the same code run server side. // This makes sure they visually track targets in multiplayer. It will NOT fire projectiles; that code can only run server side. turret.UpdateAngle(); diff --git a/Tiles/Abyss/SulphurousColumn.cs b/Tiles/Abyss/SulphurousColumn.cs index 6396cfe4bf..1a7164e41b 100644 --- a/Tiles/Abyss/SulphurousColumn.cs +++ b/Tiles/Abyss/SulphurousColumn.cs @@ -44,8 +44,8 @@ namespace CalamityMod.Tiles.Abyss { for (int k = 0; k < WorldGen.genRand.Next(3, 4 + 1); k++) { - Gore.NewGore(new Vector2(i, j) * 16f, - Vector2.One.RotatedByRandom(MathHelper.TwoPi) * WorldGen.genRand.NextFloat(1.4f, 3.2f), + Gore.NewGore(new Vector2(i, j) * 16f, + Vector2.One.RotatedByRandom(MathHelper.TwoPi) * WorldGen.genRand.NextFloat(1.4f, 3.2f), mod.GetGoreSlot($"Gores/SulphSeaGen/SulphurousRockGore{WorldGen.genRand.Next(3) + 1}")); } } diff --git a/Tiles/BaseTiles/DoubleDirectionalTile.cs b/Tiles/BaseTiles/DoubleDirectionalTile.cs index 5b4453ecc3..a41b6a97ca 100644 --- a/Tiles/BaseTiles/DoubleDirectionalTile.cs +++ b/Tiles/BaseTiles/DoubleDirectionalTile.cs @@ -26,15 +26,15 @@ namespace CalamityMod.Tiles.BaseTiles // There is a chungus among us // This is based largely on characteristics exhibited by vanilla's tile sheets. - public static readonly TileDirection?[,] WhereDoIPoint = new TileDirection?[,] - { - { TileDirection.Left, TileDirection.Up, TileDirection.Up, TileDirection.Up, TileDirection.Right, null, null, null, null, null, TileDirection.Left, TileDirection.Right, null }, + public static readonly TileDirection?[,] WhereDoIPoint = new TileDirection?[,] + { + { TileDirection.Left, TileDirection.Up, TileDirection.Up, TileDirection.Up, TileDirection.Right, null, null, null, null, null, TileDirection.Left, TileDirection.Right, null }, { TileDirection.Left, TileDirection.Center, TileDirection.Center, TileDirection.Center, TileDirection.Right, null, TileDirection.Up, TileDirection.Up, TileDirection.Up, null, TileDirection.Left, TileDirection.Right, null }, { TileDirection.Left, TileDirection.Down, TileDirection.Down, TileDirection.Down, TileDirection.Right, null, TileDirection.Down, TileDirection.Down, TileDirection.Down, null, TileDirection.Left, TileDirection.Right, null }, { TileDirection.UpLeft, TileDirection.UpRight, TileDirection.UpLeft, TileDirection.UpRight, TileDirection.UpLeft, TileDirection.UpRight, null, null, null, null, null, null, null }, { TileDirection.DownLeft, TileDirection.DownRight, TileDirection.DownLeft, TileDirection.DownRight, TileDirection.DownLeft, TileDirection.DownRight, null, null, null, null, null, null, null } }; - + public static readonly int?[,] WhatVariantAmI = new int?[,] { { 1, 1, 2, 3, 1, 1, 1, 2, 3, 1, 1, 1, 1 }, @@ -103,7 +103,7 @@ namespace CalamityMod.Tiles.BaseTiles frameXOffset = 36 + -18 * (GiveVariant(i, j) - 1); frameYOffset = -18 + 90 + 18 * (GiveVariant(i, j) - 1); } - if ((Top == TileDirection.Up && Left == TileDirection.Left && Bottom == TileDirection.Center && Right == TileDirection.Center) || + if ((Top == TileDirection.Up && Left == TileDirection.Left && Bottom == TileDirection.Center && Right == TileDirection.Center) || ((Top == TileDirection.Left || Top == TileDirection.UpLeft) && (Left == TileDirection.Up || Left == TileDirection.UpLeft) && (BottomRight == TileDirection.Center || BroadBottomRight.Contains(BottomRight)))) //Top left { frameXOffset = 54 + -18 * (GiveVariant(i, j) - 1); @@ -129,7 +129,7 @@ namespace CalamityMod.Tiles.BaseTiles } //If we don't absolutely need the transition layer to exist, we cut out anything else extra - if (!TransitionHardRequired) + if (!TransitionHardRequired) return; if (BroadLeft.Contains(Left) && BroadRight.Contains(Right) && Top == TileDirection.Center && Bottom == TileDirection.Center) //Vertical thin line @@ -170,4 +170,4 @@ namespace CalamityMod.Tiles.BaseTiles } } -} \ No newline at end of file +} diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 117b91ca2a..36bfe14f56 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -507,15 +507,15 @@ namespace CalamityMod.Tiles { // Ashen, Ancient and Profaned Sinks all count as a lava source instead of a water source // Exo Sinks count as a water, lava, and honey source - if (type == ModContent.TileType() || - type == ModContent.TileType() || - type == ModContent.TileType() || + if (type == ModContent.TileType() || + type == ModContent.TileType() || + type == ModContent.TileType() || type == ModContent.TileType()) { Main.LocalPlayer.adjLava = true; } // Botanic Sink counts as a honey source instead of a water source - if (type == ModContent.TileType() || + if (type == ModContent.TileType() || type == ModContent.TileType()) { Main.LocalPlayer.adjHoney = true; diff --git a/Tiles/DraedonStructures/ChargingStation.cs b/Tiles/DraedonStructures/ChargingStation.cs index cecb2b90b8..9a9c6589e8 100644 --- a/Tiles/DraedonStructures/ChargingStation.cs +++ b/Tiles/DraedonStructures/ChargingStation.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Tiles.DraedonStructures Player player = Main.LocalPlayer; player.CancelSignsAndChests(); CalamityPlayer mp = player.Calamity(); - + // If this is the charger the player is currently looking at OR this charger doesn't really exist, close the GUI. if (thisCharger is null || thisCharger.ID == mp.CurrentlyViewedChargerID) { diff --git a/Tiles/Furniture/CraftingStations/DraedonsForge.cs b/Tiles/Furniture/CraftingStations/DraedonsForge.cs index faa00a1276..5aebed6613 100644 --- a/Tiles/Furniture/CraftingStations/DraedonsForge.cs +++ b/Tiles/Furniture/CraftingStations/DraedonsForge.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations { public class DraedonsForge : ModTile { - public override void SetDefaults() + public override void SetDefaults() { Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; diff --git a/Tiles/Furniture/Fountains/AbyssFountainTile.cs b/Tiles/Furniture/Fountains/AbyssFountainTile.cs index 0dddd5e61d..c4d9d75533 100644 --- a/Tiles/Furniture/Fountains/AbyssFountainTile.cs +++ b/Tiles/Furniture/Fountains/AbyssFountainTile.cs @@ -78,4 +78,4 @@ namespace CalamityMod.Tiles.Furniture.Fountains player.showItemIcon2 = ModContent.ItemType(); } } -} \ No newline at end of file +} diff --git a/Tiles/Furniture/Fountains/AstralFountainTile.cs b/Tiles/Furniture/Fountains/AstralFountainTile.cs index 4b35dd698e..e51871f150 100644 --- a/Tiles/Furniture/Fountains/AstralFountainTile.cs +++ b/Tiles/Furniture/Fountains/AstralFountainTile.cs @@ -79,4 +79,4 @@ namespace CalamityMod.Tiles.Furniture.Fountains player.showItemIcon2 = ModContent.ItemType(); } } -} \ No newline at end of file +} diff --git a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs index c03f39c0a9..589de448ee 100644 --- a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs +++ b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs @@ -78,4 +78,4 @@ namespace CalamityMod.Tiles.Furniture.Fountains player.showItemIcon2 = ModContent.ItemType(); } } -} \ No newline at end of file +} diff --git a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs index 6ee80fb030..8a0da910a9 100644 --- a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs +++ b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs @@ -78,4 +78,4 @@ namespace CalamityMod.Tiles.Furniture.Fountains player.showItemIcon2 = ModContent.ItemType(); } } -} \ No newline at end of file +} diff --git a/Tiles/FurnitureAncient/AncientChandelier.cs b/Tiles/FurnitureAncient/AncientChandelier.cs index b58ab1922d..12639ee0c6 100644 --- a/Tiles/FurnitureAncient/AncientChandelier.cs +++ b/Tiles/FurnitureAncient/AncientChandelier.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { CalamityUtils.LightHitWire(Type, i, j, 3, 3); } - + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs index b47008c4d7..2e7f5739db 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs @@ -88,4 +88,4 @@ namespace CalamityMod.Tiles.FurnitureCosmilite } } } -} \ No newline at end of file +} diff --git a/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs b/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs index ca29bfe6e4..8bcb009f38 100644 --- a/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs +++ b/Tiles/LivingFire/LivingBrimstoneFireBlockTile.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Tiles.LivingFire }; //if (Main.tile[i, j]) || tile.type == Type - //return true; //temporary for testing purposes + //return true; //temporary for testing purposes if (Main.tile[i, j].wall != WallID.None) { diff --git a/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs b/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs index 0d449a21f5..ab18c76b3e 100644 --- a/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs +++ b/Tiles/LivingFire/LivingGodSlayerFireBlockTile.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.LivingFire }; //if (Main.tile[i, j]) || tile.type == Type - //return true; //temporary for testing purposes + //return true; //temporary for testing purposes if (Main.tile[i, j].wall != WallID.None) { diff --git a/Tiles/LivingFire/LivingHolyFireBlockTile.cs b/Tiles/LivingFire/LivingHolyFireBlockTile.cs index b3aa279e35..c3acb824fb 100644 --- a/Tiles/LivingFire/LivingHolyFireBlockTile.cs +++ b/Tiles/LivingFire/LivingHolyFireBlockTile.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.LivingFire }; //if (Main.tile[i, j]) || tile.type == Type - //return true; //temporary for testing purposes + //return true; //temporary for testing purposes if (Main.tile[i, j].wall != WallID.None) { diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index 6458b6c95d..b204630414 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Tiles public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { if ((Main.tile[i - 1, j - 1].type != Type || Main.tile[i, j - 1].type != Type || Main.tile[i + 1, j - 1].type != Type || - Main.tile[i - 1, j - 2].type != Type || Main.tile[i, j - 2].type != Type || Main.tile[i + 1, j - 2].type != Type) && + Main.tile[i - 1, j - 2].type != Type || Main.tile[i, j - 2].type != Type || Main.tile[i + 1, j - 2].type != Type) && nextSpecialDrawIndex < Main.specX.Length) { Main.specX[nextSpecialDrawIndex] = i; diff --git a/TrailGeneration/PrimitiveTrail.cs b/TrailGeneration/PrimitiveTrail.cs index 5508905c8f..a48a9258d1 100644 --- a/TrailGeneration/PrimitiveTrail.cs +++ b/TrailGeneration/PrimitiveTrail.cs @@ -124,8 +124,8 @@ namespace CalamityMod int effectivePointCount = DegreeOfBezierCurveCornerSmoothening > 0 ? totalTrailPoints * DegreeOfBezierCurveCornerSmoothening : totalTrailPoints; BezierCurve bezierCurve = new BezierCurve(controlPoints.Where((_, i) => { - return DegreeOfBezierCurveCornerSmoothening <= 0 || - i % DegreeOfBezierCurveCornerSmoothening == 0 || + return DegreeOfBezierCurveCornerSmoothening <= 0 || + i % DegreeOfBezierCurveCornerSmoothening == 0 || i == 0 || i == controlPoints.Count - 1 || pointCountCondition; diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index ef78160bea..eacdc76627 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -588,7 +588,7 @@ namespace CalamityMod.UI // Store the intended NPC type for this bar. // This is necessary because it is possible for the NPC slot to become occupied by something else when the NPC becomes // inactive. If this happens and the bar isn't done closing, it will simply think that the new occupant is what is should attach to, regardless - // of if it's actually supposed to have a bar in the first place. By verifying NPC type, we can be sure that this does not happen. + // of if it's actually supposed to have a bar in the first place. By verifying NPC type, we can be sure that this does not happen. // And if an NPC of the same type does this, it doesn't matter, because that means it was valid to begin with. if (AssociatedNPC != null && AssociatedNPC.active) { diff --git a/UI/ChargingStationUI.cs b/UI/ChargingStationUI.cs index 4af97e1555..e3add0f604 100644 --- a/UI/ChargingStationUI.cs +++ b/UI/ChargingStationUI.cs @@ -124,7 +124,7 @@ namespace CalamityMod.UI // Otherwise, if the slot is clicked, try to swap it with the player's held item. There are a few cases this succeeds: // 1) The player's held item is air and the plugged item is NOT air. // 2) The player's held item is chargeable. - // If neither case meets, then nothing happens + // If neither case meets, then nothing happens else if((playerHandItem.IsAir && !pluggedItem.IsAir) || (!playerHandItem.IsAir && playerHandItem.Calamity().UsesCharge)) { Utils.Swap(ref playerHandItem, ref pluggedItem); @@ -151,7 +151,7 @@ namespace CalamityMod.UI { short chargerStackDiff = 0; bool shiftClicked = false; - + // If the player is holding shift and has space for the power cells, just spawn all of them on his or her face. if (Main.keyState.PressingShift() && p.ItemSpace(powercell)) { diff --git a/UI/PowerCellFactoryUI.cs b/UI/PowerCellFactoryUI.cs index 135645d728..f3b619d42f 100644 --- a/UI/PowerCellFactoryUI.cs +++ b/UI/PowerCellFactoryUI.cs @@ -24,7 +24,7 @@ namespace CalamityMod.UI Player p = Main.LocalPlayer; CalamityPlayer mp = p.Calamity(); int factoryID = mp.CurrentlyViewedFactoryID; - + // The UI only draws if the player is viewing a factory. if (factoryID == -1) return; diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index 3753b2b8cf..d291dd270a 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -21,7 +21,7 @@ namespace CalamityMod.UI private const int RageAnimFrames = 10; private const int AdrenAnimFrameDelay = 5; private const int AdrenAnimFrames = 10; - + public static Vector2 rageDrawPos = new Vector2(DefaultRagePosX, DefaultRagePosY); public static Vector2 adrenDrawPos = new Vector2(DefaultAdrenPosX, DefaultAdrenPosY); private static Vector2? rageDragOffset = null; @@ -162,7 +162,7 @@ namespace CalamityMod.UI if (modPlayer.rageBoostThree) // Red Lightning Container pearls.Add(redLightningTex); IList offsets = GetPearlOffsets(pearls.Count); - + // Draw pearls at appropriate positions. for (int i = 0; i < pearls.Count; ++i) spriteBatch.Draw(pearls[i], rageDrawPos + shakeOffset + offsets[i] * uiScale, null, Color.White, 0f, rageBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); @@ -210,7 +210,7 @@ namespace CalamityMod.UI spriteBatch.Draw(adrenBorderTex, adrenDrawPos + shakeOffset, null, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); // Use a slightly different texture if Adrenaline is full or active if (modPlayer.adrenaline >= modPlayer.adrenalineMax || modPlayer.adrenalineModeActive) - spriteBatch.Draw(adrenBorderTexFull, adrenDrawPos + shakeOffset, null, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); + spriteBatch.Draw(adrenBorderTexFull, adrenDrawPos + shakeOffset, null, Color.White, 0f, adrenBorderTex.Size() * 0.5f, uiScale, SpriteEffects.None, 0); // The amount of the bar to draw depends on the player's current Adrenaline level // 7 pixels of dead space, 90 pixels of bar, 7 pixels of dead space. diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index c89af4806d..3891cbd1fe 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -49,7 +49,7 @@ namespace CalamityMod EditShroomiteBarRecipe(); EditChlorophyteBarRecipe(); // Don't remove this in 1.4 since it has 1 less ore required than that version EditTier3HardmodeBarRecipes(); // Remove this when we get 1.4 port - EditHardmodeOreSetRecipes(); + EditHardmodeOreSetRecipes(); AddPotionRecipes(); AddCookedFood(); @@ -359,7 +359,7 @@ namespace CalamityMod }); } - private static void EditMechBossSummonRecipes() + private static void EditMechBossSummonRecipes() { List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.MechanicalWorm || x.createItem.type == ItemID.MechanicalEye || x.createItem.type == ItemID.MechanicalSkull).ToList().ForEach(s => diff --git a/Utilities/MathematicalUtils.cs b/Utilities/MathematicalUtils.cs index 1221216865..5d60c2f734 100644 --- a/Utilities/MathematicalUtils.cs +++ b/Utilities/MathematicalUtils.cs @@ -107,7 +107,7 @@ namespace CalamityMod return theta; } - + /// /// Determines the angular distance between two vectors based on dot product comparisons. This method ensures underlying normalization is performed safely. /// @@ -182,7 +182,7 @@ namespace CalamityMod public float originY; /// /// This represents the elevation shift that will happen during the segment. Set this to 0 to turn the segment into a flat line. - /// Usually this elevation shift is fully applied at the end of a segment, but the sinebump easing type makes it be reached at the apex of its curve. + /// Usually this elevation shift is fully applied at the end of a segment, but the sinebump easing type makes it be reached at the apex of its curve. /// public float displacement; /// @@ -213,7 +213,7 @@ namespace CalamityMod return 0f; if (segments[0].originX != 0) //If for whatever reason you try to not play by the rules, get fucked - segments[0].originX = 0; + segments[0].originX = 0; progress = MathHelper.Clamp(progress, 0f, 1f); //Clamp the progress float ratio = 0f; diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 179882f732..9ea4f431df 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -301,7 +301,7 @@ namespace CalamityMod checkedTile = Main.tile[(int)player.Center.X / 16 + player.direction * i, (int)(player.position.Y + (float)player.height - 1f) / 16 + 1 - j]; ConditionMet = !(checkedTile != null && checkedTile.nactive() && Main.tileSolid[checkedTile.type]); //IsTileSolidGround minus the ground part, to avoid platforms and other half solid tiles messing it up - if (!ConditionMet) + if (!ConditionMet) return ConditionMet; } } diff --git a/Utilities/TileUtils.cs b/Utilities/TileUtils.cs index 737029dd06..affcc1c806 100644 --- a/Utilities/TileUtils.cs +++ b/Utilities/TileUtils.cs @@ -513,7 +513,7 @@ namespace CalamityMod /// /// The tile to check. public static bool IsTileSolidGround(this Tile tile) => tile != null && tile.nactive() && (Main.tileSolid[tile.type] || Main.tileSolidTop[tile.type]); - + /// /// Determines if a tile is solid based on whether it's active and not actuated or if the tile is solid. This will not count platforms and other non-solid ground tiles diff --git a/World/Abyss.cs b/World/Abyss.cs index c8e1c54000..36444a473a 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -239,7 +239,7 @@ namespace CalamityMod.World maxAbyssIslands = 16; //Medium World // Place the Terminus shrine. - UndergroundShrines.SpecialHut((ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + UndergroundShrines.SpecialHut((ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.WallType(), UndergroundShrines.UndergroundShrineType.Abyss, abyssChasmX, CalamityWorld.abyssChasmBottom); int islandLocationOffset = 30; diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 1293e15b4d..bbe270a0b1 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -50,7 +50,7 @@ namespace CalamityMod.World // New Temple Altar public static int newAltarX = 0; public static int newAltarY = 0; - + // Evil Islands public static int fehX = 0; public static int fehY = 0; diff --git a/World/CustomTemple.cs b/World/CustomTemple.cs index 3f044935f2..548c28f3cb 100644 --- a/World/CustomTemple.cs +++ b/World/CustomTemple.cs @@ -788,14 +788,14 @@ namespace CalamityMod.World // Bit of a weird solution that makes wooden spikes non-solid so that nothing is placed on top of them. Main.tileSolid[TileID.WoodenSpikes] = false; - + placementAttempts = 0; while (totalChestsToPlace > 0f) { int randomPointInTempleX = WorldGen.genRand.Next(templeLeft, templeRight); int randomPointInTempleY = WorldGen.genRand.Next(templeTop, templeBottom); if (Main.tile[randomPointInTempleX, randomPointInTempleY].wall == WallID.LihzahrdBrickUnsafe && - !Main.tile[randomPointInTempleX, randomPointInTempleY].active() && + !Main.tile[randomPointInTempleX, randomPointInTempleY].active() && WorldGen.AddBuriedChest(randomPointInTempleX, randomPointInTempleY, ItemID.LihzahrdPowerCell, true, 16)) { totalChestsToPlace--; diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index 922a761182..406527baae 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -44,7 +44,7 @@ namespace CalamityMod.World { otherModTilesToAvoid = null; } - + public static bool ShouldAvoidLocation(Point placementPoint, bool careAboutLava = true) { Tile tile = CalamityUtils.ParanoidTileRetrieval(placementPoint.X, placementPoint.Y); diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index 9aa3287df5..149fade501 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -62,7 +62,7 @@ namespace CalamityMod.World internal static Chest AddChestWithLoot(int i, int j, ushort type = TileID.Containers, uint startingSlot = 1, int tileStyle = 0) { int chestIndex = -1; - + // Slide downwards on the Y axis trying to find the floor beneath the empty position initially picked while (j < Main.maxTilesY - 210) { diff --git a/World/SulphurousSea.cs b/World/SulphurousSea.cs index 1217eec653..c5dcec1700 100644 --- a/World/SulphurousSea.cs +++ b/World/SulphurousSea.cs @@ -268,7 +268,7 @@ namespace CalamityMod.World { int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; int edgeScore = GetEdgeScore(trueX, y); - + if (edgeScore >= MinimumEdgeScore) { for (int dx = -SpotWidth / 2; dx <= SpotWidth; dx++) @@ -501,7 +501,7 @@ namespace CalamityMod.World if (y - YStart > BlockDepth * 0.5f) { if (WorldGen.SolidTile(trueX, y + 1) && - WorldGen.SolidTile(trueX + 1, y + 1) && + WorldGen.SolidTile(trueX + 1, y + 1) && SulphSeaTiles.Contains(CalamityUtils.ParanoidTileRetrieval(trueX, y + 1).type) && WorldGen.genRand.NextBool(3) && Math.Abs(trueX - previousX) >= ColumnMinDistanceX)