diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 58f265f0f7..c5baa5d71f 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -95,8 +95,11 @@ namespace CalamityMod.Balancing #endregion #region Wall of Flesh - // 40% resist to Corro/Crimslime Staff. - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType(), ProjectileType())))); + // 50% resist to Staff of Necrosteocytes. + NPCSpecificBalancingChanges.AddRange(Bundle(new List { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); + + // 20% resist to Blighted Slime Staff. + NPCSpecificBalancingChanges.AddRange(Bundle(new List { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); #endregion #region Aquatic Scourge diff --git a/Buffs/Summon/Corroslime.cs b/Buffs/Summon/BlightedSlime.cs similarity index 57% rename from Buffs/Summon/Corroslime.cs rename to Buffs/Summon/BlightedSlime.cs index ca5b6d02ee..1455f3f3b1 100644 --- a/Buffs/Summon/Corroslime.cs +++ b/Buffs/Summon/BlightedSlime.cs @@ -1,12 +1,12 @@ -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; using Terraria.ModLoader; namespace CalamityMod.Buffs.Summon { - public class Corroslime : BaseSummonBuff + public class BlightedSlime : BaseSummonBuff { - protected override int MinionProjectileType => ModContent.ProjectileType(); + protected override int MinionProjectileType => ModContent.ProjectileType(); - protected override ref bool MinionBool => ref BuffModdedOwner.cSlime; + protected override ref bool MinionBool => ref BuffModdedOwner.blightedSlime; } } diff --git a/Buffs/Summon/Corroslime.png b/Buffs/Summon/BlightedSlime.png similarity index 100% rename from Buffs/Summon/Corroslime.png rename to Buffs/Summon/BlightedSlime.png diff --git a/Buffs/Summon/Crimslime.png b/Buffs/Summon/BlightedSlimeCrimson.png similarity index 100% rename from Buffs/Summon/Crimslime.png rename to Buffs/Summon/BlightedSlimeCrimson.png diff --git a/Buffs/Summon/Crimslime.cs b/Buffs/Summon/Crimslime.cs deleted file mode 100644 index dc08297928..0000000000 --- a/Buffs/Summon/Crimslime.cs +++ /dev/null @@ -1,12 +0,0 @@ -using CalamityMod.Projectiles.Summon; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.Summon -{ - public class Crimslime : BaseSummonBuff - { - protected override int MinionProjectileType => ModContent.ProjectileType(); - - protected override ref bool MinionBool => ref BuffModdedOwner.cSlime2; - } -} diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 76ca7d151f..98d743a96f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1514,10 +1514,8 @@ namespace CalamityMod.CalPlayer public bool CalamarisLament = false; /// Entropy's Vigil. public bool cEyes = false; - /// Corroslime Staff. - public bool cSlime = false; - /// Crimslime Staff. - public bool cSlime2 = false; + /// Blighted Slime Staff. + public bool blightedSlime = false; /// Abandoned Slime Staff. public bool aSlime = false; public bool brittleStar = false; @@ -2772,8 +2770,7 @@ namespace CalamityMod.CalPlayer cosmicViper = false; CalamarisLament = false; cEyes = false; - cSlime = false; - cSlime2 = false; + blightedSlime = false; aSlime = false; brittleStar = false; aquaticStar = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 384e65a136..c56ce9b6db 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1138,6 +1138,7 @@ namespace CalamityMod.CalPlayer Asset carpetAuric = ExtraTextureRefs.FlyingCarpetAuric; Asset carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla; TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal); + TextureAssets.Buff[ModContent.BuffType()] = WorldGen.crimson ? ExtraTextureRefs.BlightedSlimeCrimIcon : ExtraTextureRefs.BlightedSlimeCorroIcon; for (int l = 0; l < Player.MaxBuffs; l++) { diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs index 7eaf854a40..2fe42db986 100644 --- a/ExtraTextures/ExtraTextureRefs.cs +++ b/ExtraTextures/ExtraTextureRefs.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Buffs.Summon; +using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.GameContent; @@ -28,6 +29,10 @@ namespace CalamityMod.ExtraTextures public static Asset LuckIconVanilla; public static Asset LuckIconLesser; + // Blighted Slime Buff icons + public static Asset BlightedSlimeCorroIcon; + public static Asset BlightedSlimeCrimIcon; + // Particles public static Asset CircularSmear; public static Asset CircularSmearFire1; @@ -52,6 +57,9 @@ namespace CalamityMod.ExtraTextures LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky]; LuckIconLesser = ModContent.Request("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad); + BlightedSlimeCorroIcon = ModContent.Request("CalamityMod/Buffs/Summon/BlightedSlime"); + BlightedSlimeCrimIcon = ModContent.Request("CalamityMod/Buffs/Summon/BlightedSlimeCrimson"); + CircularSmear = ModContent.Request("CalamityMod/Particles/CircularSmear", AssetRequestMode.AsyncLoad); CircularSmearFire1 = ModContent.Request("CalamityMod/Particles/CircularSmearFire1", AssetRequestMode.AsyncLoad); CircularSmearFire2 = ModContent.Request("CalamityMod/Particles/CircularSmearFire2", AssetRequestMode.AsyncLoad); diff --git a/Items/TreasureBags/SlimeGodBag.cs b/Items/TreasureBags/SlimeGodBag.cs index 9889e3fbe4..44657ccb8d 100644 --- a/Items/TreasureBags/SlimeGodBag.cs +++ b/Items/TreasureBags/SlimeGodBag.cs @@ -68,8 +68,7 @@ namespace CalamityMod.Items.TreasureBags ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType() })); // Equipment diff --git a/Items/Weapons/Summon/CorroslimeStaff.cs b/Items/Weapons/Summon/BlightedSlimeStaff.cs similarity index 82% rename from Items/Weapons/Summon/CorroslimeStaff.cs rename to Items/Weapons/Summon/BlightedSlimeStaff.cs index 4708a0d420..3bfedcf270 100644 --- a/Items/Weapons/Summon/CorroslimeStaff.cs +++ b/Items/Weapons/Summon/BlightedSlimeStaff.cs @@ -8,14 +8,15 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { - public class CorroslimeStaff : ModItem, ILocalizedModType + [LegacyName("CorroslimeStaff", "CrimslimeStaff")] + public class BlightedSlimeStaff : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetDefaults() { Item.width = 52; Item.height = 54; - Item.damage = 24; + Item.damage = 20; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; @@ -25,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Summon Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item44; Item.autoReuse = true; - Item.buffType = ModContent.BuffType(); - Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + Item.shoot = ModContent.ProjectileType(); Item.DamageType = DamageClass.Summon; } diff --git a/Items/Weapons/Summon/CorroslimeStaff.png b/Items/Weapons/Summon/BlightedSlimeStaff.png similarity index 100% rename from Items/Weapons/Summon/CorroslimeStaff.png rename to Items/Weapons/Summon/BlightedSlimeStaff.png diff --git a/Items/Weapons/Summon/CrimslimeStaff.cs b/Items/Weapons/Summon/CrimslimeStaff.cs deleted file mode 100644 index fcef51fb1b..0000000000 --- a/Items/Weapons/Summon/CrimslimeStaff.cs +++ /dev/null @@ -1,42 +0,0 @@ -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Buffs.Summon; -using CalamityMod.Projectiles.Summon; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Summon -{ - public class CrimslimeStaff : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Weapons.Summon"; - public override void SetDefaults() - { - Item.width = 52; - Item.height = 52; - Item.damage = 24; - Item.mana = 10; - Item.useAnimation = Item.useTime = 36; - Item.useStyle = ItemUseStyleID.Swing; - Item.noMelee = true; - Item.knockBack = 2f; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; - Item.UseSound = SoundID.Item44; - Item.autoReuse = true; - Item.buffType = ModContent.BuffType(); - Item.shoot = ModContent.ProjectileType(); - Item.DamageType = DamageClass.Summon; - } - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - player.AddBuff(Item.buffType, 2); - var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI); - minion.originalDamage = Item.damage; - return false; - } - } -} diff --git a/Items/Weapons/Summon/CrimslimeStaff.png b/Items/Weapons/Summon/CrimslimeStaff.png deleted file mode 100644 index 3e40afc20b..0000000000 Binary files a/Items/Weapons/Summon/CrimslimeStaff.png and /dev/null differ diff --git a/Items/Weapons/Summon/StaffOfNecrosteocytes.cs b/Items/Weapons/Summon/StaffOfNecrosteocytes.cs index 46d99f5fd5..c53423819a 100644 --- a/Items/Weapons/Summon/StaffOfNecrosteocytes.cs +++ b/Items/Weapons/Summon/StaffOfNecrosteocytes.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 52; Item.height = 54; - Item.damage = 31; + Item.damage = 25; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 4c04ee824d..c88257da6f 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1294,6 +1294,11 @@ BlackHawkBuff: { Description: The fighter jet will protect you } +BlightedSlime: { + DisplayName: Blighted Slime + Description: The blighted slime will protect you +} + BrimseekerBuff: { DisplayName: Brimseeker Description: Does it want something from you? @@ -1334,11 +1339,6 @@ CloudElemental: { Description: The Cloud Elemental will protect you } -Corroslime: { - DisplayName: Corroslime - Description: The corroslime will protect you -} - CorvidHarbringerBuff: { DisplayName: Raven Description: The powerful raven will protect you @@ -1359,11 +1359,6 @@ CosmilampBuff: { Description: The cosmilamp will protect you } -Crimslime: { - DisplayName: Crimslime - Description: The crimslime will protect you -} - DaedalusCrystalBuff: { DisplayName: Daedalus Crystal Description: The Daedalus crystal will protect you diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index ed0fa8eb78..91b8b88dd8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -85,6 +85,11 @@ BlackHawkRemote: { ''' } +BlightedSlimeStaff: { + DisplayName: Blighted Slime Staff + Tooltip: Summons a blighted slime to fight for you +} + BorealisBomber: { DisplayName: Borealis Bomber Tooltip: @@ -191,11 +196,6 @@ Cnidarian: { ''' } -CorroslimeStaff: { - DisplayName: Corroslime Staff - Tooltip: Summons a corro slime to fight for you -} - CorvidHarbringerStaff: { DisplayName: Corvid Harbinger Staff Tooltip: @@ -233,11 +233,6 @@ Cosmilamp: { Tooltip: Summons a cosmic lantern above your head to fight for you } -CrimslimeStaff: { - DisplayName: Crimslime Staff - Tooltip: Summons a crim slime to fight for you -} - CryogenicStaff: { DisplayName: Cryogenic Staff Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 121827ff82..2b0158eebe 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -35,11 +35,10 @@ BlackDragonHead.DisplayName: Black Celestial Dragon BlackDragonTail.DisplayName: Black Celestial Dragon BlackHawkBullet.DisplayName: Black Hawk Bullet BlackHawkSummon.DisplayName: Black Hawk +BlightedSlimeMinion.DisplayName: Blighted Slime BloodBreath.DisplayName: Blood Dragon Fire BloodRain.DisplayName: Blood Rain BloodSpit.DisplayName: Blood Spit -BoneMatter.DisplayName: Bone Matter -BoneMatter2.DisplayName: Bone Matter BrimseekerAuraBall.DisplayName: Seeker BrimstoneDartMinion.DisplayName: Brimfire BrimstoneDartSummon.DisplayName: Brimstone Dart @@ -64,7 +63,6 @@ CinderBlossom.DisplayName: Cinder Blossom CloudElementalMinion.DisplayName: Cloud Elemental CnidarianJellyfishOnTheString.DisplayName: Cnidarian CnidarianSpark.DisplayName: Cnidarian Spark -CorroslimeMinion.DisplayName: Corroslime CorruptionSlimeGodMinion.DisplayName: Slime God CosmicBlast.DisplayName: Cosmic Blast CosmicBlastBig.DisplayName: Cosmic Blast @@ -76,7 +74,6 @@ CosmicViperSplittingRocket.DisplayName: Splitting Rocket CosmicViperSummon.DisplayName: Cosmic Viper CosmilampBeam.DisplayName: Cosmic Beam CosmilampMinion.DisplayName: Cosmilamp -CrimslimeMinion.DisplayName: Crimslime CrimsonSlimeGodMinion.DisplayName: Slime God DaedalusCrystal.DisplayName: Daedalus Crystal DaedalusCrystalShot.DisplayName: Crystal Shot diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 6aec151c76..deff3f2114 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -1173,8 +1173,7 @@ namespace CalamityMod RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 4981b94c3f..766eded681 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -652,8 +652,7 @@ IL_6899: ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType() }; normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); diff --git a/Projectiles/Summon/CorroslimeMinion.png b/Projectiles/Summon/BlightedSlimeCorro.png similarity index 100% rename from Projectiles/Summon/CorroslimeMinion.png rename to Projectiles/Summon/BlightedSlimeCorro.png diff --git a/Projectiles/Summon/CrimslimeMinion.png b/Projectiles/Summon/BlightedSlimeCrim.png similarity index 100% rename from Projectiles/Summon/CrimslimeMinion.png rename to Projectiles/Summon/BlightedSlimeCrim.png diff --git a/Projectiles/Summon/CrimslimeMinion.cs b/Projectiles/Summon/BlightedSlimeMinion.cs similarity index 70% rename from Projectiles/Summon/CrimslimeMinion.cs rename to Projectiles/Summon/BlightedSlimeMinion.cs index 934db01829..2dff0559e7 100644 --- a/Projectiles/Summon/CrimslimeMinion.cs +++ b/Projectiles/Summon/BlightedSlimeMinion.cs @@ -2,23 +2,34 @@ using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Summon { - public class CrimslimeMinion : ModProjectile, ILocalizedModType + public class BlightedSlimeMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public float dust = 0f; + public static Asset Corroslime; + public static Asset Crimslime; + public override void SetStaticDefaults() { Main.projFrames[Type] = 6; Main.projPet[Type] = true; ProjectileID.Sets.MinionSacrificable[Type] = true; ProjectileID.Sets.MinionTargettingFeature[Type] = true; + + if (!Main.dedServ) + { + Corroslime = ModContent.Request("CalamityMod/Projectiles/Summon/BlightedSlimeCorro"); + Crimslime = ModContent.Request("CalamityMod/Projectiles/Summon/BlightedSlimeCrim"); + } } public override void SetDefaults() @@ -34,16 +45,16 @@ namespace CalamityMod.Projectiles.Summon Projectile.penetrate = -1; Projectile.timeLeft *= 5; Projectile.minion = true; + AIType = ProjectileID.BabySlime; Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 23; - AIType = ProjectileID.BabySlime; + Projectile.localNPCHitCooldown = 30; Projectile.DamageType = DamageClass.Summon; } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { - fallThrough = false; + //fallThrough = false; return true; } @@ -53,28 +64,28 @@ namespace CalamityMod.Projectiles.Summon CalamityPlayer modPlayer = player.Calamity(); if (dust == 0f) { - int constant = 16; - for (int i = 0; i < constant; i++) + int dustAmt = 16; + for (int i = 0; i < dustAmt; i++) { - Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; - rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center; + Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2(Projectile.width / 2f, Projectile.height) * 0.75f; + rotate = rotate.RotatedBy((i - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt) + Projectile.Center; Vector2 faceDirection = rotate - Projectile.Center; - int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Blood, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f); + int dust = Dust.NewDust(rotate + faceDirection, 0, 0, WorldGen.crimson ? DustID.Blood : DustID.Demonite, faceDirection.X, faceDirection.Y, 100, default, 1.1f); Main.dust[dust].noGravity = true; Main.dust[dust].noLight = true; Main.dust[dust].velocity = faceDirection; } dust += 1f; } - bool isMinion = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); + bool isMinion = Projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); if (isMinion) { if (player.dead) { - modPlayer.cSlime2 = false; + modPlayer.blightedSlime = false; } - if (modPlayer.cSlime2) + if (modPlayer.blightedSlime) { Projectile.timeLeft = 2; } @@ -85,7 +96,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Texture2D texture2D13 = (WorldGen.crimson ? Crimslime : Corroslime).Value; int framing = texture2D13.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/BoneMatter.cs b/Projectiles/Summon/BoneMatter.cs deleted file mode 100644 index 5b86428a3d..0000000000 --- a/Projectiles/Summon/BoneMatter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon -{ - public class BoneMatter : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - ProjectileID.Sets.MinionShot[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 32; - Projectile.friendly = true; - Projectile.tileCollide = true; - Projectile.DamageType = DamageClass.Summon; - } - - public override void AI() - { - if (Projectile.frameCounter++ % 9 == 8) - { - Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Type]) - Projectile.Kill(); - } - } - } -} diff --git a/Projectiles/Summon/BoneMatter.png b/Projectiles/Summon/BoneMatter.png deleted file mode 100644 index 2f28b1ab30..0000000000 Binary files a/Projectiles/Summon/BoneMatter.png and /dev/null differ diff --git a/Projectiles/Summon/BoneMatter2.cs b/Projectiles/Summon/BoneMatter2.cs deleted file mode 100644 index f13ef7e259..0000000000 --- a/Projectiles/Summon/BoneMatter2.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Summon -{ - public class BoneMatter2 : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - ProjectileID.Sets.MinionShot[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 28; - Projectile.friendly = true; - Projectile.tileCollide = true; - Projectile.DamageType = DamageClass.Summon; - } - - public override void AI() - { - Projectile.frameCounter++; - if (Projectile.frameCounter % 9 == 8) - { - Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Type]) - Projectile.Kill(); - } - } - } -} diff --git a/Projectiles/Summon/BoneMatter2.png b/Projectiles/Summon/BoneMatter2.png deleted file mode 100644 index 277aedabfd..0000000000 Binary files a/Projectiles/Summon/BoneMatter2.png and /dev/null differ diff --git a/Projectiles/Summon/CorroslimeMinion.cs b/Projectiles/Summon/CorroslimeMinion.cs deleted file mode 100644 index 9fd7296ef8..0000000000 --- a/Projectiles/Summon/CorroslimeMinion.cs +++ /dev/null @@ -1,97 +0,0 @@ -using CalamityMod.Buffs.Summon; -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Summon -{ - public class CorroslimeMinion : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public float dust = 0f; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 6; - Main.projPet[Type] = true; - ProjectileID.Sets.MinionSacrificable[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 26; - Projectile.height = 26; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.minionSlots = 1; - Projectile.alpha = 75; - Projectile.aiStyle = ProjAIStyleID.Pet; - Projectile.timeLeft = 18000; - Projectile.penetrate = -1; - Projectile.timeLeft *= 5; - Projectile.minion = true; - AIType = ProjectileID.BabySlime; - Projectile.tileCollide = false; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 23; - Projectile.DamageType = DamageClass.Summon; - } - - public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) - { - fallThrough = false; - return true; - } - - public override void AI() - { - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (dust == 0f) - { - int constant = 16; - for (int i = 0; i < constant; i++) - { - Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f; - rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center; - Vector2 faceDirection = rotate - Projectile.Center; - int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Demonite, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f); - Main.dust[dust].noGravity = true; - Main.dust[dust].noLight = true; - Main.dust[dust].velocity = faceDirection; - } - dust += 1f; - } - bool isMinion = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (isMinion) - { - if (player.dead) - { - modPlayer.cSlime = false; - } - if (modPlayer.cSlime) - { - Projectile.timeLeft = 2; - } - } - } - - public override bool MinionContactDamage() => true; - - public override bool PreDraw(ref Color lightColor) - { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; - int y6 = framing * Projectile.frame; - Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); - return false; - } - - public override bool OnTileCollide(Vector2 oldVelocity) => false; - } -} diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.cs b/Projectiles/Summon/CorruptionSlimeGodMinion.cs index e627103010..4eccfaee8a 100644 --- a/Projectiles/Summon/CorruptionSlimeGodMinion.cs +++ b/Projectiles/Summon/CorruptionSlimeGodMinion.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public class CorruptionSlimeGodMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public override string Texture => "CalamityMod/Projectiles/Summon/CorroslimeMinion"; + public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCorro"; public float dust = 0f; public override void SetStaticDefaults() diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.png b/Projectiles/Summon/CorruptionSlimeGodMinion.png deleted file mode 100644 index 70d4fe5869..0000000000 Binary files a/Projectiles/Summon/CorruptionSlimeGodMinion.png and /dev/null differ diff --git a/Projectiles/Summon/CrimsonSlimeGodMinion.cs b/Projectiles/Summon/CrimsonSlimeGodMinion.cs index 3199f82bbc..129a42d4f0 100644 --- a/Projectiles/Summon/CrimsonSlimeGodMinion.cs +++ b/Projectiles/Summon/CrimsonSlimeGodMinion.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public class CrimsonSlimeGodMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public override string Texture => "CalamityMod/Projectiles/Summon/CrimslimeMinion"; + public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCrim"; public float dust = 0f; public override void SetStaticDefaults() diff --git a/Projectiles/Summon/CrimsonSlimeGodMinion.png b/Projectiles/Summon/CrimsonSlimeGodMinion.png deleted file mode 100644 index e4e1a4620f..0000000000 Binary files a/Projectiles/Summon/CrimsonSlimeGodMinion.png and /dev/null differ diff --git a/Projectiles/Summon/SmallSkeletonMinion.cs b/Projectiles/Summon/SmallSkeletonMinion.cs index d5be045715..5aaa5133c0 100644 --- a/Projectiles/Summon/SmallSkeletonMinion.cs +++ b/Projectiles/Summon/SmallSkeletonMinion.cs @@ -36,9 +36,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.DamageType = DamageClass.Summon; - Projectile.MaxUpdates = 2; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 15; + Projectile.localNPCHitCooldown = 20; } public override void SendExtraAI(BinaryWriter writer) { @@ -66,82 +65,61 @@ namespace CalamityMod.Projectiles.Summon Projectile.frameCounter = 0; } if (Projectile.frame < 1) - { Projectile.frame = 1; - } if (Projectile.frame >= Main.projFrames[Type]) - { Projectile.frame = 1; - } bool isCorrectProjectile = Projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); if (isCorrectProjectile) { if (player.dead) - { modPlayer.necrosteocytesDudes = false; - } if (modPlayer.necrosteocytesDudes) - { Projectile.timeLeft = 2; - } } NPC potentialTarget = Projectile.Center.MinionHoming(900f, player); - if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.Distance(player.Center) > 205f && Projectile.position.X == Projectile.oldPosition.X))) - { + if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.Distance(player.Center) > 320f && Projectile.position.X == Projectile.oldPosition.X) || (potentialTarget is not null && Projectile.Top.Y > potentialTarget.Bottom.Y))) Projectile.velocity.Y = -10f; - } else if (Projectile.velocity.Y != 0f) - { Projectile.frame = 2; - } - if (Projectile.velocity.Y > -16f) - { + if (Projectile.velocity.Y < 16f) Projectile.velocity.Y += 0.3f; - } - Projectile.ai[0]++; - if (Projectile.ai[0] % 60f == 59f && Main.myPlayer == Projectile.owner) - { - int type = Utils.SelectRandom(Main.rand, ModContent.ProjectileType(), ModContent.ProjectileType()); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, type, Projectile.damage, Projectile.knockBack, Projectile.owner); - } if (potentialTarget is null) { - if (Math.Abs(player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos) > 160f) + if (Math.Abs(player.Center.X - Projectile.Center.X - 30f * Projectile.minionPos * player.direction) > 80f) { - Projectile.velocity.X += Main.rand.NextFloat(0.11f, 0.16f) * (player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos > 0f).ToDirectionInt(); + Projectile.velocity.X += Main.rand.NextFloat(0.1f, 0.13f) * (player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos > 0f).ToDirectionInt(); Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -13f, 13f); } else { - Projectile.velocity.X *= 0.95f; + Projectile.velocity.X *= 0.925f; + if (MathF.Abs(Projectile.velocity.X) < 0.05f) + Projectile.velocity.X = 0f; } - if (Projectile.Distance(player.Center) <= 150f) - { + + if (Projectile.velocity.X == 0f) Projectile.frame = 0; - } if (Projectile.Distance(player.Center) > 1600f) { Projectile.Center = player.Center; + Projectile.velocity = Vector2.Zero; Projectile.netUpdate = true; } } else { - if (Math.Abs(potentialTarget.Center.X - Projectile.Center.X + (int)MathHelper.Min(potentialTarget.width / 2, 40f)) > (int)MathHelper.Min(potentialTarget.width / 2, 40f)) - { - Projectile.velocity.X += Main.rand.NextFloat(0.08f, 0.15f) * (potentialTarget.Center.X - Projectile.Center.X > 0f).ToDirectionInt(); - Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -16f, 16f); - } - else - { + Projectile.velocity.X += Main.rand.NextFloat(0.1f, 0.13f) * (potentialTarget.Center.X > Projectile.Center.X).ToDirectionInt(); + Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -13f, 13f); + if (Math.Sign(Projectile.velocity.X) != (potentialTarget.Center.X > Projectile.Center.X).ToDirectionInt()) Projectile.velocity.X *= 0.95f; - } + if (Projectile.Distance(player.Center) > 1400f) { Projectile.Center = player.Center; + Projectile.velocity = Vector2.Zero; Projectile.netUpdate = true; } Projectile.MinionAntiClump(0.075f);