From 0edf6a65f1794f9b6c64d9adbc1d7410e6f79484 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Thu, 5 Jan 2023 04:05:32 -0600 Subject: [PATCH 01/19] Vernal Soil except Red said "NO!" to Plantera Bulbs spawning on anything that isn't Jungle Grass :) --- Items/Placeables/VernalSoil.cs | 28 +++++++++++++ Items/Placeables/VernalSoil.png | Bin 0 -> 180 bytes Tiles/VernalSoil.cs | 69 ++++++++++++++++++++++++++++++++ Tiles/VernalSoil.png | Bin 0 -> 19033 bytes 4 files changed, 97 insertions(+) create mode 100644 Items/Placeables/VernalSoil.cs create mode 100644 Items/Placeables/VernalSoil.png create mode 100644 Tiles/VernalSoil.cs create mode 100644 Tiles/VernalSoil.png diff --git a/Items/Placeables/VernalSoil.cs b/Items/Placeables/VernalSoil.cs new file mode 100644 index 0000000000..38c41092d7 --- /dev/null +++ b/Items/Placeables/VernalSoil.cs @@ -0,0 +1,28 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class VernalSoil : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Vernal Soil"); + SacrificeTotal = 10; + } + + public override void SetDefaults() + { + Item.createTile = ModContent.TileType(); + Item.useStyle = ItemUseStyleID.Swing; + Item.useTurn = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.autoReuse = true; + Item.consumable = true; + Item.width = 16; + Item.height = 16; + Item.maxStack = 999; + } + } +} diff --git a/Items/Placeables/VernalSoil.png b/Items/Placeables/VernalSoil.png new file mode 100644 index 0000000000000000000000000000000000000000..a0a8c2c4e10f9864f7a53ac501442863bf68d093 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GGLLkg|>2BR0pkSJ( zi(^Q|t>lg^1qlp^)}e3zFGiESbV8o%u7wlfke1UmlfJxAOh8b>O4jdNUd&Qh#y7&d%1^XB`oM91GU~K+k5Rk*b YP?J^7vMFs=7|=!rPgg&ebxsLQ0M*+#(); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Vernal Soil"); + AddMapEntry(new Color(80, 120, 0), name); + HitSound = SoundID.Dig; + } + + public override void RandomUpdate(int i, int j) + { + int j2 = j - 1; + if (j2 < 10) + j2 = 10; + + if (Main.tile[i, j2].LiquidAmount == 0) + { + if (WorldGen.genRand.NextBool(15)) + { + bool placeBulb = true; + int minDistanceFromOtherBulbs = 5; + for (int k = i - minDistanceFromOtherBulbs; k < i + minDistanceFromOtherBulbs; k += 2) + { + for (int l = j - minDistanceFromOtherBulbs; l < j + minDistanceFromOtherBulbs; l += 2) + { + if (k > 1 && k < Main.maxTilesX - 2 && l > 1 && l < Main.maxTilesY - 2 && Main.tile[k, l].HasTile && Main.tile[k, l].TileType == TileID.PlanteraBulb) + { + placeBulb = false; + break; + } + } + } + + if (placeBulb) + { + WorldGen.Place2x2(i, j2, TileID.PlanteraBulb, 0); + WorldGen.SquareTileFrame(i, j2); + WorldGen.SquareTileFrame(i + 2, j2); + WorldGen.SquareTileFrame(i - 1, j2); + if (Main.tile[i, j2].TileType == TileID.PlanteraBulb && Main.netMode == NetmodeID.Server) + NetMessage.SendTileSquare(-1, i, j2, 5); + } + } + } + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/VernalSoil.png b/Tiles/VernalSoil.png new file mode 100644 index 0000000000000000000000000000000000000000..8c1e2f1c5691e536fdda8cc9a3367db011401dc4 GIT binary patch literal 19033 zcmZ{Mc|6o@_y1>R7)-XJqO27m6&141q(wDk9b49{O)3&u$B3eI-1dTA_kU7vHE^M0TAIp>;tCKn6@5W5fn00^8r zd&&#|peO)<2=cNg8JO{teEeLdo}79*f~{H0pYlgIk-a<~FrSED@pzF*T^QWsd$}(StfZQpaw}KYRw+5=v04 zvk8ptIH25T&I)y#TvkRJtej?P>IJQn7h)zfk@hQNF*CZKzX!P)*CInzS$)aGB~B@G zZMCx{px0};_%YH*Q{6?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`7 z&5g3i@IArTflCRWz4-2B*RPO)Kf|Hx?&QQzR3%n3RJK+f@JT$xv&1jl)kkQlZCD}0 zaFsXT;VNMJ&>iEy@vK;ILK7wMR=ctL7SHr+_hE2~MB{Mbjp;e?6BvdJo?6MH49}#2 z*H?GrEr4?s?F~b8I?yWjcu7zDkltBrPiU*f{=!Z)Bp#u%)X_LVX?czPT4t+6zRjZ{ z>CyQ1R=smmkUb{smv{YFcdGa3f{Js%5~f}UG4Sb;_B0| zzRxf-Eix;?Dg+@0uWV`aGW*uEazgVvGv}PAW~o);IC*Hiu;T#w&TFI3C87L!-5wN+ za)Q$BeqU6U5vwg^hg&x%^w2VYbDe8VF&U{&_?sRfTt(m?|GA!)L7~VmUtWBk-aX>? z%F%Y;wI9s;H%K?sVV})d)f(c1g%II{??+zzxH<+8^H_7(w;t)3UhN2G9$-Ax+&a=e z-NVJ+>m8a^mX|?fmgV4hvkHHE$nJorKh}|NVxnDda(url2uXX)`p-tel3G>?0wa# Date: Thu, 5 Jan 2023 10:02:56 -0500 Subject: [PATCH 02/19] renamed localization file correctly --- Localization/{enUS.hjson => en-US.hjson} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Localization/{enUS.hjson => en-US.hjson} (100%) diff --git a/Localization/enUS.hjson b/Localization/en-US.hjson similarity index 100% rename from Localization/enUS.hjson rename to Localization/en-US.hjson From 0bc1739acc9321e54da2b5bd2372b40ef56b396c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 5 Jan 2023 11:06:18 -0500 Subject: [PATCH 03/19] Fixed doubled armor pen. For real. Hurrah. --- NPCs/CalamityGlobalNPC.cs | 34 ++++++++++++++++++------- Projectiles/CalamityGlobalProjectile.cs | 23 ++++++++--------- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index cd999d2690..9f53495de0 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2564,14 +2564,16 @@ namespace CalamityMod.NPCs #endregion #region Strike NPC + // Incoming defense to this function is already affected by the vanilla debuffs Ichor (-15) and Betsy's Curse (-40), and cannot be below zero. public override bool StrikeNPC(NPC npc, ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { // Don't bother tampering with the damage if it is already zero. - // Zero damage does not happen in the base game and is always indicative of antibutcher in Calamity. + // Zero damage does not happen in the base game; if something has been set to zero damage by another mod, it's really not intended to do damage. if (damage == 0D) - return false; + return true; - // Override hand/head eye 'death' code and use custom 'death' code instead, this is here just in case the AI code fails + // Safety for ML's eyes on Rev+ so that the boss doesn't remain invulnerable forever + // TODO -- this is very old, is it still needed? if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { if (npc.type == NPCID.MoonLordHand || npc.type == NPCID.MoonLordHead) @@ -2589,16 +2591,19 @@ namespace CalamityMod.NPCs } } + // Armor penetration has already been applied as bonus damage. // Yellow Candle provides +5% damage which ignores both DR and defense. - // However, armor penetration bonus damage has already been applied, so it's slightly higher than it should be. + // This means Yellow Candle is buffing armor penetration and technically not ignoring defense, + // but it's small enough to let it slide. double yellowCandleDamage = 0.05 * damage; // Apply modifications to enemy's current defense based on Calamity debuffs. // As with defense and DR, flat reductions apply first, then multiplicative reductions. + // + // Ozzatron 05JAN2023: fixed doubled armor pen, this time for real int effectiveDefense = defense - (marked > 0 && DR <= 0f ? MarkedforDeath.DefenseReduction : 0) - (wither > 0 ? WitherDebuff.DefenseReduction : 0) - - (int)Main.LocalPlayer.GetArmorPenetration() - miscDefenseLoss; // Defense can never be negative and has a minimum value of zero. @@ -2622,6 +2627,8 @@ namespace CalamityMod.NPCs } // Large Deus worm takes reduced damage to last a long enough time. + // TODO -- WHY DOES DEUS HAVE THIS UNDOCUMENTED MULTIPLIER HERE?? + // this should be in ModifyHitNPC for deus himself if (CalamityLists.AstrumDeusIDs.Contains(npc.type) && newAI[0] == 0f) damage *= 0.8; @@ -2632,9 +2639,13 @@ namespace CalamityMod.NPCs if (damage == 0D) return false; - // Cancel out vanilla defense math by reversing the calculation vanilla is about to perform. - // While roundabout, this is safer than returning false to stop vanilla damage calculations entirely. - // Other mods will probably expect the vanilla code to run and may compensate for it themselves. + // Immediately after StrikeNPC runs, vanilla does the following 3 things: + // 1 - Reduces damage by vanilla effective defense + // 2 - Doubles damage if it's a crit + // 3 - Multiplies by vanilla takenDamageMultiplier if it's over 1.0 + // + // The following line cancels out vanilla defense calculations, since we just did our own above. + // We return true to allow all 3 to run, but cancel out #1, meaning crits and Crawltipede still work. damage = Main.CalculateDamageNPCsTake((int)damage, -defense); return true; } @@ -4493,6 +4504,9 @@ namespace CalamityMod.NPCs } } + // + // DAAWNLIGHT SPIRIT ORIGIN AIM IMPLEMENTATION + // int bullseyeType = ProjectileType(); Projectile bullseye = null; for (int i = 0; i < Main.maxProjectiles; i++) @@ -4564,6 +4578,7 @@ namespace CalamityMod.NPCs } } + // Plague Reaper deals 1.1x damage to Plagued enemies if (!projectile.npcProj && !projectile.trap) { if (projectile.CountsAsClass() && modPlayer.plagueReaper && pFlames > 0) @@ -4602,7 +4617,8 @@ namespace CalamityMod.NPCs damage = (int)(damage * 0.1); } - // TODO -- What in god's name is this? + // Generalized pierce resistance that stacks with all other resistances for some specific bosses defined in a list. + // The actual resistance formula isn't really a problem, but the implementation of this desperately needs refactoring. private void PierceResistGlobal(Projectile projectile, NPC npc, ref int damage) { // Thanatos segments do not trigger pierce resistance if they are closed diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 026b57fa0d..2f022602fe 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2467,7 +2467,7 @@ namespace CalamityMod.Projectiles } #endregion - #region CanDamage + #region CanDamage + CanHit public override bool? CanDamage(Projectile projectile) { if (projectile.hostile && (projectile.damage - (int)(damageReduction * (Main.expertMode ? 0.25f : 0.5f)) <= 0)) @@ -2497,6 +2497,16 @@ namespace CalamityMod.Projectiles } return null; } + + // Cultist lightning orbs cannot hit players specifically. This could probably be switched to CanDamage? + public override bool CanHitPlayer(Projectile projectile, Player target) + { + if (projectile.type == ProjectileID.CultistBossLightningOrb) + { + return false; + } + return true; + } #endregion #region Drawing @@ -2662,17 +2672,6 @@ namespace CalamityMod.Projectiles } #endregion - #region CanHit - public override bool CanHitPlayer(Projectile projectile, Player target) - { - if (projectile.type == ProjectileID.CultistBossLightningOrb) - { - return false; - } - return true; - } - #endregion - #region LifeSteal public static bool CanSpawnLifeStealProjectile(float healMultiplier, float healAmount) { From ba88797505eb42b6374f268ae522ff91ccab81b4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 5 Jan 2023 11:29:25 -0500 Subject: [PATCH 04/19] fix Heavenly Gale being able to crit with DSO --- Projectiles/Ranged/ExoCrystalArrow.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Projectiles/Ranged/ExoCrystalArrow.cs b/Projectiles/Ranged/ExoCrystalArrow.cs index 799d2a1713..0fb55bfe35 100644 --- a/Projectiles/Ranged/ExoCrystalArrow.cs +++ b/Projectiles/Ranged/ExoCrystalArrow.cs @@ -129,7 +129,6 @@ namespace CalamityMod.Projectiles.Ranged int lightning = Projectile.NewProjectile(Projectile.GetSource_FromThis(), lightningSpawnPosition, lightningShootVelocity, ModContent.ProjectileType(), lightningDamage, 0f, Projectile.owner); if (Main.projectile.IndexInRange(lightning)) { - Main.projectile[lightning].CritChance = Projectile.CritChance; Main.projectile[lightning].ai[0] = lightningShootVelocity.ToRotation(); Main.projectile[lightning].ai[1] = Main.rand.Next(100); } From 49f84f83d2388344bf7c3a0cb2332e7e408eb510 Mon Sep 17 00:00:00 2001 From: Memes <114233643+Mr-Memes@users.noreply.github.com> Date: Thu, 5 Jan 2023 19:31:14 +0100 Subject: [PATCH 05/19] Reworked Belladonna Spirit Staff. --- Items/Weapons/Summon/BelladonnaSpiritStaff.cs | 5 +- Projectiles/Summon/BelladonnaPetal.cs | 135 +++++++++++-- Projectiles/Summon/BelladonnaPetal.png | Bin 197 -> 697 bytes Projectiles/Summon/BelladonnaSpirit.cs | 184 +++++++++--------- 4 files changed, 215 insertions(+), 109 deletions(-) diff --git a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs index bddd3cbd4e..700e3d6eb6 100644 --- a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs +++ b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs @@ -12,13 +12,13 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Belladonna Spirit Staff"); - Tooltip.SetDefault("Summons a cute forest spirit that scatters toxic petals"); + Tooltip.SetDefault("Summons a cute forest spirit that flings magical toxic petals"); SacrificeTotal = 1; } public override void SetDefaults() { - Item.damage = 5; + Item.damage = 30; Item.mana = 10; Item.width = 40; Item.height = 42; @@ -31,7 +31,6 @@ namespace CalamityMod.Items.Weapons.Summon Item.UseSound = SoundID.Item44; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Projectiles/Summon/BelladonnaPetal.cs b/Projectiles/Summon/BelladonnaPetal.cs index cf26e0fd6d..f99220f09a 100644 --- a/Projectiles/Summon/BelladonnaPetal.cs +++ b/Projectiles/Summon/BelladonnaPetal.cs @@ -1,49 +1,154 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Summon { public class BelladonnaPetal : ModProjectile { + public Player Owner => Main.player[Projectile.owner]; + + public ref float AITimer => ref Projectile.ai[0]; // The timer for the AI to do it's actions. + + public ref float CheckForFiring => ref Projectile.ai[1]; // Check for when it's about to fire, so we can put one-time effects and sounds. + + public ref float GaveRandomAngle => ref Projectile.localAI[0]; // A check to give the projectile a random angle. + + public NPC targetFound; // A variable where the potential target will be written on. + public override void SetStaticDefaults() { - DisplayName.SetDefault("Bullet"); + DisplayName.SetDefault("Belladonna Petal"); ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; } public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 12; + Projectile.width = 14; + Projectile.height = 24; Projectile.friendly = true; Projectile.minion = true; Projectile.minionSlots = 0f; Projectile.ignoreWater = true; + Projectile.tileCollide = false; Projectile.penetrate = 1; - Projectile.timeLeft = 360; + Projectile.timeLeft = 130; Projectile.DamageType = DamageClass.Summon; } + public override void AI() - { - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - Projectile.velocity.X *= 0.99f; - if (Projectile.velocity.Y < 9f) - Projectile.velocity.Y += 0.085f; - Projectile.tileCollide = Projectile.timeLeft <= 180; + { + if (GaveRandomAngle == 0f) // Just gives it a random angle once so the throws look more natural. + { + Projectile.rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); + GaveRandomAngle = 1f; + } + Lighting.AddLight(Projectile.Center, 0.5f, 1f, 0.3f); // Gives it a jungl-y green color. + + if (Owner.HasMinionAttackTargetNPC) // If the Owner has selected for a target manually, go for that one. + { + NPC manualTarget = Main.npc[Owner.MinionAttackTargetNPC]; + Behaviour(manualTarget); + } + else // If not, go for the closest one. + { + NPC potentialTarget = Projectile.Center.MinionHoming(1200f, Owner); + Behaviour(potentialTarget); + } + + AITimer++; + AITimer = (AITimer > 60f) ? 60f : AITimer; // AITimer can reach only a maximun of 60. } + + #region Methods + + public void Behaviour(NPC target) + { + if (target != null && AITimer >= 60f) // If the target is found, and 1 second has passed, do effects and go to the target. + { + Projectile.alpha = 0; + for (int i = 0; i < 5; i++) + { + Dust gotTarget = Dust.NewDustPerfect(Projectile.Center, DustID.Grass); + gotTarget.velocity = Main.rand.NextVector2Circular(2f, 2f); + gotTarget.noGravity = true; + } + if (CheckForFiring == 0f) // Check for it so it doesn't update the velocity indefinetly, meaning it would be homing. + { + Projectile.velocity = CalamityUtils.CalculatePredictiveAimToTarget(Projectile.Center, targetFound, 20f); + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + SoundEngine.PlaySound(SoundID.Grass, Projectile.Center); + CheckForFiring = 1f; + Projectile.netUpdate= true; + } + } + else if (target != null && AITimer < 60f) // If there's target, but 1 second hasn't passed, rotate to point at the target, while still having gravity. + { + Projectile.velocity.Y += 0.2f; + Projectile.rotation = MathHelper.Lerp(Projectile.rotation, (target.Center - Projectile.Center).ToRotation() + MathHelper.PiOver2, AITimer / 60f); + // (AITimer / 60f) because 60 is maximum time of the timer. + targetFound = target; + // Puts the potentialTarget on this variable that won't update constantly so the projectile doesn't become incredibly homing. + Projectile.netUpdate = true; + } + else // If there's no target when shot (For example when the enemy has been killed), just fall. + { + AITimer = 0f; // Restart the timer, just so if a target appears again it looks smoother. + Projectile.alpha += 2; + Projectile.velocity.Y += 0.2f; + Projectile.rotation += 0.05f; // Continues spinning until it dies. + Projectile.netUpdate = true; + } + } + public override void Kill(int timeLeft) { for (int i = 0; i < 5; i++) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.Grass); - dust.velocity = Main.rand.NextVector2Circular(2f, 2f); - dust.noGravity = true; + Dust projDeath = Dust.NewDustPerfect(Projectile.Center, DustID.Grass); + projDeath.velocity = Main.rand.NextVector2Circular(2f, 2f); + projDeath.noGravity = true; } } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + + public override bool? CanDamage() // If the projectile is going to the target, do damage, if not, don't. { - target.AddBuff(BuffID.Poisoned, 240); + if (targetFound != null && AITimer >= 60f) + { + return null; + } + + return false; } + + public override bool OnTileCollide(Vector2 oldVelocity) => false; + + public override bool PreDraw(ref Color lightColor) // Code taken from ExampleMod to make the trail. + { + Main.instance.LoadProjectile(Projectile.type); + Texture2D texture = TextureAssets.Projectile[Projectile.type].Value; + + if (CheckForFiring == 1f) + { + Vector2 drawOrigin = new Vector2(texture.Width * 0.5f, Projectile.height * 0.5f); + for (int k = 0; k < Projectile.oldPos.Length; k++) + { + Vector2 drawPos = (Projectile.oldPos[k] - Main.screenPosition) + drawOrigin + new Vector2(0f, Projectile.gfxOffY); + Color color = Projectile.GetAlpha(lightColor) * ((Projectile.oldPos.Length - k) / (float)Projectile.oldPos.Length); + Main.EntitySpriteDraw(texture, drawPos, null, color, Projectile.rotation, drawOrigin, Projectile.scale, SpriteEffects.None, 0); + } + } + return true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => target.AddBuff(BuffID.Poisoned, 240); + + #endregion } } diff --git a/Projectiles/Summon/BelladonnaPetal.png b/Projectiles/Summon/BelladonnaPetal.png index ddd5d1aac1f267bf9cdf4dcf5594ac29a8bdaae3..43bc9ac92dcf0c11458bebf2b5a9ab12319f125a 100644 GIT binary patch literal 697 zcmV;q0!ICbP)EX>4Tx04R}tkv&MmP!xqv(@I4u9qb_DkfAzR5Eao)s#pXIrLEAagUL((ph-iL z;^HW{799LptU9+0Yt2!cN#t}afBE>hxsNufoI7hdvl-aUu+?gNBom8oW698fjO zNGIZAF25=UU*SUlVfxNW%+!;a#VkDQ>z?|k?qWR4yYJ8HR|+Nrd?N82(+!JwgLrz= z(mC%FM_5@>h|h_~3_2k3BiCh@-#C{X7ItBhU>J3k-!p?NI`^*Ix48bLX7?zDJIgiANTMNIsO#6WO7x& z$gzMLR7j2={0)B3)+|m=xJjWn(DP#3A0t3;7icwX`}^3oTPJ}38Mx9q{#p~5`6Rv3 z(V|B{cpJF5?r8EJaJd5vKIxJnIg+22P%HxPXY@>YVBi+$TXW~u-pAy{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2j>9<4+9UySvC>?006Z~L_t(I%VS``0SpZd{~H<_ z{>LTH#6Tus!DbT!0|P_cvNsTcC)G<=_g{Ti2e`D6Qi1Bf3(`ZDe}L4)F_I>M_)BEGY8S&mD*qgbH3AQKL@oV8m4d fpaZIv0Q3g{G{-~Irtz%u00000NkvXXu0mjf%B3*Y literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>srPho43U_c z%=4K$IROZ6?5jUt&!*$x^Gsfu83=^UJaZbJUVEwhUs6IsqU?>usRKap;9=rf5WQf< zU;bs!>^;?tq&&P9?sz-@kNFy|&T{3R!p^|nMj$vCWG>@+@Z(x-PveP!0heZg#2zXu j>t8DnnKngLSB8=OpoB!L Main.player[Projectile.owner]; + public CalamityPlayer moddedOwner => Owner.Calamity(); + public float PetalFireTimer { get => Projectile.ai[0]; set => Projectile.ai[0] = value; } + public override void SetStaticDefaults() { DisplayName.SetDefault("Belladonna Spirit"); @@ -29,9 +34,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.netImportant = true; Projectile.friendly = true; Projectile.minionSlots = 1; - Projectile.timeLeft = 18000; Projectile.penetrate = -1; - Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Summon; @@ -39,124 +42,123 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (Projectile.localAI[0] == 0f) + CheckMinionExistance(); // Checks if the minion can still exist. + SpawnEffect(); // Makes a dust effect where the minion spawns. + DoAnimation(); // Does the animation of the minion. + PointInDirection(); // Points in the right directions. + FollowPlayer(); // Vibes around the player. + Projectile.MinionAntiClump(); // The minions push eachother to not clump. + + NPC potentialTarget = Projectile.Center.MinionHoming(1200f, Owner); + if (potentialTarget is not null) { - Initialize(player); - Projectile.localAI[0] = 1f; + TargetNPC(); } - if (Projectile.frameCounter++ > 6f) + } + + #region Methods + + public void CheckMinionExistance() + { + Owner.AddBuff(ModContent.BuffType(), 1); + if (Projectile.type == ModContent.ProjectileType()) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; - Projectile.frameCounter = 0; - } - bool isCorrectProjectile = Projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (isCorrectProjectile) - { - if (player.dead) + if (Owner.dead) { - modPlayer.belladonaSpirit = false; + moddedOwner.belladonaSpirit = false; } - if (modPlayer.belladonaSpirit) + if (moddedOwner.belladonaSpirit) { Projectile.timeLeft = 2; } } - - if (Projectile.velocity.X > 0.25f) - Projectile.spriteDirection = -1; - else if (Projectile.velocity.X < -0.25f) - Projectile.spriteDirection = 1; - - NPC potentialTarget = Projectile.Center.MinionHoming(1200f, player); - if (potentialTarget is null) - { - Vector2 targetPosition = player.Bottom; - FollowPlayer(player, targetPosition); - } - else - { - TargetNPC(potentialTarget); - } - Projectile.MinionAntiClump(); } - public void Initialize(Player player) + + public void SpawnEffect() { - for (int i = 0; i < 45; i++) + if (Projectile.localAI[0] == 0f) { - float angle = MathHelper.TwoPi / 45f * i; - Vector2 velocity = angle.ToRotationVector2() * 4f; - Dust dust = Dust.NewDustPerfect(Projectile.Center + velocity * 2.75f, 39, velocity); - dust.noGravity = true; + for (int i = 0; i < 45; i++) + { + float angle = MathHelper.TwoPi / 45f * i; + Vector2 velocity = angle.ToRotationVector2() * 4f; + Dust dust = Dust.NewDustPerfect(Projectile.Center + velocity * 2.75f, 39, velocity); + dust.noGravity = true; + } + Projectile.localAI[0] = 1f; } } - public void FollowPlayer(Player player, Vector2 targetPosition) + + public void DoAnimation() { - Projectile.velocity.X = (player.Center.X + player.direction * 75f - Projectile.Center.X) / 60f; - if (Projectile.Distance(player.Center) > 2500f || - targetPosition.Y - Projectile.Top.Y > 360f) + Projectile.frameCounter++; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + } + + public void PointInDirection() + { + NPC potentialTarget = Projectile.Center.MinionHoming(1200f, Owner); + if (potentialTarget is not null) // If there's a target look at the target. { - Projectile.Center = player.Center; + Projectile.spriteDirection = ((potentialTarget.Center.X - Projectile.Center.X) < 0).ToDirectionInt(); + } + else // If there's not a target, the minion just points where it's going. + { + if (Math.Abs(Projectile.velocity.X) > 0.01f) + Projectile.spriteDirection = -Math.Sign(Projectile.velocity.X); + } + } + + public void FollowPlayer() + { + if (Projectile.WithinRange(Owner.Center, 1200f) && !Projectile.WithinRange(Owner.Center, 300f)) // If the minion starts to get far, force the minion to go to you. + { + Projectile.velocity = (Owner.Center - Projectile.Center) / 30f; + Projectile.netUpdate= true; + } + else if (!Projectile.WithinRange(Owner.Center, 160f)) // The minion will change directions to you if it's going away from you, meaning it'll just hover around you. + { + Projectile.velocity = (Projectile.velocity * 37f + Projectile.SafeDirectionTo(Owner.Center) * 17f) / 40f; Projectile.netUpdate = true; } - else if (targetPosition.Y - Projectile.Top.Y < -550f) + + // Teleport to the owner if sufficiently far away. + if (!Projectile.WithinRange(Owner.Center, 1200f)) { - Projectile.velocity.Y += Math.Sign(targetPosition.Y - targetPosition.Y) * 0.08f; - } - else - { - Projectile.velocity.Y = (targetPosition.Y - Projectile.Center.Y) / 60f; + Projectile.position = Owner.Center; + Projectile.velocity *= 0.3f; + Projectile.netUpdate = true; } } - public void TargetNPC(NPC target) + + public void TargetNPC() { - Vector2 targetPosition = target.Center; - if (Math.Abs(targetPosition.X - Projectile.Center.X) < 180f) - { - Projectile.velocity.X *= 0.95f; - PetalFireTimer++; - if (Main.myPlayer == Projectile.owner) - FirePetals(target); - } - else - { - Projectile.velocity.X += (targetPosition.X - Projectile.Center.X + target.spriteDirection * 75f > 0).ToDirectionInt() * 0.5f; - Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -12f, 12f); - } - Projectile.velocity.Y = (targetPosition.Y - Projectile.Center.Y + target.spriteDirection * 75f) / 90f; + PetalFireTimer++; + Projectile.velocity.Y -= MathHelper.Lerp(0, 0.005f, PetalFireTimer % 75f); + // The minion will slowly go up until it throws the petal. + // This essentially makes the minion stay above you and trigger the "Turn back to player", it'll do this continuously, giving the effect of bouncing. + PetalFireTimer = (PetalFireTimer == 76f) ? 1f : PetalFireTimer; // The timer cannot go above 75f. + if (Main.myPlayer == Projectile.owner) + FirePetals(); + Projectile.netUpdate = true; } - public void FirePetals(NPC target) + + public void FirePetals() { int petalID = ModContent.ProjectileType(); - if (PetalFireTimer % 20f == 19f) + if (PetalFireTimer % 75f == 0f) // Every 75 frames, throws a petal. { - for (int i = -1; i <= 1; i++) - { - float angle = Main.rand.NextFloat(-0.1f, 0.1f) + i * 0.05f; - Vector2 petalSpawnPosition = Projectile.Center - Vector2.UnitY * 6f; - Vector2 petalShootVelocity = Projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 7.5f; - int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), petalSpawnPosition, petalShootVelocity, petalID, Projectile.damage, Projectile.knockBack, Projectile.owner); - if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = Projectile.originalDamage; - } - } - - if (PetalFireTimer % 180f == 179f) - { - for (int i = 0; i < 5; i++) - { - float angle = MathHelper.Lerp(MathHelper.ToRadians(-Main.rand.NextFloat(30f, 36f)), MathHelper.ToRadians(Main.rand.NextFloat(30f, 36f)), i / 4f); - Vector2 petalSpawnPosition = Projectile.Center - Vector2.UnitY * 6f; - Vector2 petalShootVelocity = -Vector2.UnitY.RotatedBy(angle) * 9f; - int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), petalSpawnPosition, petalShootVelocity, petalID, Projectile.damage, Projectile.knockBack, Projectile.owner); - if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = Projectile.originalDamage; - } + Vector2 petalShootVelocity = (-Vector2.UnitY * Main.rand.NextFloat(7f, 9f)) + Projectile.velocity; + // Throws the petal upwards with a random force and inherits the minion's Y speed. + int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, petalShootVelocity, petalID, Projectile.damage, Projectile.knockBack, Projectile.owner); + if (Main.projectile.IndexInRange(p)) + Main.projectile[p].originalDamage = Projectile.originalDamage; + Projectile.netUpdate = true; } } public override bool? CanDamage() => false; + + #endregion } } From b1e18837e6829e48b4df2376b01de00c0361f796 Mon Sep 17 00:00:00 2001 From: Memes <114233643+Mr-Memes@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:30:20 +0100 Subject: [PATCH 06/19] Applied Ozz's comments & some fixes. --- Projectiles/Summon/BelladonnaPetal.cs | 10 +--------- Projectiles/Summon/BelladonnaSpirit.cs | 5 ++++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Projectiles/Summon/BelladonnaPetal.cs b/Projectiles/Summon/BelladonnaPetal.cs index f99220f09a..4812eb10e4 100644 --- a/Projectiles/Summon/BelladonnaPetal.cs +++ b/Projectiles/Summon/BelladonnaPetal.cs @@ -16,8 +16,6 @@ namespace CalamityMod.Projectiles.Summon public ref float CheckForFiring => ref Projectile.ai[1]; // Check for when it's about to fire, so we can put one-time effects and sounds. - public ref float GaveRandomAngle => ref Projectile.localAI[0]; // A check to give the projectile a random angle. - public NPC targetFound; // A variable where the potential target will be written on. public override void SetStaticDefaults() @@ -44,13 +42,6 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { - if (GaveRandomAngle == 0f) // Just gives it a random angle once so the throws look more natural. - { - Projectile.rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); - GaveRandomAngle = 1f; - } - Lighting.AddLight(Projectile.Center, 0.5f, 1f, 0.3f); // Gives it a jungl-y green color. - if (Owner.HasMinionAttackTargetNPC) // If the Owner has selected for a target manually, go for that one. { NPC manualTarget = Main.npc[Owner.MinionAttackTargetNPC]; @@ -64,6 +55,7 @@ namespace CalamityMod.Projectiles.Summon AITimer++; AITimer = (AITimer > 60f) ? 60f : AITimer; // AITimer can reach only a maximun of 60. + Lighting.AddLight(Projectile.Center, 0.5f, 1f, 0.3f); // Gives it a jungl-y green color. } #region Methods diff --git a/Projectiles/Summon/BelladonnaSpirit.cs b/Projectiles/Summon/BelladonnaSpirit.cs index be18bfc634..36d433023e 100644 --- a/Projectiles/Summon/BelladonnaSpirit.cs +++ b/Projectiles/Summon/BelladonnaSpirit.cs @@ -149,10 +149,13 @@ namespace CalamityMod.Projectiles.Summon if (PetalFireTimer % 75f == 0f) // Every 75 frames, throws a petal. { Vector2 petalShootVelocity = (-Vector2.UnitY * Main.rand.NextFloat(7f, 9f)) + Projectile.velocity; - // Throws the petal upwards with a random force and inherits the minion's Y speed. + // Throws the petal upwards with a random force and inherits the minion's speed. int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, petalShootVelocity, petalID, Projectile.damage, Projectile.knockBack, Projectile.owner); if (Main.projectile.IndexInRange(p)) + { Main.projectile[p].originalDamage = Projectile.originalDamage; + Main.projectile[p].rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); + } Projectile.netUpdate = true; } } From fb9d879e8d0c67bb1ed3d74bb73c03a7af121432 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 6 Jan 2023 13:27:33 +0700 Subject: [PATCH 07/19] Hydra rework... --- Items/Weapons/Ranged/Hydra.cs | 136 +++++++++++--- Projectiles/Ranged/HydraHead.cs | 250 ++++++++++++++++++++++++++ Projectiles/Ranged/HydraHeadChain.png | Bin 0 -> 158 bytes Projectiles/Ranged/HydraHeadLaunch.cs | 66 +++++++ Projectiles/Ranged/HydrasBlood.cs | 65 +++++++ 5 files changed, 496 insertions(+), 21 deletions(-) create mode 100644 Projectiles/Ranged/HydraHead.cs create mode 100644 Projectiles/Ranged/HydraHeadChain.png create mode 100644 Projectiles/Ranged/HydraHeadLaunch.cs create mode 100644 Projectiles/Ranged/HydrasBlood.cs diff --git a/Items/Weapons/Ranged/Hydra.cs b/Items/Weapons/Ranged/Hydra.cs index 7dd910afcc..fa38dd5bc6 100644 --- a/Items/Weapons/Ranged/Hydra.cs +++ b/Items/Weapons/Ranged/Hydra.cs @@ -1,6 +1,6 @@ -using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -11,52 +11,146 @@ namespace CalamityMod.Items.Weapons.Ranged { public class Hydra : ModItem { - public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/Hydra"); + //Editable stats: + public const int BulletsPerShot = 4; + public const float ShotSpread = 10f; //in degrees + public const int TimeToSpawnHead = 3; //in seconds + public const int MaximumHeadCount = 3; + + public int HeadID = ModContent.ProjectileType(); + public int HeadSpawnTimer = 0; + + //There could be new sounds for these. Vanilla sounds for now. + public static readonly SoundStyle SpawnSound = SoundID.Item60; + public static readonly SoundStyle LaunchSound = SoundID.Item1; public override void SetStaticDefaults() { DisplayName.SetDefault("Hydra"); - Tooltip.SetDefault("Fires a spread of explosive bullets"); + Tooltip.SetDefault("Fusion of heavy machinery and Lernaean blood\n" + + "Fires a spread of " + BulletsPerShot + " toxic bullets\n"+ + "Grows a gun-head every " + TimeToSpawnHead + " seconds, up to a maximum of " + MaximumHeadCount + " heads\n" + + "Left-click to command any existing heads to fire\n" + + "Right-click to launch the heads for powerful explosive damage"); SacrificeTotal = 1; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() { - Item.damage = 120; - Item.DamageType = DamageClass.Ranged; Item.width = 66; Item.height = 30; - Item.useTime = 33; - Item.useAnimation = 33; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 10f; - Item.value = CalamityGlobalItem.Rarity9BuyPrice; - Item.rare = ItemRarityID.Yellow; - Item.UseSound = FireSound; - Item.autoReuse = true; - Item.shootSpeed = 12f; - Item.shoot = ModContent.ProjectileType(); + Item.damage = 50; + Item.DamageType = DamageClass.Ranged; + Item.useAnimation = Item.useTime = 60; Item.useAmmo = AmmoID.Bullet; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; + Item.knockBack = 10f; + Item.autoReuse = true; + Item.value = CalamityGlobalItem.Rarity8BuyPrice; + Item.rare = ItemRarityID.Yellow; + Item.UseSound = null; //does so in Shoot Item.Calamity().canFirePointBlankShots = true; } - public override Vector2? HoldoutOffset() + public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse == 2 ? false : true; + + public override void UpdateInventory(Player player) { - return new Vector2(-5, 0); + //Spawn heads while holding + if (player.ActiveItem().type == Item.type && player.ownedProjectileCounts[HeadID] < MaximumHeadCount) + { + HeadSpawnTimer++; + if (HeadSpawnTimer >= TimeToSpawnHead * 60) + { + HeadSpawnTimer = 0; + SoundEngine.PlaySound(SpawnSound, player.Center); + Projectile.NewProjectile(Item.GetSource_FromThis(), player.Top + Vector2.UnitY * 8f, Vector2.Zero, HeadID, 0, 0, player.whoAmI); + } + } + else if (player.ActiveItem().type != Item.type || player.dead || !player.active) + { + for (int i = 0; i < Main.maxProjectiles; i++) + { + //Destroy all heads + if (Main.projectile[i].type == HeadID && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) + Main.projectile[i].Kill(); + } + HeadSpawnTimer = 0; + } + } + + public override bool AltFunctionUse(Player player) + { + //Does nothing if there's no heads + if (player.ownedProjectileCounts[HeadID] <= 0) + return false; + + //Otherwise, launch the guns + for (int i = 0; i < Main.maxProjectiles; i++) + { + SoundEngine.PlaySound(LaunchSound, player.Center); + if (Main.projectile[i].type == HeadID && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) + Main.projectile[i].ai[1] = -1f; + } + return false; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - for (int index = 0; index < 8; ++index) + Vector2 shootDirection = velocity.SafeNormalize(Vector2.Zero); + for (int i = 0; i < 4; i++) { - float SpeedX = velocity.X + Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = velocity.Y + Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); + int CurrentHeadCount = player.ownedProjectileCounts[HeadID]; + //Exponentially louder the more heads, slightly + SoundStyle FireSound = new("CalamityMod/Sounds/Item/Hydra") { Volume = 0.3f + (float)(Math.Pow(CurrentHeadCount, 1.5D) * 0.2f) }; + SoundEngine.PlaySound(FireSound, player.Center); + + Vector2 spreadDirection = shootDirection.RotatedByRandom(MathHelper.ToRadians(ShotSpread / 2f)); + float spreadVelocity = Item.shootSpeed * Main.rand.NextFloat(1f, 1.4f); + Vector2 newPos = player.MountedCenter + shootDirection * 50f; + + Projectile.NewProjectile(source, newPos, spreadVelocity * spreadDirection, Item.shoot, damage, knockback, player.whoAmI); + } + + for (int i = 0; i < Main.maxProjectiles; i++) + { + //Force all heads to shoot + if (Main.projectile[i].type == HeadID && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].active) + Main.projectile[i].ai[1] = 1f; } return false; } + public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true; + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + player.direction = Math.Sign((player.Calamity().mouseWorld - player.Center).X); + float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir; + + Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * 7f; + Vector2 itemSize = new Vector2(Item.width, Item.height); + Vector2 itemOrigin = new Vector2(-17, 3); + CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin); + base.UseStyle(player, heldItemFrame); + } + + public override void UseItemFrame(Player player) + { + player.direction = Math.Sign((player.Calamity().mouseWorld - player.Center).X); + + float animProgress = 1 - player.itemTime / (float)player.itemTimeMax; + float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2; + if (animProgress < 0.4f) + rotation += -0.45f * (float)Math.Pow((0.4f - animProgress) / 0.4f, 2) * player.direction; + + player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation); + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Projectiles/Ranged/HydraHead.cs b/Projectiles/Ranged/HydraHead.cs new file mode 100644 index 0000000000..fbf084a037 --- /dev/null +++ b/Projectiles/Ranged/HydraHead.cs @@ -0,0 +1,250 @@ +using CalamityMod.DataStructures; +using CalamityMod.Items.Weapons.Ranged; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class HydraHead : ModProjectile + { + public override string Texture => "CalamityMod/Items/Weapons/Ranged/Hydra"; + + public Vector2 CurrentPositionOffset; + public Vector2 IdealPositionOffset; + public Vector2[] OldVelocities = new Vector2[20]; + public Player Owner => Main.player[Projectile.owner]; + + public ref float Time => ref Projectile.ai[0]; + public ref float AttackType => ref Projectile.ai[1]; + + public Vector2 DrawStartPosition + { + get + { + if (Projectile.owner < 0 || Projectile.owner >= Main.player.Length) + return Vector2.Zero; + return Main.player[Projectile.owner].Top + Vector2.UnitY * 8f; + } + } + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hydra Head"); + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 30; //66x30 sprite + Projectile.friendly = true; + Projectile.netImportant = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.timeLeft = 600; + Projectile.penetrate = 1; + Projectile.DamageType = DamageClass.Ranged; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.WritePackedVector2(CurrentPositionOffset); + writer.WritePackedVector2(IdealPositionOffset); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + CurrentPositionOffset = reader.ReadPackedVector2(); + IdealPositionOffset = reader.ReadPackedVector2(); + } + + public override void AI() + { + if (Owner.dead || !Owner.active || Owner.ActiveItem().type != ModContent.ItemType()) + Projectile.Kill(); + else + Projectile.timeLeft = 2; //Infinite lifespan + + Vector2 returnPosition = DrawStartPosition + CurrentPositionOffset; + + if (Projectile.localAI[0] == 0f) + { + PerformInitializationEffects(); + Projectile.localAI[0] = 1f; + } + + Vector2 aimDestination = Owner.Calamity().mouseWorld; + float idealRotation = Projectile.AngleTo(aimDestination); + if (Time < 0f) + Projectile.rotation = MathHelper.Lerp(Projectile.rotation, idealRotation, (Time + 15f) / 15f); + else + Projectile.rotation = idealRotation; + + Projectile.Center = new Vector2(Projectile.Center.X, MathHelper.Clamp(Projectile.Center.Y, 1f, returnPosition.Y - 8f)); + MoveTowardsDestination(returnPosition); + AdjustOldVelocityArray(); + + PerformAttacks(aimDestination); + } + + public void PerformInitializationEffects() + { + int totalHeads = Owner.ownedProjectileCounts[Projectile.type]; + CurrentPositionOffset = IdealPositionOffset = new Vector2(Main.rand.NextFloat(-72f - 8f * totalHeads, 72f + 8f * totalHeads), -Main.rand.NextFloat(8f, 84f + 4f * totalHeads)); + Projectile.netUpdate = true; + } + + public void MoveTowardsDestination(Vector2 returnPosition) + { + float distanceFromTarget = Projectile.Distance(returnPosition); + if (distanceFromTarget > 7f) + { + float flySpeed = MathHelper.Lerp(2f, 17f, Utils.GetLerpValue(10f, 70f, distanceFromTarget, true)); + Projectile.velocity = (Projectile.velocity * 9f + Projectile.SafeDirectionTo(returnPosition) * flySpeed) / 10f; + } + + int totalHeads = Owner.ownedProjectileCounts[Projectile.type]; + int moveRate = 40 + totalHeads * 4; + + // Reset the ideal offset from time to time. + Time++; + if (Time % moveRate == moveRate - 1f) + IdealPositionOffset = new Vector2(Main.rand.NextFloat(-72f - 8f * totalHeads, 72f + 8f * totalHeads), -Main.rand.NextFloat(8f, 84f + 4f * totalHeads)); + + if (Vector2.Distance(IdealPositionOffset, CurrentPositionOffset) > 0.2f) + CurrentPositionOffset = Vector2.Lerp(CurrentPositionOffset, IdealPositionOffset, 0.125f); + + // Clamp the Y position. + if (Projectile.Center.Y > Owner.Top.Y - 46f) + Projectile.Center = new Vector2(Projectile.Center.X, Owner.Top.Y - 46f); + + // Clamp the center so that it does not go too far from the return position. + if (Projectile.Distance(returnPosition) > 120f) + Projectile.Center = returnPosition + Projectile.DirectionFrom(returnPosition) * 120f; + + // Disallow heads from getting too close to each other. + Projectile.MinionAntiClump(0.15f); + } + + public void AdjustOldVelocityArray() + { + for (int i = OldVelocities.Length - 1; i > 0; i--) + OldVelocities[i] = OldVelocities[i - 1]; + + OldVelocities[0] = Projectile.velocity; + } + + public void PerformAttacks(Vector2 aimDestination) + { + Item heldItem = Owner.ActiveItem(); + + Vector2 shootDirection = Projectile.SafeDirectionTo(aimDestination); + + //Normal shot + if (AttackType > 0f) + { + //Calculation for damage and co + Owner.PickAmmo(heldItem, out _, out float itemVelocity, out int itemDamage, out float itemKB, out _); + int type = ModContent.ProjectileType(); + for (int i = 0; i < 4; i++) + { + Vector2 spreadDirection = shootDirection.RotatedByRandom(MathHelper.ToRadians(Hydra.ShotSpread / 2f)); + float spreadVelocity = itemVelocity * Main.rand.NextFloat(1f, 1.4f); + Vector2 shootPos = Projectile.Center + shootDirection * 24f; + + Projectile.NewProjectile(Projectile.GetSource_FromThis(), shootPos, spreadVelocity * spreadDirection, type, itemDamage, itemKB, Projectile.owner); + } + + //Minor recoil + Projectile.rotation -= MathHelper.ToRadians(25f) * Math.Sign(Projectile.rotation); + Time = -15f; //Reset the movement shift and let it recoil normally + Projectile.velocity += shootDirection * -10f; + + //Reset the attack + AttackType = 0f; + } + //Yeet + else if (AttackType < 0f) + { + //Calculation for damage and co + Owner.PickAmmo(heldItem, out _, out float itemVelocity, out int itemDamage, out float itemKB, out _); + int gunType = ModContent.ProjectileType(); + int gunDamage = itemDamage * 3; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, itemVelocity * shootDirection, gunType, gunDamage, itemKB, Projectile.owner); + + Projectile.Kill(); + } + } + + public override void Kill(int timeLeft) + { + if (Main.dedServ) + return; + + for (int i = 0; i < 10; i++) + Dust.NewDustPerfect(Projectile.Center, 171, Main.rand.NextVector2CircularEdge(4f, 4f)).noGravity = true; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D chain = ModContent.Request("CalamityMod/Projectiles/Ranged/HydraHeadChain").Value; + Vector2 end = Projectile.Center + (Projectile.spriteDirection == 1).ToInt() * 10 * Vector2.UnitX; + + List controlPoints = new List + { + DrawStartPosition + }; + for (int i = 0; i < OldVelocities.Length; i++) + { + // Incorporate the past movement into neck turns, giving it rubber band-like movment. + // Become less responsive at the neck ends. Having the ends have typical movement can look strange sometimes. + float swayResponsiveness = Utils.GetLerpValue(0f, 6f, i, true) * Utils.GetLerpValue(OldVelocities.Length, OldVelocities.Length - 6f, i, true); + Vector2 swayTotalOffset = OldVelocities[i] * swayResponsiveness; + controlPoints.Add(Vector2.Lerp(DrawStartPosition, end, i / (float)OldVelocities.Length) + swayTotalOffset); + } + controlPoints.Add(end); + + int chainPointCount = (int)(Vector2.Distance(controlPoints.First(), controlPoints.Last()) / 5f); + if (chainPointCount < 12) + chainPointCount = 12; + BezierCurve bezierCurve = new BezierCurve(controlPoints.ToArray()); + List chainPoints = bezierCurve.GetPoints(chainPointCount); + + for (int i = 0; i < chainPoints.Count; i++) + { + Vector2 positionAtPoint = chainPoints[i]; + if (Vector2.Distance(positionAtPoint, Projectile.Center) < 10f) + continue; + float angleAtPoint = i == chainPoints.Count - 1 ? (end - chainPoints[i]).ToRotation() : (chainPoints[i + 1] - chainPoints[i]).ToRotation(); + angleAtPoint += MathHelper.PiOver2; + Main.EntitySpriteDraw(chain, + positionAtPoint - Main.screenPosition, + null, + Color.Lerp(Color.White, Color.Transparent, 0.6f), + angleAtPoint, + chain.Size() / 2f, + 1f, + SpriteEffects.None, + 0); + } + + Texture2D headTexture = ModContent.Request(Texture).Value; + Main.EntitySpriteDraw(headTexture, + Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, + null, + lightColor, + Projectile.rotation, + Projectile.Size * 0.5f, + Projectile.scale, + Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, + 0); + + return false; + } + + public override bool? CanDamage() => false; + } +} \ No newline at end of file diff --git a/Projectiles/Ranged/HydraHeadChain.png b/Projectiles/Ranged/HydraHeadChain.png new file mode 100644 index 0000000000000000000000000000000000000000..688841e42b5353d9953480ccbfef5ac32760ed41 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4rFyzJhDd}bo0yybKhMCz$;qkE zm3Xj;H9>0bd5=v_$;rtZJQWoc6Mj8AJ6pr-fUn95fi=7w34S-W "CalamityMod/Items/Weapons/Ranged/Hydra"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hydra Head"); + } + + public override void SetDefaults() + { + Projectile.width = 66; + Projectile.height = 30; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.timeLeft = 360; + Projectile.MaxUpdates = 3; + Projectile.penetrate = 1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; + } + + //Normal hitbox size for explosion, rotated otherwise + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.ai[1] < 1f ? Projectile.RotatingHitboxCollision(targetHitbox.TopLeft(), targetHitbox.Size()) : null); + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(Projectile.ai[0]); + Projectile.ai[0] += 12f; + } + + public override void Kill(int timeLeft) + { + Projectile.ai[1] = 1f; + Projectile.ExpandHitboxBy(180); + Projectile.Damage(); + + float randAngle = Main.rand.NextFloat(1f, 2f); + //8-pointed star + for (int i = 0; i < 8; i++) + { + float angle = MathHelper.Pi * randAngle - i * MathHelper.TwoPi / 8f; + float nextAngle = MathHelper.Pi * randAngle - (i + 2) * MathHelper.TwoPi / 8f; + Vector2 start = angle.ToRotationVector2(); + Vector2 end = nextAngle.ToRotationVector2(); + for (int j = 0; j < 30; j++) + { + Dust starDust = Dust.NewDustPerfect(Projectile.Center, 267); + starDust.scale = 1.5f; + starDust.velocity = Vector2.Lerp(start, end, j / 30f) * 12f; + starDust.color = Color.Orchid; + starDust.noGravity = true; + } + } + SoundEngine.PlaySound(CommonCalamitySounds.LargeWeaponFireSound, Projectile.Center); + } + } +} \ No newline at end of file diff --git a/Projectiles/Ranged/HydrasBlood.cs b/Projectiles/Ranged/HydrasBlood.cs new file mode 100644 index 0000000000..39e6f8b577 --- /dev/null +++ b/Projectiles/Ranged/HydrasBlood.cs @@ -0,0 +1,65 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class HydrasBlood : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Magic/VitriolicViperSpit"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hydra's Blood"); + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = 14; + Projectile.height = 26; + Projectile.friendly = true; + Projectile.timeLeft = 90; + Projectile.MaxUpdates = 5; + Projectile.penetrate = 1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => Projectile.RotatingHitboxCollision(targetHitbox.TopLeft(), targetHitbox.Size()); + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + if (Projectile.timeLeft < 85 && Main.rand.NextBool(3)) + { + Dust dust = Dust.NewDustDirect(Projectile.Center, 1, 1, 171); + dust.velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(5f)) * -0.5f; + dust.scale = Main.rand.NextFloat(0.3f, 1.6f); + dust.noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 14; i++) + { + Dust dust = Dust.NewDustDirect(Projectile.position, 14, 14, 171); + dust.scale = Main.rand.NextFloat(0.3f, 1.6f); + dust.noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Venom, 300); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Venom, 300); + } + } +} From 5e705227729e7bc9ae275df5f778a71c5d621f82 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 6 Jan 2023 13:59:06 +0700 Subject: [PATCH 08/19] Hydra recipe changes based on its new theme --- Items/Weapons/Ranged/Hydra.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Ranged/Hydra.cs b/Items/Weapons/Ranged/Hydra.cs index fa38dd5bc6..9df87596f6 100644 --- a/Items/Weapons/Ranged/Hydra.cs +++ b/Items/Weapons/Ranged/Hydra.cs @@ -154,10 +154,9 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.Shotgun). - AddIngredient(ItemID.IllegalGunParts). - AddRecipeGroup("IronBar", 20). - AddIngredient(ItemID.Ectoplasm, 20). + AddIngredient(ItemID.QuadBarrelShotgun). + AddIngredient(ItemID.Nanites, 25). + AddIngredient(ItemID.VialofVenom, 25). AddTile(TileID.MythrilAnvil). Register(); } From 5ad1b917ee57fafd19c47e52f9c21f0182b18bdb Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 6 Jan 2023 18:13:47 +0700 Subject: [PATCH 09/19] a gore --- Gores/IceClasper/IceClasper.png | Bin 0 -> 350 bytes Gores/IceClasper/IceClasper2.png | Bin 0 -> 439 bytes Gores/IceClasper/IceClasper3.png | Bin 0 -> 359 bytes Gores/ImpiousImmolator/ImpiousImmolator.png | Bin 0 -> 340 bytes Gores/ImpiousImmolator/ImpiousImmolator2.png | Bin 0 -> 454 bytes Gores/ImpiousImmolator/ImpiousImmolator3.png | Bin 0 -> 383 bytes Gores/LuminousCorvina/LuminousCorvina.png | Bin 0 -> 673 bytes Gores/LuminousCorvina/LuminousCorvina2.png | Bin 0 -> 784 bytes Gores/LuminousCorvina/LuminousCorvina3.png | Bin 0 -> 416 bytes Gores/MantisShrimp/MantisShrimp.png | Bin 0 -> 411 bytes Gores/MantisShrimp/MantisShrimp2.png | Bin 0 -> 305 bytes Gores/MantisShrimp/MantisShrimp3.png | Bin 0 -> 296 bytes Gores/Melter/Melter.png | Bin 0 -> 574 bytes Gores/Melter/Melter2.png | Bin 0 -> 551 bytes Gores/Melter/Melter3.png | Bin 0 -> 388 bytes Gores/MorayEel/MorayEel.png | Bin 0 -> 795 bytes Gores/MorayEel/MorayEel2.png | Bin 0 -> 664 bytes Gores/MorayEel/MorayEel3.png | Bin 0 -> 737 bytes Gores/Oarfish/OarfishBody.png | Bin 0 -> 429 bytes Gores/Oarfish/OarfishHead.png | Bin 0 -> 883 bytes Gores/Oarfish/OarfishTail.png | Bin 0 -> 409 bytes NPCs/Abyss/LuminousCorvina.cs | 6 ++++++ NPCs/Abyss/MorayEel.cs | 6 ++++++ NPCs/Abyss/OarfishBody.cs | 2 ++ NPCs/Abyss/OarfishHead.cs | 2 ++ NPCs/Abyss/OarfishTail.cs | 2 ++ NPCs/NormalNPCs/IceClasper.cs | 6 ++++++ NPCs/NormalNPCs/ImpiousImmolator.cs | 6 ++++++ NPCs/NormalNPCs/MantisShrimp.cs | 6 ++++++ NPCs/PlagueEnemies/Melter.cs | 6 ++++++ 30 files changed, 42 insertions(+) create mode 100644 Gores/IceClasper/IceClasper.png create mode 100644 Gores/IceClasper/IceClasper2.png create mode 100644 Gores/IceClasper/IceClasper3.png create mode 100644 Gores/ImpiousImmolator/ImpiousImmolator.png create mode 100644 Gores/ImpiousImmolator/ImpiousImmolator2.png create mode 100644 Gores/ImpiousImmolator/ImpiousImmolator3.png create mode 100644 Gores/LuminousCorvina/LuminousCorvina.png create mode 100644 Gores/LuminousCorvina/LuminousCorvina2.png create mode 100644 Gores/LuminousCorvina/LuminousCorvina3.png create mode 100644 Gores/MantisShrimp/MantisShrimp.png create mode 100644 Gores/MantisShrimp/MantisShrimp2.png create mode 100644 Gores/MantisShrimp/MantisShrimp3.png create mode 100644 Gores/Melter/Melter.png create mode 100644 Gores/Melter/Melter2.png create mode 100644 Gores/Melter/Melter3.png create mode 100644 Gores/MorayEel/MorayEel.png create mode 100644 Gores/MorayEel/MorayEel2.png create mode 100644 Gores/MorayEel/MorayEel3.png create mode 100644 Gores/Oarfish/OarfishBody.png create mode 100644 Gores/Oarfish/OarfishHead.png create mode 100644 Gores/Oarfish/OarfishTail.png diff --git a/Gores/IceClasper/IceClasper.png b/Gores/IceClasper/IceClasper.png new file mode 100644 index 0000000000000000000000000000000000000000..e5e3930e2729b22a361c2ce4dd0a77bbfb3a90cc GIT binary patch literal 350 zcmV-k0iphhP)Px$7)eAyR5*>bl(A03Fc5}60}Bi3I|SA;bVcfdFv>e1_A+E+W`?N)-TM+%gBYmP zwUx*W8w(rmQWglq*(kOOtrYiPe7|+ceZF&|2&B8cD%`89m<&|i@BEj%iT2i2PTJb@ z8mc-;Jc3Z2>nqRCZtp!JN79_YoxOD|Z@%nz0GN&p0I$W1_kbx2&o?JX+GhZyItAdA zcUdz@c+7-on2Y~-{w0V!g_Eo$6|EoUGaJ2yl|3~lFy#XP)6o&IqU*Nu?*4%S_*yO^ z6S&|e`;?VKFJW#8zL$#%K-un(CxgfYp=|Ons|5E%O%Px$aY;l$R7i=%lrc-gKp2LfsEdQ7ql24uZ9yFi?I5P;Ul5#C(8;N@i=7MksJGZf+P3o@8^7B+Jk4+ zl3nCE@ZtKg>oI3q(|yq zwi5Hjb z0Nh4#gMMij$kSt6LG?J{wa6uP(0v>OFnD?g=1gpV5CQlWx$>=C&yUzv-SS*g2hMXm hGjW#GiP~{S`~?Rlh@Jk#$Grdm002ovPDHLkV1jRm%u@gW literal 0 HcmV?d00001 diff --git a/Gores/IceClasper/IceClasper3.png b/Gores/IceClasper/IceClasper3.png new file mode 100644 index 0000000000000000000000000000000000000000..bc516c2e9d7de32d1fa93e35623d4ab6c2cd74e9 GIT binary patch literal 359 zcmV-t0hs=YP)Px$AxT6*R7i=vlp#;UKp2Lf!VCtG6LXtJ5F|r%;jUaVRmT3}x0ET7F z)Dk4Am>&NDe!&pq9rUA@Euq&(UBBL4p1$|>A`DkI&ud!)_*~{1MgaL@QZhI;PFH4nw(~CsrvPOA`@n`WlhNbt8vsSR$xK<= zFM(cZ!`cla7bhB*PE982Lm|^&w@-=s4K+|-`3zL=y6vq4z~Rwx1TdXFgfZOtFIzK< z%tW{hh0RjfO!LL$&su0QLtmfy%tZJMg}v`~nTgsBzX1NEVZbqyyD0zw002ovPDHLk FV1j!9oE`uG literal 0 HcmV?d00001 diff --git a/Gores/ImpiousImmolator/ImpiousImmolator.png b/Gores/ImpiousImmolator/ImpiousImmolator.png new file mode 100644 index 0000000000000000000000000000000000000000..69ec8765c3cad98c58d530139e20ce5e7a8f8bde GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gy!3HEdYt9+~DaPU;cPEB*=VV?2*?gWZjv*Gk z$teng9$psz-JjXlZ=5bT+e$5nS50h#Kv2WGLjvZ}B0o)cOZ+o7NZ2)}PVd^JiKz)d zQ1RdWt-YDJ-M;$%Mj%kUYAxX^bNA_&V#6~_&xajd*pY9ob^ru6FrS*gw^WxI2o9gT z?Y~jV$5{MuvXI#CVy;gCB5!t-&1-CA6x?Q@uzJN2ka`16*NH%phl{6hPL`06$atAl zGJVl*0kPk4Ve$bchYriEsyn;xu*Rn?d6BtYkp00i_>zopr01mN${r~^~ literal 0 HcmV?d00001 diff --git a/Gores/ImpiousImmolator/ImpiousImmolator2.png b/Gores/ImpiousImmolator/ImpiousImmolator2.png new file mode 100644 index 0000000000000000000000000000000000000000..ca773be7a1a67e6156fcba2ad89f118c5e8b1f0e GIT binary patch literal 454 zcmV;%0XhDOP)Px$fJsC_R7i=%md#26Q5c4wiEvR7lFL+#f>4A+qBeC0L7Up;qG;bOcnP&{*Rn3c zpiLrS5K2)vShQ0ls)bb3Vtmm#jAfAHvzeLm!@TeJGiNM1tfc21fY(-=UMf$I7Cxk+ zF~@J*+&A{qqW@rA%9j&y&qT?t1CYXB=~Os`-@YCk2*QDG8qGHV*0Qsn=Nb*)jZ&UW zgx%+*1OTOL8-PODT{mvl!bYL=(@hp@R z6Dd~&ipG3!4n#fVzEjm9WhUxap$M1^zmv@YedkjXUUR3%c>uQe^Pcg_`-gk&b8ZBm z1C!moLja!FHvl-g-2vcWabchr1fK(;TPx$IY~r8R5*>jl+7+fK^TUgBaICydMuo18znYUkys!pE4Seqq;Uh{23&z1H(+NY zk^W>Y!IP}m$JRtx^$A59HbH7*G*#kge&Pe0A9m)0kD|#09aq11|YkX0pRespyi6Sz!?l- z(3}wf6Ol3iZfpdA+iD2Fg`d-i&kFi}dxYN9rT|!-mnYXdRW0aW`r7=lR01Gs6tv&N zL~0g*dPnxE)qVru!<&=@jV1tbHwHkh)gCZm@Nf^n?$$m4dq+Ec69IWcny3J=PS?B2+y@#CMjP!B${pk(Gu dU+LcoKLMe)Ws9fZqEi3>002ovPDHLkV1j`Jprrr+ literal 0 HcmV?d00001 diff --git a/Gores/LuminousCorvina/LuminousCorvina.png b/Gores/LuminousCorvina/LuminousCorvina.png new file mode 100644 index 0000000000000000000000000000000000000000..e65da49586e8da21d95ddeb88d67f8d57a6b54f8 GIT binary patch literal 673 zcmV;S0$%-zP)Px%TS-JgR9J=WmcMILQ545NiM5(GRvwLQ!)p-{>>`MQ)WO9?aMQur+0C)gf1prM z{{_h)PEN(8;;M+27F{eNjY(S}C8#f{T1*^nPRTiWFEO&EK4qm@aG~;DMNkr*lP*t{{o=|o%*aA9}6vc+4an_f+88WvSe+}3R$TFy?5({#qTmrVdvD}f>_J-U`!2H+4bN2@!!D(v-ioc(ru%=sI){pV==Kj3@Q zp|3MpKQ=_edOZMxM~(vUP*ML86@`#h1Vt+wi(S?5*bw~%RCfb!Sx9jv00000NkvXX Hu0mjfI|@fv literal 0 HcmV?d00001 diff --git a/Gores/LuminousCorvina/LuminousCorvina2.png b/Gores/LuminousCorvina/Lu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TZUK1k8vv9tg)knnvH4wH z_B%@AhfE_C4eG7PJh2dLrsg8OKK5!o^M93jVqI~B!+I++M*Icl4sF+7@jBN40000< KMNUMnLSTZ|Cc1n8 literal 0 HcmV?d00001 diff --git a/Gores/MantisShrimp/MantisShrimp.png b/Gores/MantisShrimp/MantisShrimp.png new file mode 100644 index 0000000000000000000000000000000000000000..ec026b5b2c369daa2e9db4d7ddf6d949c70a7b1f GIT binary patch literal 411 zcmV;M0c8G(P)Px$RY^oaR5*>b)UiujQ547VPb3b-w9qWY;ua}I(l~T-ax+7rlh7q#L0pRMA{{MV zTy#=gyZJ9Ti3C?cOru>wr%Drolv3j&h_A!DFZ5X@4$re(IQQJcm*4rFn=>GuzM7Aq zz5OKz(RwusS2^%z3=9owbl1oaB>A`jqRZzIoPVf;LU%MpmKjm*Hj@0r6?nE6=Udb9 zxw(9pdi(lOL#9OkX;eJ9059J!fuDOD30X|A*0`}zc0}b$E&4ZcRvk_i6iOBF{o6qV zPx#>q$gGR49?P(yvQHVHC#k&pTvWxeB61m>5J*h6tij>_+QgCX-FDSS%K+CP6T) zY7k5|lOUEM`vWFu5DYG9xrXfpuMD?v_msnVe>~^QIVTuW)#Y0HJO8MZ!0YWrfWojw zgETg%a@6e7E|}g)KTA&MlcC;Q<2vIC0Y2~5Px#;z>k7R5*>TlB*8FKoCXG0s&8gfTRLLLc&8~Q7CZK;_&&@BGTYg?>qujdJo}v`PU&s{ueW zcxd;qwU9ZYqW3&mdM;*xr#-O4 z7=Xj33P8{88z$;CvWn3r)DlEdo@^as1rQ|l6yQGVYWK|lS~)>xvCsV=sRMAjY_olv u>}1cBQKDj-mwAF!DP|!@sYdca#)zIbd`V%CnXZKZ0000S->P)Px$_(?=TR7i==9EOkIXp#NzP;FC*zPA>ol*&QIx8YLg604V25hFvuiSvuWe ztZjc0tA^1N6)UwI=c*Cp^Z7srkx8e&E{wHE&)jnWez#Tkqw6|NwsILpGWGg}u@=ec zj}rhgnG8^0W7l;P5J!#F_sK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.png new file mode 100644 index 0000000000000000000000000000000000000000..14f397c7eb890d688acf8a489867ca43435d66b7 GIT binary patch literal 883 zcmV-(1C0EMP)Px&ElET{R9J=Gm`zAjQ5c4w@h42o7Kxf>qnM>KNFddsHbJGesUULE%2l;2+C%BW5Zw zVgb<7&?H$lz@pE49alQE`ni(Zdc;zbap{>28mX*$c>95tzS(sPfXar08~U)o67wBz znVpS!djME$F4oG$LoYh70Wem1Kr6rB{{(>P@y`GZ-FXW5$G5-|%XwDTm8q(hlQum! zf9fOv)lT}`=p^8hTCW02%yXQ@TaQck0WeUs0)SP%1Mr`vvQn5j)b$L2?xmlAx7Pwo zY{MUBjVIRDO;Ci=DJ4d%wbkOke%NL!V^(^3>%wv&0Lif*KxRA>2{kWTZTaujbGJ&j z8~Zu&+}0r`5nj}@@&SMtM*ugT;mk_$nUIn-Q`SmT*9#A8?cONasaJ3a2A`OCE29UF z#A~J`o(ZYu=`ULOn%CZZ1YEDm2#Du|BunZMd}5}zq$jae)iVkevFPj!0M%(R3^GZX z5>K@+MF4kXgj90wm-@fJ&q_aU2|1P(xu}yb`>?*=KCQm&GEBA4D^fD6yXVweSy!ae z=9(E?V)Ena!dC#!mRA7K=1juc?|YqmCu2cxKxU=H`Lt6J;KsM)U>rz`izR9Vgq*2B z6VpyZ5@%``6sbu5N(dl2JEN^>5}$;KJmpkm?p(!NF~_U2AM;XhiKQmh*oSLcfwTzk zcxiN15v(b%2Ox61K5IjM=ST4t`RXxHrsCJ5_>kNhY4w9k%*>F;URqEP0{E1C2e`yc z`R!7r+>B#FN)$^CYwrc0nA}x}*MyXpEMu)S(<1XUWs>qzV2Q2!e)L4^WgB3Z6$7BU zq!NI}i;6Vi{Q$hW+oQeryXqK_`LtkD1f literal 0 HcmV?d00001 diff --git a/Gores/Oarfish/OarfishTail.png b/Gores/Oarfish/OarfishTail.png new file mode 100644 index 0000000000000000000000000000000000000000..cd7acee3bf1ac79c1723f9896db3bd20293bf946 GIT binary patch literal 409 zcmV;K0cQS*P)Px$Q%OWYR5*>blrc*}Q5462&kPD4wM5B_lF%m^VS`jlYtg1b%-j;ycPNp?D{r#r%{( zDB68n1ws$=-+KShoy0ETAc=RsN%J4$09;OJGo{;B2pxdVt%`g7F%Wh;U%l6f zz$=lE$vvZ=6bWQv=GGj8OuUl`xt_iQ!fwkQ<#q)tg#BGMy)0soCC9o>K&Bx4?@r&l zs{gz_4@C(tC!qpJE==i~rw#zK5xsowDdUB=_S*aa-qL2pHe>Z_00000NkvXXu0mjf D0gki} literal 0 HcmV?d00001 diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index 7da0ea8f42..89aa499e84 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -326,6 +326,12 @@ namespace CalamityMod.NPCs.Abyss { Dust.NewDust(NPC.position, NPC.width, NPC.height, 139, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("LuminousCorvina").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("LuminousCorvina2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("LuminousCorvina3").Type, 1f); + } } } } diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index ea03aac09f..7fa9262eec 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -129,6 +129,12 @@ namespace CalamityMod.NPCs.Abyss { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("MorayEel").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("MorayEel2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("MorayEel3").Type, 1f); + } } } } diff --git a/NPCs/Abyss/OarfishBody.cs b/NPCs/Abyss/OarfishBody.cs index 6b605de16d..18d2a3a209 100644 --- a/NPCs/Abyss/OarfishBody.cs +++ b/NPCs/Abyss/OarfishBody.cs @@ -137,6 +137,8 @@ namespace CalamityMod.NPCs.Abyss { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("OarfishBody").Type, 1f); } } } diff --git a/NPCs/Abyss/OarfishHead.cs b/NPCs/Abyss/OarfishHead.cs index a9f818b180..bb142a2b19 100644 --- a/NPCs/Abyss/OarfishHead.cs +++ b/NPCs/Abyss/OarfishHead.cs @@ -349,6 +349,8 @@ namespace CalamityMod.NPCs.Abyss { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("OarfishHead").Type, 1f); } } diff --git a/NPCs/Abyss/OarfishTail.cs b/NPCs/Abyss/OarfishTail.cs index 4fec13d088..bdafdfc74a 100644 --- a/NPCs/Abyss/OarfishTail.cs +++ b/NPCs/Abyss/OarfishTail.cs @@ -137,6 +137,8 @@ namespace CalamityMod.NPCs.Abyss { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("OarfishTail").Type, 1f); } } } diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index d2e88be8e0..0faec74453 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -283,6 +283,12 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, 92, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("IceClasper").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("IceClasper2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("IceClasper3").Type, 1f); + } } } diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index c4463a4926..9016e7326d 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -284,6 +284,12 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ImpiousImmolator").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ImpiousImmolator2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("ImpiousImmolator3").Type, 1f); + } } } } diff --git a/NPCs/NormalNPCs/MantisShrimp.cs b/NPCs/NormalNPCs/MantisShrimp.cs index 391bb6be5d..bc7eeda2d9 100644 --- a/NPCs/NormalNPCs/MantisShrimp.cs +++ b/NPCs/NormalNPCs/MantisShrimp.cs @@ -138,6 +138,12 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("MantisShrimp").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("MantisShrimp2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("MantisShrimp3").Type, 1f); + } } } } diff --git a/NPCs/PlagueEnemies/Melter.cs b/NPCs/PlagueEnemies/Melter.cs index fa752e314a..6912725a29 100644 --- a/NPCs/PlagueEnemies/Melter.cs +++ b/NPCs/PlagueEnemies/Melter.cs @@ -81,6 +81,12 @@ namespace CalamityMod.NPCs.PlagueEnemies { Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Plague, hitDirection, -1f, 0, default, 1f); } + if (Main.netMode != NetmodeID.Server) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Melter").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Melter2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("Melter3").Type, 1f); + } } } From 8ef31a68d5353e253f5ad0067a22464e9bce6138 Mon Sep 17 00:00:00 2001 From: Memes <114233643+Mr-Memes@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:07:42 +0100 Subject: [PATCH 10/19] Improved Cinder Blossom Staff. --- Items/Weapons/Summon/CinderBlossomStaff.cs | 10 ++- Projectiles/Summon/Cinder.cs | 76 ++++------------- Projectiles/Summon/CinderBlossom.cs | 96 ++++++++++++---------- 3 files changed, 74 insertions(+), 108 deletions(-) diff --git a/Items/Weapons/Summon/CinderBlossomStaff.cs b/Items/Weapons/Summon/CinderBlossomStaff.cs index 351fe0e30b..82eb094474 100644 --- a/Items/Weapons/Summon/CinderBlossomStaff.cs +++ b/Items/Weapons/Summon/CinderBlossomStaff.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Cinder Blossom Staff"); - Tooltip.SetDefault("Summons a really hot flower over your head\n" + + Tooltip.SetDefault("Summons scorching flower over your head\n" + "There can only be one flower"); SacrificeTotal = 1; } @@ -21,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Summon { Item.damage = 25; Item.mana = 10; - Item.width = 46; - Item.height = 46; + Item.width = 50; + Item.height = 56; Item.useTime = Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -31,10 +31,11 @@ namespace CalamityMod.Items.Weapons.Summon Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item34; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { CalamityUtils.KillShootProjectiles(true, type, player); @@ -43,6 +44,7 @@ namespace CalamityMod.Items.Weapons.Summon Main.projectile[p].originalDamage = Item.damage; return false; } + public override void AddRecipes() { CreateRecipe(). diff --git a/Projectiles/Summon/Cinder.cs b/Projectiles/Summon/Cinder.cs index 7781c50d54..1f915803af 100644 --- a/Projectiles/Summon/Cinder.cs +++ b/Projectiles/Summon/Cinder.cs @@ -1,18 +1,17 @@ -using CalamityMod.Buffs.DamageOverTime; +using System.Security.Cryptography.X509Certificates; using Microsoft.Xna.Framework; -using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Summon { public class Cinder : ModProjectile { + public Player Owner => Main.player[Projectile.owner]; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public const float FallAcceleration = 0.185f; - public const float FallSpeedMax = 16; - public const float FallDelay = 300; public override void SetStaticDefaults() { DisplayName.SetDefault("Cinder"); @@ -21,9 +20,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetDefaults() { - Projectile.width = 6; + Projectile.width = 12; Projectile.height = 12; Projectile.friendly = true; + Projectile.tileCollide = false; Projectile.penetrate = 3; Projectile.timeLeft = 300; Projectile.usesIDStaticNPCImmunity = true; @@ -34,61 +34,17 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { - if (Projectile.velocity.X != Projectile.velocity.X) - { - Projectile.velocity.X *= -0.1f; - } - if (Projectile.velocity.X != Projectile.velocity.X) - { - Projectile.velocity.X *= -0.5f; - } - if (Projectile.velocity.Y != Projectile.velocity.Y && Projectile.velocity.Y > 1f) - { - Projectile.velocity.Y *= -0.5f; - } - Projectile.ai[0]++; - if (Projectile.ai[0] > 5f) - { - Projectile.ai[0] = 5f; - if (Projectile.velocity.Y == 0f && Projectile.velocity.X != 0f) - { - Projectile.velocity.X *= 0.97f; - if (Math.Abs(Projectile.velocity.X) < 0.01) - { - Projectile.velocity.X = 0f; - Projectile.netUpdate = true; - } - } - } + SpawnDust(); + Lighting.AddLight(Projectile.Center, Color.Orange.ToVector3()); + } - if (Projectile.ai[0] >= FallDelay && Projectile.velocity.Y < FallSpeedMax) - { - Projectile.velocity.Y += FallAcceleration; - } - - Projectile.rotation += Projectile.velocity.X * 0.1f; - int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); - Main.dust[idx].position += new Vector2(2f); - Main.dust[idx].scale += Main.rand.NextFloat(0.5f); - Main.dust[idx].noGravity = true; - Main.dust[idx].velocity.Y -= 2f; - if (Main.rand.NextBool(2)) - { - idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); - Main.dust[idx].position += new Vector2(2f); - Main.dust[idx].scale += 0.3f + Main.rand.NextFloat(0.5f); - Main.dust[idx].noGravity = true; - Main.dust[idx].velocity.Y -= 2f; - } - if (Projectile.velocity.Y < 0.25f && Projectile.velocity.Y > 0.15f) - { - Projectile.velocity.X *= 0.8f; - } - Projectile.rotation = -Projectile.velocity.X * 0.05f; - if (Projectile.velocity.Y > 16f) - { - Projectile.velocity.Y = 16f; - } + public void SpawnDust() + { + int bootlegTexture = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1f); + Main.dust[bootlegTexture].position += new Vector2(2f); + Main.dust[bootlegTexture].scale += 0.3f + Main.rand.NextFloat(0.5f); + Main.dust[bootlegTexture].noGravity = true; + Main.dust[bootlegTexture].velocity.Y -= 2f; } public override bool OnTileCollide(Vector2 oldVelocity) => false; diff --git a/Projectiles/Summon/CinderBlossom.cs b/Projectiles/Summon/CinderBlossom.cs index 532633b8c6..4cf387ca12 100644 --- a/Projectiles/Summon/CinderBlossom.cs +++ b/Projectiles/Summon/CinderBlossom.cs @@ -4,15 +4,21 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Summon { public class CinderBlossom : ModProjectile { - public float Time + public Player Owner => Main.player[Projectile.owner]; + + public CalamityPlayer moddedOwner => Owner.Calamity(); + + public float DelayBetweenShooting { get => Projectile.ai[0]; set => Projectile.ai[0] = value; } + public override void SetStaticDefaults() { DisplayName.SetDefault("Cinder Blossom"); @@ -22,73 +28,75 @@ namespace CalamityMod.Projectiles.Summon public override void SetDefaults() { - Projectile.width = 36; - Projectile.height = 40; + Projectile.width = 42; + Projectile.height = 42; Projectile.netImportant = true; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.minionSlots = 1f; - Projectile.timeLeft = 18000; Projectile.penetrate = -1; Projectile.tileCollide = false; - Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.DamageType = DamageClass.Summon; } public override void AI() { - bool isCorrectMinion = Projectile.type == ModContent.ProjectileType(); - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - player.AddBuff(ModContent.BuffType(), 3600); - if (isCorrectMinion) + CheckMinionExistance(); // Checks if the minion can still exist. + EffectWhenSpawned(); // Makes a dust effect when it spawns + + NPC potentialTarget = Projectile.Center.MinionHoming(1200f, Owner); + if (Projectile.owner == Main.myPlayer) { - if (player.dead) + if (potentialTarget != null) { - modPlayer.cinderBlossom = false; + if (DelayBetweenShooting % 35f == 0f) // Shoots once every 35 frames. + { + Vector2 velocity = CalamityUtils.CalculatePredictiveAimToTarget(Projectile.Center, potentialTarget, 20f); + int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + if (Main.projectile.IndexInRange(p)) + Main.projectile[p].originalDamage = Projectile.originalDamage; + Projectile.netUpdate = true; + } + DelayBetweenShooting++; + DelayBetweenShooting = (DelayBetweenShooting == 36f) ? 0f : DelayBetweenShooting; // The timer cannot go above 35. } - if (modPlayer.cinderBlossom) + } + + Projectile.Center = Owner.Center - Vector2.UnitY * 60f; + Projectile.rotation += MathHelper.ToRadians((potentialTarget is not null) ? 3f * (potentialTarget.Center.X - Projectile.Center.X > 0).ToDirectionInt() : 1.5f * Owner.direction); + // The projectile normally will spin in the direction of the player. + // If an enemy is detected, it will spin faster, in the direction of where the enemy is. + Lighting.AddLight(Projectile.Center, Color.Orange.ToVector3()); + } + + public void CheckMinionExistance() + { + Owner.AddBuff(ModContent.BuffType(), 1); + if (Projectile.type == ModContent.ProjectileType()) + { + if (Owner.dead) + { + moddedOwner.cinderBlossom = false; + } + if (moddedOwner.cinderBlossom) { Projectile.timeLeft = 2; } } - Projectile.Center = player.Center + Vector2.UnitY * (player.gfxOffY - 60f); - if (player.gravDir == -1f) - Projectile.position.Y += 120f; - Projectile.position.X = (int)Projectile.position.X; - Projectile.position.Y = (int)Projectile.position.Y; - Projectile.position = Projectile.position.Floor(); - Projectile.rotation += MathHelper.ToRadians(1.5f) * player.direction; + } + public void EffectWhenSpawned() + { if (Projectile.localAI[0] == 0f) { - Initialize(player); - Projectile.localAI[0] = 1f; - } - if (Projectile.owner == Main.myPlayer) - { - NPC potentialTarget = Projectile.Center.MinionHoming(700f, player); - if (potentialTarget != null) + for (int i = 0; i < 36; i++) { - if (Time++ % 35f == 34f && Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, potentialTarget.position, potentialTarget.width, potentialTarget.height)) - { - Vector2 velocity = Projectile.SafeDirectionTo(potentialTarget.Center) * Main.rand.NextFloat(10f, 18f); - int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = Projectile.originalDamage; - } + Dust dust = Dust.NewDustPerfect(Projectile.Center, 6); + dust.noGravity = true; + dust.velocity = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(2f, 6f); } - } - Lighting.AddLight(Projectile.Center, Color.Orange.ToVector3()); - } - public void Initialize(Player player) - { - for (int i = 0; i < 36; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, 6); - dust.noGravity = true; - dust.velocity = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(2f, 6f); + Projectile.localAI[0] = 1f; } } From e8ab5ce07a850f1dbf1782d1db3cfb3809adb71d Mon Sep 17 00:00:00 2001 From: Memes <114233643+Mr-Memes@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:19:07 +0100 Subject: [PATCH 11/19] Applied Ozz's requested change. --- Projectiles/Summon/Cinder.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Projectiles/Summon/Cinder.cs b/Projectiles/Summon/Cinder.cs index 1f915803af..04dc668e6b 100644 --- a/Projectiles/Summon/Cinder.cs +++ b/Projectiles/Summon/Cinder.cs @@ -1,5 +1,4 @@ -using System.Security.Cryptography.X509Certificates; -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; From 4c76c41a1bb41af9c00de68c31a306bfb697ea07 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Fri, 6 Jan 2023 09:41:38 -0600 Subject: [PATCH 12/19] Big hive built by Queen Bee simps. --- Systems/WorldgenManagementSystem.cs | 30 ++- Tiles/VernalSoil.cs | 4 +- World/MiscWorldgenRoutines.cs | 343 +++++++++++++++++++++++++++- 3 files changed, 365 insertions(+), 12 deletions(-) diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index dcf531afdd..ebea619fad 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Systems int islandIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Floating Island Houses")); if (islandIndex != -1) { - tasks.Insert(islandIndex + 2, new PassLegacy("EvilIsland", (progress, config) => + tasks.Insert(islandIndex + 2, new PassLegacy("Evil Island", (progress, config) => { progress.Message = "Corrupting a floating island"; WorldEvilIsland.PlaceEvilIsland(); @@ -52,6 +52,20 @@ namespace CalamityMod.Systems CustomTemple.NewJungleTemple(); }); + int hiveIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Hives")); + tasks[JungleTempleIndex] = new PassLegacy("Giant Hive", (progress, config) => + { + progress.Message = "Building a giant beehive"; + int attempts = 0; + while (attempts < 1000) + { + attempts++; + Point origin = WorldGen.RandomWorldPoint((int)Main.worldSurface, 20, Main.maxTilesY - (int)Main.worldSurface - 100, 20); + if (MiscWorldgenRoutines.CanPlaceGiantHive(origin, WorldGen.structures)) + break; + } + }); + int JungleTempleIndex2 = tasks.FindIndex(genpass => genpass.Name.Equals("Temple")); tasks[JungleTempleIndex2] = new PassLegacy("Temple", (progress, config) => { @@ -66,7 +80,7 @@ namespace CalamityMod.Systems int TrapsIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Traps")); if (TrapsIndex != -1) { - tasks.Insert(TrapsIndex + 1, new PassLegacy("SunkenSea", (progress, config) => + tasks.Insert(TrapsIndex + 1, new PassLegacy("Sunken Sea", (progress, config) => { progress.Message = "Partially flooding an overblown desert"; int sunkenSeaX = WorldGen.UndergroundDesertLocation.Left; @@ -88,7 +102,7 @@ namespace CalamityMod.Systems if (FinalIndex != -1) { int currentFinalIndex = FinalIndex; - tasks.Insert(++currentFinalIndex, new PassLegacy("GemDepthAdjustment", (progress, config) => + tasks.Insert(++currentFinalIndex, new PassLegacy("Gem Depth Adjustment", (progress, config) => { progress.Message = "Reallocating gem deposits to match cavern depth"; MiscWorldgenRoutines.SmartGemGen(); @@ -98,7 +112,7 @@ namespace CalamityMod.Systems //Not touching this yet because the Crags will be reworked in the future #region BrimstoneCrag - tasks.Insert(++currentFinalIndex, new PassLegacy("BrimstoneCrag", (progress, config) => + tasks.Insert(++currentFinalIndex, new PassLegacy("Brimstone Crag", (progress, config) => { progress.Message = "Uncovering the ruins of a fallen empire"; @@ -134,21 +148,21 @@ namespace CalamityMod.Systems int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); if (SulphurIndex != -1) { - tasks.Insert(SulphurIndex + 1, new PassLegacy("SulphurSea", (progress, config) => + tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur Sea", (progress, config) => { progress.Message = "Polluting one of the oceans"; SulphurousSea.PlaceSulphurSea(); })); } - tasks.Insert(++currentFinalIndex, new PassLegacy("SpecialShrines", (progress, config) => + tasks.Insert(++currentFinalIndex, new PassLegacy("Special Shrines", (progress, config) => { progress.Message = "Placing hidden shrines"; UndergroundShrines.PlaceShrines(); })); - tasks.Insert(++currentFinalIndex, new PassLegacy("DraedonStructures", (progress, config) => + tasks.Insert(++currentFinalIndex, new PassLegacy("Draedon Structures", (progress, config) => { progress.Message = "Rust and Dust"; List workshopPositions = new List(); @@ -191,7 +205,7 @@ namespace CalamityMod.Systems Abyss.PlaceAbyss(); })); - tasks.Insert(++currentFinalIndex, new PassLegacy("SulphurSea2", (progress, config) => + tasks.Insert(++currentFinalIndex, new PassLegacy("Sulphur Sea 2", (progress, config) => { progress.Message = "Further polluting one of the oceans"; SulphurousSea.SulphurSeaGenerationAfterAbyss(); diff --git a/Tiles/VernalSoil.cs b/Tiles/VernalSoil.cs index c3b0701f73..87402dc7cd 100644 --- a/Tiles/VernalSoil.cs +++ b/Tiles/VernalSoil.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Tiles } } - if (placeBulb) + /*if (placeBulb) { WorldGen.Place2x2(i, j2, TileID.PlanteraBulb, 0); WorldGen.SquareTileFrame(i, j2); @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles WorldGen.SquareTileFrame(i - 1, j2); if (Main.tile[i, j2].TileType == TileID.PlanteraBulb && Main.netMode == NetmodeID.Server) NetMessage.SendTileSquare(-1, i, j2, 5); - } + }*/ } } } diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index 130ec4a78b..82fb705fce 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Materials; using CalamityMod.Items.Potions; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Tiles; @@ -15,6 +16,7 @@ using Terraria; using Terraria.ID; using Terraria.IO; using Terraria.ModLoader; +using Terraria.Utilities; using Terraria.WorldBuilding; namespace CalamityMod.World @@ -175,6 +177,343 @@ namespace CalamityMod.World } #endregion + #region Giant Hive + public static bool CanPlaceGiantHive(Point origin, StructureMap structures) + { + if (!structures.CanPlace(new Rectangle(origin.X - 50, origin.Y - 50, 100, 100))) + return false; + + if (TooCloseToImportantLocations(origin)) + return false; + + Ref ref1 = new Ref(0); + Ref ref2 = new Ref(0); + Ref ref3 = new Ref(0); + WorldUtils.Gen(origin, new Shapes.Circle(15), Actions.Chain(new Modifiers.IsSolid(), new Actions.Scanner(ref1), new Modifiers.OnlyTiles(60, 59), new Actions.Scanner(ref2), new Modifiers.OnlyTiles(60), new Actions.Scanner(ref3))); + if (ref2.Value / (float)ref1.Value < 0.75f || ref3.Value < 2) + return false; + + int num = 0; + int[] array = new int[1000]; + int[] array2 = new int[1000]; + Vector2 vector = origin.ToVector2(); + int numHiveTunnels = WorldGen.genRand.Next(10, 13); + + for (int i = 0; i < numHiveTunnels; i++) + { + Vector2 vector2 = vector; + int num3 = WorldGen.genRand.Next(2, 5); + for (int j = 0; j < num3; j++) + vector2 = CreateHiveTunnel((int)vector.X, (int)vector.Y, WorldGen.genRand); + + vector = vector2; + array[num] = (int)vector.X; + array2[num] = (int)vector.Y; + num++; + } + + FrameOutAllHiveContents(origin, 50); + + for (int k = 0; k < num; k++) + { + int num4 = array[k]; + int y = array2[k]; + int num5 = 1; + if (WorldGen.genRand.NextBool()) + num5 = -1; + + bool flag = false; + while (WorldGen.InWorld(num4, y, 10) && BadSpotForHoneyFall(num4, y)) + { + num4 += num5; + if (Math.Abs(num4 - array[k]) > 50) + { + flag = true; + break; + } + } + + if (!flag) + { + num4 += num5; + if (!SpotActuallyNotInHive(num4, y)) + { + CreateBlockedHoneyCube(num4, y); + CreateDentForHoneyFall(num4, y, num5); + } + } + } + + CreateStandForLarva(vector); + + for (int l = 0; l < 1000; l++) + { + Vector2 vector3 = vector; + vector3.X += WorldGen.genRand.Next(-50, 51); + vector3.Y += WorldGen.genRand.Next(-50, 51); + if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(vector, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + { + CreateStandForLarva(vector3); + break; + } + } + + structures.AddProtectedStructure(new Rectangle(origin.X - 50, origin.Y - 50, 100, 100), 5); + return true; + } + + private static void FrameOutAllHiveContents(Point origin, int squareHalfWidth) + { + int num = Math.Max(10, origin.X - squareHalfWidth); + int num2 = Math.Min(Main.maxTilesX - 10, origin.X + squareHalfWidth); + int num3 = Math.Max(10, origin.Y - squareHalfWidth); + int num4 = Math.Min(Main.maxTilesY - 10, origin.Y + squareHalfWidth); + for (int i = num; i < num2; i++) + { + for (int j = num3; j < num4; j++) + { + Tile tile = Main.tile[i, j]; + if (tile.HasTile && tile.TileType == TileID.Hive) + WorldGen.SquareTileFrame(i, j); + + if (tile.WallType == WallID.HiveUnsafe) + WorldGen.SquareWallFrame(i, j); + } + } + } + + private static Vector2 CreateHiveTunnel(int i, int j, UnifiedRandom random) + { + double num = random.Next(20, 26); + float num2 = random.Next(30, 41); + float num3 = Main.maxTilesX / 4200; + num3 = (num3 + 1f) / 2f; + num *= (double)num3; + num2 *= num3; + + double num4 = num; + Vector2 result = default; + result.X = i; + result.Y = j; + Vector2 vector = default; + vector.X = random.Next(-10, 11) * 0.2f; + vector.Y = random.Next(-10, 11) * 0.2f; + while (num > 0.0 && num2 > 0f) + { + if (result.Y > (Main.maxTilesY - 250)) + num2 = 0f; + + num = num4 * (double)(1f + random.Next(-20, 20) * 0.01f); + num2 -= 1f; + int num5 = (int)(result.X - num); + int num6 = (int)(result.X + num); + int num7 = (int)(result.Y - num); + int num8 = (int)(result.Y + num); + if (num5 < 1) + num5 = 1; + + if (num6 > Main.maxTilesX - 1) + num6 = Main.maxTilesX - 1; + + if (num7 < 1) + num7 = 1; + + if (num8 > Main.maxTilesY - 1) + num8 = Main.maxTilesY - 1; + + for (int k = num5; k < num6; k++) + { + for (int l = num7; l < num8; l++) + { + if (!WorldGen.InWorld(k, l, 50)) + { + num2 = 0f; + } + else + { + if (Main.tile[k - 10, l].WallType == WallID.LihzahrdBrickUnsafe) + num2 = 0f; + + if (Main.tile[k + 10, l].WallType == WallID.LihzahrdBrickUnsafe) + num2 = 0f; + + if (Main.tile[k, l - 10].WallType == WallID.LihzahrdBrickUnsafe) + num2 = 0f; + + if (Main.tile[k, l + 10].WallType == WallID.LihzahrdBrickUnsafe) + num2 = 0f; + } + + if (l < Main.worldSurface && Main.tile[k, l - 5].WallType == WallID.None) + num2 = 0f; + + float num9 = Math.Abs(k - result.X); + float num10 = Math.Abs(l - result.Y); + double num11 = Math.Sqrt(num9 * num9 + num10 * num10); + if (num11 < num4 * 0.4 * (1.0 + random.Next(-10, 11) * 0.005)) + { + Main.tile[k, l].LiquidAmount = byte.MaxValue; + Main.tile[k, l].Get().LiquidType = LiquidID.Honey; + Main.tile[k, l].WallType = WallID.HiveUnsafe; + Main.tile[k, l].Get().HasTile = false; + Main.tile[k, l].Get().IsHalfBlock = false; + Main.tile[k, l].Get().Slope = SlopeType.Solid; + } + else if (num11 < num4 * 0.75 * (1.0 + random.Next(-10, 11) * 0.005)) + { + Main.tile[k, l].LiquidAmount = 0; + if (Main.tile[k, l].WallType != WallID.HiveUnsafe) + { + Main.tile[k, l].Get().HasTile = true; + Main.tile[k, l].Get().IsHalfBlock = false; + Main.tile[k, l].Get().Slope = SlopeType.Solid; + Main.tile[k, l].TileType = TileID.Hive; + } + } + + if (num11 < num4 * 0.6 * (1.0 + random.Next(-10, 11) * 0.005)) + { + Main.tile[k, l].WallType = WallID.HiveUnsafe; + if (random.NextBool()) + { + Main.tile[k, l].LiquidAmount = byte.MaxValue; + Main.tile[k, l].Get().LiquidType = LiquidID.Honey; + } + } + } + } + + result += vector; + num2 -= 1f; + vector.Y += random.Next(-10, 11) * 0.05f; + vector.X += random.Next(-10, 11) * 0.05f; + } + + return result; + } + + private static bool TooCloseToImportantLocations(Point origin) + { + int x = origin.X; + int y = origin.Y; + int num = 150; + for (int i = x - num; i < x + num; i += 10) + { + if (i <= 0 || i > Main.maxTilesX - 1) + continue; + + for (int j = y - num; j < y + num; j += 10) + { + if (j > 0 && j <= Main.maxTilesY - 1) + { + if (Main.tile[i, j].HasTile && Main.tile[i, j].TileType == TileID.LihzahrdBrick) + return true; + + if (Main.tile[i, j].WallType == WallID.CrimstoneUnsafe || Main.tile[i, j].WallType == WallID.EbonstoneUnsafe || Main.tile[i, j].WallType == WallID.LihzahrdBrickUnsafe) + return true; + } + } + } + + return false; + } + + private static void CreateDentForHoneyFall(int x, int y, int dir) + { + dir *= -1; + y++; + int num = 0; + while ((num < 4 || WorldGen.SolidTile(x, y)) && x > 10 && x < Main.maxTilesX - 10) + { + num++; + x += dir; + if (WorldGen.SolidTile(x, y)) + { + WorldGen.PoundTile(x, y); + if (!Main.tile[x, y + 1].HasTile) + { + Main.tile[x, y + 1].Get().HasTile = true; + Main.tile[x, y + 1].TileType = TileID.Hive; + } + } + } + } + + private static void CreateBlockedHoneyCube(int x, int y) + { + for (int i = x - 1; i <= x + 2; i++) + { + for (int j = y - 1; j <= y + 2; j++) + { + if (i >= x && i <= x + 1 && j >= y && j <= y + 1) + { + Main.tile[i, j].Get().HasTile = false; + Main.tile[i, j].LiquidAmount = byte.MaxValue; + Main.tile[i, j].Get().LiquidType = LiquidID.Honey; + } + else + { + Main.tile[i, j].Get().HasTile = true; + Main.tile[i, j].TileType = TileID.Hive; + } + } + } + } + + private static bool SpotActuallyNotInHive(int x, int y) + { + for (int i = x - 1; i <= x + 2; i++) + { + for (int j = y - 1; j <= y + 2; j++) + { + if (i < 10 || i > Main.maxTilesX - 10) + return true; + + if (Main.tile[i, j].HasTile && Main.tile[i, j].TileType != TileID.Hive) + return true; + } + } + + return false; + } + + private static bool BadSpotForHoneyFall(int x, int y) + { + if (Main.tile[x, y].HasTile && Main.tile[x, y + 1].HasTile && Main.tile[x + 1, y].HasTile) + return !Main.tile[x + 1, y + 1].HasTile; + + return true; + } + + public static void CreateStandForLarva(Vector2 position) + { + WorldGen.larvaX[WorldGen.numLarva] = Utils.Clamp((int)position.X, 5, Main.maxTilesX - 5); + WorldGen.larvaY[WorldGen.numLarva] = Utils.Clamp((int)position.Y, 5, Main.maxTilesY - 5); + WorldGen.numLarva++; + if (WorldGen.numLarva >= WorldGen.larvaX.Length) + WorldGen.numLarva = WorldGen.larvaX.Length - 1; + + int num = (int)position.X; + int num2 = (int)position.Y; + for (int i = num - 1; i <= num + 1 && i > 0 && i < Main.maxTilesX; i++) + { + for (int j = num2 - 2; j <= num2 + 1 && j > 0 && j < Main.maxTilesY; j++) + { + if (j != num2 + 1) + { + Main.tile[i, j].Get().HasTile = false; + continue; + } + + Main.tile[i, j].Get().HasTile = true; + Main.tile[i, j].TileType = TileID.Hive; + Main.tile[i, j].Get().Slope = SlopeType.Solid; + Main.tile[i, j].Get().IsHalfBlock = false; + } + } + } + #endregion + #region Place Rox Shrine public static void PlaceRoxShrine() { @@ -189,7 +528,7 @@ namespace CalamityMod.World { if ((Main.tile[x, y].TileFrameX == 18 && Main.tile[x, y].TileFrameY == 0) || (Main.tile[x, y].TileFrameX == 45 && Main.tile[x, y].TileFrameY == 0)) { - if (WorldGen.genRand.Next(3) == 0) + if (WorldGen.genRand.NextBool(3)) { for (int dx = -1; dx < 2; dx++) { From 2ac4dbb7a54236dd3678a73f8934462405c0bd00 Mon Sep 17 00:00:00 2001 From: AquaSG Date: Fri, 6 Jan 2023 00:13:49 -0500 Subject: [PATCH 13/19] Reworked Ethereal Subjugator A variable was added to superhoming to adjust how much predictiveness is incorporated into the vector. this is so that the projectile doesn't go funky mode and copy all npc movement when extra updates are in the equation. plus, other people can use it if they want to for other situations. by default, it is 1f which keeps the predictiveness at normal behaviour. all other instances of superhoming still work as they did before the added variable, with no changes to their code. --- Items/Weapons/Summon/EtherealSubjugator.cs | 5 +- Projectiles/Summon/GhostFire.cs | 124 +++++++++++++++++---- Projectiles/Summon/PhantomGuy.cs | 38 +++++-- Utilities/ProjectileUtils.cs | 6 +- 4 files changed, 138 insertions(+), 35 deletions(-) diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index 17c2215f30..49ec3e3d51 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -15,14 +15,13 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Ethereal Subjugator"); - Tooltip.SetDefault("Summons a phantom to protect you\n" + - "Each phantom takes only half of a minion slot"); + Tooltip.SetDefault("Summons a phantom to protect you"); SacrificeTotal = 1; } public override void SetDefaults() { - Item.damage = 45; + Item.damage = 200; Item.mana = 10; Item.width = 66; Item.height = 70; diff --git a/Projectiles/Summon/GhostFire.cs b/Projectiles/Summon/GhostFire.cs index 855bfd6bce..b8533cfe3a 100644 --- a/Projectiles/Summon/GhostFire.cs +++ b/Projectiles/Summon/GhostFire.cs @@ -1,49 +1,135 @@ -using Microsoft.Xna.Framework; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Summon { public class GhostFire : ModProjectile { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public bool ableToHit = true; + public NPC target; public override void SetStaticDefaults() { - DisplayName.SetDefault("Fire"); + DisplayName.SetDefault("Ghastly Particle"); ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; } public override void SetDefaults() { - Projectile.width = 4; - Projectile.height = 4; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 80; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 50; + Projectile.penetrate = 200; + Projectile.extraUpdates = 3; + Projectile.timeLeft = 600; Projectile.minion = true; Projectile.minionSlots = 0f; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 50; Projectile.DamageType = DamageClass.Summon; } + public override bool? CanDamage() => ableToHit ? (bool?)null : false; public override void AI() { - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 6f) + Player player = Main.player[Projectile.owner]; + Projectile.localAI[0] += 1f / (Projectile.extraUpdates + 1); + + if (Projectile.penetrate < 200) //If an enemy has already been hit by the projectile, prevents any further homing capabilities { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity * 0.25f; - Projectile.alpha = 255; - int num448 = Dust.NewDust(vector33, 1, 1, 180, 0f, 0f, 0, default, 0.2f); - Main.dust[num448].position = vector33; - Main.dust[num448].noGravity = true; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[num448].velocity *= 0.2f; + if (Projectile.timeLeft > 60) { Projectile.timeLeft = 60; } //The projectile start shrinking and slowing down. it can still hit for a bit during this, to allow a bit of multi-target if the enemies are really close to eachother. + Projectile.velocity *= 0.88f; } + else if (Projectile.localAI[0] < 60f) //If the projectile hasn't been alive for 1 second yet, slow it down more every frame and prevent any homing capabilities. + { + Projectile.velocity *= 0.93f; + } + else FindTarget(player); //No barricades stand in our way. FIND AND KILL! + + if (Projectile.timeLeft <= 20) //removes projectile's ability to hit when it is super close to death because it will have been visually shrunk to almost nothing in PreDraw + { + ableToHit = false; + } + } + public void FindTarget(Player player) + { + float maxDistance = 3000f; + bool foundTarget = false; + if (player.HasMinionAttackTargetNPC) //Targetted enemy takes priority for homing no matter what. + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(Projectile, false)) + { + float targetDist = Vector2.Distance(npc.Center, Projectile.Center); + if (targetDist < maxDistance) + { + maxDistance = targetDist; + foundTarget = true; + target = npc; + } + } + } + if (!foundTarget) + { + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + { + NPC npc = Main.npc[npcIndex]; + if (npc.CanBeChasedBy(Projectile, false)) + { + float targetDist = Vector2.Distance(npc.Center, Projectile.Center); + if (targetDist < maxDistance) + { + maxDistance = targetDist; + foundTarget = true; + target = npc; + } + } + } + } + if (!foundTarget) //If the enemy that the projectile was heading towards died prematurely, slow down the projectile if there are no new targets. + { + Projectile.velocity *= 0.98f; + } + else KillTheThing(target); //If there is an npc found, seek and destroy. + } + public void KillTheThing(NPC npc) + { + Projectile.velocity = Projectile.SuperhomeTowardsTarget(npc, 50f/(Projectile.extraUpdates+1), 60f / (Projectile.extraUpdates + 1), 1f / (Projectile.extraUpdates + 1)); //predictionStrength is lessened to account for extra updates, otherwise the projectile tends to copy fast NPC movement 1:1. Not Cool. + } + public override bool PreDraw(ref Color lightColor) //photoviscerator ball drawcode, slightly edited + { + Texture2D lightTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 32f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; + Color color = Color.Lerp(Color.Cyan, Color.LightBlue, colorInterpolation) * 0.4f; + color.A = 0; + Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2 (-28f, -28f); //Last vector is to offset the circle so that it is displayed where the hitbox actually is, instead of a bit down and to the right. + Color outerColor = color; + Color innerColor = color * 0.5f; + float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); + intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); + if (Projectile.timeLeft <= 60) //Shrinks to nothing when projectile is nearing death + { + intensity *= Projectile.timeLeft / 60f; + } + // Become smaller the futher along the old positions we are. + Vector2 outerScale = new Vector2(1f) * intensity; + Vector2 innerScale = new Vector2(1f) * intensity * 0.7f; + outerColor *= intensity; + innerColor *= intensity; + Main.EntitySpriteDraw(lightTexture, drawPosition, null, outerColor, 0f, lightTexture.Size() * 0.5f, outerScale * 0.6f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(lightTexture, drawPosition, null, innerColor, 0f, lightTexture.Size() * 0.5f, innerScale * 0.6f, SpriteEffects.None, 0); + } + return false; } } } diff --git a/Projectiles/Summon/PhantomGuy.cs b/Projectiles/Summon/PhantomGuy.cs index e22c0e9ae4..c72e629c16 100644 --- a/Projectiles/Summon/PhantomGuy.cs +++ b/Projectiles/Summon/PhantomGuy.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.netImportant = true; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.minionSlots = 0.5f; + Projectile.minionSlots = 1f; Projectile.timeLeft = 18000; Projectile.penetrate = -1; Projectile.tileCollide = false; @@ -36,6 +36,9 @@ namespace CalamityMod.Projectiles.Summon Projectile.DamageType = DamageClass.Summon; } + public int shootTimeCounter = 0; + bool canShoot = false; + public override void AI() { Player player = Main.player[Projectile.owner]; @@ -80,7 +83,7 @@ namespace CalamityMod.Projectiles.Summon if (npc.CanBeChasedBy(Projectile, false)) { float num646 = Vector2.Distance(npc.Center, Projectile.Center); - if (!flag25 && num646 < num633) + if (num646 < num633) { num633 = num646; vector46 = npc.Center; @@ -194,24 +197,37 @@ namespace CalamityMod.Projectiles.Summon } if (Projectile.ai[0] == 0f) { - float scaleFactor3 = 6f; - int num658 = ModContent.ProjectileType(); if (flag25 && Projectile.ai[1] == 0f) { - SoundEngine.PlaySound(SoundID.Item20, Projectile.position); Projectile.ai[1] += 1f; if (Main.myPlayer == Projectile.owner) { - Vector2 value19 = vector46 - Projectile.Center; - value19.Normalize(); - value19 *= scaleFactor3; - int p = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, value19.X, value19.Y, num658, Projectile.damage, 0f, Main.myPlayer, 0f, 0f); - if (Main.projectile.IndexInRange(p)) - Main.projectile[p].originalDamage = Projectile.originalDamage; + canShoot = true; Projectile.netUpdate = true; } } } + if (canShoot) + { + shootTimeCounter++; + + if (shootTimeCounter % 20 == 0 && shootTimeCounter <= 60) + { + SoundEngine.PlaySound(SoundID.Item20, Projectile.position); + float randomRadius = Main.rand.Next(10, 14); + Vector2 randomVelocity = Main.rand.NextVector2CircularEdge(randomRadius, randomRadius); + Projectile.velocity -= randomVelocity*0.22f; //funny recoil + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, randomVelocity.X, randomVelocity.Y, ModContent.ProjectileType(), Projectile.damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.netUpdate = true; + } + if (shootTimeCounter > 200) + { + canShoot = false; + shootTimeCounter = 0; + Projectile.netUpdate = true; + } + + } } public override Color? GetAlpha(Color lightColor) diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index c3ba722111..08d11d7696 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -152,9 +152,11 @@ namespace CalamityMod /// The projectile that should home. /// The target. /// The inertia of the movement change. - public static Vector2 SuperhomeTowardsTarget(this Projectile projectile, NPC target, float homingSpeed, float inertia) + /// The ratio for how much the projectile aims ahead of the target. 1f is normal predictiveness. 0.01f is the lowest possible value, equating to no practical predictiveness. + public static Vector2 SuperhomeTowardsTarget(this Projectile projectile, NPC target, float homingSpeed, float inertia, float predictionStrength = 1f) { - Vector2 idealVelocity = CalculatePredictiveAimToTarget(projectile.Center, target, homingSpeed); + if (predictionStrength < 0.01f) { predictionStrength = 0.01f; } + Vector2 idealVelocity = CalculatePredictiveAimToTarget(projectile.Center, target, homingSpeed/predictionStrength) * predictionStrength; return (projectile.velocity * (inertia - 1f) + idealVelocity) / inertia; } #endregion From 357b8dbdd87991134ffe5d02e0935c3479ddf838 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:51:07 +0700 Subject: [PATCH 14/19] furniture toggle sound + candle changes --- Tiles/Furniture/ChaosCandle.cs | 2 +- Tiles/Furniture/Fountains/AbyssFountainTile.cs | 3 +++ Tiles/Furniture/Fountains/AstralFountainTile.cs | 3 +++ Tiles/Furniture/Fountains/SulphurousFountainTile.cs | 3 +++ Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs | 3 +++ Tiles/Furniture/LanternCenterTile.cs | 2 ++ Tiles/Furniture/TranquilityCandle.cs | 2 +- 7 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Tiles/Furniture/ChaosCandle.cs b/Tiles/Furniture/ChaosCandle.cs index 15604d6fba..6d59836a4d 100644 --- a/Tiles/Furniture/ChaosCandle.cs +++ b/Tiles/Furniture/ChaosCandle.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Furniture public override bool RightClick(int i, int j) { - CalamityUtils.RightClickBreak(i, j); + CalamityUtils.LightHitWire(Type, i, j, 1, 1); return true; } } diff --git a/Tiles/Furniture/Fountains/AbyssFountainTile.cs b/Tiles/Furniture/Fountains/AbyssFountainTile.cs index 7d49acf4ea..4ee66d30dc 100644 --- a/Tiles/Furniture/Fountains/AbyssFountainTile.cs +++ b/Tiles/Furniture/Fountains/AbyssFountainTile.cs @@ -1,8 +1,10 @@ using CalamityMod.Items.Placeables.Furniture.Fountains; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -60,6 +62,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override bool RightClick(int i, int j) { CalamityUtils.LightHitWire(Type, i, j, 2, 4); + SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16)); return true; } diff --git a/Tiles/Furniture/Fountains/AstralFountainTile.cs b/Tiles/Furniture/Fountains/AstralFountainTile.cs index 042d6ae760..f9dd6e62f4 100644 --- a/Tiles/Furniture/Fountains/AstralFountainTile.cs +++ b/Tiles/Furniture/Fountains/AstralFountainTile.cs @@ -2,8 +2,10 @@ using CalamityMod.Items.Placeables.Furniture.Fountains; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -61,6 +63,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override bool RightClick(int i, int j) { CalamityUtils.LightHitWire(Type, i, j, 2, 4); + SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16)); return true; } diff --git a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs index 597f60a3f1..9312d146fe 100644 --- a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs +++ b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs @@ -1,8 +1,10 @@ using CalamityMod.Items.Placeables.Furniture.Fountains; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -60,6 +62,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override bool RightClick(int i, int j) { CalamityUtils.LightHitWire(Type, i, j, 2, 4); + SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16)); return true; } diff --git a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs index 4a8fb520f0..b1b21f8691 100644 --- a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs +++ b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.cs @@ -1,8 +1,10 @@ using CalamityMod.Items.Placeables.Furniture.Fountains; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -60,6 +62,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override bool RightClick(int i, int j) { CalamityUtils.LightHitWire(Type, i, j, 2, 4); + SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16)); return true; } diff --git a/Tiles/Furniture/LanternCenterTile.cs b/Tiles/Furniture/LanternCenterTile.cs index 5b903a48ad..fc0a3bbffe 100644 --- a/Tiles/Furniture/LanternCenterTile.cs +++ b/Tiles/Furniture/LanternCenterTile.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Placeables.Furniture; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent.Events; using Terraria.GameContent.ObjectInteractions; @@ -58,6 +59,7 @@ namespace CalamityMod.Tiles.Furniture { CalamityUtils.LightHitWire(Type, i, j, 3, 3); LanternNight.ToggleManualLanterns(); + SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16)); return true; } diff --git a/Tiles/Furniture/TranquilityCandle.cs b/Tiles/Furniture/TranquilityCandle.cs index 5002998856..67e621f03a 100644 --- a/Tiles/Furniture/TranquilityCandle.cs +++ b/Tiles/Furniture/TranquilityCandle.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Furniture public override bool RightClick(int i, int j) { - CalamityUtils.RightClickBreak(i, j); + CalamityUtils.LightHitWire(Type, i, j, 1, 1); return true; } } From 294ea3c5390b0c0513cb460e4820cced362145bc Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 7 Jan 2023 11:28:03 +0700 Subject: [PATCH 15/19] cal fountains are now off when placed like vanilla --- .../Furniture/Fountains/AbyssFountainTile.cs | 2 +- .../Furniture/Fountains/AbyssFountainTile.png | Bin 3268 -> 3393 bytes .../Fountains/AbyssFountainTile_Highlight.png | Bin 2050 -> 2583 bytes .../Furniture/Fountains/AstralFountainTile.cs | 2 +- .../Fountains/AstralFountainTile.png | Bin 2627 -> 3312 bytes .../AstralFountainTile_Highlight.png | Bin 2017 -> 2508 bytes .../Fountains/SulphurousFountainTile.cs | 2 +- .../Fountains/SulphurousFountainTile.png | Bin 3585 -> 3213 bytes .../SulphurousFountainTile_Highlight.png | Bin 1802 -> 2250 bytes .../Fountains/SunkenSeaFountainTile.cs | 2 +- .../Fountains/SunkenSeaFountainTile.png | Bin 3566 -> 3222 bytes .../SunkenSeaFountainTile_Highlight.png | Bin 2256 -> 2226 bytes 12 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tiles/Furniture/Fountains/AbyssFountainTile.cs b/Tiles/Furniture/Fountains/AbyssFountainTile.cs index 4ee66d30dc..b7cb48fa38 100644 --- a/Tiles/Furniture/Fountains/AbyssFountainTile.cs +++ b/Tiles/Furniture/Fountains/AbyssFountainTile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { - if (Main.tile[i, j].TileFrameX < 36) + if (Main.tile[i, j].TileFrameX >= 36) CalamityGlobalTile.SetActiveFountainColor(ModContent.Find("CalamityMod/AbyssWater").Slot); } diff --git a/Tiles/Furniture/Fountains/AbyssFountainTile.png b/Tiles/Furniture/Fountains/AbyssFountainTile.png index 68927bab257573bafc111d636657a0f2191435c7..145dd37d5c357648690c618b108982d83868db18 100644 GIT binary patch delta 3391 zcmXw5c|6nqA1_2@VXii1)ROX}q{MHJ|uy#DAmZ51wl~uC!cG!|Vd;EdC z!!b#t`uDH>;gZtNUDC>+1_8FL_w&TM5qH@-$v}q<3mm($$*;Ywf6~GV=etx85w-Mr z;n#ZO#_#osg`hFOZD5kSv^}45lN7#C!!`2wE@My9N+~({{&I|3j@i`I3xc+0z}$j) zSgoJc<~ft79bl*QTcZkLbPpzZstgo#UKt+m+*GVf>7=t0!8W?e$DPJ0$Uk6UtozC( z%qK(NdmJwU!x*?>Q0K6`y}8I%YmB^z>|4tP>LKYB*MXw>PE}0m(tSseam3?C&8l4R zL#9_u=w)6|nMb)6LWN=Q!2Vs@<7Pd2YQ&t<8>kXo#P4_1iaUXkdnZcMXQyVkBN55h zwbY-7J5Ph*sJkHV+(jgkX6T~dF8$`OabSvX!}+D8c-JU$s(Hw<;}Fw0^7gICj-94F zS)48jC=+*m!Thj~zA(I=Ko%x#t3AMPd`suwy^WtaMzkoS7VE;x2-nug?#lQGCv8|` z)B2u`AFV{V?t+JUoeJ>~L4rx#ESx;_FQm?rsAppNdxq3iJbDSmy<-yb+VYDRvb>!Is}X*_s!eguoP`nmFxmw$l>jC zx)fZ^&bes*(khP%!*Xs~h`OfiJ86O;KjDooa&&a!m{mv=1@q&IE`m?)*x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+g0n@5@!@b68UycS8(Ecl@>~c|XnNTYP6lx4O=KG}*ONy%-^=g0`qqD1rY)wGUZ} z?$CzuF9hF2EVDOQA`JH34wDra=rTpPL+p;nVN_XbvFJB-%EI{Xb$*0m3ZscVH1>*( zyMk>_IE<3JBdYk;N~$yg2TzvX1mEbx9%=ZwAffN2&WUlFk_v|(9v|b-Z70@Z_56(GDIov-39oSFY%R65qnMe9TBt#>pk|hr`3|Usj?q3r*O^6 zfxxJ`sx1pOxHXP3H@zG?D^5GtuT%SPs8uV~ON?p$;6Pfv!kmx>elJh5n&k7a0@(7* zGS0*|-#m3F1{5WK+{+^5>Wx61r;1rDvd`E_!>>F8zRl0j_gji1d-NU z`PIME#7;X@DaGZ889TAL)}8Ehu*lpItJdD%bA%z*C~@sRf%#I| zZu5WSs2=T8j>^X~0$!7YWW$ib@lO$I)lJ)+uqIrldyQM7&n6Eod3P%Z(T2DY%idQ? z2Dtk%xui2hktO?$DN+%j7avwMd1S{L#qP#-st?Grda72j!O`yJ><)SBs`nD*eB9r literal 2050 zcmeAS@N?(olHy`uVBq!ia0vp^ZVU{J3LMNpmYvpDS0Ke$9OUlAu&n@m4*1Hk ztvq}{?KEq(oaK}A=a1e0-y?kJRY=;OsT-|KC8O_ni#hqZs>O8}-v~^9#9pz{Z^z=Z zZ(h$m^YY}G&u4xPkW*5`mr1ic&GgIBUvCr(YSZvyU-{<${%7m&3^W2_4_x+hC zm-bp)?($Llsa9@f^x3AoL{ja{?8%oWe!P3~VyeiM)DQCSP7E}3yjx+s zy9F5f&A(&jcM5e$+*oSro(xPiI=JEQ o&7Xhw%O5KnNzv4(^7->;{?jV$KE{q(CZHnP)78&qol`;+0G!A0M*si- diff --git a/Tiles/Furniture/Fountains/AstralFountainTile.cs b/Tiles/Furniture/Fountains/AstralFountainTile.cs index f9dd6e62f4..8bcc5d495d 100644 --- a/Tiles/Furniture/Fountains/AstralFountainTile.cs +++ b/Tiles/Furniture/Fountains/AstralFountainTile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { - if (Main.tile[i, j].TileFrameX < 36) + if (Main.tile[i, j].TileFrameX >= 36) CalamityGlobalTile.SetActiveFountainColor(ModContent.Find("CalamityMod/AstralWater").Slot); } diff --git a/Tiles/Furniture/Fountains/AstralFountainTile.png b/Tiles/Furniture/Fountains/AstralFountainTile.png index 126498ac4dffdf97aba682a26641f3cada55e546..d727da44c550a656b6946c5ad52099f104a85dcb 100644 GIT binary patch literal 3312 zcmXY!c|26>AIHZwmPSm-gfbTmLt(D%cNt5vUyR09_GX0aStr|7q_Iwv3`$wXnl1Y_ znT#d7D_4<0mf?ySR0#DuUccX8=XpKndA+{p`JVUtbDooIV{IxZARzz(fdtLXjIhAf z1O(!M^MQd8|5u(!5D3z2Zgj%MRc%-1)f#5%#$$m8_yG{K6~2(oMkp4_h1~s zNy!?ATV{1@CY{QEAZ$2ZBy*qWi-$G~Co1qjWfge(&t_x!r@GA`R%WSZd6*qz-LYN_ zM(CI>lcBapZ8%ts+hay=?dmaET}*W3T3*u68fVQPEJOWo(^D0NN$@9eCOwld1wpgP zWgkM3NP};0J5TmDb4qE8QS09PDHf;GgfrZRp$uPULDhaozxG%s=RQXw!MqggX;E7- z5>%F3Q36GTOkX6vXS0LNuQW6?1Rmy8NY8nfzC`*S=f4mdi(osf2Fz(FH z-`VrsJ8tee{8XlLLAI1noL7+yQ;#GzzCS7yyYKR{{CfDQC-*k4pu&N=##;Be#L~%4 zRnnKfxwl%k9c`@09g8b?jV&f)UG2q5P+Ns0rC&aDf2Usrb5!{-w#noXwS?SGNP`v5 z3R^-V{U!unb@(OBHht^UnPYD2gO5cOh+|c=q<&HM7v<*+Q zYi8+0(KodZ>EHh*mj-TxuP&*$lAx#^(m(VoV)bsD96+CEK|VRC9ZevR;pe`zNaAxo8o-FrPv z)4m$9rq|6)m6`g&CJH4TSQV~u)Ci^EJEEHVv z+FEp-ZXYZ3)(cxMAnco$k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jSpp2X3g~LZJ&^q z_RFNI;IoJ@kjI@KSIqTU4_l|w<>f!s=1T2<`e!N7pOP1TyqFJ+65cQmn_?&B zgIedmWIjtiYdY~^_L3?)ll2PAoRgcqW1P>toi%rZ>CLjoT4{B&if7phMo<3B=a!tj55)~muoKQ zERHm`;bl{~6~^PenJpy1xI8Q87LV)as=v$|7*FgyH_2oXs08+O^>bP0l+XkKFs8f$ diff --git a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs index 9312d146fe..dd0c8e6797 100644 --- a/Tiles/Furniture/Fountains/SulphurousFountainTile.cs +++ b/Tiles/Furniture/Fountains/SulphurousFountainTile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains public override void NearbyEffects(int i, int j, bool closer) { - if (Main.tile[i, j].TileFrameX < 36) + if (Main.tile[i, j].TileFrameX >= 36) CalamityGlobalTile.SetActiveFountainColor(ModContent.Find("CalamityMod/SulphuricWater").Slot); } diff --git a/Tiles/Furniture/Fountains/SulphurousFountainTile.png b/Tiles/Furniture/Fountains/SulphurousFountainTile.png index 9dfcecd6e67659a9b8c9df043d35e419148b6335..ddbdeb221229ad8d8ff6e31463a235418162df2c 100644 GIT binary patch delta 3210 zcmV;540ZE?9E}-}BYzB1NklNmFqH zHbH0*G=&lZiiG$Ns(7LulPZv+(xi%~urM2MIxA(_ z_VB)1IHv4)C`{QoM%U0!7mi5o`S`Q(Xt9enqsh6g?0BLJfi_)sAVtMV6;H4*aKv4k zugR4GIi_mIq<@Zw!VH>YP(%OPb+?@APk(+|w$HqFP{hT4d{63JqvQGQmdE6)@x6n_ z6YUrZQ#2d4aa>W$p{!I4BBm^vN`Q?yq? zcE9=hWpav@t1daOWAHtxoKsaiu4AeSB(x<}6;H4*7=Q8pZTGuUhWT?>$QJ7_2>9xS z3*`NypPfjOYxIa0@%-qe`{esxU2;!uT=nZEBl7<9$Ht@Lp)iBy80{E1Lyvsnq*S@a za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`sxmSmDGUITBb>q+nk960#bdV4Sb@wx8YkeK!DCgS5w|Ca)j1o058&0o+=e$^ z_n`dds=#%9oQZPuK7Of~J`Q;ejnhVI7_D(F3t`UU`3%zcL|cUP_AbQLrAVHZ(L;IJ zy#sdNkWWyoZErKgRgAc1^?^=u*=!5uko>21!n~zi3vup;bc{0;cWLxrL_ft+r}VDL xuZRdbSqh^8)QCVgvskM^qLxH%QazEMR5OM_q`414{J@Ehl literal 1802 zcmeAS@N?(olHy`uVBq!ia0vp^ZVU{J3LMNpmYvpDS0Ke$9OUlAuo9D^~jayWjSAy2qP2C(o!Wm90uY)|EP;SnsgYiHqrF7t&qYC#75~ zlsR;6vQZ(2^{t-&7x$jrY*cqlru3M%U9)U%ns}+2y~ykg<2ZwBn#K2g>LV|tFUrn~ zS$^kY+8aqj^E)f&I9@V6ER&ihp9@r2K1EVRBKi2-S&}ttrM8`wja{~%Icixw!>Tl+ zmAS^xt!HjLEfec@aQ49~=eO)vFS|OSSj~8T$BmWqB(`}grsI4;S+7Zv z$AJ#=KXpX$O@{G5_wQ=wPyLWAz9Omrlc#LU%-Ab4{{-YLI$LotV)>a$mvN!EO}VEfDe=G_Q&J~#7BjZ)I`sN;Evv zWREMpvC$N6->~@X5Ba;ZZL}Y!p9xIg^ThbZ#k8`(^iR$kJIx-mCeJl`e)h|B)>^e) z&yJOzlFdCfPq6s#+*6V&vBqZt)4p9y`{Z2cKGU(uuGZ#}u_DK5t_4!?$6wYgzZuGgcWA3Y&8#qQHzzHgZJ uQodo;OrNaVXMXyny)km19;k4##;*SSgr(9GijKvCiYiZ6KbLh*2~7Y= 36) CalamityGlobalTile.SetActiveFountainColor(ModContent.Find("CalamityMod/SunkenSeaWater").Slot); } diff --git a/Tiles/Furniture/Fountains/SunkenSeaFountainTile.png b/Tiles/Furniture/Fountains/SunkenSeaFountainTile.png index e8ceb8d0a192244ef3735d0d93ce65e916306ad7..2e964dcf1a6385025526f0bbbfb04cfd5d32e0fe 100644 GIT binary patch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wIf*pS<+epDB zfgw+RAn;m6CF_lB!oQf+?lMKPrrN753$*qYvw=3pliW@_^H4CKhVCQXu8M;Sv<=nN zdb524Tn*Njlm*+Oo~i>%k%E?JUjGv1#_#+}}8kQC}w3Rlq}pE~j*A4}NyIO}t4Sfwa)B>>mVi zFMznq*YcrUm$u1NZJ@-5`n4BYL_iyXGSuy19YGW9t*LBS#K}DWMhp_zmGd2oq4OI1pg1-VOjP#CJ+WmJ3)O zoDVT@V}Wari)~t{6Av|CAC6PxJQ{ApM(r|IQ#QcaGWxP*Vj3#vIMdD^-hl1pg(vr2kcXEU%jsBQpxhIBrQg)2^l*_La^7Kj46?#%4w&L#L?!1C7q>W&i*H diff --git a/Tiles/Furniture/Fountains/SunkenSeaFountainTile_Highlight.png b/Tiles/Furniture/Fountains/SunkenSeaFountainTile_Highlight.png index 5866fcb8b8fa8491955c08b71ae70007ef9463ae..4364cf01eebd282d163d3eebd7822c97fb1f90ea 100644 GIT binary patch literal 2226 zcmY+Gdpy&9AI8VDkWo^*&>r;*qk~z{77;P+j3|Q zH7sG27K+Is@g$NQCZ%xWUfr+f^*qn_pYQkj?{mGb_v`w6DQH&*NpVGS5C|mcbaeSL}M&F#$hn&TwB1I@P;K z0#KfA=JsD3*>TB{YxjhpP@RrW0Cpe{gYZg|D@E`FscY+k^XftO)N;%Xt8!vr%fM;lBoy; zxV+gSyakWq4jd2vdc1Bua6vn1e64VgGdf_f)s&{h=LjMCRi& zJ>g+qUuO%zO2-@aReOaQZ`D!Fl7MlW;o+KI6Es45#%GdsoiF1w9g*f>kVZpNgQJJfMvrumEpg{o*d0+TDpk`~hJAHexR+ZdXeTicW^P9PI{RZ*Dm5 zuDn<9fT7e*;BX78Z_zcRJ$Quvzk71m+qD&y(*APcR z=PohuEPfk$PPly!@5WB~j&l?Gp40h@p(xb%&-vL~*o|lKE8ZOep-s_2L)peY$7EEX zEBLS7`&UxThQL8j&%Y<|;b5(w;Gua^9C27$g|@oW0922(g7hJ5Ae?aBec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E5(VyQH^dNnn?DNB{n1wamPBdvT&TVR+sW zG=mk@AT!c1tx=#H?UNo9wN%XxGvVZ$`LKZ0u-;TG?Uy-8(7;z!;Ud5CTv+-0`t-)Z zV0M`8_#!DA*>+#0v@D!=P&|Eze5Foe!CHlWmxA?&rv{tk<$4tj?n-e?te($stJBJra z^P^At^ySr%GuICB$ceIP!gGPggb;{m8}|i#pSg_XDOUX!K2)C`NFK From 972c211d1f517e12e4cda5f4d37f380a5f90c19f Mon Sep 17 00:00:00 2001 From: AquaSG Date: Sat, 7 Jan 2023 00:56:28 -0500 Subject: [PATCH 16/19] Fixed long-standing visual offset of photovisc projectiles The shader for these projectiles was always drawn a specific amount down and to the right of the hitbox --- Projectiles/Ranged/ExoFlare.cs | 2 +- Projectiles/Ranged/ExoLight.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Ranged/ExoFlare.cs b/Projectiles/Ranged/ExoFlare.cs index 1d4475778c..45e1e85147 100644 --- a/Projectiles/Ranged/ExoFlare.cs +++ b/Projectiles/Ranged/ExoFlare.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; Color color = Color.Lerp(Color.LightGreen, Color.LightPink, colorInterpolation) * 0.4f; color.A = 0; - Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-25f, -25f); Color outerColor = color; Color innerColor = color * 0.5f; float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); diff --git a/Projectiles/Ranged/ExoLight.cs b/Projectiles/Ranged/ExoLight.cs index eb4fe298d0..df4c7a12e3 100644 --- a/Projectiles/Ranged/ExoLight.cs +++ b/Projectiles/Ranged/ExoLight.cs @@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Ranged Color.SlateGray }) * Projectile.Opacity; color.A = 0; - Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); Color outerColor = color; Color innerColor = color * 0.5f; float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); From 2d8944fbb98012d380723d0103406d3dc763d667 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 7 Jan 2023 08:46:05 -0600 Subject: [PATCH 17/19] Added Honey Chests to the giant beehive. --- World/MiscWorldgenRoutines.cs | 175 ++++++++++++++++++++++++++++++++-- World/Planets/MudPlanet.cs | 94 +----------------- 2 files changed, 170 insertions(+), 99 deletions(-) diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index 82fb705fce..bddfb5e755 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -196,19 +196,19 @@ namespace CalamityMod.World int num = 0; int[] array = new int[1000]; int[] array2 = new int[1000]; - Vector2 vector = origin.ToVector2(); + Vector2 larvaLocation = origin.ToVector2(); int numHiveTunnels = WorldGen.genRand.Next(10, 13); for (int i = 0; i < numHiveTunnels; i++) { - Vector2 vector2 = vector; + Vector2 vector2 = larvaLocation; int num3 = WorldGen.genRand.Next(2, 5); for (int j = 0; j < num3; j++) - vector2 = CreateHiveTunnel((int)vector.X, (int)vector.Y, WorldGen.genRand); + vector2 = CreateHiveTunnel((int)larvaLocation.X, (int)larvaLocation.Y, WorldGen.genRand); - vector = vector2; - array[num] = (int)vector.X; - array2[num] = (int)vector.Y; + larvaLocation = vector2; + array[num] = (int)larvaLocation.X; + array2[num] = (int)larvaLocation.Y; num++; } @@ -244,20 +244,50 @@ namespace CalamityMod.World } } - CreateStandForLarva(vector); + CreateStandForLarva(larvaLocation); - for (int l = 0; l < 1000; l++) + // Generate a second larva stand + Vector2 secondLarvaLocation = default; + int maxAttempts = 1000; + for (int l = 0; l < maxAttempts; l++) { - Vector2 vector3 = vector; + Vector2 vector3 = larvaLocation; vector3.X += WorldGen.genRand.Next(-50, 51); vector3.Y += WorldGen.genRand.Next(-50, 51); - if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(vector, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(larvaLocation, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) { + secondLarvaLocation = vector3; CreateStandForLarva(vector3); break; } } + // Honey chests + Vector2 honeyChestLocation = default; + for (int l = 0; l < maxAttempts; l++) + { + Vector2 vector3 = larvaLocation; + vector3.X += WorldGen.genRand.Next(-100, 101); + vector3.Y += WorldGen.genRand.Next(-100, 101); + if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(larvaLocation, vector3) > 10f && Vector2.Distance(secondLarvaLocation, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + { + honeyChestLocation = vector3; + CreateStandAndPlaceHoneyChest(vector3); + break; + } + } + for (int l = 0; l < maxAttempts; l++) + { + Vector2 vector3 = larvaLocation; + vector3.X += WorldGen.genRand.Next(-100, 101); + vector3.Y += WorldGen.genRand.Next(-100, 101); + if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(larvaLocation, vector3) > 10f && Vector2.Distance(secondLarvaLocation, vector3) > 10f && Vector2.Distance(honeyChestLocation, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + { + CreateStandAndPlaceHoneyChest(vector3); + break; + } + } + structures.AddProtectedStructure(new Rectangle(origin.X - 50, origin.Y - 50, 100, 100), 5); return true; } @@ -512,6 +542,131 @@ namespace CalamityMod.World } } } + + public static void CreateStandAndPlaceHoneyChest(Vector2 position) + { + int chestPlacementX = Utils.Clamp((int)position.X, 5, Main.maxTilesX - 5); + int chestPlacementY = Utils.Clamp((int)position.Y, 5, Main.maxTilesY - 5); + + int num = (int)position.X; + int num2 = (int)position.Y; + for (int i = num; i <= num + 1 && i > 0 && i < Main.maxTilesX; i++) + { + for (int j = num2 - 1; j <= num2 + 1 && j > 0 && j < Main.maxTilesY; j++) + { + if (j != num2 + 1) + { + Main.tile[i, j].Get().HasTile = false; + continue; + } + + Main.tile[i, j].Get().HasTile = true; + Main.tile[i, j].TileType = TileID.Hive; + Main.tile[i, j].Get().Slope = SlopeType.Solid; + Main.tile[i, j].Get().IsHalfBlock = false; + } + } + + int num144 = chestPlacementX; + int num145 = chestPlacementY; + for (int num146 = num144; num146 <= num144 + 1; num146++) + { + for (int num147 = num145 - 1; num147 <= num145 + 1; num147++) + { + if (num147 != num145 + 1) + { + Main.tile[num146, num147].Get().HasTile = false; + } + else + { + Main.tile[num146, num147].Get().HasTile = true; + Main.tile[num146, num147].TileType = TileID.Hive; + Main.tile[num146, num147].Get().Slope = SlopeType.Solid; + Main.tile[num146, num147].Get().IsHalfBlock = false; + } + } + } + + int chestID = WorldGen.PlaceChest(num144, num145, 21, false, 29); + FillHoneyChest(chestID, WorldGen.genRand); + } + + // Honey chest stuff, this is also used by the Hive Planetoid + private static int[] FocusLootHoney = new int[] + { + ItemID.NaturesGift, + ItemID.Bezoar, + ItemID.FlowerBoots, + ItemID.BeeMinecart + }; + + private static int[] PotionLootHoney = new int[] + { + ItemID.LifeforcePotion, + ItemID.RegenerationPotion, + ItemID.ManaRegenerationPotion, + ItemID.HeartreachPotion, + ModContent.ItemType() + }; + + private static int[] BarLootHoney = new int[] + { + WorldGen.silverBar == TileID.Silver ? ItemID.SilverBar : ItemID.TungstenBar, + WorldGen.goldBar == TileID.Gold ? ItemID.GoldBar : ItemID.PlatinumBar + }; + + public static void FillHoneyChest(int id, UnifiedRandom random) + { + Chest chest = Main.chest[id]; + int index = 0; + + chest.item[index++].SetDefaults(random.Next(FocusLootHoney)); + + if (random.Next(3) <= 1) + { + chest.item[index].SetDefaults(random.Next(BarLootHoney)); + chest.item[index].SetDefaults(random.Next(7, 15)); + } + else + { + chest.item[index].SetDefaults(ItemID.GoldCoin); + chest.item[index++].stack = random.Next(3, 5); + } + + if (random.NextBool()) + { + chest.item[index].SetDefaults(random.Next(PotionLootHoney)); + chest.item[index++].stack = random.Next(1, 4); + } + else + { + chest.item[index].SetDefaults(ItemID.BottledHoney); + chest.item[index++].stack = random.Next(3, 7); + } + + if (random.NextBool()) + { + chest.item[index].SetDefaults(ItemID.Stinger); + chest.item[index++].stack = random.Next(4, 6); + } + else + { + chest.item[index].SetDefaults(ItemID.JungleSpores); + chest.item[index++].stack = random.Next(3, 5); + } + + if (random.NextBool()) + { + chest.item[index].SetDefaults(ItemID.RecallPotion); + chest.item[index++].stack = random.Next(1, 4); + } + else + { + chest.item[index].SetDefaults(ItemID.JungleTorch); + chest.item[index++].stack = random.Next(18, 36); + } + + } #endregion #region Place Rox Shrine diff --git a/World/Planets/MudPlanet.cs b/World/Planets/MudPlanet.cs index 448c019893..2bcf890cd9 100644 --- a/World/Planets/MudPlanet.cs +++ b/World/Planets/MudPlanet.cs @@ -109,7 +109,7 @@ namespace CalamityMod.World.Planets { int testX = origin.X + _random.Next(-radius, radius); int testY = origin.Y + _random.Next(-radius, radius); - if (WorldGen.EmptyTileCheck(testX - 1, testX + 1, testY - 1, testY + 1) && _tiles[testX, testY].WallType == WallID.HiveUnsafe) + if (WorldGen.EmptyTileCheck(testX - 1, testX + 1, testY - 1, testY + 1) && _tiles[testX, testY].WallType == WallID.HiveUnsafe) { for (int floorX = testX - 1; floorX <= testX + 1; floorX++) { @@ -119,7 +119,7 @@ namespace CalamityMod.World.Planets } //Place chest int chestID = WorldGen.PlaceChest(testX, testY + 1, 21, false, 29); - FillHoneyChest(chestID); + MiscWorldgenRoutines.FillHoneyChest(chestID, WorldGen.genRand); placedChest = true; } } @@ -237,7 +237,7 @@ namespace CalamityMod.World.Planets } //Potion loot - if (_random.Next(2) == 0) + if (_random.NextBool()) { chest.item[index].SetDefaults(_random.Next(PotionLoot)); chest.item[index++].stack = _random.Next(1, 4); @@ -249,7 +249,7 @@ namespace CalamityMod.World.Planets } //Weaponry - if (_random.Next(2) == 0) + if (_random.NextBool()) { chest.item[index].SetDefaults(_random.Next(new int[] { ItemID.Shuriken, ItemID.ThrowingKnife })); chest.item[index++].stack = _random.Next(50, 100); @@ -261,7 +261,7 @@ namespace CalamityMod.World.Planets } //Recall potion - if (_random.Next(2) == 0) + if (_random.NextBool()) { chest.item[index].SetDefaults(ItemID.RecallPotion); chest.item[index++].stack = _random.Next(1, 4); @@ -273,89 +273,5 @@ namespace CalamityMod.World.Planets } } - - //--------------------- - //HONEY CHEST STUFF - //--------------------- - - private int[] FocusLootHoney = new int[] - { - ItemID.NaturesGift, - ItemID.Bezoar, - ItemID.SharpeningStation - }; - - private int[] PotionLootHoney = new int[] - { - ItemID.LifeforcePotion, - ItemID.RegenerationPotion, - ItemID.ManaRegenerationPotion, - ItemID.HeartreachPotion, - ModContent.ItemType() - }; - - private int[] BarLootHoney = new int[] - { - WorldGen.silverBar == TileID.Silver ? ItemID.SilverBar : ItemID.TungstenBar, - WorldGen.goldBar == TileID.Gold ? ItemID.GoldBar : ItemID.PlatinumBar - }; - - private void FillHoneyChest(int id) - { - Chest chest = Main.chest[id]; - int index = 0; - - //Focus loot - chest.item[index++].SetDefaults(_random.Next(FocusLootHoney)); - - //Bars - if (_random.Next(3) <= 1) - { - chest.item[index].SetDefaults(_random.Next(BarLootHoney)); - chest.item[index].SetDefaults(_random.Next(7, 15)); - } - else - { - chest.item[index].SetDefaults(ItemID.GoldCoin); - chest.item[index++].stack = _random.Next(3, 5); // 3 or 4 gold coins - } - - //Potion loot - if (_random.Next(2) == 0) - { - chest.item[index].SetDefaults(_random.Next(PotionLootHoney)); - chest.item[index++].stack = _random.Next(1, 4); - } - else //Healing potion - { - chest.item[index].SetDefaults(ItemID.BottledHoney); - chest.item[index++].stack = _random.Next(3, 7); - } - - //Weaponry - if (_random.Next(2) == 0) - { - chest.item[index].SetDefaults(ItemID.Stinger); - chest.item[index++].stack = _random.Next(4, 6); - } - else - { - chest.item[index].SetDefaults(ItemID.JungleSpores); - chest.item[index++].stack = _random.Next(3, 5); - } - - //Recall potion - if (_random.Next(2) == 0) - { - chest.item[index].SetDefaults(ItemID.RecallPotion); - chest.item[index++].stack = _random.Next(1, 4); - } - else //glowsticks - { - chest.item[index].SetDefaults(ItemID.YellowTorch); - chest.item[index++].stack = _random.Next(18, 36); - } - - } } } From 022341104fe43abc35bfe15c6e43bb95b2581f21 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 7 Jan 2023 16:36:57 -0600 Subject: [PATCH 18/19] Death Mode Destroyer is less fat. --- NPCs/CalamityGlobalNPC.cs | 4 ++-- NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9f53495de0..738bee7c55 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1301,7 +1301,7 @@ namespace CalamityMod.NPCs else if (CalamityLists.DestroyerIDs.Contains(npc.type)) { npc.lifeMax = (int)(npc.lifeMax * 1.25); - npc.scale *= CalamityWorld.death ? 2.5f : 1.5f; + npc.scale *= CalamityWorld.death ? 2f : 1.5f; npc.npcSlots = 10f; } else if (npc.type == NPCID.Probe) @@ -1309,7 +1309,7 @@ namespace CalamityMod.NPCs if (CalamityWorld.death) npc.lifeMax = (int)(npc.lifeMax * 2.0); - npc.scale *= CalamityWorld.death ? 2f : 1.2f; + npc.scale *= CalamityWorld.death ? 1.5f : 1.2f; } else if (npc.type == NPCID.SkeletronPrime) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index f42aa70cd1..edc11c60ef 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -144,7 +144,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.realLife = npc.whoAmI; int index = npc.whoAmI; - int totalSegments = death ? 60 : 80; + int totalSegments = 80; if (Main.getGoodWorld) totalSegments *= 2; From f197e3602d9b476cca0ade7e29c2df0d79730bee Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 7 Jan 2023 21:21:14 -0600 Subject: [PATCH 19/19] Momentum Capacitor no longer works if any bosses are alive. --- Items/MomentumCapacitor.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Items/MomentumCapacitor.cs b/Items/MomentumCapacitor.cs index 043a578d32..3019595d1b 100644 --- a/Items/MomentumCapacitor.cs +++ b/Items/MomentumCapacitor.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items { SacrificeTotal = 1; DisplayName.SetDefault("Momentum Capacitor"); - Tooltip.SetDefault("While using the Momentum Capacitor,\n" + "your top speed will continuously and uncontrollably increase"); + Tooltip.SetDefault("While using the Momentum Capacitor,\n" + "your top speed will continuously and uncontrollably increase\n" + "This effect only works if there are no bosses alive"); } public override void SetDefaults() @@ -41,11 +41,14 @@ namespace CalamityMod.Items public override bool? UseItem(Player player) { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.momentumCapacitorTime = TotalFadeTime; - modPlayer.momentumCapacitorBoost += Main.rand.NextFloat(0.5f, 3.5f) * MomentumChargePerFrame; - if (modPlayer.momentumCapacitorBoost >= MaxMomentumCharge) - modPlayer.momentumCapacitorBoost = MaxMomentumCharge; + if (!CalamityPlayer.areThereAnyDamnBosses) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.momentumCapacitorTime = TotalFadeTime; + modPlayer.momentumCapacitorBoost += Main.rand.NextFloat(0.5f, 3.5f) * MomentumChargePerFrame; + if (modPlayer.momentumCapacitorBoost >= MaxMomentumCharge) + modPlayer.momentumCapacitorBoost = MaxMomentumCharge; + } return null; } }