From 50ef1c4837490fb0f78f719af57b7d3ba9f5e38a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 8 Jan 2020 16:10:05 -0500 Subject: [PATCH 01/26] Don't underestimate the power of Exoblade's baby bro --- Items/Accessories/PlaguedFuelPack.cs | 2 +- Items/Armor/XerocMask.cs | 2 +- Items/Weapons/Melee/DraedonsExoblade.cs | 1 - Items/Weapons/Melee/ExoGladius.cs | 112 +++++++++++++++ Items/Weapons/Melee/ExoGladius.png | Bin 0 -> 1767 bytes Items/Weapons/Ranged/MagnomalyCannon.cs | 2 +- Items/Weapons/Rogue/Supernova.cs | 2 +- Projectiles/Melee/ExoGladComet.cs | 117 +++++++++++++++ Projectiles/Melee/ExoGladComet.png | Bin 0 -> 619 bytes Projectiles/Melee/ExoGladProj.cs | 168 ++++++++++++++++++++++ Projectiles/Melee/ExoGladProj.png | Bin 0 -> 136 bytes Projectiles/Melee/ExoGladSpears.cs | 181 ++++++++++++++++++++++++ Projectiles/Melee/ExoGladSpears.png | Bin 0 -> 1767 bytes Projectiles/Melee/ExoGladiusBeam.cs | 133 +++++++++++++++++ Projectiles/Melee/ExoGladiusBeam.png | Bin 0 -> 1767 bytes 15 files changed, 715 insertions(+), 5 deletions(-) create mode 100644 Items/Weapons/Melee/ExoGladius.cs create mode 100644 Items/Weapons/Melee/ExoGladius.png create mode 100644 Projectiles/Melee/ExoGladComet.cs create mode 100644 Projectiles/Melee/ExoGladComet.png create mode 100644 Projectiles/Melee/ExoGladProj.cs create mode 100644 Projectiles/Melee/ExoGladProj.png create mode 100644 Projectiles/Melee/ExoGladSpears.cs create mode 100644 Projectiles/Melee/ExoGladSpears.png create mode 100644 Projectiles/Melee/ExoGladiusBeam.cs create mode 100644 Projectiles/Melee/ExoGladiusBeam.png diff --git a/Items/Accessories/PlaguedFuelPack.cs b/Items/Accessories/PlaguedFuelPack.cs index 238b57cecf..7d711ee88a 100644 --- a/Items/Accessories/PlaguedFuelPack.cs +++ b/Items/Accessories/PlaguedFuelPack.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Plagued Fuel Pack"); - Tooltip.SetDefault("*5 increased rogue damage\n" + + Tooltip.SetDefault("5% increased rogue damage\n" + "15% increased rogue projectile velocity\n" + "Press [Hotkey] to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds\n" + "This effect has a 3 second cooldown before it can be used again"); diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index dc34f65f84..12a2412850 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor modPlayer.xerocSet = true; modPlayer.rogueStealthMax += 1.25f; player.setBonus = "9% increased rogue damage and velocity\n" + - "All projectile types have special effects on enemy hits\n" + + "Rogue projectiles have special effects on enemy hits\n" + "Imbued with cosmic wrath and rage when you are damaged\n" + "Rogue stealth builds while not attacking and not moving, up to a max of 125\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + diff --git a/Items/Weapons/Melee/DraedonsExoblade.cs b/Items/Weapons/Melee/DraedonsExoblade.cs index 4201d7fe8a..94c8424e76 100644 --- a/Items/Weapons/Melee/DraedonsExoblade.cs +++ b/Items/Weapons/Melee/DraedonsExoblade.cs @@ -1,7 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Melee; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; diff --git a/Items/Weapons/Melee/ExoGladius.cs b/Items/Weapons/Melee/ExoGladius.cs new file mode 100644 index 0000000000..a337ef40dd --- /dev/null +++ b/Items/Weapons/Melee/ExoGladius.cs @@ -0,0 +1,112 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Melee +{ + public class ExoGladius : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Exo Gladius"); + Tooltip.SetDefault("Do not underestimate the power of Exoblade's younger brother\n" + + "Striking an enemy with the blade makes you immune for a short time and summons comets from the sky\n" + + "Fires a rainbow orb that summons sword beams on hit"); + } + + public override void SetDefaults() + { + item.useStyle = 3; + item.useTurn = false; + item.useAnimation = 12; + item.useTime = 12; + item.width = 56; + item.height = 56; + item.damage = 3599; + item.melee = true; + item.knockBack = 9.9f; + item.UseSound = SoundID.Item1; + item.useTurn = true; + item.autoReuse = true; + item.value = Item.buyPrice(2, 50, 0, 0); + item.rare = 10; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 19f; + item.Calamity().postMoonLordRarity = 15; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, item.shootSpeed * player.direction, 0f, type, damage, knockBack, player.whoAmI, 0f, 0f); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddTile(ModContent.TileType()); + recipe.SetResult(this); + recipe.AddRecipe(); + } + + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(5)) + { + int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 107); + } + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + if (!player.immune) + { + player.immune = true; + if (player.immuneTime < 10) + player.immuneTime = 10; + if (player.hurtCooldowns[0] < 10) + player.hurtCooldowns[0] = 10; + if (player.hurtCooldowns[1] < 10) + player.hurtCooldowns[1] = 10; + } + + target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.Frostburn, 120); + target.AddBuff(BuffID.OnFire, 120); + target.AddBuff(BuffID.Ichor, 120); + + float x = target.Center.X + (float)Main.rand.Next(-400, 400); + float y = target.Center.Y - (float)Main.rand.Next(500, 800); + Vector2 vector = new Vector2(x, y); + float num15 = target.Center.X + (float)(target.width / 2) - vector.X; + float num16 = target.Center.Y + (float)(target.height / 2) - vector.Y; + num15 += (float)Main.rand.Next(-100, 101); + int num17 = 25; + float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16)); + num18 = (float)num17 / num18; + num15 *= num18; + num16 *= num18; + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), 15f, player.whoAmI, 0f, 0f); + } + } + } +} diff --git a/Items/Weapons/Melee/ExoGladius.png b/Items/Weapons/Melee/ExoGladius.png new file mode 100644 index 0000000000000000000000000000000000000000..e1c9f0323b653334ed3cd74b406e3d0a9846960d GIT binary patch literal 1767 zcmVwuHs9MfS%gn{a%(?|qy;M~`5- zZl~w_&wDw~^PKm*pYwa3@9+1%2LDqf4Vw;tr6J1E`n+XKKLem{-&p{BI{HG}TYepV z0gtODp9TQREd>C)vVA=Og`?Lhq6T;gcDzO;FK+XEZDghF)X640d^G@B_yQ1}dI#_l z?0DU{eGY)IpuXB{nI0W&0Gu6b)!HxEe+z(Bqk|pL2?!b;^~G^9sSnjIz|R6eQ%ju# zpg1c6fN@310Hp4p3pis?DJw-{(c=mJ7h=%ypbsq(cMX8*Dmf0GTm!(o%9{X8HOcw& zu}jb8fS2IErv=|m0$@Ut5X#+I48T`QYaIYl-Nu?N_W|%~w0KQ_et6)xUV`nd{u#Xt zfK@ZLODrmqFAg$W2+0*23bcOjtzHYj8kg~M>X(>%!GM=w`>FgwApoI)@c_gQcv>Sl zA%7$Qj@VIVk3Y5kYr=c9Id1khvb0A`v3s+Lc9n86-BWr2&{P^|&X!RC4Yn$2~vGVdAyHP!&YOR)Wn}bBV`*P+n|7++UJLhzG$<*Z-}`4s337D z@dGBAEwZ)t5fzhV$22n8ZoH?OJ(Gq882}}J-3Gh_olBQd3bRRqWMYD{}xuW)5!i`(APgxlz{c034dG*1;}XJLOy|^Tfkm?;Qld z#hmW|FG2U@-W@v&fR~5qj^aR#tV3(QuW$fFgxoM%kK+>&2tbtGjJ+ALT7PHOAe!2I zP{s`xaw_%|xew+Fx#aW!1E47Xw$|VC3A(F0Dpl3)2JRq109?ON;sCI|GaPWvp0?B5wefyws0AQ><{|(V*30=(2)V_RP6LoSu7^oZ z);$$_N}f+J)UO2qdyAh|8%YUiGyrbh>Iy)8<8`g$vUOi;$BJyy+v5ReY_60)0AW6f z;x#je0uZ0pRqKEJ!xI4H%t;5}v*{UtbKO%;MUhL%3^M=EHM_{a>)S5sjScl+s?1m2Ks8&QNT&A)ocntmnnS!NHoc**xU2b zDgfRbEEVdBBgGMgW#s{|>VUN0Heae}Q4_8j0EdrW0Nj&P>O2H{`nMPWmzyOP=XJlS zHB?os;7vAt1i#Gy#P^X3^S&kT1F&?*aR4qoBl%sTOU#uPNK8+bM-TUrUmbP|0H2NG zOnRsJ8UPmysXa4@kM#$fgxtxM^pR^q_)y_a0J?@+ z#k1NaOHlRG$5rPc=&sfh@RVfKDhp7=hI}fSxNA0GUoSCat7rybTDmwGMNVbtYS!GE ze;#mVE$W*7DLEyNC)id-uh&}aQfpE9+Y8gArkt4&sC8O5HoMI)*qSfIbB3jB=kMi{ zW&t}iFx~*LH`sWR>XZZl$cY#4SmtYb(!C`BY-9@nHq%?GO7y_tX$HWlJh2?nmP7#V zx;%qdnLmH*0-Uj@V*W|Ro|5MiRI{hLgIN}-PA#e%-~jm2atwgvK4v{~uWXiWkbJFY zdV)r7P~SKJiqDmrHJnVK6**I`jz`7(la|L5G-jtu?c=vAjoLc5E4c`8zL%1h9Rk4X zHpvPGnU15_bR4bZ09ZczEx@_%sVqa0Te*7^011(C2Edu>a=;sdk1QiDCRKX}Oc7Ih z_LDJybGFL}@iPF9+>~mZy5p^!&;#FGQfhBc+Rw*XG3;d;j(_U%De zwHG-hk0()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.ElectrosphereLauncher); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index 710d2c3b28..32944f1383 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -62,7 +62,7 @@ Stealth strikes release energy as they fly"); //replaces Duststorm in a Bottle when added //recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Projectiles/Melee/ExoGladComet.cs b/Projectiles/Melee/ExoGladComet.cs new file mode 100644 index 0000000000..80ffa279c7 --- /dev/null +++ b/Projectiles/Melee/ExoGladComet.cs @@ -0,0 +1,117 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Melee +{ + public class ExoGladComet : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Comet"); + Main.projFrames[projectile.type] = 5; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.melee = true; + projectile.penetrate = 1; + projectile.alpha = 50; + } + + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 4) + { + projectile.frame = 0; + } + if (projectile.timeLeft > 30 && projectile.alpha > 0) + { + projectile.alpha -= 25; + } + if (projectile.timeLeft > 30 && projectile.alpha < 128 && Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.alpha = 128; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + if (projectile.alpha < 40) + { + int num309 = Dust.NewDust(new Vector2(projectile.position.X - projectile.velocity.X * 4f + 2f, projectile.position.Y + 2f - projectile.velocity.Y * 4f), 8, 8, 107, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, new Color(0, 255, 255), 0.5f); + Main.dust[num309].velocity *= -0.25f; + num309 = Dust.NewDust(new Vector2(projectile.position.X - projectile.velocity.X * 4f + 2f, projectile.position.Y + 2f - projectile.velocity.Y * 4f), 8, 8, 107, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, new Color(0, 255, 255), 0.5f); + Main.dust[num309].velocity *= -0.25f; + Main.dust[num309].position -= projectile.velocity * 0.5f; + } + Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.5f); + projectile.velocity *= 1.005f; + + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi) + MathHelper.ToRadians(90) * projectile.direction; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.Frostburn, 120); + target.AddBuff(BuffID.OnFire, 120); + target.AddBuff(BuffID.Ichor, 120); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(0, 255, 255, projectile.alpha); + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(29, (int)projectile.position.X, (int)projectile.position.Y, 103, 1f, 0f); + projectile.position = projectile.Center; + projectile.width = projectile.height = 80; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + } + } +} diff --git a/Projectiles/Melee/ExoGladComet.png b/Projectiles/Melee/ExoGladComet.png new file mode 100644 index 0000000000000000000000000000000000000000..abdb698535d96baea6699eb22200f41ce7a25836 GIT binary patch literal 619 zcmV-x0+juUP)Px#1ZP1_K>z@;j|==^1poj53{Xr|MF0Q*GylKB|MDNZz~d(czW@LM{YgYYRA@u( zn!!!OKoCW33gE<@9>^Vm6w06oDoGKPK_n3O&;xf)G+?xj|4NKK{tnvR4BmNCWLY7f z@%&l)Z=m^qY`WJjyoOVii{Y4`_wKt3ui;cBSw*Ul><#Nx{)$c|nNT|%M`%vnwwIHi z$#-eY9qs)ZT*GzmnoWPscxn#)@zCD)8tE$n*Dr5S>c#akKh+;3*hP8(EHphxxqxU08g}Wms0W2?p za<2Jz{^Qk;-+H#ahzoII=b2lQY&qL-j{u$+p8O+J$df-8^5oAcp4eQ7Lxt?^j>4T$ z{@rMbWED9HU}+YVbIp^#L7~yIMjy_$7m2E@5=lil+n$iUIT{JE=a}|>z8(R&OVV~l zz@Gi(ggp6kJo&rO0_+Jn31Dd!lyl9Kzd<22jc88!fBXEM^seE$&%Qev&4f&|k_x}` zS9^p?;38boDl69`dwUU2{+!?*9GqjtJ#rzAJt1o}%@5kJhnw;OQX~KX002ovPDHLk FV1g!d9smFU literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/ExoGladProj.cs b/Projectiles/Melee/ExoGladProj.cs new file mode 100644 index 0000000000..d2ebdcf12e --- /dev/null +++ b/Projectiles/Melee/ExoGladProj.cs @@ -0,0 +1,168 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class ExoGladProj : ModProjectile + { + private float counter = 0f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Orb"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.melee = true; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.timeLeft = 300; + } + + public override void AI() + { + Vector2 value7 = new Vector2(5f, 10f); + counter += 1f; + if (counter == 48f) + { + counter = 0f; + } + else + { + for (int num41 = 0; num41 < 2; num41++) + { + int dustType = num41 == 0 ? 107 : 234; + if (Main.rand.NextBool(4)) + { + dustType = 269; + } + Vector2 value8 = Vector2.UnitX * -12f; + value8 = -Vector2.UnitY.RotatedBy((double)(counter * 0.1308997f + (float)num41 * 3.14159274f), default) * value7; + int num42 = Dust.NewDust(projectile.Center, 0, 0, dustType, 0f, 0f, 160, default, 1.5f); + Main.dust[num42].noGravity = true; + Main.dust[num42].position = projectile.Center + value8; + Main.dust[num42].velocity = projectile.velocity; + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.8f); + Main.dust[num458].noGravity = true; + Main.dust[num458].velocity *= 0f; + } + } + + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 1000f; + bool flag17 = false; + for (int num475 = 0; num475 < Main.npc.Length; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + if (flag17) + { + float num483 = 36f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + } + } + + public override void Kill(int timeLeft) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 107, + 234, + 269 + }); + for (int k = 0; k < 4; k++) + { + int num = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, dustType, (float)(projectile.direction * 2), 0f, 150, default, 1f); + Main.dust[num].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int type = ModContent.ProjectileType(); + int numSwords = Main.rand.Next(1,4); + float swordKB = projectile.knockBack; + for (int i = 0; i < numSwords; ++i) + { + float startOffsetX = Main.rand.NextFloat(1000f, 1400f) * (Main.rand.NextBool() ? -1f : 1f); + float startOffsetY = Main.rand.NextFloat(80f, 900f) * (Main.rand.NextBool() ? -1f : 1f); + Vector2 startPos = new Vector2(target.Center.X + startOffsetX, target.Center.Y + startOffsetY); + float dx = target.Center.X - startPos.X; + float dy = target.Center.Y - startPos.Y; + + dx += Main.rand.NextFloat(-5f, 5f); + dy += Main.rand.NextFloat(-5f, 5f); + float speed = Main.rand.NextFloat(24f, 30f); + float dist = (float)Math.Sqrt((double)(dx * dx + dy * dy)); + dist = speed / dist; + dx *= dist; + dy *= dist; + Vector2 swordVel = new Vector2(dx, dy); + float angle = Main.rand.NextFloat(MathHelper.TwoPi); + if (projectile.owner == Main.myPlayer) + { + int idx = Projectile.NewProjectile(startPos, swordVel, type, (int)((double)projectile.damage * 0.25), swordKB, projectile.owner, 0f, 0f); + Main.projectile[idx].rotation = angle; + } + } + + int spearAmt = Main.rand.Next(1,4); + for (int n = 0; n < spearAmt; n++) + { + float x = projectile.position.X + (float)Main.rand.Next(-400, 400); + float y = projectile.position.Y + (float)Main.rand.Next(800, 1000); + Vector2 vector = new Vector2(x, y); + float num13 = projectile.position.X + (float)(projectile.width / 2) - vector.X; + float num14 = projectile.position.Y + (float)(projectile.height / 2) - vector.Y; + num13 += (float)Main.rand.Next(-100, 101); + int num15 = 29; + float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14)); + num16 = (float)num15 / num16; + num13 *= num16; + num14 *= num16; + int num17 = Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), swordKB, projectile.owner, 0f, 0f); + } + + target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.Frostburn, 120); + target.AddBuff(BuffID.OnFire, 120); + target.AddBuff(BuffID.Ichor, 120); + } + } +} diff --git a/Projectiles/Melee/ExoGladProj.png b/Projectiles/Melee/ExoGladProj.png new file mode 100644 index 0000000000000000000000000000000000000000..0056fc1e2479e11bd6391fc4ccd1fe54fa0d671f GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPgflb|yv^-kZzH%z;9po-U3d5|@+z{QqyyY num954) + { + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); + if (vector102.HasNaNs()) + { + vector102 = Vector2.UnitY; + } + projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953; + } + } + else + { + if (projectile.timeLeft > 30) + { + projectile.timeLeft = 30; + } + } + + Lighting.AddLight(projectile.Center, Main.DiscoR * 0.5f / 255f, Main.DiscoG * 0.5f / 255f, Main.DiscoB * 0.5f / 255f); + if (currentColor == Color.Black) + { + int startPoint = Main.rand.Next(6); + projectile.localAI[0] = startPoint; + currentColor = GetStartingColor(startPoint); + } + Visuals(projectile, ref currentColor); + } + + internal static void Visuals(Projectile projectile, ref Color c) + { + CalamityUtils.IterateDisco(ref c, ref projectile.localAI[0], 15); + Vector3 compositeColor = 0.1f * Color.White.ToVector3() + 0.05f * c.ToVector3(); + Lighting.AddLight(projectile.Center, compositeColor); + } + + internal static Color GetStartingColor(int startPoint = 0) + { + switch (startPoint) + { + default: return new Color(1f, 0f, 0f, 0f); // Color.Red + case 1: return new Color(1f, 1f, 0f, 0f); // Color.Yellow + case 2: return new Color(0f, 1f, 0f, 0f); // Color.Green + case 3: return new Color(0f, 1f, 1f, 0f); // Color.Turquoise + case 4: return new Color(0f, 0f, 1f, 0f); // Color.Blue + case 5: return new Color(1f, 0f, 1f, 0f); // Color.Violet + } + } + + // This projectile is always fullbright. + public override Color? GetAlpha(Color lightColor) + { + return currentColor; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 64; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 74, 1f, 0f); + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 107, + 234, + 269 + }); + for (int num193 = 0; num193 < 6; num193++) + { + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0, 0); + } + for (int num194 = 0; num194 < 10; num194++) + { + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0, 0); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0, 0); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.Frostburn, 120); + target.AddBuff(BuffID.OnFire, 120); + target.AddBuff(BuffID.Ichor, 120); + } + } +} diff --git a/Projectiles/Melee/ExoGladSpears.png b/Projectiles/Melee/ExoGladSpears.png new file mode 100644 index 0000000000000000000000000000000000000000..e1c9f0323b653334ed3cd74b406e3d0a9846960d GIT binary patch literal 1767 zcmVwuHs9MfS%gn{a%(?|qy;M~`5- zZl~w_&wDw~^PKm*pYwa3@9+1%2LDqf4Vw;tr6J1E`n+XKKLem{-&p{BI{HG}TYepV z0gtODp9TQREd>C)vVA=Og`?Lhq6T;gcDzO;FK+XEZDghF)X640d^G@B_yQ1}dI#_l z?0DU{eGY)IpuXB{nI0W&0Gu6b)!HxEe+z(Bqk|pL2?!b;^~G^9sSnjIz|R6eQ%ju# zpg1c6fN@310Hp4p3pis?DJw-{(c=mJ7h=%ypbsq(cMX8*Dmf0GTm!(o%9{X8HOcw& zu}jb8fS2IErv=|m0$@Ut5X#+I48T`QYaIYl-Nu?N_W|%~w0KQ_et6)xUV`nd{u#Xt zfK@ZLODrmqFAg$W2+0*23bcOjtzHYj8kg~M>X(>%!GM=w`>FgwApoI)@c_gQcv>Sl zA%7$Qj@VIVk3Y5kYr=c9Id1khvb0A`v3s+Lc9n86-BWr2&{P^|&X!RC4Yn$2~vGVdAyHP!&YOR)Wn}bBV`*P+n|7++UJLhzG$<*Z-}`4s337D z@dGBAEwZ)t5fzhV$22n8ZoH?OJ(Gq882}}J-3Gh_olBQd3bRRqWMYD{}xuW)5!i`(APgxlz{c034dG*1;}XJLOy|^Tfkm?;Qld z#hmW|FG2U@-W@v&fR~5qj^aR#tV3(QuW$fFgxoM%kK+>&2tbtGjJ+ALT7PHOAe!2I zP{s`xaw_%|xew+Fx#aW!1E47Xw$|VC3A(F0Dpl3)2JRq109?ON;sCI|GaPWvp0?B5wefyws0AQ><{|(V*30=(2)V_RP6LoSu7^oZ z);$$_N}f+J)UO2qdyAh|8%YUiGyrbh>Iy)8<8`g$vUOi;$BJyy+v5ReY_60)0AW6f z;x#je0uZ0pRqKEJ!xI4H%t;5}v*{UtbKO%;MUhL%3^M=EHM_{a>)S5sjScl+s?1m2Ks8&QNT&A)ocntmnnS!NHoc**xU2b zDgfRbEEVdBBgGMgW#s{|>VUN0Heae}Q4_8j0EdrW0Nj&P>O2H{`nMPWmzyOP=XJlS zHB?os;7vAt1i#Gy#P^X3^S&kT1F&?*aR4qoBl%sTOU#uPNK8+bM-TUrUmbP|0H2NG zOnRsJ8UPmysXa4@kM#$fgxtxM^pR^q_)y_a0J?@+ z#k1NaOHlRG$5rPc=&sfh@RVfKDhp7=hI}fSxNA0GUoSCat7rybTDmwGMNVbtYS!GE ze;#mVE$W*7DLEyNC)id-uh&}aQfpE9+Y8gArkt4&sC8O5HoMI)*qSfIbB3jB=kMi{ zW&t}iFx~*LH`sWR>XZZl$cY#4SmtYb(!C`BY-9@nHq%?GO7y_tX$HWlJh2?nmP7#V zx;%qdnLmH*0-Uj@V*W|Ro|5MiRI{hLgIN}-PA#e%-~jm2atwgvK4v{~uWXiWkbJFY zdV)r7P~SKJiqDmrHJnVK6**I`jz`7(la|L5G-jtu?c=vAjoLc5E4c`8zL%1h9Rk4X zHpvPGnU15_bR4bZ09ZczEx@_%sVqa0Te*7^011(C2Edu>a=;sdk1QiDCRKX}Oc7Ih z_LDJybGFL}@iPF9+>~mZy5p^!&;#FGQfhBc+Rw*XG3;d;j(_U%De zwHG-hk0= 0) + { + projectile.ai[1]--; + if (projectile.ai[1] == 0) + { + projectile.velocity *= -0.9f; + } + } + + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; + Lighting.AddLight(projectile.Center, Main.DiscoR * 0.5f / 255f, Main.DiscoG * 0.5f / 255f, Main.DiscoB * 0.5f / 255f); + if (currentColor == Color.Black) + { + int startPoint = Main.rand.Next(6); + projectile.localAI[0] = startPoint; + currentColor = GetStartingColor(startPoint); + } + Visuals(projectile, ref currentColor); + } + + internal static void Visuals(Projectile projectile, ref Color c) + { + CalamityUtils.IterateDisco(ref c, ref projectile.localAI[0], 15); + Vector3 compositeColor = 0.1f * Color.White.ToVector3() + 0.05f * c.ToVector3(); + Lighting.AddLight(projectile.Center, compositeColor); + } + + internal static Color GetStartingColor(int startPoint = 0) + { + switch (startPoint) + { + default: return new Color(1f, 0f, 0f, 0f); // Color.Red + case 1: return new Color(1f, 1f, 0f, 0f); // Color.Yellow + case 2: return new Color(0f, 1f, 0f, 0f); // Color.Green + case 3: return new Color(0f, 1f, 1f, 0f); // Color.Turquoise + case 4: return new Color(0f, 0f, 1f, 0f); // Color.Blue + case 5: return new Color(1f, 0f, 1f, 0f); // Color.Violet + } + } + + // This projectile is always fullbright. + public override Color? GetAlpha(Color lightColor) + { + return currentColor; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.scale += (maxScale - 1) / (float)penetrationAmt; + projectile.ai[1] = 5 + Main.rand.Next(-2, 3); + + target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(BuffID.CursedInferno, 120); + target.AddBuff(BuffID.Frostburn, 120); + target.AddBuff(BuffID.OnFire, 120); + target.AddBuff(BuffID.Ichor, 120); + } + } +} diff --git a/Projectiles/Melee/ExoGladiusBeam.png b/Projectiles/Melee/ExoGladiusBeam.png new file mode 100644 index 0000000000000000000000000000000000000000..e1c9f0323b653334ed3cd74b406e3d0a9846960d GIT binary patch literal 1767 zcmVwuHs9MfS%gn{a%(?|qy;M~`5- zZl~w_&wDw~^PKm*pYwa3@9+1%2LDqf4Vw;tr6J1E`n+XKKLem{-&p{BI{HG}TYepV z0gtODp9TQREd>C)vVA=Og`?Lhq6T;gcDzO;FK+XEZDghF)X640d^G@B_yQ1}dI#_l z?0DU{eGY)IpuXB{nI0W&0Gu6b)!HxEe+z(Bqk|pL2?!b;^~G^9sSnjIz|R6eQ%ju# zpg1c6fN@310Hp4p3pis?DJw-{(c=mJ7h=%ypbsq(cMX8*Dmf0GTm!(o%9{X8HOcw& zu}jb8fS2IErv=|m0$@Ut5X#+I48T`QYaIYl-Nu?N_W|%~w0KQ_et6)xUV`nd{u#Xt zfK@ZLODrmqFAg$W2+0*23bcOjtzHYj8kg~M>X(>%!GM=w`>FgwApoI)@c_gQcv>Sl zA%7$Qj@VIVk3Y5kYr=c9Id1khvb0A`v3s+Lc9n86-BWr2&{P^|&X!RC4Yn$2~vGVdAyHP!&YOR)Wn}bBV`*P+n|7++UJLhzG$<*Z-}`4s337D z@dGBAEwZ)t5fzhV$22n8ZoH?OJ(Gq882}}J-3Gh_olBQd3bRRqWMYD{}xuW)5!i`(APgxlz{c034dG*1;}XJLOy|^Tfkm?;Qld z#hmW|FG2U@-W@v&fR~5qj^aR#tV3(QuW$fFgxoM%kK+>&2tbtGjJ+ALT7PHOAe!2I zP{s`xaw_%|xew+Fx#aW!1E47Xw$|VC3A(F0Dpl3)2JRq109?ON;sCI|GaPWvp0?B5wefyws0AQ><{|(V*30=(2)V_RP6LoSu7^oZ z);$$_N}f+J)UO2qdyAh|8%YUiGyrbh>Iy)8<8`g$vUOi;$BJyy+v5ReY_60)0AW6f z;x#je0uZ0pRqKEJ!xI4H%t;5}v*{UtbKO%;MUhL%3^M=EHM_{a>)S5sjScl+s?1m2Ks8&QNT&A)ocntmnnS!NHoc**xU2b zDgfRbEEVdBBgGMgW#s{|>VUN0Heae}Q4_8j0EdrW0Nj&P>O2H{`nMPWmzyOP=XJlS zHB?os;7vAt1i#Gy#P^X3^S&kT1F&?*aR4qoBl%sTOU#uPNK8+bM-TUrUmbP|0H2NG zOnRsJ8UPmysXa4@kM#$fgxtxM^pR^q_)y_a0J?@+ z#k1NaOHlRG$5rPc=&sfh@RVfKDhp7=hI}fSxNA0GUoSCat7rybTDmwGMNVbtYS!GE ze;#mVE$W*7DLEyNC)id-uh&}aQfpE9+Y8gArkt4&sC8O5HoMI)*qSfIbB3jB=kMi{ zW&t}iFx~*LH`sWR>XZZl$cY#4SmtYb(!C`BY-9@nHq%?GO7y_tX$HWlJh2?nmP7#V zx;%qdnLmH*0-Uj@V*W|Ro|5MiRI{hLgIN}-PA#e%-~jm2atwgvK4v{~uWXiWkbJFY zdV)r7P~SKJiqDmrHJnVK6**I`jz`7(la|L5G-jtu?c=vAjoLc5E4c`8zL%1h9Rk4X zHpvPGnU15_bR4bZ09ZczEx@_%sVqa0Te*7^011(C2Edu>a=;sdk1QiDCRKX}Oc7Ih z_LDJybGFL}@iPF9+>~mZy5p^!&;#FGQfhBc+Rw*XG3;d;j(_U%De zwHG-hk0 Date: Wed, 8 Jan 2020 16:30:07 -0500 Subject: [PATCH 02/26] weapon balancing --- Items/Weapons/Summon/Endogenesis.cs | 2 +- Items/Weapons/Summon/ForgottenApexWand.cs | 2 +- Items/Weapons/Summon/SandSharknadoStaff.cs | 2 +- Projectiles/Summon/ApexShark.cs | 2 +- Projectiles/Summon/MiniSandShark.cs | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Summon/Endogenesis.cs b/Items/Weapons/Summon/Endogenesis.cs index a4e6ead6ce..a1bd44d31c 100644 --- a/Items/Weapons/Summon/Endogenesis.cs +++ b/Items/Weapons/Summon/Endogenesis.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Summon if (AttackMode == 1) //icicles dmgMult = 1f; if (AttackMode == 2) //melee - dmgMult = 0.9f; + dmgMult = 0.95f; if (AttackMode == 3) //flamethrower dmgMult = 0.9f; int body = Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, type, (int)(damage * dmgMult), knockBack, player.whoAmI, AttackMode, 0f); diff --git a/Items/Weapons/Summon/ForgottenApexWand.cs b/Items/Weapons/Summon/ForgottenApexWand.cs index 867f6e99bc..6aa4ae6555 100644 --- a/Items/Weapons/Summon/ForgottenApexWand.cs +++ b/Items/Weapons/Summon/ForgottenApexWand.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon item.knockBack = 4f; item.mana = 15; - item.damage = 120; + item.damage = 28; item.useTime = 30; item.useAnimation = 30; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/SandSharknadoStaff.cs b/Items/Weapons/Summon/SandSharknadoStaff.cs index 259984afa9..2f90592568 100644 --- a/Items/Weapons/Summon/SandSharknadoStaff.cs +++ b/Items/Weapons/Summon/SandSharknadoStaff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 42; + item.damage = 35; item.mana = 10; item.width = 48; item.height = 56; diff --git a/Projectiles/Summon/ApexShark.cs b/Projectiles/Summon/ApexShark.cs index 9e95eca1b8..5cfbc78dad 100644 --- a/Projectiles/Summon/ApexShark.cs +++ b/Projectiles/Summon/ApexShark.cs @@ -278,7 +278,7 @@ namespace CalamityMod.Projectiles.Summon { Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 70, 0.5f); projectile.velocity = new Vector2(0f, 5f).RotatedBy(projectile.velocity.ToRotation() + 1.5f); - int sand = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, 5f, projectile.owner, 0f, 0f); + int sand = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.7f), (int)(projectile.knockBack * 0.7f), projectile.owner, 0f, 0f); Main.projectile[sand].Center = projectile.Center; projectile.netUpdate = true; HitCooldown = 20; diff --git a/Projectiles/Summon/MiniSandShark.cs b/Projectiles/Summon/MiniSandShark.cs index c2a7f2485e..c89d8d9cfb 100644 --- a/Projectiles/Summon/MiniSandShark.cs +++ b/Projectiles/Summon/MiniSandShark.cs @@ -73,6 +73,7 @@ namespace CalamityMod.Projectiles.Summon projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; + projectile.damage /= 2; projectile.Damage(); Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 14); int num226 = 36; From d4ab84e1d357d939621bb0310d7d7cea746d3074 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 8 Jan 2020 17:06:52 -0500 Subject: [PATCH 03/26] boss checklist fix --- ModSupport/WeakReferenceSupport.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index d684f3db25..52035cadab 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -320,9 +320,8 @@ namespace CalamityMod calamity, "Profaned Guardians", (Func)(() => CalamityWorld.downedGuardians), ModContent.ItemType(), - ModContent.ItemType(), + new List() { ModContent.ItemType(), ModContent.ItemType() }, new List() { ModContent.ItemType(), ItemID.GreaterHealingPotion}, - new List() { ModContent.ItemType() }, "Use a [i:" + ModContent.ItemType() + "] in the Hallow or Underworld Biomes", "[c/FFA500:The guardians must protect their goddess at all costs.]", "CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardians_BossChecklist"); From 44b69c4ced0f1556594cc4500c49a59cde38358d Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Thu, 9 Jan 2020 01:00:53 +0000 Subject: [PATCH 04/26] Cuttlefish Resprite --- NPCs/Abyss/Cuttlefish.png | Bin 1032 -> 1808 bytes NPCs/Abyss/CuttlefishGlow.png | Bin 927 -> 186 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/NPCs/Abyss/Cuttlefish.png b/NPCs/Abyss/Cuttlefish.png index a7aace459c1eab9ad070d47575c32d5b57319a0e..4258fd6a7095ae36d431aeba86d032f6c1dd932a 100644 GIT binary patch delta 1806 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 diff --git a/NPCs/Abyss/CuttlefishGlow.png b/NPCs/Abyss/CuttlefishGlow.png index bc1570b0e78d62abbb128822cf049f27f9554ad4..0a1341d39cb56cb0eaab0b18ea6ace1a476e667e 100644 GIT binary patch delta 171 zcmbQwzKd~!c>OdEHUGZx^prwft(Ug7srr_IdAW5MwnHURt zvY3H^?=T269?xHq0u+=iag8Vm&QB{TPb^AhC`ioAE78kKEm1JhGte_K{HTyQm4Sho z-_yl0q$2L^9NT;mLlM{S>jQ%roH$f|P3hpO*Yv&Q;<(7+<&VA1^PldnGRrrPZ2h_G zz1&NY#~;t_+5M?1{jJ9G%vnJaW=2{q0!h>N{46k@89)DDNMX#D; z>h^5;P#NtN5!1fke`l4skUvW8#H;1MxxTXByhQB+0FZ7l#S<<>wV$IgM_a_`?k#-bN zPY-Btn7%}j>$#}Y1fjQl#!}G0T5@xehwzq`lN)n8623TI=DBO)*edYIG(oX?N}tA( zoz*!T>wihz6=OA9AW{-okSxLysPW;b`T732&58Cg;f~YU%=NA#{7H;hlaZ*vdWs+)=lM=$=$Ru}+|9ks^>yy+n zI4}QAIJU9XB-6p**MiKpyjcsJbhzz|7MHjv`by;-JX2pXS@HRGnc4uBl56bZ;t`JF zjI0Y3I+~t4*sIGq@BVhyQ+!K=dT-bh`~Pm&#B#->y$HI|lJMx50PDHNI)T#* zHf)(IpEN7>|5Xo=^E$)MWSh-gwPT+3{he02Df1RcY^rE+Ss3=Ec+q_R+(%Vqxy8i+ q9JK+!^e`{u=e&y>CZ2!!MZ7*^M|3;?_dB4B$KdJe=d#Wzp$PzzL6cno From 4c97c5d4e74dcd64cea442ccbd3a09335fe45aa2 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Thu, 9 Jan 2020 01:20:01 +0000 Subject: [PATCH 05/26] viperfish resprote (fuck i split the commits REEE) --- Gores/ViperFish.png | Bin 243 -> 391 bytes Gores/ViperFish2.png | Bin 366 -> 316 bytes NPCs/Abyss/Viperfish.png | Bin 1971 -> 2653 bytes NPCs/Abyss/ViperfishGlow.png | Bin 552 -> 219 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Gores/ViperFish.png b/Gores/ViperFish.png index ab7a2bfdc4c22199d9832a294c1113ca6a6c121a..05d7d4fb6726bf3f9e7e5d871e6f5ea1962a7aa4 100644 GIT binary patch literal 391 zcmV;20eJq2P)Px$K}keGR5*>r)WJ$yQ4q%Q-xbA(MCmorL;^;UE<^}jxOUN{J3)K^pP|ptr|1(X z?z-&4MOPI>5EoKVAxKcGjX{jKxNbb!dr3tRuHWjMk6{k~nKKi`aTN><4uQMdo5UMb zj7t%8F3wYa-&>NtM*T?O?)C2uG3;mJ|3wf-&TuYUQ8XUQJlAWx$DOaol~JxyR?X&GFfw88ezjb{@quB@f*|B$4V zYmY!NE`iR)`HRT1B*(jZ;Iw&wr=IWc{6L;W;Sk6?%vB(ItwIHY-k)fsTn4S~9^002ovPDHLkV1nC;u^s>b literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rhe9iA?ZAr}70DGEX!A6Nc$5Bv4z zvaVZ-9T)rjnJLmO>jGoEWpmE|?OuNHOZ$8Mj$*-^Y@7vN4Tl@Lr}F10pJ6q4-?j48 z!XJO0%-X7<*KFON)SSSk@oIKcuETc8XFcKD4o$&5i}#C(Jm)bsl-8Pd9(ZmVI#M?~BP3 rbDA$4X0jC)?lFyN^gN-!z*w5Q{Egm%c%UB`JYD@<);T3KF)#oCCv9Dy diff --git a/Gores/ViperFish2.png b/Gores/ViperFish2.png index 41ee3dea2d63f6b0b2ee678ad6a1b6bc7d36ea45..d7485cde9e122297d358b0b5db4ce52e9e07a3b7 100644 GIT binary patch literal 316 zcmV-C0mJ@@P)Px#_DMuRR5*>b)4fUqQ4~etZ$#mWn2~{z#3)zsZbZFLl&0uX~8!Ya$LHDRrSPav% zAW14Vj2g`rcz^3=(B3})pHBnuaC=i&SXx=d&n|0e8dYN$LdalqYY)sU#Gt<1Dg^J& zFADEGmveSa(!ZHj@!@?NdK$s6*^vzJh6vM?dHyCF9 zo{OhYTntOsAHKgJsZwA>FYc&jFnW4KPbH+f6s8}i_h8A7T!R5ZgzDeKP6n(10000< MMNUMnLSTXb0B~-T1ONa4 diff --git a/NPCs/Abyss/Viperfish.png b/NPCs/Abyss/Viperfish.png index fbd1a610cfd3ca1f460a8b55898557c5f9eebf25..3aeb7c48bf5ca3a63961ad61f227d96ad53d355a 100644 GIT binary patch literal 2653 zcmV-j3ZnIiP)Px<7fD1xRCt{2onLGmR~3i9aqM`#j=la9C$5D-;J z@PH6fs#XXdKmw_66-dBCRq=)pLVbz~r9xCnD=JZ>qLwtRf@m5!4N0(LJ9Qk#>v+9u zCte=z9((8R+?~DNU3*Q>_p+Y9JL~z)xo7VE%^6UXdJ=5(0k}BusfS&Q^2HPHpFJUe zhJH&Be6#ik1vJ%Vum8t1Z}b5OqNrrD6M&_qoP6e^*1zw_U;uFH)r$ZeJGxKStLs&x z3iD*c6gE6`7=X^+?Eo}2Zvh~aN#_B!_YDDXeQH!T2>|BjrU7{Q&ldog96blX^S|#5 z01h4;tm|>B!aOOt-g|lm>iUK4oxK1g5*+|6&M)QxhV~x}tv5RIJ^z4q? zZtFLnSI$JnHr5!!lF9Ch)>DOf64;7rX>9{wDYxJ{gKMIz*R*Okr^oXEJ9h5}R%4ZL z?%me_XiaPj02b!ch2z=^z+8GN4>0iU-vF@dKd%7r_8WfyATfM6fU*j-2>=oU_W;l| zJ6?7>RhTEm3Jd*bMFGQyJ{j7ef6rZ^>B-9Th2MteKmMbi1C=Yyh3wzn&NW|JQNeCy1zE4@*be|$KJ_dB*QVYBN|h*x zB1MVqdmjuy73R%~!desU0OYdsd4T)A^fh4hj7lps`+~`%Qpcx5J9_x|cSF-x&i*?z zEv=zTF~Yvj9u7@k{KuKlc6JPv~szOAgSJNE|wi`PZ~RhTzHPtQPP z-XX1%D92WsP^q$9F{jelWfK?UTu5tbW5=+U9^Ws2n!GNX1yo_)tSC(KF5&WsxwdTu zRf>J4i+UY^()>=8X=ncScCO|2d|T0i-8$Mxz9mu z6xO`86@c{3$vmv~3RH^3B57R(J2u4i9<=lf2LMYqt^lj~kBdYi5t?=>E`l}n%&NjX zS@|!^nd9F&p1j$yWjOMir(git-U+(>M?x`=aSpdG=RFLq4#2ISpNCE9ptY zDJ;U<8p_w6JaHrdc#Veo9V|&B-=yEx^aEN^nT=T1Eu|K)uO!>b!J6j_4c+3z8=@k-t7Uvh4Ut6C5DYM zT@J(M=0pH+`*yZ$Z^)J{EdfAl>$b?{H*QQs&R2zb66MnmotfVLA>(469IeXpYI|Ho zX+yjAh1Rn@uA`U6fTDi6g0fs5S5cOX8a?>yKZW)$o{8q}!Z>JV#>UZvsJU&4c=1Ej58L5Ou^SH)sfBtW8My@9wi?5y>iCiv9%x1G1!)ih7(`>e~ zY>(^7U;YHB-s38tD<0Q9=EL^5+8$U@wjEn}B>MNvy*wT{UzD}|?#~1OWAFSuay?a; zCne7sZE0=+U@rY(9vau<>g%Q+Njwm_pErJJo{rml?^k42+3`?Sm?ssxsD0Tek87N_ z)ovXn?~>oEF|5YKx~PRl_qf__Aluv8J$z39FmvU-JZK)aZUh6nJ`O-`;Z|gZUoVfV zU_TEjRO$}0-9Yxep(sY2jj8^f09-%!&$7KQs<0Zdl81G6?EoNs^TV>e3N9-3xC$$t z*6!WL(>gO2xn89nS65H0e825%j6?IV8d1_)k?iOK;QF;oHTAektK@P|7gYlQs`s{* zaXMDzY*dALQg@H*-~-117=QCr*=KvIbx+&Gxv5oQ>qKmeQSF)Xh%KRGYBcw>pbAqI zMfnKPFb>2xZ13xnCydASsV9!CtE*aDNlzM1VPz@=3uP+>tHK(L4fnVbZ#z;_A2p{&ifJQ>KQs)^V*d4eN1Tm^W3= zopoF-k89EBP~`ZeVAnXLa7AS&Dyu7|3iD*sdR%?$xY}qP*L9*qVTm@A4`mBp3yEDW zkE@_{T$M;l6t=XqQ25L?w8vHJxNZ`hBj2e$<1U_^nhYteQnZe%0z~-qh2`aC0J7QH zNQFsj)hHfUS5-|xT0O1fy3RO#`a(y0_)Sy?9x+c;#I;iE<#COxs%a}v>$t8nPM^LV zQ{q@_9alNy&8Y!X4PZ9>G{3JqNT{HmtJZN{4@!Lcf-APfvDP}S>+L`kv@%MaDapfb z-(CdZ&K>z&s_7T115r^FMNt$*Q50p60}*J{!H4^rXZeRxhvX))wPwUGcaUT+^*>=FRn@DCy}B*hHvm5|ST|8|( zv2Ed=-G?6fgxRm>dyV3}t#&NO+C8RMG1(`Nkn$@c!jr%{xQ zHg$CEC_LF=!tB)5^JTrQr_U|=9(MrH(rOgBlyg=V4#jy@m?yC{5bgJU+di#&d0giT z6_OrN^~U zdeG%@wG~xujcP#@m9ms2`JAmd*LbWd%oArTndmTn{TtUt8^YsSD{rgo?b33`kowr6 z0ATjNXMxfYcvYAu&i=5XyZ(^E8m*3NTxKu0-dJCz@?NCJLlx$UGlt1s{Ors`WGzJ3 zlNz=1xF*}XjN5tsX5?~@H^$op;I6!9ucr#Dl9fEnRnIj}QTDy1jlGrY=`lfKjVP-E zpV*qlC5qhHUfZj}JX!hg?%8_?h_4iEw_d5fev`LMO@`)s_}|MOTcbGSJVP=#%BN)%?((rVtmVYKpy?*&NvN)IP&iOFiODA!Bkjw(K;o&EV8PdPbj=!nunXN0S z{OiyrDyKa@>Sb`fbW#cc1Bju+0a>GV936meI*IU&()FL0&s8;ul0DEGs?MX{iOd7U0XTc{41tXMw=cMxaJy~p zom75(;8QBMz5G0t@HLz(}sS^(s)sa18#IIer zMD_4xTc6tz$ta0AXw2=>e4Min;vE}61;{xtW20xO1|tfegAqbK-tniGucE3&4+Se_ zzGB9#_THg=R6p~UmJl=GlknV??TbUtJ8?8vX^)*BqjLP}IF+q)TB-cDDd0f4%z+Uq zgAAb1c>Q<5f!VlpI#oW^@dcIhdS*qAbpFMmP`xXY@G$r&&NSRdJ8AF6pYy`&@6avR zS&PFVGROc5peh3B#_6+YCCq1)zTOAv5858sNhQ`fc(;cJ*VFxXx9q3#gOOXQ#EKZc zh>wu#_5S>EY6{=C_R+4;pYoM?&3upn6dtl725IXE*AWM^&>rg{FzK}o2dD~X%RPyn>ap9$0N=Ine!35)!;W%iGXqH342wRfdFqUkWWjD2 zjrjTn_c43m8Y8}H{W7|RlfwRE*U>f3pquXKq-*TmewY#*67W49_JZ8ln(f6vQ3EJ| zT%6_s6qtcMmP9MO+k7Rh?RBK*p?_Wvd$7WWZl`IB#55bUiRgA5=>nMy?qe0T3l7v!Bm29V&b0SwmxxvDxITiQfV_N@!@ z#vlWz0JXGhMob>@D}Hv&&w1ifbx6w($xgKAEB@GKvCIP$muP`A1|!GMuq9Oo+H2|# zwBvSj^$FTZ%ynjv0VKS%wH7T%(FaM@0W-O}gENcUjd~vC0CP~!&y`dL89uC<(jlouU6$@ z0BN!LxYQhcMJ#C*%T;wi7lgPQbk`jV=10C0lFFmvb&vrReC0u0C{`<0;L3Q;9CTc% zs^hbhC+HD8Chr=tR?dA=jUfkoYyZC5spmnGA+EDuW&!dw zg7xmFVg}XQa9{n`4Io$XLcJoY7ytuEp`tf{T*V7G0qom5K&HR7=_r+{*9RFu0#&OO zFMK%IO;7fnH^`e0GJpzDr$xNLUxe74bmjp{yLbW2;a{O}W{?3S%tC1qFK8#Ch_?X- zoQSFnGJqI!8cp2+^R*lvh|u!y`)e`!hF5oZ1E^8O3sSBR0LRrGh}5F~r{S+kx|zvJ z11NfyO1yXhW+U?gw2R0i#6Oml!=qv!lyvz^-2qCvctOkA!5QS5!-KD!F`FSugJ46> z0179gD+0(hd?V%Rh+Ez9$>A$BxW`VNrt;nuk5E}|{zEXtRox-(#SEbEODb+wlO|r^ zufDe86}FN^w3|X|Uf?4gm)^*gY2ul5Qsgg*1;`a)SLdEt@qz*5 zN~M&yQ%@9A{`u99S2uvxv_C;?({UVFFl2+Y%nGFn}0$^zqFHD{&mPrV)dFBC1yLf?TdMKMg29WUbq*c7&n!Q-v zY8XI_IgO_7aLwJpBdhq>TE?q}S9f>=s8PiW+A>8_cewsiOT()>Y7S7+#S8EqJUtJ7 znZ-4CN5wwK04n`slZh8E@Z23dG|Y2&xT-t&ItafRRP?p*q^mpX4v=g3rdH|>s5y|c zmH#3Oa(D2Y8&WC>?zCOi9pYZh016;gH>*h#FYu8s_ZL~D>EBh|QM8*kfWqny@wg)? z;sr23v!~XokHpGf5(|*FbmxX!?hXMl*V(VpWPQjEnx?oJHr&dIz4a;AE^IEGZr zd3$H0V1oh=Yd|5dda)CGfz_%T(G^L8#lP+`G3xO?l)uap({V#7se4UTahPJ)$yX+_ zKm!fdz4!i7>p7b* zmv82e6DuUEeEx1b?tJb~&+g4Wc1q8mf8P3fifcf49>20f0|O%y3x|LLkkP2d6dbFT zWn9d^;@9(cmPNC3>Q>*CJpR4#SIXnizc*{$^Ti#H@|CW9eeSH{zT=C6But-mTv{Px zXH);y?0DuqrHs7qTLeJ{K}`JM-x&LOj`y>9PjjZ<*?rWsXrt4|56_#GZuh_07jgdC zU8RiTAZ8(i`V9^W)>|iT)tC5nVfv|~U2i>KJBG@t-CKCv`s*Xh!_2`(~$y* znX}~l(P`^!Pv4!^xA|Mu*9A`JcK>AZU=elL#R(2VunRJ@Cd_?w;?``xWse^eZDg`u z%N|-fqhk8I5_iR#w|6sHwnkNm%@myISH5MExgIR^4=iKaf7oocNks4WlfV?f;OXk; Jvd$@?2>>1W>>dCB From 6f3aac4e83f811f43886483a045fe72915b639d0 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 8 Jan 2020 23:09:07 -0500 Subject: [PATCH 06/26] pestilent defiler autofires --- Items/Weapons/Ranged/PestilentDefiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/PestilentDefiler.cs b/Items/Weapons/Ranged/PestilentDefiler.cs index eb2b5d68f5..5d356ae7d5 100644 --- a/Items/Weapons/Ranged/PestilentDefiler.cs +++ b/Items/Weapons/Ranged/PestilentDefiler.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.UseSound = SoundID.Item40; - item.autoReuse = false; + item.autoReuse = true; item.shootSpeed = 20f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 97; From 348c5983ab283a98d44689e966098521e95c7a47 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 8 Jan 2020 23:30:16 -0500 Subject: [PATCH 07/26] list stuff --- CalamityMod.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CalamityMod.cs b/CalamityMod.cs index f4610fe650..fed4d555d1 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -870,6 +870,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -916,6 +918,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), //Cryonic Bar set stuff, could potentially be removed ModContent.ItemType(), ModContent.ItemType(), @@ -1034,6 +1038,9 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -1976,6 +1983,8 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), ModContent.ItemType() }; @@ -1992,6 +2001,8 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), ModContent.ProjectileType() }; From 235550006f0cee752b6f60631152132228feb3fe Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 8 Jan 2020 23:33:16 -0500 Subject: [PATCH 08/26] added turbulance to luminous striker recipe --- Items/Weapons/Rogue/LuminousStriker.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Weapons/Rogue/LuminousStriker.cs b/Items/Weapons/Rogue/LuminousStriker.cs index 88f668ebad..c3ad2ce218 100644 --- a/Items/Weapons/Rogue/LuminousStriker.cs +++ b/Items/Weapons/Rogue/LuminousStriker.cs @@ -47,6 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ItemID.FragmentStardust, 10); recipe.AddTile(TileID.LunarCraftingStation); From 238c577e471e9d4d16923ad41ecc759590d5f767 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Thu, 9 Jan 2020 19:32:04 +0000 Subject: [PATCH 09/26] Shattered Sun Rework --- Items/Weapons/Rogue/ShatteredSun.cs | 17 +- Projectiles/Rogue/ShatteredSunFireball.cs | 218 +++++++++++++++++++++ Projectiles/Rogue/ShatteredSunFireball.png | Bin 0 -> 3751 bytes Projectiles/Rogue/ShatteredSunKnife.cs | 32 ++- 4 files changed, 260 insertions(+), 7 deletions(-) create mode 100644 Projectiles/Rogue/ShatteredSunFireball.cs create mode 100644 Projectiles/Rogue/ShatteredSunFireball.png diff --git a/Items/Weapons/Rogue/ShatteredSun.cs b/Items/Weapons/Rogue/ShatteredSun.cs index c501b0d739..cf2e7dbab8 100644 --- a/Items/Weapons/Rogue/ShatteredSun.cs +++ b/Items/Weapons/Rogue/ShatteredSun.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,14 +12,15 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Shattered Sun"); - Tooltip.SetDefault("Throws daggers that split twice and explode upon contact"); + Tooltip.SetDefault("Throws daggers that transform into homing meteors\n" + + "Stealth strikes fire volleys of meteors from the player"); } public override void SafeSetDefaults() { item.width = 56; item.height = 56; - item.damage = 60; + item.damage = 110; item.crit += 10; item.noMelee = true; item.noUseGraphic = true; @@ -45,5 +47,16 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.SetResult(this); recipe.AddRecipe(); } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.Calamity().StealthStrikeAvailable()) + { + int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[stealth].Calamity().stealthStrike = true; + return false; + } + return true; + } } } diff --git a/Projectiles/Rogue/ShatteredSunFireball.cs b/Projectiles/Rogue/ShatteredSunFireball.cs new file mode 100644 index 0000000000..c83f623ddd --- /dev/null +++ b/Projectiles/Rogue/ShatteredSunFireball.cs @@ -0,0 +1,218 @@ +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class ShatteredSunFireball : ModProjectile + { + int counter = 0; + float multiplier = 1f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Flare"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + Main.projFrames[projectile.type] = 3; + } + + public override void SetDefaults() + { + projectile.width = 42; + projectile.height = 42; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.extraUpdates = 1; + projectile.penetrate = 1; + projectile.Calamity().rogue = true; + projectile.tileCollide = false; + projectile.timeLeft = 500; + } + + public override void AI() + { + counter++; + if (counter == 20 && !projectile.Calamity().stealthStrike) + { + projectile.tileCollide = true; + } + if (counter % 5 == 0) + { + multiplier -= 0.05f; + } + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 2) + { + projectile.frame = 0; + } + + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + Lighting.AddLight(projectile.Center, 0.7f, 0.3f, 0f); + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 400f; + bool flag17 = false; + for (int num475 = 0; num475 < 200; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + if (flag17) + { + float num483 = 20f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + } + float num633 = 700f; + Vector2 vector46 = projectile.position; + bool flag25 = false; + for (int num645 = 0; num645 < 200; num645++) + { + NPC nPC2 = Main.npc[num645]; + if (nPC2.CanBeChasedBy(projectile, false)) + { + float num646 = Vector2.Distance(nPC2.Center, projectile.Center); + if (!flag25) + { + num633 = num646; + vector46 = nPC2.Center; + flag25 = true; + } + } + } + if (flag25 && projectile.ai[0] == 0f) + { + Vector2 vector47 = vector46 - projectile.Center; + float num648 = vector47.Length(); + vector47.Normalize(); + if (num648 > 200f) + { + float scaleFactor2 = 8f; + vector47 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + else + { + float num649 = 4f; + vector47 *= -num649; + projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + damage = (int)((double)damage * multiplier); + if (projectile.Calamity().stealthStrike) + { + int numProj = 5; + float rotation = MathHelper.ToRadians(10); + if (projectile.owner == Main.myPlayer) + { + int spread = 6; + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); + Vector2 position = Main.player[projectile.owner].position; + Projectile.NewProjectile(position.X, position.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner, 0f, 0f); + spread -= Main.rand.Next(2, 6); + } + projectile.active = false; + } + } + target.AddBuff(ModContent.BuffType(), 180); + } + + public override void Kill(int timeLeft) + { + + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = projectile.height = 200; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 4; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 12; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + } + for (int num625 = 0; num625 < 3; num625++) + { + float scaleFactor10 = 0.33f; + if (num625 == 1) + { + scaleFactor10 = 0.66f; + } + if (num625 == 2) + { + scaleFactor10 = 1f; + } + int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + Gore gore = Main.gore[num626]; + gore.velocity *= scaleFactor10; + gore.velocity.X += 1f; + gore.velocity.Y += 1f; + num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + gore.velocity *= scaleFactor10; + gore.velocity.X -= 1f; + gore.velocity.Y += 1f; + num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + gore.velocity *= scaleFactor10; + gore.velocity.X += 1f; + gore.velocity.Y -= 1f; + num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f); + gore.velocity *= scaleFactor10; + gore.velocity.X -= 1f; + gore.velocity.Y -= 1f; + } + } + } +} diff --git a/Projectiles/Rogue/ShatteredSunFireball.png b/Projectiles/Rogue/ShatteredSunFireball.png new file mode 100644 index 0000000000000000000000000000000000000000..ca9b1d8ac64d0d6ec9f6d7fa2e06ec076810c4de GIT binary patch literal 3751 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 RbbkN<002ovPDHLkV1i9}bZ-Cv literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index e6b6337304..5143d47761 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.width = 56; projectile.height = 56; projectile.friendly = true; - projectile.penetrate = 3; + projectile.penetrate = 4; projectile.timeLeft = 300; projectile.alpha = 255; projectile.tileCollide = false; @@ -48,18 +48,40 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; } - if (projectile.ai[1] == 12f) + if (projectile.ai[1] == 25f) { - int numProj = 2; + int numProj = 5; float rotation = MathHelper.ToRadians(10); if (projectile.owner == Main.myPlayer) { + int spread = 6; for (int i = 0; i < numProj; i++) { - Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Vector2 perturbedspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedspeed.X * 0.8f, perturbedspeed.Y * 0.8f, ModContent.ProjectileType(), (int)((double)projectile.damage * 1.5), 1f, projectile.owner, 0f, 0f); + Main.projectile[proj].Calamity().stealthStrike = projectile.Calamity().stealthStrike; + spread -= Main.rand.Next(2, 6); } + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); projectile.active = false; + for (int num621 = 0; num621 < 4; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 12; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + } } } } From f5033eeb5e62e4a571a5fb19d60176d4e8bdcf85 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 9 Jan 2020 15:07:51 -0500 Subject: [PATCH 10/26] weapon balancing --- Items/Weapons/Melee/ExoGladius.cs | 2 +- Items/Weapons/Ranged/MagnomalyCannon.cs | 2 +- Items/Weapons/Rogue/Supernova.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/ExoGladius.cs b/Items/Weapons/Melee/ExoGladius.cs index a337ef40dd..794de98f0f 100644 --- a/Items/Weapons/Melee/ExoGladius.cs +++ b/Items/Weapons/Melee/ExoGladius.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 12; item.width = 56; item.height = 56; - item.damage = 3599; + item.damage = 3001; item.melee = true; item.knockBack = 9.9f; item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Ranged/MagnomalyCannon.cs b/Items/Weapons/Ranged/MagnomalyCannon.cs index dc34756ef1..6203417bf3 100644 --- a/Items/Weapons/Ranged/MagnomalyCannon.cs +++ b/Items/Weapons/Ranged/MagnomalyCannon.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 1001; + item.damage = 1301; item.ranged = true; item.width = 84; item.height = 30; diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index 32944f1383..b75aa31dc9 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -21,7 +21,7 @@ Stealth strikes release energy as they fly"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 699; + item.damage = 1299; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 24; From 6d1d4340ce8c610cbbe82d727010be0ad41652e5 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Thu, 9 Jan 2020 21:00:28 +0000 Subject: [PATCH 11/26] dust + cleanup --- CalamityMod.cs | 2 - Projectiles/Rogue/ShatteredSun2.cs | 86 --------------------- Projectiles/Rogue/ShatteredSun2.png | Bin 1570 -> 0 bytes Projectiles/Rogue/ShatteredSun3.cs | 101 ------------------------- Projectiles/Rogue/ShatteredSun3.png | Bin 1570 -> 0 bytes Projectiles/Rogue/ShatteredSunKnife.cs | 12 +-- 6 files changed, 6 insertions(+), 195 deletions(-) delete mode 100644 Projectiles/Rogue/ShatteredSun2.cs delete mode 100644 Projectiles/Rogue/ShatteredSun2.png delete mode 100644 Projectiles/Rogue/ShatteredSun3.cs delete mode 100644 Projectiles/Rogue/ShatteredSun3.png diff --git a/CalamityMod.cs b/CalamityMod.cs index fed4d555d1..d0783e3c49 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1952,8 +1952,6 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType(), - ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), diff --git a/Projectiles/Rogue/ShatteredSun2.cs b/Projectiles/Rogue/ShatteredSun2.cs deleted file mode 100644 index b7f51939e0..0000000000 --- a/Projectiles/Rogue/ShatteredSun2.cs +++ /dev/null @@ -1,86 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class ShatteredSun2 : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Shattered Sun"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = 56; - projectile.height = 56; - projectile.friendly = true; - projectile.penetrate = 3; - projectile.timeLeft = 300; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 15; - projectile.Calamity().rogue = true; - } - - public override void AI() - { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; - if (projectile.spriteDirection == -1) - { - projectile.rotation -= 1.57f; - } - projectile.ai[1] += 1f; - if (projectile.ai[1] == 8f) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(10); - if (projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5f), projectile.knockBack, projectile.owner, 0f, 0f); - } - projectile.active = false; - } - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (projectile.timeLeft > 299) - return false; - - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); - return false; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); - return true; - } - - public override void Kill(int timeLeft) - { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 246, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f, 0, default, 1f); - } - } - } -} diff --git a/Projectiles/Rogue/ShatteredSun2.png b/Projectiles/Rogue/ShatteredSun2.png deleted file mode 100644 index 95bfbda427149a406b7501b262a37e893e1201f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1570 zcmV+-2Hp9IP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1-D5=K~!i%?V5i~ zlyw}(j~{o(j}D0g!IMB(WI@v?%(Br+x3Z{B7Pe7MXVcnpxmuC7)?Y4XQmd)`Q!Zw+ z+?1lFmeW-%rz>-#nmUPzK_^Hlzmy*bDjo07^S<5lfd_O$ZQS$P9^TLQc<%1G=l#4t z-ye5T(=rweIj(}t^wg+f^|zfxyYhjUnK>O!*85MRO>VTKbdW@zgDu6+LCMMoml=D)ijt?G%Rk%*C7yT}96jGB z_r4X^+u=#?VCVy`+Hwk;rskam*vRAaIIuQX|G=@;hj#qbPq7^mO}qQ@^Mk^Bvd*Wk2}QPgPKzNj{HNnHgnuC43(`o1fH+ zbDHYxH#r*y{%<>I5OR=NEXtG2#5e-Dg4!WEp|f?@>L;MgB>%6`*PVdFv@DY+YI6Na6rebbCw6G)t`tgQlXzj@cXb_#v&|Nqhk&{8fEC#`q;>d;> zDSM`xEw+W;-d%YGZ5&`H}tjnzm;ui@ws z%<3gx=&tRDq3qX6AHElwTO^J(9+Ag&6(u^0GrTwBGyHXK^x1{&pk};k%2@$n)>6E+ z(Dy69hLYDRWF_IgTTeji_H;vEsuJh)*wYmqg>xRbJnGwzz;;kW2h&_~kKd7c2|7Q$ z3zzhTH)M6rS8nu2#;oA0O)H^vkX7=@a><~(Ub0zO`7D&wReTOD*(}vE(dEQB_Y4f8 zosr~$p6Qmgq%d%t?VuIq1u|j@f-6_?SOOY!;QrJ%q4Q_o31xp)^P@P$>Ph(c&iV>y zh}vC{#V<-m!{&h|md%?3Wxwc-j3{8 z*)ibS%>I+Ix~4}ue0`2-*}}I%d^j8G-0AC9}abmJim;w_0>iUwLLK+by#X zu8#(0${oQG51nH+xe~y(?VuHOaK;qr2aovMphy4dfTOyq`8bt;HEF*Zgci)_!;#XB*5ct23XU93O}0clOE3II$hPQuMF<#=zw8tZez!;vY>? z_40jFp*>wPwq#bVvZu375@KTTy0(K8#nn2@?CG_ayfiP)xu;*U#;W{s*+R58Rm=BR z_DJShqkmg%RfY9;6neJ6s%&+f?cnu7XEezz?QWw#90iI`F?x4f*AGI=& U280JPA^-pY07*qoM6N<$g0*H3SpWb4 diff --git a/Projectiles/Rogue/ShatteredSun3.cs b/Projectiles/Rogue/ShatteredSun3.cs deleted file mode 100644 index 42bf1b87a6..0000000000 --- a/Projectiles/Rogue/ShatteredSun3.cs +++ /dev/null @@ -1,101 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class ShatteredSun3 : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Shattered Sun"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 4; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = 56; - projectile.height = 56; - projectile.friendly = true; - projectile.penetrate = 1; - projectile.timeLeft = 300; - projectile.Calamity().rogue = true; - } - - public override void AI() - { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f; - if (projectile.spriteDirection == -1) - { - projectile.rotation -= 1.57f; - } - float centerX = projectile.Center.X; - float centerY = projectile.Center.Y; - float num474 = 750f; - bool homeIn = false; - for (int i = 0; i < 200; i++) - { - if (Main.npc[i].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].Center, 1, 1)) - { - float num476 = Main.npc[i].position.X + (float)(Main.npc[i].width / 2); - float num477 = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2); - float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); - if (num478 < num474) - { - num474 = num478; - centerX = num476; - centerY = num477; - homeIn = true; - } - } - } - if (homeIn) - { - float num483 = 20f; - Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num484 = centerX - vector35.X; - float num485 = centerY - vector35.Y; - float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); - num486 = num483 / num486; - num484 *= num486; - num485 *= num486; - projectile.velocity.X = (projectile.velocity.X * 15f + num484) / 16f; - projectile.velocity.Y = (projectile.velocity.Y * 15f + num485) / 16f; - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (projectile.timeLeft > 299) - return false; - - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); - return false; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); - return true; - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 246, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f, 0, default, 1f); - } - } - } -} diff --git a/Projectiles/Rogue/ShatteredSun3.png b/Projectiles/Rogue/ShatteredSun3.png deleted file mode 100644 index 95bfbda427149a406b7501b262a37e893e1201f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1570 zcmV+-2Hp9IP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1-D5=K~!i%?V5i~ zlyw}(j~{o(j}D0g!IMB(WI@v?%(Br+x3Z{B7Pe7MXVcnpxmuC7)?Y4XQmd)`Q!Zw+ z+?1lFmeW-%rz>-#nmUPzK_^Hlzmy*bDjo07^S<5lfd_O$ZQS$P9^TLQc<%1G=l#4t z-ye5T(=rweIj(}t^wg+f^|zfxyYhjUnK>O!*85MRO>VTKbdW@zgDu6+LCMMoml=D)ijt?G%Rk%*C7yT}96jGB z_r4X^+u=#?VCVy`+Hwk;rskam*vRAaIIuQX|G=@;hj#qbPq7^mO}qQ@^Mk^Bvd*Wk2}QPgPKzNj{HNnHgnuC43(`o1fH+ zbDHYxH#r*y{%<>I5OR=NEXtG2#5e-Dg4!WEp|f?@>L;MgB>%6`*PVdFv@DY+YI6Na6rebbCw6G)t`tgQlXzj@cXb_#v&|Nqhk&{8fEC#`q;>d;> zDSM`xEw+W;-d%YGZ5&`H}tjnzm;ui@ws z%<3gx=&tRDq3qX6AHElwTO^J(9+Ag&6(u^0GrTwBGyHXK^x1{&pk};k%2@$n)>6E+ z(Dy69hLYDRWF_IgTTeji_H;vEsuJh)*wYmqg>xRbJnGwzz;;kW2h&_~kKd7c2|7Q$ z3zzhTH)M6rS8nu2#;oA0O)H^vkX7=@a><~(Ub0zO`7D&wReTOD*(}vE(dEQB_Y4f8 zosr~$p6Qmgq%d%t?VuIq1u|j@f-6_?SOOY!;QrJ%q4Q_o31xp)^P@P$>Ph(c&iV>y zh}vC{#V<-m!{&h|md%?3Wxwc-j3{8 z*)ibS%>I+Ix~4}ue0`2-*}}I%d^j8G-0AC9}abmJim;w_0>iUwLLK+by#X zu8#(0${oQG51nH+xe~y(?VuHOaK;qr2aovMphy4dfTOyq`8bt;HEF*Zgci)_!;#XB*5ct23XU93O}0clOE3II$hPQuMF<#=zw8tZez!;vY>? z_40jFp*>wPwq#bVvZu375@KTTy0(K8#nn2@?CG_ayfiP)xu;*U#;W{s*+R58Rm=BR z_DJShqkmg%RfY9;6neJ6s%&+f?cnu7XEezz?QWw#90iI`F?x4f*AGI=& U280JPA^-pY07*qoM6N<$g0*H3SpWb4 diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index 5143d47761..8082b784e9 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -64,22 +64,22 @@ namespace CalamityMod.Projectiles.Rogue } Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); projectile.active = false; - for (int num621 = 0; num621 < 4; num621++) + for (int num621 = 0; num621 < 8; num621++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; if (Main.rand.NextBool(2)) { - Main.dust[num622].scale = 0.5f; + //Main.dust[num622].scale = 0.5f; Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 12; num623++) + for (int num623 = 0; num623 < 16; num623++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 3f); + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default, 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } } From 9f5b5061c7ac9346ded045afe4df9b77dbe4e653 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Thu, 9 Jan 2020 22:52:58 +0000 Subject: [PATCH 12/26] Shattered Sun stealth strike tooltip clarification --- Items/Weapons/Rogue/ShatteredSun.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/ShatteredSun.cs b/Items/Weapons/Rogue/ShatteredSun.cs index cf2e7dbab8..acfb0ad0a0 100644 --- a/Items/Weapons/Rogue/ShatteredSun.cs +++ b/Items/Weapons/Rogue/ShatteredSun.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Shattered Sun"); Tooltip.SetDefault("Throws daggers that transform into homing meteors\n" + - "Stealth strikes fire volleys of meteors from the player"); + "Stealth strikes fire volleys of meteors from the player on meteor hits"); } public override void SafeSetDefaults() From 671f2fe0b3ed93f82bd34e6165aa0f99d2e376c0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 9 Jan 2020 18:24:03 -0500 Subject: [PATCH 13/26] nanotech tooltip fix --- Items/Accessories/Nanotech.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 6c8860a212..fd26b56a7c 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories if (line2.mod == "Terraria" && line2.Name == "Tooltip0") { line2.text = "Rogue projectiles create nanoblades as they travel\n" + - "Stealth strikes summon lunar flares and sparks on enemy hits\n" + + "Stealth strikes summon nanobeams and sparks on enemy hits\n" + "Stealth strikes have +20 armor penetration, deal 5% more damage, and heal for 1 HP\n" + "Rogue weapons have a chance to instantly kill normal enemies\n" + "5% increased rogue damage, 5% increased rogue crit chance, and 15% increased rogue velocity\n" + From b2bef3ad3eed7f8e95637c5e34fc81c734e565e2 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Thu, 9 Jan 2020 23:50:25 +0000 Subject: [PATCH 14/26] Balanced Shattered Sun a bit --- Items/Weapons/Rogue/ShatteredSun.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/ShatteredSun.cs b/Items/Weapons/Rogue/ShatteredSun.cs index acfb0ad0a0..d3bf873fa8 100644 --- a/Items/Weapons/Rogue/ShatteredSun.cs +++ b/Items/Weapons/Rogue/ShatteredSun.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue { item.width = 56; item.height = 56; - item.damage = 110; + item.damage = 90; item.crit += 10; item.noMelee = true; item.noUseGraphic = true; From 673a34e7529723458f9c8ce5ffb800341f0e7ba8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 9 Jan 2020 19:15:57 -0500 Subject: [PATCH 15/26] stuff --- Projectiles/Rogue/GodsParanoiaProj.cs | 7 ++----- Projectiles/Rogue/SupernovaBomb.cs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Projectiles/Rogue/GodsParanoiaProj.cs b/Projectiles/Rogue/GodsParanoiaProj.cs index 93dd511324..46b15b94e7 100644 --- a/Projectiles/Rogue/GodsParanoiaProj.cs +++ b/Projectiles/Rogue/GodsParanoiaProj.cs @@ -85,10 +85,7 @@ namespace CalamityMod.Projectiles.Rogue } int num988 = 15; bool flag55 = false; - float[] var_2_2CB4E_cp_0 = projectile.localAI; - int var_2_2CB4E_cp_1 = 0; - float num73 = var_2_2CB4E_cp_0[var_2_2CB4E_cp_1]; - var_2_2CB4E_cp_0[var_2_2CB4E_cp_1] = num73 + 1f; + projectile.localAI[0] += 1f; if (projectile.localAI[0] % 30f == 0f) { flag55 = true; @@ -115,7 +112,7 @@ namespace CalamityMod.Projectiles.Rogue float pcy = projectile.Center.Y; float var1 = 800f; bool flag = false; - for (int npcvar = 0; npcvar < 200; npcvar++) + for (int npcvar = 0; npcvar < Main.npc.Length; npcvar++) { if (Main.npc[npcvar].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[npcvar].Center, 1, 1)) { diff --git a/Projectiles/Rogue/SupernovaBomb.cs b/Projectiles/Rogue/SupernovaBomb.cs index 68d210d41d..2a765c4096 100644 --- a/Projectiles/Rogue/SupernovaBomb.cs +++ b/Projectiles/Rogue/SupernovaBomb.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, 2f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, 2f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.8), projectile.knockBack, projectile.owner, 0f, 0f); } stealthTimer = 8; } From 1bfcc58167f2a48d966bc65892e853111badc371 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 9 Jan 2020 20:34:01 -0500 Subject: [PATCH 16/26] added lantern of the soul RIV --- Items/Weapons/Summon/LanternoftheSoul.cs | 49 ++++++++ Items/Weapons/Summon/LanternoftheSoul.png | Bin 0 -> 1296 bytes Projectiles/Healing/EssenceFlame.png | Bin 686 -> 997 bytes Projectiles/Melee/EssenceFlame2.png | Bin 686 -> 997 bytes Projectiles/Melee/EssenceScythe.cs | 2 +- Projectiles/Rogue/GodsParanoiaProj.cs | 2 +- Projectiles/Summon/DreadmineTurret.cs | 2 +- Projectiles/Summon/LanternFlame.cs | 141 ++++++++++++++++++++++ Projectiles/Summon/LanternFlame.png | Bin 0 -> 997 bytes Projectiles/Summon/LanternSoul.cs | 85 +++++++++++++ Projectiles/Summon/LanternSoul.png | Bin 0 -> 558 bytes 11 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 Items/Weapons/Summon/LanternoftheSoul.cs create mode 100644 Items/Weapons/Summon/LanternoftheSoul.png create mode 100644 Projectiles/Summon/LanternFlame.cs create mode 100644 Projectiles/Summon/LanternFlame.png create mode 100644 Projectiles/Summon/LanternSoul.cs create mode 100644 Projectiles/Summon/LanternSoul.png diff --git a/Items/Weapons/Summon/LanternoftheSoul.cs b/Items/Weapons/Summon/LanternoftheSoul.cs new file mode 100644 index 0000000000..530a31b1f2 --- /dev/null +++ b/Items/Weapons/Summon/LanternoftheSoul.cs @@ -0,0 +1,49 @@ +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class LanternoftheSoul : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lantern of the Soul"); + Tooltip.SetDefault("Summons a lantern turret to fight for you"); + } + + public override void SetDefaults() + { + item.damage = 180; + item.summon = true; + item.sentry = true; + item.mana = 10; + item.width = 42; + item.height = 60; + item.useTime = 36; + item.useAnimation = 36; + item.useStyle = 1; + item.noMelee = true; + item.knockBack = 5f; + item.value = Item.buyPrice(1, 40, 0, 0); + item.rare = 10; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.Calamity().postMoonLordRarity = 22; + item.UseSound = SoundID.Item44; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + position = Main.MouseWorld; + speedX = 0; + speedY = 0; + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); + player.UpdateMaxTurrets(); + return false; + } + } +} diff --git a/Items/Weapons/Summon/LanternoftheSoul.png b/Items/Weapons/Summon/LanternoftheSoul.png new file mode 100644 index 0000000000000000000000000000000000000000..2f2f239a4b6074bc340a988a8d17224106c3b861 GIT binary patch literal 1296 zcmV+r1@HQaP)3hnZv%!o-^m1{m*Z{Z@zE7Jx)i2KM51F zyM9S{__)&PON!6VaE!rtp%7S?zJ+)sUEM*gifqJ)+D_=SIg5zoooi>!CTbg@++jbr zzM@mjAL=EujJS;&D-=$Yo0&lx-Rovh+t}DjZLgY_)b1;4ebYM0Dg8d{>p3$?m%y9XpvOfRWDM8r5rIMvAEarCvub3eE?YMfBj)arzSWLokR zA~bHpVrr{5@0M1kPtN{y-0gMLc%eFCynlVy10sXi4MHHAG%1Pt%P(G`HqJGc+NRd0 z)CQbA86y-zU@&|{=r71EqDxB4OQezW{tFk+ON0_*2GTJ|o~}Mc$FNDuL~SROXWFnW zknZamA$cjttBB6eTp-PW>UoyaJe3U^D-a4-Fu7E9-m-N0-6b$z7s!6!Qqey%aGRkp*Po#e-r}Bpa^3E7nQO3`oM( zb^CbfVGf7mPd;ipp&N5o(_rcz)lrK)k&h60Bfsud+ZVbts%JE{`3WM%@48n_ZP17s zFO=IVCy3(_(S7JEY!-n%&dC3(nf73R7H{xgp-9=gXsF?m2}HN z&(Y8jwXIN|v|u2JNbleEmd2(ciHm|}qnxPmLV0LSi5*2__;$UG+AH7hNn=8Wjx22Q ziEWZ?hK#6fgo41DlswvxdpcU^6f$z2Z(1eEP0MP`*VdkFBUEJq*c&~2&_Ix^db`z( zUK^QIUXLGuQyC+alSJkY@9u2>VTq(_;8txD_bYAGc0yHNI$>BAtp><9d6vZQo8S`F zJpO5Dm235?5UwR^yinE1K+>w0<2lQBuBET>@h)mFRfrwLt#hKXf=|G;C$A~|J>|9$ zswJ>T0OKxjTZ`msEA4`e9CnK{UutsRYbPE+i!P|=szn|RYU{n z{)uzxD@by02HB7GmwA_T>}8|=5)Hdhe+BY&6j=}=6OY-*0eC)&n9g$qWn}v2g{mSH zvZ1O{@kT`K+`-gh7m7E>US4je^H~Lxr5pjz#je!rpF4z1tIJZ@ga$h0+(i*t;*yt9 zSM&2)LFjj$iM*8G$NSx*Q|Xc>&q-<#>74(qQ0$pd0r7ViI&-0TbHZ!S6l|g)7Yf@^ zWk){4#$TNwtCWDK@j|VV^7lI3Yf7qREojv|tAc|q^e6U?x4477-;)3U002ovPDHLk GV1fW#WP3XR literal 0 HcmV?d00001 diff --git a/Projectiles/Healing/EssenceFlame.png b/Projectiles/Healing/EssenceFlame.png index 2ef4c2dba535b5bf28d0821bec795e8527c0946c..3009ead2138f69b06c5a4c22476e120420930559 100644 GIT binary patch literal 997 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 Uj()) { diff --git a/Projectiles/Summon/LanternFlame.cs b/Projectiles/Summon/LanternFlame.cs new file mode 100644 index 0000000000..48ed31a2fb --- /dev/null +++ b/Projectiles/Summon/LanternFlame.cs @@ -0,0 +1,141 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class LanternFlame : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Flame"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.minion = true; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.alpha = 255; + projectile.tileCollide = false; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.65f / 255f); + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + + if (projectile.alpha > 0) + { + projectile.alpha -= 10; + } + if (projectile.alpha <= 25) + { + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 700f; + bool flag17 = false; + if (Main.player[projectile.owner].HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[Main.player[projectile.owner].MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float num950 = npc.position.X + (float)(npc.width / 2); + float num951 = npc.position.Y + (float)(npc.height / 2); + float num952 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num950) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num951); + if (num952 < num474) + { + num474 = num952; + num472 = num950; + num473 = num951; + flag17 = true; + } + } + } + else + { + for (int num475 = 0; num475 < Main.npc.Length; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + } + if (flag17) + { + float num483 = 16f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + } + } + } + + public override void Kill(int timeLeft) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 48; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 74); + for (int num621 = 0; num621 < 10; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 15; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.ShadowFlame, 180); + } + } +} diff --git a/Projectiles/Summon/LanternFlame.png b/Projectiles/Summon/LanternFlame.png new file mode 100644 index 0000000000000000000000000000000000000000..3009ead2138f69b06c5a4c22476e120420930559 GIT binary patch literal 997 zcmVPx&pGibPRA_tBq;eyp$-3q%IB#z(q|)vpey#k(ij;D(kDhdfUTcoUf$* zxQlE>`m8P9EC6uf&O68J5n6-`iLP>XO!+)`BH0aOUGlD$6tbn2TJXtv9Etpw>j6pK z+@w-#D6{8orC3ib5eeNa$BO2-`s%!nd*!D+0z+|TA0Ze938#@q}Yd^AuB$G@l zgdK9UX1`y12EgU+48TZYpGa3SRZ<8>5*Yv=G>z=oe#3^+AaXqjUCHGI>CnrbK#M|)h?{mg4x@s15nP6S)Mid zhGt>=mNr{rz$O*7$s7W!);it?0B>qkJ_`9GP;cmTU=n~sR8 zjU5l#k#3NqeC_x$}^^I`R)6;Oq9T z2ap?0I3k*#YB@I#x-0C(@lhY(#h04W&K{ATi%2HWs~+iY*4p*#R)t+oIg0F0^(_xz zI-geS*rApqIt+vxDE69x`|P-mqTH;Hf%ZV^*>3K&{d8m;n}6vjRy}vxjwf0=$sANhMN(-` zjT|?+T9N(As7SB0Pv_Hm6Qk@AMOE5GGJCUyoa210yV4#=>eJjoJq zVL4~}NfwdBkw~1sjM>w(6G3LMsV)Teh#Jjb3W2U4pTGM66=&H|$5TARdUl|{K`SDO Tp<8Vn00000NkvXXu0mjf$= 300f) + { + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + + int num = 0; + for (int i = 0; i < Main.projectile.Length; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == ModContent.ProjectileType()) + { + num++; + } + } + if (num < 20) + { + projectile.ai[1] += (float)Main.rand.Next(2,6) + 1f; + if (projectile.ai[1] >= 75f) + { + projectile.ai[1] = 0f; + projectile.netUpdate = true; + if (projectile.owner == Main.myPlayer) + { + float startOffsetX = Main.rand.NextFloat(15f, 200f) * (Main.rand.NextBool() ? -1f : 1f); + float startOffsetY = Main.rand.NextFloat(15f, 200f) * (Main.rand.NextBool() ? -1f : 1f); + Vector2 startPos = new Vector2(projectile.position.X + startOffsetX, projectile.position.Y + startOffsetY); + Vector2 speed = new Vector2(0f, 0f); + Projectile.NewProjectile(startPos, speed, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + } + } + } + } + + public override bool CanDamage() + { + return false; + } + } +} diff --git a/Projectiles/Summon/LanternSoul.png b/Projectiles/Summon/LanternSoul.png new file mode 100644 index 0000000000000000000000000000000000000000..335f855c50597b20adc22f09a261bb5956da2461 GIT binary patch literal 558 zcmV+}0@3}6P)NklHpG_y!o+ZV+L;jPJFhihs|f$7}~&V%Wro3@~M=Mwx7DUW~vS62*JNkp^llwPfjS6)6zwaM|)uG27hL31&5zK;uqJFT8CeQB! z)47R7V0!CLNL+}jYl7+5H?ML>ISqWBE%Bf48;7oQ1s$@4R}u(}vMqR@RT zX`%*Ja%kan{63<&MX=~%I-4N6arg7yDn7)Q}wP1CNa#n)rd(R*t0@DYN zBbr+Tvj7&>!oJ*iePSCu5nN&%UYd`RHPC(bcJo)1)W}G8i_lXOt{jfbN9Y+H-8{ID zXl@bA0+@?nWfVFe=95=8kkVW1$TKhviz`C zaRn=lw@ls+Rgr2m}<>gf@z)J3&UJa&U1pr3LKsSqERXMB$N@^>}+7HqyBD&2$GmBth wPxA&O-7UhEuL!k*(DMy?>Lj{1L8(OmNxJ`1mViZf00000NkvXXu0mjf0DCw5E&u=k literal 0 HcmV?d00001 From 0371193c05b9ac8b93b25ddd2c5740c03d040dec Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Fri, 10 Jan 2020 01:47:52 +0000 Subject: [PATCH 17/26] Stealth Strike too stronk --- Projectiles/Rogue/ShatteredSunFireball.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Rogue/ShatteredSunFireball.cs b/Projectiles/Rogue/ShatteredSunFireball.cs index c83f623ddd..09773911cd 100644 --- a/Projectiles/Rogue/ShatteredSunFireball.cs +++ b/Projectiles/Rogue/ShatteredSunFireball.cs @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Rogue damage = (int)((double)damage * multiplier); if (projectile.Calamity().stealthStrike) { - int numProj = 5; + int numProj = 3; float rotation = MathHelper.ToRadians(10); if (projectile.owner == Main.myPlayer) { @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Rogue { Vector2 perturbedspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); Vector2 position = Main.player[projectile.owner].position; - Projectile.NewProjectile(position.X, position.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.3), 1f, projectile.owner, 0f, 0f); spread -= Main.rand.Next(2, 6); } projectile.active = false; From 2772f131e7b7cc37c1840f8db77de3b606adbb63 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 9 Jan 2020 19:51:49 -0600 Subject: [PATCH 18/26] Lots of shit --- CalPlayer/CalamityPlayer.cs | 45 ++- CalamityMod.cs | 5 +- NPCs/AquaticScourge/AquaticParasite.cs | 4 +- NPCs/AquaticScourge/AquaticScourgeHead.cs | 4 +- NPCs/AquaticScourge/AquaticSeekerBody.cs | 14 +- NPCs/AquaticScourge/AquaticSeekerHead.cs | 16 +- NPCs/AquaticScourge/AquaticSeekerTail.cs | 14 +- NPCs/AquaticScourge/AquaticUrchin.cs | 8 +- NPCs/AstrumDeus/AstrumDeusProbe.png | Bin 675 -> 536 bytes NPCs/AstrumDeus/AstrumDeusProbe2.png | Bin 675 -> 536 bytes NPCs/Calamitas/SoulSeeker.cs | 1 - NPCs/CalamityAI.cs | 147 ++++--- NPCs/CalamityGlobalAI.cs | 219 +++++------ NPCs/CalamityGlobalNPC.cs | 109 +++--- NPCs/Crabulon/CrabulonIdle.cs | 107 +++++- NPCs/Cryogen/Cryogen.cs | 361 ++++++++++++------ NPCs/DevourerofGods/DevourerofGodsBodyS.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsHeadS.cs | 244 +++++++++--- NPCs/DevourerofGods/DevourerofGodsTail.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsTailS.cs | 4 +- NPCs/HiveMind/HiveMindP2.cs | 50 ++- NPCs/Perforator/PerforatorHive.cs | 61 ++- .../PlaguebringerGoliath.cs | 2 +- NPCs/Ravager/RavagerBody.cs | 51 ++- NPCs/Signus/CosmicLantern.cs | 20 +- NPCs/Signus/Signus.cs | 29 +- NPCs/Signus/SignusBomb.cs | 3 +- NPCs/Signus/SignusScreenShaderData.cs | 44 +++ NPCs/Signus/SignusSky.cs | 107 ++++++ Projectiles/Boss/DarkEnergyBall2.cs | 83 ++++ Projectiles/Boss/DarkEnergyBall2.png | Bin 0 -> 4562 bytes Projectiles/Boss/MushBombFall.cs | 17 +- Projectiles/Healing/BurntSiennaProj.cs | 2 +- Projectiles/Healing/CactusHealOrb.cs | 2 +- Projectiles/Healing/EssenceFlame.cs | 2 +- Projectiles/Healing/PhoenixHeal.cs | 2 +- Projectiles/Healing/RainHeal.cs | 2 +- Projectiles/Healing/TerracottaProj.cs | 2 +- Projectiles/Magic/ForbiddenSunburst.cs | 22 -- .../Magic/HellfireExplosionFriendly.cs | 22 -- .../Magic/HellfireExplosionFriendly2.cs | 22 -- Projectiles/Magic/SHPExplosion.cs | 23 -- Projectiles/Magic/VenusianExplosion.cs | 22 -- 44 files changed, 1202 insertions(+), 696 deletions(-) create mode 100644 NPCs/Signus/SignusScreenShaderData.cs create mode 100644 NPCs/Signus/SignusSky.cs create mode 100644 Projectiles/Boss/DarkEnergyBall2.cs create mode 100644 Projectiles/Boss/DarkEnergyBall2.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 75a34ecdf7..5f6aa55854 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -35,6 +35,7 @@ using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.PlaguebringerGoliath; using CalamityMod.NPCs.Providence; +using CalamityMod.NPCs.Signus; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Projectiles.Melee; @@ -1758,7 +1759,10 @@ namespace CalamityMod.CalPlayer bool useHoly = NPC.AnyNPCs(ModContent.NPCType()); player.ManageSpecialBiomeVisuals("CalamityMod:Providence", useHoly); - bool useSBrimstone = NPC.AnyNPCs(ModContent.NPCType()); + bool useDark = NPC.AnyNPCs(ModContent.NPCType()); + player.ManageSpecialBiomeVisuals("CalamityMod:Signus", useDark); + + bool useSBrimstone = NPC.AnyNPCs(ModContent.NPCType()); player.ManageSpecialBiomeVisuals("CalamityMod:SupremeCalamitas", useSBrimstone); bool inAstral = ZoneAstral; @@ -1909,11 +1913,18 @@ namespace CalamityMod.CalPlayer #region InventoryStartup public override void SetupStartInventory(IList items, bool mediumcoreDeath) { - if (!mediumcoreDeath) + Item createItem(int type) + { + Item i = new Item(); + i.SetDefaults(type); + return i; + } + + if (!mediumcoreDeath) { - player.inventory[9].SetDefaults(ModContent.ItemType()); - player.inventory[8].SetDefaults(ModContent.ItemType()); - player.inventory[7].SetDefaults(ModContent.ItemType()); + items.Add(createItem(ModContent.ItemType())); + items.Add(createItem(ModContent.ItemType())); + items.Add(createItem(ModContent.ItemType())); } } #endregion @@ -4248,7 +4259,7 @@ namespace CalamityMod.CalPlayer { if (item.melee) { - damageMult += CalamityWorld.death ? (DHorHoD ? 7.6 : 6.8) : (DHorHoD ? 2.3 : 2.0); // Death Mode values: 8.9 and 8.0, rev: 2.3 and 2.0 + damageMult += (DHorHoD ? 2.3 : 2.0); } } else if (rageMode) @@ -4256,10 +4267,10 @@ namespace CalamityMod.CalPlayer if (item.melee) { double rageDamageBoost = 0.0 + - (rageBoostOne ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostTwo ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostThree ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0); // Death Mode values: 0.6, rev: 0.15 - double rageDamage = (CalamityWorld.death ? (DHorHoD ? 2.0 : 1.7) : (DHorHoD ? 0.65 : 0.5)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5 + (rageBoostOne ? 0.15 : 0.0) + + (rageBoostTwo ? 0.15 : 0.0) + + (rageBoostThree ? 0.15 : 0.0); + double rageDamage = (DHorHoD ? 0.65 : 0.5) + rageDamageBoost; damageMult += rageDamage; } } @@ -4267,7 +4278,7 @@ namespace CalamityMod.CalPlayer { if (item.melee) { - double damageMultAdr = (CalamityWorld.death ? 5.0 : 1.5) * (double)adrenalineDmgMult; // Death Mode values: 6, rev: 1.5 + double damageMultAdr = 1.5 * (double)adrenalineDmgMult; damageMult += damageMultAdr; } } @@ -4538,7 +4549,7 @@ namespace CalamityMod.CalPlayer { if (hasClassType) { - damageMult += CalamityWorld.death ? (DHorHoD ? 7.6 : 6.8) : (DHorHoD ? 2.3 : 2.0); // Death Mode values: 8.9 and 8.0, rev: 2.3 and 2.0 + damageMult += (DHorHoD ? 2.3 : 2.0); } } else if (rageMode) @@ -4546,10 +4557,10 @@ namespace CalamityMod.CalPlayer if (hasClassType) { double rageDamageBoost = 0.0 + - (rageBoostOne ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostTwo ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostThree ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0); // Death Mode values: 0.6, rev: 0.15 - double rageDamage = (CalamityWorld.death ? (DHorHoD ? 2.0 : 1.7) : (DHorHoD ? 0.65 : 0.5)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5 + (rageBoostOne ? 0.15 : 0.0) + + (rageBoostTwo ? 0.15 : 0.0) + + (rageBoostThree ? 0.15 : 0.0); + double rageDamage = (DHorHoD ? 0.65 : 0.5) + rageDamageBoost; damageMult += rageDamage; } } @@ -4557,7 +4568,7 @@ namespace CalamityMod.CalPlayer { if (hasClassType) { - double damageMultAdr = (CalamityWorld.death ? 5.0 : 1.5) * (double)adrenalineDmgMult; // Death Mode values: 6, rev: 1.5 + double damageMultAdr = 1.5 * (double)adrenalineDmgMult; damageMult += damageMultAdr; } } diff --git a/CalamityMod.cs b/CalamityMod.cs index ab63454225..aa2966146b 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -280,7 +280,10 @@ namespace CalamityMod Filters.Scene["CalamityMod:SupremeCalamitas"] = new Filter(new SCalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:SupremeCalamitas"] = new SCalSky(); - Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref(CustomShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh); + Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh); + SkyManager.Instance["CalamityMod:Signus"] = new SignusSky(); + + Filters.Scene["CalamityMod:Astral"] = new Filter(new AstralScreenShaderData(new Ref(CustomShader), "AstralPass").UseColor(0.18f, 0.08f, 0.24f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:Astral"] = new AstralSky(); UIHandler.OnLoad(this); diff --git a/NPCs/AquaticScourge/AquaticParasite.cs b/NPCs/AquaticScourge/AquaticParasite.cs index 31beac86df..e1395c84d4 100644 --- a/NPCs/AquaticScourge/AquaticParasite.cs +++ b/NPCs/AquaticScourge/AquaticParasite.cs @@ -17,11 +17,11 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetDefaults() { npc.noGravity = true; - npc.damage = 15; + npc.damage = Main.hardMode ? 35 : 15; npc.width = 28; npc.height = 28; npc.defense = 5; - npc.LifeMaxNERD(30, bossRush: 30000); + npc.LifeMaxNERD((Main.hardMode ? 200 : 30), bossRush: 30000); npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 00efcd272a..40c9f80706 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -64,11 +64,13 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SendExtraAI(BinaryWriter writer) { writer.Write(npc.chaseable); - } + writer.Write(npc.localAI[1]); + } public override void ReceiveExtraAI(BinaryReader reader) { npc.chaseable = reader.ReadBoolean(); + npc.localAI[1] = reader.ReadSingle(); } public override void AI() diff --git a/NPCs/AquaticScourge/AquaticSeekerBody.cs b/NPCs/AquaticScourge/AquaticSeekerBody.cs index 525390dea7..a185d176a8 100644 --- a/NPCs/AquaticScourge/AquaticSeekerBody.cs +++ b/NPCs/AquaticScourge/AquaticSeekerBody.cs @@ -16,17 +16,17 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetDefaults() { - npc.damage = 15; //70 - npc.width = 16; //28 - npc.height = 16; //28 + npc.damage = Main.hardMode ? 30 : 15; + npc.width = 16; + npc.height = 16; npc.defense = 10; - npc.lifeMax = 60; - if (CalamityWorld.bossRushActive) + npc.lifeMax = Main.hardMode ? 500 : 60; + if (CalamityWorld.bossRushActive) { npc.lifeMax = 60000; } - npc.aiStyle = -1; //new - aiType = -1; //new + npc.aiStyle = -1; + aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticSeekerHead.cs b/NPCs/AquaticScourge/AquaticSeekerHead.cs index a067d313e2..847aa16995 100644 --- a/NPCs/AquaticScourge/AquaticSeekerHead.cs +++ b/NPCs/AquaticScourge/AquaticSeekerHead.cs @@ -13,8 +13,8 @@ namespace CalamityMod.NPCs.AquaticScourge { public const int minLength = 3; public const int maxLength = 4; - public float speed = 3f; //10 - public float turnSpeed = 0.05f; //0.15 + public float speed = 3f; + public float turnSpeed = 0.05f; bool TailSpawned = false; public override void SetStaticDefaults() @@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetDefaults() { - npc.damage = 20; - npc.width = 22; //36 - npc.height = 28; //20 + npc.damage = Main.hardMode ? 40 : 20; + npc.width = 22; + npc.height = 28; npc.defense = 5; - npc.lifeMax = 60; + npc.lifeMax = Main.hardMode ? 500 : 60; if (CalamityWorld.bossRushActive) { npc.lifeMax = 60000; @@ -109,8 +109,8 @@ namespace CalamityMod.NPCs.AquaticScourge { npc.active = false; } - float num188 = speed; - float num189 = turnSpeed; + float num188 = speed * (Main.hardMode ? 3f : 1f); + float num189 = turnSpeed * (Main.hardMode ? 3f : 1f); Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); diff --git a/NPCs/AquaticScourge/AquaticSeekerTail.cs b/NPCs/AquaticScourge/AquaticSeekerTail.cs index dd182b947a..75253344ee 100644 --- a/NPCs/AquaticScourge/AquaticSeekerTail.cs +++ b/NPCs/AquaticScourge/AquaticSeekerTail.cs @@ -16,17 +16,17 @@ namespace CalamityMod.NPCs.AquaticScourge public override void SetDefaults() { - npc.damage = 5; //70 - npc.width = 16; //28 - npc.height = 22; //28 + npc.damage = Main.hardMode ? 15 : 5; + npc.width = 16; + npc.height = 22; npc.defense = 20; - npc.lifeMax = 60; - if (CalamityWorld.bossRushActive) + npc.lifeMax = Main.hardMode ? 500 : 60; + if (CalamityWorld.bossRushActive) { npc.lifeMax = 60000; } - npc.aiStyle = -1; //new - aiType = -1; //new + npc.aiStyle = -1; + aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticUrchin.cs b/NPCs/AquaticScourge/AquaticUrchin.cs index d40c04e557..5a9f61731f 100644 --- a/NPCs/AquaticScourge/AquaticUrchin.cs +++ b/NPCs/AquaticScourge/AquaticUrchin.cs @@ -20,11 +20,11 @@ namespace CalamityMod.NPCs.AquaticScourge { npc.aiStyle = -1; aiType = -1; - npc.damage = 25; - npc.width = 40; //324 - npc.height = 40; //216 + npc.damage = Main.hardMode ? 50 : 25; + npc.width = 40; + npc.height = 40; npc.defense = 10; - npc.lifeMax = 50; + npc.lifeMax = Main.hardMode ? 300 : 50; if (CalamityWorld.bossRushActive) { npc.lifeMax = 50000; diff --git a/NPCs/AstrumDeus/AstrumDeusProbe.png b/NPCs/AstrumDeus/AstrumDeusProbe.png index e08f7efc9e771dccdf159e8cca1025bdb73c7716..cb5bb69dc7c508eab14e0d597a424f80114a13b5 100644 GIT binary patch delta 510 zcmVpGtw}^dR9HvdmCq}KaU92olv>%S&B0?6<+30ZO%0+}y4z$v8SW#*h2eo<3kCo=ID2aM|-iPOtuYbqv@;rN8Ue9+uTRpEn z&u3LG1>wQDPvi1OE>1R;-z|q~!?wY)Q19L>&Lo|BfeWj})_Dnjl$_-=6oW$$ z&A2jCd4=Tc$bWrQnBIoH@hP}|`4p~g(O`0LmV}*ONHsfzZxadlnqXPv{Z@yw`A3-d zZ5{5w`qR~~rR-OTWd?fs@PUL+NLWOchrC+1t&9`1&H+6UaxZ{F~dWPBgqSa*-X_Af+KrP{OrY*peq@%=BK zJHLmC+*>Te{p8#kijIxLEF#J4H8A&+io|6K&gdCfZf@rknqOGLSr*|;$XOt=kW~?h z{WtZ@=p@cos5Uc85UU~*`xp8zrIt`(vqCP{7pKyyWW8Pbp#T5?07*qoM6N<$f}5fB A;{X5v delta 651 zcmV;60(AYD1fvCzB!3BTNLh0L01m+b01m+cxRGn^0000WV@Og>004R=004l4008;_ z004mL004C`008P>0026e000+nl3&F}0006hNklF|9LGOX3W-D-xLY>s zf(I{RlChwOpp^xIM$%2OgPuB+hfabw@mgLyEr<|wNrer9P=6@Ug+Mll@FEzfTcCpf zLJFd$!|YFdk2ljmmp9+b?ECHSy@Ahsf4|?1<9QxYG;#Z>vY!2O06<|eYs|lXYdG}a z!eZ7j#m``woFGDvzvqqd{QYS?WIUj1v=4yB%mw5A_!BaC!bl{DglKi;5P*Y;xs!Wp zUb3Cgi$OKgKYs(j-rxfz-2JV}GZ7I2S0>;1>*JrHH{AKW0zleLE2NeSxtMt)(v z%5%p3U!UAn*5aXx{T%={iW>?kYYCO5lFgA46HOTadOO;c_^+)Z07uVm_#_5in)^@b z`lCAG|0ofPZy!2E&I5SZ<9ljzcN>7Znj`?_Dc49$@_$bHkyd@Wm%3Uz96JfM+#HIU z>j5m(`cwYmol3tN-yQ=na(Kx|PKb$ga-w%1mMpEZplPi?Yfv=_n}m>Ss|tO z6;W;5Wq$w~I{PA#`%>IAl93s9id0NGwUA1?X#hH}WkL^-epBQAHvTWf7IO1OQt}2F zA3}zi7D`N?WxDsob2_o?)N@KR(g7IHj>Y_|L!bU4Ay@C#DfxQm4${o)S9W*mvZ#qt l1^RcD?zR7wb%g#703qAzzQGAm{Qv*}07*qoLpGtw}^dR9HvdmCq}KaU92olv>%S&B0?6<+30ZO%0+}y4z$v8SW#*h2eo<3kCo=ID2aM|-iPOtuYbqv@;rN8Ue9+uTRpEn z&u3LG1>wQDPvi1OE>1R;-z|q~!?wY)Q19L>&Lo|BfeWj})_Dnjl$_-=6oW$$ z&A2jCd4=Tc$bWrQnBIoH@hP}|`4p~g(O`0LmV}*ONHsfzZxadlnqXPv{Z@yw`A3-d zZ5{5w`qR~~rR-OTWd?fs@PUL+NLWOchrC+1t&9`1&H+6UaxZ{F~dWPBgqSa*-X_Af+KrP{OrY*peq@%=BK zJHLmC+*>Te{p8#kijIxLEF#J4H8A&+io|6K&gdCfZf@rknqOGLSr*|;$XOt=kW~?h z{WtZ@=p@cos5Uc85UU~*`xp8zrIt`(vqCP{7pKyyWW8Pbp#T5?07*qoM6N<$f}5fB A;{X5v delta 651 zcmV;60(AYD1fvCzB!3BTNLh0L01m+b01m+cxRGn^0000WV@Og>004R=004l4008;_ z004mL004C`008P>0026e000+nl3&F}0006hNklF|9LGOX3W-D-xLY>s zf(I{RlChwOpp^xIM$%2OgPuB+hfabw@mgLyEr<|wNrer9P=6@Ug+Mll@FEzfTcCpf zLJFd$!|YFdk2ljmmp9+b?ECHSy@Ahsf4|?1<9QxYG;#Z>vY!2O06<|eYs|lXYdG}a z!eZ7j#m``woFGDvzvqqd{QYS?WIUj1v=4yB%mw5A_!BaC!bl{DglKi;5P*Y;xs!Wp zUb3Cgi$OKgKYs(j-rxfz-2JV}GZ7I2S0>;1>*JrHH{AKW0zleLE2NeSxtMt)(v z%5%p3U!UAn*5aXx{T%={iW>?kYYCO5lFgA46HOTadOO;c_^+)Z07uVm_#_5in)^@b z`lCAG|0ofPZy!2E&I5SZ<9ljzcN>7Znj`?_Dc49$@_$bHkyd@Wm%3Uz96JfM+#HIU z>j5m(`cwYmol3tN-yQ=na(Kx|PKb$ga-w%1mMpEZplPi?Yfv=_n}m>Ss|tO z6;W;5Wq$w~I{PA#`%>IAl93s9id0NGwUA1?X#hH}WkL^-epBQAHvTWf7IO1OQt}2F zA3}zi7D`N?WxDsob2_o?)N@KR(g7IHj>Y_|L!bU4Ay@C#DfxQm4${o)S9W*mvZ#qt l1^RcD?zR7wb%g#703qAzzQGAm{Qv*}07*qoL())]; double deg = (double)npc.ai[1]; double rad = deg * (Math.PI / 180); diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 216a761a3c..bc51d8be7b 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -50,6 +50,68 @@ namespace CalamityMod.NPCs npc.velocity.Length(); + // Circular movement + bool doSpiral = false; + if (head && calamityGlobalNPC.newAI[0] == 1f && calamityGlobalNPC.newAI[2] == 1f && (CalamityWorld.revenge || CalamityWorld.bossRushActive)) + { + float ai3 = 600f; + calamityGlobalNPC.newAI[3] += 1f; + doSpiral = calamityGlobalNPC.newAI[1] == 0f && calamityGlobalNPC.newAI[3] >= ai3; + if (doSpiral) + { + // Barf out enemies + if (calamityGlobalNPC.newAI[3] % 60f == 0f) + { + Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13); + + int npcPosX = (int)(npc.position.X + (float)(npc.width / 2)) / 16; + int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; + + if (npcPosX < 0) + npcPosX = 0; + if (npcPosX > Main.maxTilesX) + npcPosX = Main.maxTilesX; + if (npcPosY < 0) + npcPosY = 0; + if (npcPosY > Main.maxTilesY) + npcPosY = Main.maxTilesY; + + Vector2 spawnPosition = new Vector2((float)(npcPosX * 16), (float)(npcPosY * 16)); + + if (!Main.tile[npcPosX, npcPosY].active() && Main.netMode != NetmodeID.MultiplayerClient) + { + if (NPC.CountNPCS(ModContent.NPCType()) < 1) + NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType()); + if (NPC.CountNPCS(ModContent.NPCType()) < 4) + NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType()); + if (NPC.CountNPCS(ModContent.NPCType()) < 8) + NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, ModContent.NPCType()); + } + } + + // Velocity boost + if (calamityGlobalNPC.newAI[3] == ai3) + { + npc.velocity.Normalize(); + npc.velocity *= 24f; + } + + // Spin velocity + float velocity = (float)(Math.PI * 2D) / 120f; + npc.velocity = npc.velocity.RotatedBy((double)(-(double)velocity * npc.localAI[1])); + npc.rotation = (float)System.Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; + + // Reset and charge at target + if (calamityGlobalNPC.newAI[3] >= ai3 + 180f) + { + calamityGlobalNPC.newAI[3] = 0f; + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * 12f; + } + } + else + npc.localAI[1] = (npc.Center.X - Main.player[npc.target].Center.X < 0 ? 1f : -1f); + } + if (Main.netMode != NetmodeID.MultiplayerClient) { if (head) @@ -82,49 +144,14 @@ namespace CalamityMod.NPCs calamityGlobalNPC.newAI[2] = 1f; } - // Big barf attack, spawns enemies and projectile swarms - if (calamityGlobalNPC.newAI[0] == 1f) + // Big barf attack + if (calamityGlobalNPC.newAI[0] == 1f && !doSpiral) { npc.localAI[0] += 1f; - if (npc.localAI[0] >= ((calamityGlobalNPC.enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 120f : 180f)) - { - int npcPosX = (int)(npc.position.X + (float)(npc.width / 2)) / 16; - int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; - - if (npcPosX < 0) - npcPosX = 0; - if (npcPosX > Main.maxTilesX) - npcPosX = Main.maxTilesX; - if (npcPosY < 0) - npcPosY = 0; - if (npcPosY > Main.maxTilesY) - npcPosY = Main.maxTilesY; - - if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 300f && - !Main.tile[npcPosX, npcPosY].active()) - { - npc.localAI[0] = 0f; - npc.TargetClosest(true); - npc.netUpdate = true; - - int random = Main.rand.Next(3); - Main.PlaySound(3, (int)npc.Center.X, (int)npc.Center.Y, 8); - Vector2 spawnAt = npc.Center + new Vector2(0f, (float)npc.height / 2f); - - if (random == 0 && NPC.CountNPCS(ModContent.NPCType()) < 1) - NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType()); - else if (random == 1 && NPC.CountNPCS(ModContent.NPCType()) < 3) - NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType()); - else if (NPC.CountNPCS(ModContent.NPCType()) < 8) - NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType()); - } - } - - npc.localAI[1] += 1f; if (Main.player[npc.target].gravDir == -1f) - npc.localAI[1] += 2f; + npc.localAI[0] += 2f; - if (npc.localAI[1] >= (CalamityWorld.bossRushActive ? 270f : 390f)) + if (npc.localAI[0] >= (CalamityWorld.bossRushActive ? 300f : (CalamityWorld.revenge ? 360f : 420f))) { int npcPosX = (int)(npc.position.X + (float)(npc.width / 2)) / 16; int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; @@ -140,7 +167,7 @@ namespace CalamityMod.NPCs if (!Main.tile[npcPosX, npcPosY].active() && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 300f) { - npc.localAI[1] = 0f; + npc.localAI[0] = 0f; npc.TargetClosest(true); npc.netUpdate = true; Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13); @@ -320,7 +347,7 @@ namespace CalamityMod.NPCs int num43 = (int)(Main.player[npc.target].Center.X / 16f); int num44 = (int)(Main.player[npc.target].Center.Y / 16f); - if (head) + if (head && !doSpiral) { for (int num45 = num43 - 2; num45 <= num43 + 2; num45++) { @@ -467,7 +494,7 @@ namespace CalamityMod.NPCs } } } - else + else if (!doSpiral) { float num196 = System.Math.Abs(num191); float num197 = System.Math.Abs(num192); @@ -1007,7 +1034,6 @@ namespace CalamityMod.NPCs int FireEye = NPC.NewNPC((int)(npc.Center.X + (Math.Sin(I * 72) * 150)), (int)(npc.Center.Y + (Math.Cos(I * 72) * 150)), ModContent.NPCType(), npc.whoAmI, 0, 0, 0, -1); NPC Eye = Main.npc[FireEye]; Eye.ai[0] = I * 72; - Eye.ai[3] = I * 72; } } @@ -3283,21 +3309,32 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } - if (lifePercentage < 50 && revenge) + if (revenge) { - float spread = 45f * 0.0174f; - double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; int damage = expertMode ? 50 : 60; - int i; - float passedVar = 1f; - - for (i = 0; i < 4; i++) + if (lifePercentage < 50 || CalamityWorld.death || CalamityWorld.bossRushActive || !player.ZoneDungeon) { - offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), ModContent.ProjectileType(), damage, 0f, Main.myPlayer, passedVar, 0f); - passedVar += 1f; + for (int i = 0; i < 12; i++) + { + float ai1 = player.ZoneDungeon ? 0f : 1f; + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, (float)(i * 30), ai1); + } + } + else + { + float spread = 45f * 0.0174f; + double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2; + double deltaAngle = spread / 8f; + double offsetAngle; + int i; + float passedVar = 1f; + + for (i = 0; i < 4; i++) + { + offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), ModContent.ProjectileType(), damage, 0f, Main.myPlayer, passedVar, 0f); + passedVar += 1f; + } } } } diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 135c8bd725..dd3afe7747 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -866,8 +866,7 @@ namespace CalamityMod.NPCs } } Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); - npc.velocity.X *= 0.98f; - npc.velocity.Y *= 0.98f; + npc.velocity *= 0.98f; if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1) npc.velocity.X = 0f; @@ -2431,8 +2430,7 @@ namespace CalamityMod.NPCs // Increase speed if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < velocity) { - npc.velocity.Y *= 1.05f; - npc.velocity.X *= 1.05f; + npc.velocity *= 1.05f; } // Charge at target @@ -3343,15 +3341,13 @@ namespace CalamityMod.NPCs npc.rotation = npc.velocity.X / 15f; float num169 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.05f : 0.04f; - float num170 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 5.5f : 5f; + float num170 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 3f : 3.5f; float num171 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.1f : 0.08f; - float num172 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 11f : 10f; + float num172 = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 7.5f : 8.5f; if (CalamityWorld.bossRushActive) { num169 *= 1.5f; - num170 *= 1.2f; num171 *= 1.5f; - num172 *= 1.2f; } if (npc.position.Y > Main.player[npc.target].position.Y - 250f) @@ -3517,8 +3513,8 @@ namespace CalamityMod.NPCs if (Main.npc[(int)npc.ai[1]].ai[1] != 0f) { - float maxX = CalamityWorld.bossRushActive ? 5f : 4f; - float maxY = CalamityWorld.bossRushActive ? 3.75f : 3f; + float maxX = CalamityWorld.bossRushActive ? 6f : 7f; + float maxY = CalamityWorld.bossRushActive ? 4.5f : 5f; if (npc.position.Y > Main.npc[(int)npc.ai[1]].position.Y - 100f) { if (npc.velocity.Y > 0f) @@ -3564,22 +3560,22 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } - float maxX = CalamityWorld.bossRushActive ? 5f : 4f; - float maxY = CalamityWorld.bossRushActive ? 2f : 1.5f; + float maxX = CalamityWorld.bossRushActive ? 6f : 7f; + float maxY = CalamityWorld.bossRushActive ? 2f : 2.5f; if (npc.position.Y > Main.npc[(int)npc.ai[1]].position.Y + 230f) { if (npc.velocity.Y > 0f) - npc.velocity.Y *= 0.96f; - npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.06f : 0.04f; + npc.velocity.Y *= 0.92f; + npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.12f : 0.08f; if (npc.velocity.Y > maxY) npc.velocity.Y = maxY; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 230f) { if (npc.velocity.Y < 0f) - npc.velocity.Y *= 0.96f; - npc.velocity.Y += CalamityWorld.bossRushActive ? 0.06f : 0.04f; + npc.velocity.Y *= 0.92f; + npc.velocity.Y += CalamityWorld.bossRushActive ? 0.12f : 0.08f; if (npc.velocity.Y < -maxY) npc.velocity.Y = -maxY; } @@ -3587,8 +3583,8 @@ namespace CalamityMod.NPCs if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0]) { if (npc.velocity.X > 0f) - npc.velocity.X *= 0.96f; - npc.velocity.X -= CalamityWorld.bossRushActive ? 0.11f : 0.07f; + npc.velocity.X *= 0.92f; + npc.velocity.X -= CalamityWorld.bossRushActive ? 0.22f : 0.14f; if (npc.velocity.X > maxX) npc.velocity.X = maxX; } @@ -3596,43 +3592,8 @@ namespace CalamityMod.NPCs if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0]) { if (npc.velocity.X < 0f) - npc.velocity.X *= 0.96f; - npc.velocity.X += CalamityWorld.bossRushActive ? 0.11f : 0.07f; - if (npc.velocity.X < -maxX) - npc.velocity.X = -maxX; - } - - if (npc.position.Y > Main.npc[(int)npc.ai[1]].position.Y + 230f) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y *= 0.96f; - npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.06f : 0.04f; - if (npc.velocity.Y > maxY) - npc.velocity.Y = maxY; - } - else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 230f) - { - if (npc.velocity.Y < 0f) - npc.velocity.Y *= 0.96f; - npc.velocity.Y += CalamityWorld.bossRushActive ? 0.06f : 0.04f; - if (npc.velocity.Y < -maxY) - npc.velocity.Y = -maxY; - } - - if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0]) - { - if (npc.velocity.X > 0f) - npc.velocity.X *= 0.96f; - npc.velocity.X -= CalamityWorld.bossRushActive ? 0.11f : 0.07f; - if (npc.velocity.X > maxX) - npc.velocity.X = maxX; - } - - if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0]) - { - if (npc.velocity.X < 0f) - npc.velocity.X *= 0.96f; - npc.velocity.X += CalamityWorld.bossRushActive ? 0.11f : 0.07f; + npc.velocity.X *= 0.92f; + npc.velocity.X += CalamityWorld.bossRushActive ? 0.22f : 0.14f; if (npc.velocity.X < -maxX) npc.velocity.X = -maxX; } @@ -3653,11 +3614,10 @@ namespace CalamityMod.NPCs float num187 = (float)Math.Sqrt((double)(num185 * num185 + num186 * num186)); npc.rotation = (float)Math.Atan2((double)num186, (double)num185) + 1.57f; npc.velocity.X *= 0.95f; - npc.velocity.Y -= 0.1f; + npc.velocity.Y -= 0.2f; - npc.velocity.Y -= 0.06f; - if (npc.velocity.Y < -15f) - npc.velocity.Y = -15f; + if (npc.velocity.Y < -13f) + npc.velocity.Y = -13f; if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y - 200f) { @@ -3690,13 +3650,12 @@ namespace CalamityMod.NPCs float num190 = (float)Math.Sqrt((double)(num188 * num188 + num189 * num189)); npc.rotation = (float)Math.Atan2((double)num189, (double)num188) + 1.57f; npc.velocity.Y *= 0.95f; - npc.velocity.X += 0.1f * -npc.ai[0]; + npc.velocity.X += 0.2f * -npc.ai[0]; - npc.velocity.X += 0.07f * -npc.ai[0]; - if (npc.velocity.X < -14f) - npc.velocity.X = -14f; - else if (npc.velocity.X > 14f) - npc.velocity.X = 14f; + if (npc.velocity.X < -12f) + npc.velocity.X = -12f; + else if (npc.velocity.X > 12f) + npc.velocity.X = 12f; if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 500f || npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 500f) { @@ -4912,8 +4871,7 @@ namespace CalamityMod.NPCs npc.ai[2] += 1f; if (npc.ai[2] >= 25f) { - npc.velocity.X *= 0.96f; - npc.velocity.Y *= 0.96f; + npc.velocity *= 0.96f; if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1) { npc.velocity.X = 0f; @@ -5002,8 +4960,7 @@ namespace CalamityMod.NPCs Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); - npc.velocity.X *= 0.98f; - npc.velocity.Y *= 0.98f; + npc.velocity *= 0.98f; if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1) npc.velocity.X = 0f; @@ -5612,8 +5569,7 @@ namespace CalamityMod.NPCs if (npc.ai[2] >= timeBeforeSlowDown) { // Slow down - npc.velocity.X *= 0.9f; - npc.velocity.Y *= 0.9f; + npc.velocity *= 0.9f; if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1) npc.velocity.X = 0f; @@ -5707,8 +5663,7 @@ namespace CalamityMod.NPCs Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); - npc.velocity.X *= 0.98f; - npc.velocity.Y *= 0.98f; + npc.velocity *= 0.98f; if ((double)npc.velocity.X > -0.1 && (double)npc.velocity.X < 0.1) npc.velocity.X = 0f; @@ -6349,26 +6304,26 @@ namespace CalamityMod.NPCs npc.rotation = npc.velocity.X / 15f; - float velocity2 = CalamityWorld.bossRushActive ? 4f : 2f; + float velocity2 = 3f; float acceleration = CalamityWorld.bossRushActive ? 0.2f : 0.1f; if (!cannonAlive) { - velocity2 += 1f; + velocity2 -= 0.35f; acceleration += 0.025f; } if (!laserAlive) { - velocity2 += 1f; + velocity2 -= 0.35f; acceleration += 0.025f; } if (!viceAlive) { - velocity2 += 1f; + velocity2 -= 0.35f; acceleration += 0.025f; } if (!sawAlive) { - velocity2 += 1f; + velocity2 -= 0.35f; acceleration += 0.025f; } @@ -6400,8 +6355,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.X > 8f) - npc.velocity.X = 8f; + if (npc.velocity.X > 7f) + npc.velocity.X = 7f; } if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 150f) { @@ -6410,8 +6365,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.X < -8f) - npc.velocity.X = -8f; + if (npc.velocity.X < -7f) + npc.velocity.X = -7f; } } @@ -6580,9 +6535,9 @@ namespace CalamityMod.NPCs Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0, 1f, 0f); // Set spin direction - if (Main.player[npc.target].velocity.X > 0) + if (Main.player[npc.target].velocity.X > 0f) calamityGlobalNPC.newAI[0] = 1f; - else if (Main.player[npc.target].velocity.X < 0) + else if (Main.player[npc.target].velocity.X < 0f) calamityGlobalNPC.newAI[0] = -1f; else calamityGlobalNPC.newAI[0] = (float)Main.player[npc.target].direction; @@ -6810,8 +6765,8 @@ namespace CalamityMod.NPCs npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; + if (npc.velocity.Y > 2.5f) + npc.velocity.Y = 2.5f; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y - 100f) { @@ -6820,8 +6775,8 @@ namespace CalamityMod.NPCs npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y < -3f) - npc.velocity.Y = -3f; + if (npc.velocity.Y < -2.5f) + npc.velocity.Y = -2.5f; } if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 180f * npc.ai[0]) @@ -6831,8 +6786,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.21f : 0.14f; - if (npc.velocity.X > 8f) - npc.velocity.X = 8f; + if (npc.velocity.X > 7f) + npc.velocity.X = 7f; } if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 180f * npc.ai[0]) { @@ -6841,8 +6796,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.21f : 0.14f; - if (npc.velocity.X < -8f) - npc.velocity.X = -8f; + if (npc.velocity.X < -7f) + npc.velocity.X = -7f; } npc.TargetClosest(true); @@ -7086,8 +7041,8 @@ namespace CalamityMod.NPCs npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.12f : 0.08f; - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; + if (npc.velocity.Y > 2.5f) + npc.velocity.Y = 2.5f; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y - 150f) { @@ -7096,8 +7051,8 @@ namespace CalamityMod.NPCs npc.velocity.Y += CalamityWorld.bossRushActive ? 0.12f : 0.08f; - if (npc.velocity.Y < -3f) - npc.velocity.Y = -3f; + if (npc.velocity.Y < -2.5f) + npc.velocity.Y = -2.5f; } if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 200f) @@ -7107,8 +7062,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.3f : 0.2f; - if (npc.velocity.X > 8f) - npc.velocity.X = 8f; + if (npc.velocity.X > 7f) + npc.velocity.X = 7f; } if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 160f) { @@ -7117,8 +7072,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.3f : 0.2f; - if (npc.velocity.X < -8f) - npc.velocity.X = -8f; + if (npc.velocity.X < -7f) + npc.velocity.X = -7f; } Vector2 vector60 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -7298,8 +7253,8 @@ namespace CalamityMod.NPCs npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y > 8f) - npc.velocity.Y = 8f; + if (npc.velocity.Y > 7f) + npc.velocity.Y = 7f; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y) { @@ -7308,8 +7263,8 @@ namespace CalamityMod.NPCs npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y < -8f) - npc.velocity.Y = -8f; + if (npc.velocity.Y < -7f) + npc.velocity.Y = -7f; } if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2)) @@ -7319,8 +7274,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.75f : 0.5f; - if (npc.velocity.X > 12f) - npc.velocity.X = 12f; + if (npc.velocity.X > 10f) + npc.velocity.X = 10f; } if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2)) { @@ -7329,8 +7284,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.75f : 0.5f; - if (npc.velocity.X < -12f) - npc.velocity.X = -12f; + if (npc.velocity.X < -10f) + npc.velocity.X = -10f; } } @@ -7367,8 +7322,8 @@ namespace CalamityMod.NPCs npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; + if (npc.velocity.Y > 2.5f) + npc.velocity.Y = 2.5f; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 230f) { @@ -7377,8 +7332,8 @@ namespace CalamityMod.NPCs npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y < -3f) - npc.velocity.Y = -3f; + if (npc.velocity.Y < -2.5f) + npc.velocity.Y = -2.5f; } if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) + 250f) @@ -7388,8 +7343,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.45f : 0.3f; - if (npc.velocity.X > 9f) - npc.velocity.X = 9f; + if (npc.velocity.X > 8f) + npc.velocity.X = 8f; } if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2)) { @@ -7398,8 +7353,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.3f : 0.2f; - if (npc.velocity.X < -8f) - npc.velocity.X = -8f; + if (npc.velocity.X < -7f) + npc.velocity.X = -7f; } Vector2 vector57 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -7605,8 +7560,8 @@ namespace CalamityMod.NPCs npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y > 8f) - npc.velocity.Y = 8f; + if (npc.velocity.Y > 7f) + npc.velocity.Y = 7f; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y) { @@ -7615,8 +7570,8 @@ namespace CalamityMod.NPCs npc.velocity.Y += CalamityWorld.bossRushActive ? 0.15f : 0.1f; - if (npc.velocity.Y < -8f) - npc.velocity.Y = -8f; + if (npc.velocity.Y < -7f) + npc.velocity.Y = -7f; } if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2)) @@ -7626,8 +7581,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.75f : 0.5f; - if (npc.velocity.X > 12f) - npc.velocity.X = 12f; + if (npc.velocity.X > 10f) + npc.velocity.X = 10f; } if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2)) { @@ -7636,8 +7591,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.75f : 0.5f; - if (npc.velocity.X < -12f) - npc.velocity.X = -12f; + if (npc.velocity.X < -10f) + npc.velocity.X = -10f; } } else @@ -7670,8 +7625,8 @@ namespace CalamityMod.NPCs npc.velocity.Y -= CalamityWorld.bossRushActive ? 0.06f : 0.04f; - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; + if (npc.velocity.Y > 2.5f) + npc.velocity.Y = 2.5f; } else if (npc.position.Y < Main.npc[(int)npc.ai[1]].position.Y + 260f) { @@ -7680,8 +7635,8 @@ namespace CalamityMod.NPCs npc.velocity.Y += CalamityWorld.bossRushActive ? 0.06f : 0.04f; - if (npc.velocity.Y < -3f) - npc.velocity.Y = -3f; + if (npc.velocity.Y < -2.5f) + npc.velocity.Y = -2.5f; } if (npc.position.X + (float)(npc.width / 2) > Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2)) @@ -7691,8 +7646,8 @@ namespace CalamityMod.NPCs npc.velocity.X -= CalamityWorld.bossRushActive ? 0.45f : 0.3f; - if (npc.velocity.X > 12f) - npc.velocity.X = 12f; + if (npc.velocity.X > 10f) + npc.velocity.X = 10f; } if (npc.position.X + (float)(npc.width / 2) < Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 250f) { @@ -7701,8 +7656,8 @@ namespace CalamityMod.NPCs npc.velocity.X += CalamityWorld.bossRushActive ? 0.45f : 0.3f; - if (npc.velocity.X < -12f) - npc.velocity.X = -12f; + if (npc.velocity.X < -10f) + npc.velocity.X = -10f; } Vector2 vector52 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ca4381739f..65f8eb3a87 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -713,18 +713,18 @@ namespace CalamityMod.NPCs case NPCID.TheDestroyer: case NPCID.TheDestroyerBody: case NPCID.TheDestroyerTail: - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.7) : (int)(npc.lifeMax * 1.8); + npc.lifeMax = (int)(npc.lifeMax * 1.8); npc.scale = 1.5f; npc.npcSlots = 10f; break; case NPCID.Probe: - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.9) : (int)(npc.lifeMax * 1.6); - npc.scale *= CalamityWorld.death ? 1.25f : 1.2f; + npc.lifeMax = (int)(npc.lifeMax * 1.6); + npc.scale *= 1.2f; break; case NPCID.SkeletronPrime: - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.1) : (int)(npc.lifeMax * 1.45); + npc.lifeMax = (int)(npc.lifeMax * 1.45); npc.npcSlots = 12f; break; @@ -732,12 +732,12 @@ namespace CalamityMod.NPCs case NPCID.PrimeCannon: case NPCID.PrimeSaw: case NPCID.PrimeLaser: - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.15) : (int)(npc.lifeMax * 1.05); + npc.lifeMax = (int)(npc.lifeMax * 1.05); break; case NPCID.Retinazer: case NPCID.Spazmatism: - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.0) : (int)(npc.lifeMax * 1.8); + npc.lifeMax = (int)(npc.lifeMax * 1.8); npc.npcSlots = 10f; break; } @@ -755,20 +755,20 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.MoonLordCore) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.7) : (int)(npc.lifeMax * 2.2); + npc.lifeMax = (int)(npc.lifeMax * 2.2); npc.npcSlots = 36f; } else if (npc.type == NPCID.MoonLordHand || npc.type == NPCID.MoonLordHead || npc.type == NPCID.MoonLordLeechBlob) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.2); + npc.lifeMax = (int)(npc.lifeMax * 1.2); } else if (npc.type >= NPCID.CultistDragonHead && npc.type <= NPCID.CultistDragonTail) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 10.0) : (int)(npc.lifeMax * 5.0); + npc.lifeMax = (int)(npc.lifeMax * 5.0); } else if (npc.type == NPCID.DukeFishron) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.525) : (int)(npc.lifeMax * 1.85); + npc.lifeMax = (int)(npc.lifeMax * 1.85); npc.npcSlots = 20f; } else if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2) @@ -777,21 +777,21 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.Golem) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 7.0) : (int)(npc.lifeMax * 4.0); + npc.lifeMax = (int)(npc.lifeMax * 4.0); npc.npcSlots = 64f; } else if (npc.type == NPCID.GolemHead) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.0) : (int)(npc.lifeMax * 1.5); + npc.lifeMax = (int)(npc.lifeMax * 1.5); } else if (npc.type == NPCID.GolemHeadFree) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.5) : (int)(npc.lifeMax * 1.25); + npc.lifeMax = (int)(npc.lifeMax * 1.25); npc.dontTakeDamage = false; } else if (npc.type == NPCID.Plantera) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.4) : (int)(npc.lifeMax * 2.3); + npc.lifeMax = (int)(npc.lifeMax * 2.3); npc.npcSlots = 32f; } else if (npc.type == NPCID.PlanterasHook) @@ -800,7 +800,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.WallofFlesh || npc.type == NPCID.WallofFleshEye) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.6) : (int)(npc.lifeMax * 1.9); + npc.lifeMax = (int)(npc.lifeMax * 1.9); if (npc.type == NPCID.WallofFlesh) { @@ -809,34 +809,34 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.TheHungryII || npc.type == NPCID.LeechHead || npc.type == NPCID.LeechBody || npc.type == NPCID.LeechTail) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.15) : (int)(npc.lifeMax * 1.05); + npc.lifeMax = (int)(npc.lifeMax * 1.05); } else if (npc.type == NPCID.SkeletronHead) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.25); + npc.lifeMax = (int)(npc.lifeMax * 1.25); npc.npcSlots = 12f; } else if (npc.type == NPCID.SkeletronHand) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 0.9) : (int)(npc.lifeMax * 0.75); + npc.lifeMax = (int)(npc.lifeMax * 0.75); } else if (npc.type == NPCID.QueenBee) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.65) : (int)(npc.lifeMax * 1.15); + npc.lifeMax = (int)(npc.lifeMax * 1.15); npc.npcSlots = 14f; } else if (npc.type == NPCID.BrainofCthulhu) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.1) : (int)(npc.lifeMax * 1.6); + npc.lifeMax = (int)(npc.lifeMax * 1.6); npc.npcSlots = 12f; } else if (npc.type == NPCID.Creeper) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.2) : (int)(npc.lifeMax * 1.1); + npc.lifeMax = (int)(npc.lifeMax * 1.1); } else if (EaterofWorldsIDs.Contains(npc.type)) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.3); + npc.lifeMax = (int)(npc.lifeMax * 1.3); if (npc.type == NPCID.EaterofWorldsHead) { @@ -845,16 +845,9 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.EyeofCthulhu) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.25); + npc.lifeMax = (int)(npc.lifeMax * 1.25); npc.npcSlots = 10f; } - else if (npc.type == NPCID.KingSlime) - { - if (CalamityWorld.death) - { - npc.lifeMax = (int)(npc.lifeMax * 1.85); - } - } else if (npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental) { npc.knockBackResist = 0f; @@ -864,38 +857,27 @@ namespace CalamityMod.NPCs { if (DestroyerIDs.Contains(npc.type)) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.6) : (int)(npc.lifeMax * 1.25); + npc.lifeMax = (int)(npc.lifeMax * 1.25); npc.scale = 1.5f; npc.npcSlots = 10f; } - else if (npc.type == NPCID.Probe) - { - if (CalamityWorld.death) - { - npc.lifeMax = (int)(npc.lifeMax * 1.25); - npc.scale *= 1.2f; - } - } else if (npc.type == NPCID.SkeletronPrime) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.35) : (int)(npc.lifeMax * 1.15); + npc.lifeMax = (int)(npc.lifeMax * 1.15); npc.npcSlots = 12f; } else if (npc.type == NPCID.PrimeVice || npc.type == NPCID.PrimeCannon || npc.type == NPCID.PrimeSaw || npc.type == NPCID.PrimeLaser) { - if (!CalamityWorld.death) - { - npc.lifeMax = (int)(npc.lifeMax * 0.9); - } + npc.lifeMax = (int)(npc.lifeMax * 0.9); } else if (npc.type == NPCID.Retinazer) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.4) : (int)(npc.lifeMax * 1.25); + npc.lifeMax = (int)(npc.lifeMax * 1.25); npc.npcSlots = 10f; } else if (npc.type == NPCID.Spazmatism) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.45) : (int)(npc.lifeMax * 1.3); + npc.lifeMax = (int)(npc.lifeMax * 1.3); npc.npcSlots = 10f; } } @@ -929,7 +911,7 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.CultistBoss) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.5) : (int)(npc.lifeMax * (CalamityWorld.revenge ? 1.7 : 1.2)); + npc.lifeMax = (int)(npc.lifeMax * (CalamityWorld.revenge ? 1.7 : 1.2)); npc.npcSlots = 20f; } @@ -1073,42 +1055,42 @@ namespace CalamityMod.NPCs npc.type == thorium.NPCType("BoreanHopper") || npc.type == thorium.NPCType("BoreanMyte1") || npc.type == thorium.NPCType("EnemyBeholder") || npc.type == thorium.NPCType("ThousandSoulPhalactry") || npc.type == thorium.NPCType("AbyssalSpawn")) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.5); + npc.lifeMax = (int)(npc.lifeMax * 1.5); } else if (npc.type == thorium.NPCType("TheGrandThunderBirdv2")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.5); + npc.lifeMax = (int)(npc.lifeMax * 1.5); } else if (npc.type == thorium.NPCType("QueenJelly")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.9) : (int)(npc.lifeMax * 1.35); + npc.lifeMax = (int)(npc.lifeMax * 1.35); } else if (npc.type == thorium.NPCType("Viscount")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.65) : (int)(npc.lifeMax * 1.25); + npc.lifeMax = (int)(npc.lifeMax * 1.25); } else if (npc.type == thorium.NPCType("GraniteEnergyStorm")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.25) : (int)(npc.lifeMax * 1.1); + npc.lifeMax = (int)(npc.lifeMax * 1.1); } else if (npc.type == thorium.NPCType("TheBuriedWarrior") || npc.type == thorium.NPCType("TheBuriedWarrior1") || npc.type == thorium.NPCType("TheBuriedWarrior2")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.5) : (int)(npc.lifeMax * 1.2); + npc.lifeMax = (int)(npc.lifeMax * 1.2); } else if (npc.type == thorium.NPCType("ThePrimeScouter") || npc.type == thorium.NPCType("CryoCore") || npc.type == thorium.NPCType("BioCore") || npc.type == thorium.NPCType("PyroCore")) @@ -1116,35 +1098,35 @@ namespace CalamityMod.NPCs npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.75) : (int)(npc.lifeMax * 1.3); + npc.lifeMax = (int)(npc.lifeMax * 1.3); } else if (npc.type == thorium.NPCType("BoreanStrider") || npc.type == thorium.NPCType("BoreanStriderPopped")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.0) : (int)(npc.lifeMax * 1.4); + npc.lifeMax = (int)(npc.lifeMax * 1.4); } else if (npc.type == thorium.NPCType("FallenDeathBeholder") || npc.type == thorium.NPCType("FallenDeathBeholder2")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.5) : (int)(npc.lifeMax * 1.6); + npc.lifeMax = (int)(npc.lifeMax * 1.6); } else if (npc.type == thorium.NPCType("Lich") || npc.type == thorium.NPCType("LichHeadless")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.5) : (int)(npc.lifeMax * 1.6); + npc.lifeMax = (int)(npc.lifeMax * 1.6); } else if (npc.type == thorium.NPCType("Abyssion") || npc.type == thorium.NPCType("AbyssionCracked") || npc.type == thorium.NPCType("AbyssionReleased")) { npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.3) : (int)(npc.lifeMax * 1.5); + npc.lifeMax = (int)(npc.lifeMax * 1.5); } else if (npc.type == thorium.NPCType("SlagFury") || npc.type == thorium.NPCType("Omnicide") || npc.type == thorium.NPCType("RealityBreaker") || npc.type == thorium.NPCType("Aquaius") || npc.type == thorium.NPCType("Aquaius2")) @@ -1152,7 +1134,7 @@ namespace CalamityMod.NPCs npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.75) : (int)(npc.lifeMax * 1.3); + npc.lifeMax = (int)(npc.lifeMax * 1.3); } } } @@ -2834,11 +2816,13 @@ namespace CalamityMod.NPCs maxSpawns = (int)(maxSpawns * 1.5f); } - if (CalamityWorld.death) + if (CalamityWorld.death && Main.bloodMoon) { - spawnRate = (int)(spawnRate * 0.75); + spawnRate = (int)(spawnRate * 0.25); + maxSpawns = (int)(maxSpawns * 10f); } - else if (CalamityWorld.revenge) + + if (CalamityWorld.revenge) { spawnRate = (int)(spawnRate * 0.85); } @@ -4042,7 +4026,6 @@ namespace CalamityMod.NPCs #region Any Boss NPCs public static bool AnyBossNPCS() { - for (int i = 0; i < 200; i++) { if (Main.npc[i].active && Main.npc[i].type != NPCID.MartianSaucerCore && diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 765de1a5d1..a268ac8b1c 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -201,7 +201,7 @@ namespace CalamityMod.NPCs.Crabulon npc.velocity.X *= 0.98f; npc.velocity.Y *= 0.98f; npc.ai[1] += 1f; - if (npc.ai[1] >= 60f) + if (npc.ai[1] >= (revenge ? 30f : 60f)) { npc.noGravity = true; npc.noTileCollide = true; @@ -314,25 +314,68 @@ namespace CalamityMod.NPCs.Crabulon npc.ai[1] += 1f; if (npc.ai[1] > 0f) { + if (revenge) + { + switch ((int)npc.ai[3]) + { + case 0: + break; + case 1: + npc.ai[1] += 1f; + break; + case 2: + npc.ai[1] += 3f; + break; + case 3: + npc.ai[1] += 6f; + break; + default: + break; + } + } if (npc.life < npc.lifeMax / 2 || CalamityWorld.bossRushActive) { - npc.ai[1] += 4f; + npc.ai[1] += (!revenge ? 4f : 1f); } - if (npc.life < npc.lifeMax / 10 || CalamityWorld.bossRushActive) + if (npc.life < npc.lifeMax / 4 || CalamityWorld.bossRushActive) { - npc.ai[1] += 8f; + npc.ai[1] += (!revenge ? 4f : 1f); } } + if (npc.ai[1] >= 300f) { npc.ai[1] = -20f; - npc.frameCounter = 0.0; } else if (npc.ai[1] == -1f) { npc.TargetClosest(true); - npc.velocity.X = (float)((CalamityWorld.bossRushActive ? 12 : 4) * npc.direction); - npc.velocity.Y = CalamityWorld.bossRushActive ? -16f : -12.1f; + + int velocityX = CalamityWorld.bossRushActive ? 12 : 4; + float velocityY = CalamityWorld.bossRushActive ? -16f : -12f; + if (revenge) + { + switch ((int)npc.ai[3]) + { + case 0: // Normal + break; + case 1: // High + velocityY -= 4f; + break; + case 2: // Low + velocityY += 4f; + break; + case 3: // Long and low + velocityX += 4; + velocityY += 4f; + break; + default: + break; + } + } + npc.velocity.X = (float)(velocityX * npc.direction); + npc.velocity.Y = velocityY; + npc.ai[0] = 4f; npc.ai[1] = 0f; } @@ -343,30 +386,50 @@ namespace CalamityMod.NPCs.Crabulon if (npc.velocity.Y == 0f) { Main.PlaySound(SoundID.Item14, npc.position); + if (Main.netMode != NetmodeID.MultiplayerClient) - { Projectile.NewProjectile((int)npc.Center.X, (int)npc.Center.Y + 20, 0f, 0f, ModContent.ProjectileType(), 20, 0f, Main.myPlayer, 0f, 0f); - } - npc.ai[2] += 1f; - if (npc.ai[2] >= 3f) + + int num354 = expertMode ? 11 : 14; + if (npc.ai[2] % 2f == 0f && (double)npc.life < (double)npc.lifeMax * 0.5 && revenge) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float velocityX = npc.ai[2] == 0f ? -4f : 4f; + for (int x = 0; x < 20; x++) + { + Projectile.NewProjectile(npc.Center.X + (float)shotSpacing, npc.Center.Y - 1000f, velocityX, 0f, ModContent.ProjectileType(), num354, 0f, Main.myPlayer, 0f, 0f); + shotSpacing -= 100; + } + shotSpacing = 1000; + } + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= ((double)npc.life < (double)npc.lifeMax * 0.5 ? 4f : 3f)) { - if (Main.netMode != NetmodeID.MultiplayerClient && revenge) + if (Main.netMode != NetmodeID.MultiplayerClient && revenge && (double)npc.life >= (double)npc.lifeMax * 0.5) { for (int x = 0; x < 20; x++) { - int num354 = expertMode ? 11 : 14; Projectile.NewProjectile(npc.Center.X + (float)shotSpacing, npc.Center.Y - 1000f, 0f, 0f, ModContent.ProjectileType(), num354, 0f, Main.myPlayer, 0f, 0f); shotSpacing -= 100; } shotSpacing = 1000; } + npc.ai[0] = 1f; npc.ai[2] = 0f; + if (revenge) + npc.ai[3] = 0f; } else { npc.ai[0] = 3f; - } + if (revenge) + npc.ai[3] += 1f; + } + for (int num622 = (int)npc.position.X - 20; num622 < (int)npc.position.X + npc.width + 40; num622 += 20) { for (int num623 = 0; num623 < 4; num623++) @@ -386,20 +449,21 @@ namespace CalamityMod.NPCs.Crabulon } else { + float velocityX = 0.11f + + (expertMode ? 0.02f : 0f) + + (revenge ? 0.02f : 0f); + if (npc.direction < 0) - { - npc.velocity.X = npc.velocity.X - 0.2f; - } + npc.velocity.X = npc.velocity.X - velocityX; else if (npc.direction > 0) - { - npc.velocity.X = npc.velocity.X + 0.2f; - } + npc.velocity.X = npc.velocity.X + velocityX; + float num626 = CalamityWorld.bossRushActive ? 5f : 2.5f; if (revenge) { num626 += 1f; } - if (npc.Calamity().enraged > 0|| (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num626 += 3f; } @@ -426,6 +490,7 @@ namespace CalamityMod.NPCs.Crabulon } } } + if (npc.localAI[0] == 0f && npc.life > 0) { npc.localAI[0] = (float)npc.lifeMax; diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index e8a0f49754..b9f7cc71ab 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -115,7 +115,7 @@ namespace CalamityMod.NPCs.Cryogen double multAdd = revenge ? 0.1 : 0D; npc.TargetClosest(true); - if (npc.ai[2] == 0f && npc.localAI[1] == 0f && Main.netMode != NetmodeID.MultiplayerClient && (npc.ai[0] < 4f || CalamityWorld.bossRushActive)) //spawn shield for phase 0 1 2 3, not 4 5 + if (npc.ai[2] == 0f && npc.localAI[1] == 0f && Main.netMode != NetmodeID.MultiplayerClient && (npc.ai[0] < 4f || CalamityWorld.bossRushActive)) //spawn shield for phase 0 1 2 3, not 4 5 6 { int num6 = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType(), npc.whoAmI, 0f, 0f, 0f, 0f, 255); npc.ai[2] = (float)(num6 + 1); @@ -144,14 +144,10 @@ namespace CalamityMod.NPCs.Cryogen } } - if (npc.ai[0] == 0f || npc.ai[0] == 2f || npc.ai[0] == 4f) + if (npc.ai[0] != 5f) { npc.rotation = npc.velocity.X * 0.1f; } - else if (npc.ai[0] == 1f || npc.ai[0] == 3f) - { - npc.rotation = 0f; - } if (!Main.raining && !CalamityWorld.bossRushActive) { @@ -177,7 +173,7 @@ namespace CalamityMod.NPCs.Cryogen npc.timeLeft = 2400; } - if (Main.netMode != NetmodeID.MultiplayerClient && expertMode) + if (Main.netMode != NetmodeID.MultiplayerClient && expertMode && (npc.ai[0] < 5f || !revenge || (double)npc.life >= (double)npc.lifeMax * 0.15)) { time++; if (CalamityWorld.death || CalamityWorld.bossRushActive) @@ -186,13 +182,15 @@ namespace CalamityMod.NPCs.Cryogen if (time >= 600) { Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float spread = 45f * 0.0174f; + int totalProjectiles = 4; + float spread = MathHelper.ToRadians(90); double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2; - double deltaAngle = spread / 4f; + double deltaAngle = spread / (float)totalProjectiles; double offsetAngle; int i; int num184 = 25; - float velocity = CalamityWorld.bossRushActive ? 12f : 8f; + float velocity = CalamityWorld.bossRushActive ? 12f : 4f; + for (i = 0; i < 2; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; @@ -237,14 +235,14 @@ namespace CalamityMod.NPCs.Cryogen float num1243 = player.Center.X - vector142.X; float num1244 = player.Center.Y - vector142.Y; float num1245 = (float)Math.Sqrt((double)(num1243 * num1243 + num1244 * num1244)); - float num1246 = isChill ? 4f : 6f; + float num1246 = isChill ? 4f : 8f; if (CalamityWorld.death) { - num1246 = isChill ? 5f : 7f; + num1246 = isChill ? 5f : 10f; } if (CalamityWorld.bossRushActive) { - num1246 = 11f; + num1246 = 14f; } num1245 = num1246 / num1245; num1243 *= num1245; @@ -290,12 +288,15 @@ namespace CalamityMod.NPCs.Cryogen } } - float velocity = isChill ? 6f : 7.5f; - float acceleration = isChill ? 0.1f : 0.12f; + float velocity = isChill ? 7.5f : 4f; + float acceleration = isChill ? 0.1f : 0.15f; if (CalamityWorld.death) - velocity = isChill ? 6.5f : 8f; - if (CalamityWorld.bossRushActive) - velocity = 20f; + velocity = isChill ? 7f : 3.5f; + if (CalamityWorld.bossRushActive) + { + velocity = 3f; + acceleration *= 1.5f; + } if (npc.position.Y > Main.player[npc.target].position.Y - 375f) { @@ -325,8 +326,8 @@ namespace CalamityMod.NPCs.Cryogen npc.velocity.X = npc.velocity.X - acceleration; - if (npc.velocity.X > 8f) - npc.velocity.X = 8f; + if (npc.velocity.X > velocity) + npc.velocity.X = velocity; } if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 300f) { @@ -335,14 +336,14 @@ namespace CalamityMod.NPCs.Cryogen npc.velocity.X = npc.velocity.X + acceleration; - if (npc.velocity.X < -8f) - npc.velocity.X = -8f; + if (npc.velocity.X < -velocity) + npc.velocity.X = -velocity; } if (npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && Main.netMode != NetmodeID.MultiplayerClient) { iceShard += 1; - if (iceShard >= 24) + if (iceShard >= 20) { iceShard = 0; int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20)); @@ -422,7 +423,7 @@ namespace CalamityMod.NPCs.Cryogen num180 += (float)Main.rand.Next(-180, 181); num182 += (float)Main.rand.Next(-180, 181); num180 *= num183; - Projectile.NewProjectile(value9.X, value9.Y, num180, -15f, num185, num184, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(value9.X, value9.Y, num180, -8f, num185, num184, 0f, Main.myPlayer, 0f, 0f); } } } @@ -433,14 +434,14 @@ namespace CalamityMod.NPCs.Cryogen float num1243 = player.Center.X - vector142.X; float num1244 = player.Center.Y - vector142.Y; float num1245 = (float)Math.Sqrt((double)(num1243 * num1243 + num1244 * num1244)); - float num1246 = isChill ? 6f : 8f; + float num1246 = isChill ? 6f : 12f; if (CalamityWorld.death) { - num1246 = isChill ? 7f : 9f; + num1246 = isChill ? 7f : 14f; } if (CalamityWorld.bossRushActive) { - num1246 = 15f; + num1246 = 20f; } num1245 = num1246 / num1245; num1243 *= num1245; @@ -498,12 +499,15 @@ namespace CalamityMod.NPCs.Cryogen } } - float velocity = isChill ? 6.5f : 8f; - float acceleration = isChill ? 0.1f : 0.12f; + float velocity = isChill ? 7.5f : 4f; + float acceleration = isChill ? 0.1f : 0.15f; if (CalamityWorld.death) - velocity = isChill ? 7f : 8.5f; + velocity = isChill ? 7f : 3.5f; if (CalamityWorld.bossRushActive) - velocity = 20f; + { + velocity = 3f; + acceleration *= 1.5f; + } if (npc.position.Y > Main.player[npc.target].position.Y - 375f) { @@ -533,8 +537,8 @@ namespace CalamityMod.NPCs.Cryogen npc.velocity.X = npc.velocity.X - acceleration; - if (npc.velocity.X > 8f) - npc.velocity.X = 8f; + if (npc.velocity.X > velocity) + npc.velocity.X = velocity; } if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 300f) { @@ -543,14 +547,14 @@ namespace CalamityMod.NPCs.Cryogen npc.velocity.X = npc.velocity.X + acceleration; - if (npc.velocity.X < -8f) - npc.velocity.X = -8f; + if (npc.velocity.X < -velocity) + npc.velocity.X = -velocity; } if (npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && Main.netMode != NetmodeID.MultiplayerClient) { iceShard += 1; - if (iceShard >= 18) + if (iceShard >= 15) { iceShard = 0; int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20)); @@ -736,8 +740,8 @@ namespace CalamityMod.NPCs.Cryogen npc.localAI[2] = 0f; teleportLocationX = 0; iceShard = 0; - npc.netUpdate = true; + string key = "Mods.CalamityMod.CryogenBossText"; Color messageColor = Color.Cyan; if (Main.netMode == NetmodeID.SinglePlayer) @@ -750,13 +754,48 @@ namespace CalamityMod.NPCs.Cryogen } } } - else - { + else if (npc.ai[0] == 5f) + { npc.damage = (int)((float)npc.defDamage * 1.5f); - float num1372 = isChill ? 16f : 22f; - if (CalamityWorld.bossRushActive) + + if (revenge && (double)npc.life < (double)npc.lifeMax * 0.15) + { + if (npc.ai[1] == 60f) + npc.velocity = Vector2.Normalize(player.Center - npc.Center) * (CalamityWorld.bossRushActive ? 30f : (isChill ? 18f : 24f)); + + npc.ai[1] -= 1f; + if (npc.ai[1] <= 0f) + { + npc.ai[3] += 1f; + if (npc.ai[3] > 2f) + { + npc.damage = 0; + npc.defense = npc.defDefense + 8; + npc.ai[0] = 6f; + npc.ai[1] = 0f; + npc.ai[3] = 0f; + time = 0; + } + else + npc.ai[1] = 60f; + + npc.rotation = npc.velocity.X * 0.1f; + } + else if (npc.ai[1] <= 15f) + { + npc.velocity *= 0.95f; + npc.rotation = npc.velocity.X * 0.15f; + } + else + npc.rotation += (float)npc.direction * 0.5f; + + return; + } + + float num1372 = isChill ? 16f : 24f; + if (CalamityWorld.bossRushActive) { - num1372 = 30f; + num1372 = 32f; } Vector2 vector167 = new Vector2(npc.Center.X + (float)(npc.direction * 20), npc.Center.Y + 6f); float num1373 = player.position.X + (float)player.width * 0.5f - vector167.X; @@ -767,7 +806,7 @@ namespace CalamityMod.NPCs.Cryogen num1374 *= num1376; iceShard--; - if ((double)npc.life < (double)npc.lifeMax * (0.05 + multAdd) || CalamityWorld.death || CalamityWorld.bossRushActive) + if ((double)npc.life < (double)npc.lifeMax * (0.1 + multAdd) || CalamityWorld.death || CalamityWorld.bossRushActive) { if (num1375 < 170f || iceShard > 0) { @@ -775,19 +814,11 @@ namespace CalamityMod.NPCs.Cryogen { iceShard = 17; } - if (npc.velocity.X < 0f) - { - npc.direction = -1; - } - else - { - npc.direction = 1; - } npc.rotation += (float)npc.direction * 0.5f; return; } } - else if ((double)npc.life < (double)npc.lifeMax * (0.1 + multAdd)) + else if ((double)npc.life < (double)npc.lifeMax * (0.125 + multAdd)) { if (num1375 < 190f || iceShard > 0) { @@ -795,14 +826,6 @@ namespace CalamityMod.NPCs.Cryogen { iceShard = 19; } - if (npc.velocity.X < 0f) - { - npc.direction = -1; - } - else - { - npc.direction = 1; - } npc.rotation += (float)npc.direction * 0.35f; return; } @@ -815,14 +838,6 @@ namespace CalamityMod.NPCs.Cryogen { iceShard = 20; } - if (npc.velocity.X < 0f) - { - npc.direction = -1; - } - else - { - npc.direction = 1; - } npc.rotation += (float)npc.direction * 0.3f; return; } @@ -842,62 +857,166 @@ namespace CalamityMod.NPCs.Cryogen } npc.rotation = npc.velocity.X * 0.15f; } + else + { + time++; + if (time >= 60) + { + Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float spread = 45f * 0.0174f; + double startAngle = Math.Atan2(npc.velocity.X, npc.velocity.Y) - spread / 2; + double deltaAngle = spread / 4f; + double offsetAngle; + int i; + int num184 = 25; + float velocity2 = CalamityWorld.bossRushActive ? 16f : 6f; + for (i = 0; i < 2; i++) + { + offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; + Projectile.NewProjectile(value9.X, value9.Y, (float)(Math.Sin(offsetAngle) * velocity2), (float)(Math.Cos(offsetAngle) * velocity2), ModContent.ProjectileType(), num184, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(value9.X, value9.Y, (float)(-Math.Sin(offsetAngle) * velocity2), (float)(-Math.Cos(offsetAngle) * velocity2), ModContent.ProjectileType(), num184, 0f, Main.myPlayer, 0f, 0f); + } + time = 0; + } - if (npc.ai[3] == 0f && npc.life > 0) - { - npc.ai[3] = (float)npc.lifeMax; - } - if (npc.life > 0) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int num660 = (int)((double)npc.lifeMax * 0.075); - if ((float)(npc.life + num660) < npc.ai[3]) - { - npc.ai[3] = (float)npc.life; - for (int num662 = 0; num662 < 2; num662++) - { - int x = (int)(npc.position.X + (float)Main.rand.Next(npc.width - 32)); - int y = (int)(npc.position.Y + (float)Main.rand.Next(npc.height - 32)); - int random = 1; - switch ((int)npc.ai[0]) + if (npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && Main.netMode != NetmodeID.MultiplayerClient) + { + iceShard += 1; + if (iceShard >= 12) + { + iceShard = 0; + int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20)); + int num1170 = (int)(npc.position.Y + (float)npc.height + 4f); + int damage = expertMode ? 23 : 26; + float projVelocity = revenge ? 6f : 5f; + if (CalamityWorld.bossRushActive) + projVelocity = 9f; + + Projectile.NewProjectile((float)num1169, (float)num1170, 0f, projVelocity, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + } + } + + npc.ai[1] += 1f; + if (npc.ai[1] >= 180f) + { + npc.ai[0] = 5f; + npc.ai[1] = 60f; + time = 0; + iceShard = 0; + npc.netUpdate = true; + } + + float velocity = isChill ? 6f : 3f; + float acceleration = isChill ? 0.2f : 0.3f; + if (CalamityWorld.death) + velocity = isChill ? 5f : 2.5f; + if (CalamityWorld.bossRushActive) + { + velocity = 2f; + acceleration *= 1.5f; + } + + if (npc.position.Y > Main.player[npc.target].position.Y - 375f) + { + if (npc.velocity.Y > 0f) + npc.velocity.Y = npc.velocity.Y * 0.98f; + + npc.velocity.Y = npc.velocity.Y - acceleration; + + if (npc.velocity.Y > velocity) + npc.velocity.Y = velocity; + } + else if (npc.position.Y < Main.player[npc.target].position.Y - 400f) + { + if (npc.velocity.Y < 0f) + npc.velocity.Y = npc.velocity.Y * 0.98f; + + npc.velocity.Y = npc.velocity.Y + acceleration; + + if (npc.velocity.Y < -velocity) + npc.velocity.Y = -velocity; + } + + if (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) + 350f) + { + if (npc.velocity.X > 0f) + npc.velocity.X = npc.velocity.X * 0.98f; + + npc.velocity.X = npc.velocity.X - acceleration; + + if (npc.velocity.X > velocity) + npc.velocity.X = velocity; + } + if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 350f) + { + if (npc.velocity.X < 0f) + npc.velocity.X = npc.velocity.X * 0.98f; + + npc.velocity.X = npc.velocity.X + acceleration; + + if (npc.velocity.X < -velocity) + npc.velocity.X = -velocity; + } + } + + if (!revenge || (double)npc.life >= (double)npc.lifeMax * 0.15) + { + if (npc.ai[3] == 0f && npc.life > 0) + { + npc.ai[3] = (float)npc.lifeMax; + } + if (npc.life > 0) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int num660 = (int)((double)npc.lifeMax * 0.075); + if ((float)(npc.life + num660) < npc.ai[3]) + { + npc.ai[3] = (float)npc.life; + for (int num662 = 0; num662 < 2; num662++) { - case 0: - case 1: - break; - case 2: - case 3: - random = 2; - break; - case 4: - case 5: - random = 3; - break; - default: - break; + int x = (int)(npc.position.X + (float)Main.rand.Next(npc.width - 32)); + int y = (int)(npc.position.Y + (float)Main.rand.Next(npc.height - 32)); + int random = 1; + switch ((int)npc.ai[0]) + { + case 0: + case 1: + break; + case 2: + case 3: + random = 2; + break; + case 4: + case 5: + random = 3; + break; + default: + break; + } + int randomSpawn = Main.rand.Next(random); + if (randomSpawn == 0) + { + randomSpawn = ModContent.NPCType(); + } + else if (randomSpawn == 1) + { + randomSpawn = ModContent.NPCType(); + } + else + { + randomSpawn = ModContent.NPCType(); + } + int num664 = NPC.NewNPC(x, y, randomSpawn, 0, 0f, 0f, 0f, 0f, 255); + if (Main.netMode == NetmodeID.Server && num664 < 200) + { + NetMessage.SendData(23, -1, -1, null, num664, 0f, 0f, 0f, 0, 0, 0); + } } - int randomSpawn = Main.rand.Next(random); - if (randomSpawn == 0) - { - randomSpawn = ModContent.NPCType(); - } - else if (randomSpawn == 1) - { - randomSpawn = ModContent.NPCType(); - } - else - { - randomSpawn = ModContent.NPCType(); - } - int num664 = NPC.NewNPC(x, y, randomSpawn, 0, 0f, 0f, 0f, 0f, 255); - if (Main.netMode == NetmodeID.Server && num664 < 200) - { - NetMessage.SendData(23, -1, -1, null, num664, 0f, 0f, 0f, 0, 0, 0); - } - } - } - } - } + } + } + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) //for alt textures diff --git a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs index 1727a40563..8b42ab4d73 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.DevourerofGods } else { - npc.dontTakeDamage = false; + npc.dontTakeDamage = Main.npc[(int)npc.ai[2]].dontTakeDamage; } if (npc.ai[3] > 0f) { diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 4f36bf786b..923c464fdf 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -782,7 +782,7 @@ namespace CalamityMod.NPCs.DevourerofGods } // TODO: don't talk if the player has iframes - if (player.immuneTime > 0) + if (player.immuneTime > 0 || player.immune) return; int num = Main.rand.Next(5); diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 20f78ae5b5..568725c263 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -40,6 +40,7 @@ namespace CalamityMod.NPCs.DevourerofGods private int idleCounter = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 540 : 360; public int laserWallPhase = 0; private int laserWallCounter = 0; + private int postTeleportTimer = 0; public override void SetStaticDefaults() { @@ -82,6 +83,7 @@ namespace CalamityMod.NPCs.DevourerofGods public override void SendExtraAI(BinaryWriter writer) { + writer.Write(npc.dontTakeDamage); writer.Write(halfLife); writer.Write(laserShoot); writer.Write(phaseSwitch); @@ -92,10 +94,12 @@ namespace CalamityMod.NPCs.DevourerofGods writer.Write(idleCounter); writer.Write(laserWallPhase); writer.Write(laserWallCounter); + writer.Write(postTeleportTimer); } public override void ReceiveExtraAI(BinaryReader reader) { + npc.dontTakeDamage = reader.ReadBoolean(); halfLife = reader.ReadBoolean(); laserShoot = reader.ReadInt32(); phaseSwitch = reader.ReadInt32(); @@ -106,6 +110,7 @@ namespace CalamityMod.NPCs.DevourerofGods idleCounter = reader.ReadInt32(); laserWallPhase = reader.ReadInt32(); laserWallCounter = reader.ReadInt32(); + postTeleportTimer = reader.ReadInt32(); } public override void BossHeadRotation(ref float rotation) @@ -127,14 +132,36 @@ namespace CalamityMod.NPCs.DevourerofGods Vector2 vector = npc.Center; bool flies = npc.ai[2] == 0f; bool expertMode = Main.expertMode || CalamityWorld.bossRushActive; + bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive; + bool death = CalamityWorld.death || CalamityWorld.bossRushActive; bool speedBoost = lifeRatio < 0.6 || (CalamityWorld.bossRushActive && lifeRatio < 0.9); bool speedBoost2 = lifeRatio < 0.2; bool breathFireMore = lifeRatio < 0.15; - // Laser walls - if (speedBoost && !speedBoost2) + // Light + Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); + + // Worm shit again + if (npc.ai[3] > 0f) + npc.realLife = (int)npc.ai[3]; + + // Target + if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead) + npc.TargetClosest(true); + + // Velocity + npc.velocity.Length(); + + float distanceFromTarget = Vector2.Distance(Main.player[npc.target].Center, vector); + bool tooFarAway = distanceFromTarget > 5600f; + + // Immunity after teleport + npc.dontTakeDamage = postTeleportTimer > 0; + + // Laser walls + if (speedBoost && !speedBoost2 && postTeleportTimer <= 0) { - if (laserWallPhase == 0) //start laser wall phase + if (laserWallPhase == 0) // Start laser wall phase { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -146,7 +173,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } } - else if (laserWallPhase == 1) //turn invisible and fire laser walls + else if (laserWallPhase == 1) // Turn invisible and fire laser walls { npc.alpha += 5; if (npc.alpha == 255) @@ -159,32 +186,48 @@ namespace CalamityMod.NPCs.DevourerofGods if (idleCounter <= 0) { laserWallPhase = 2; - idleCounter = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 540 : 360; + idleCounter = death ? 540 : 360; } } } - else if (laserWallPhase == 2) //turn visible + else if (laserWallPhase == 2) // Turn visible { - npc.alpha -= 1; - if (npc.alpha <= 0) - { - npc.alpha = 0; - laserWallPhase = 0; - } + if (distanceFromTarget > 500f && revenge) + Teleport(); + else + { + npc.alpha -= 1; + if (npc.alpha <= 0) + { + npc.alpha = 0; + laserWallPhase = 0; + } + } } } else { - npc.alpha -= 6; - if (npc.alpha < 0) - npc.alpha = 0; + if (postTeleportTimer > 0) + { + postTeleportTimer -= 4; + if (postTeleportTimer < 0) + postTeleportTimer = 0; + + npc.alpha = postTeleportTimer; + } + else + { + npc.alpha -= 6; + if (npc.alpha < 0) + npc.alpha = 0; + } if (laserWallPhase > 0) laserWallPhase = 0; } - // Anger message - if (speedBoost2) + // Anger message + if (speedBoost2) { if (!halfLife) { @@ -199,20 +242,6 @@ namespace CalamityMod.NPCs.DevourerofGods } } - // Light - Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); - - // Worm shit again - if (npc.ai[3] > 0f) - npc.realLife = (int)npc.ai[3]; - - // Target - if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead) - npc.TargetClosest(true); - - // Velocity - npc.velocity.Length(); - // Spawn segments and fire projectiles if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -241,7 +270,7 @@ namespace CalamityMod.NPCs.DevourerofGods int projectileDamage = expertMode ? 69 : 80; // Fireballs - if (npc.alpha <= 0 && Vector2.Distance(Main.player[npc.target].Center, vector) > 500f && expertMode) + if (npc.alpha <= 0 && distanceFromTarget > 500f && expertMode) { calamityGlobalNPC.newAI[0] += 1f; if (calamityGlobalNPC.newAI[0] >= 150f && calamityGlobalNPC.newAI[0] % (breathFireMore ? 60f : 120f) == 0f) @@ -267,7 +296,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } } - else if (Vector2.Distance(Main.player[npc.target].Center, vector) < 250f) + else if (distanceFromTarget < 250f) calamityGlobalNPC.newAI[0] = 0f; // Laser walls @@ -292,7 +321,7 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[0] -= spacingVar; } - if (Main.rand.NextBool(2) && (CalamityWorld.revenge || CalamityWorld.bossRushActive)) + if (Main.rand.NextBool(2) && revenge) { for (int x = 0; x < 10; x++) { @@ -313,7 +342,7 @@ namespace CalamityMod.NPCs.DevourerofGods shotSpacing[1] = 1050; // Upper wall - if (lifeRatio < 0.4f && (CalamityWorld.revenge || CalamityWorld.bossRushActive)) + if (lifeRatio < 0.4f && revenge) { if (shotSpacing[2] < 2100) shotSpacing[2] = 2100; @@ -361,7 +390,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } } - fallSpeed += ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 5f : 3.5f) * (1f - lifeRatio); + fallSpeed += (death ? 5f : 3.5f) * (1f - lifeRatio); // Movement int num180 = (int)(npc.position.X / 16f) - 1; @@ -397,20 +426,25 @@ namespace CalamityMod.NPCs.DevourerofGods phaseSwitch += 1; - int phaseLimit = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 600 : 900) / (1 + (int)(5f * (1f - lifeRatio))); + int phaseLimit = (death ? 600 : 900) / (1 + (int)(5f * (1f - lifeRatio))); npc.localAI[1] = 0f; - float speed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 18f : 15f) + (3f * (1f - lifeRatio)); - float turnSpeed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.33f : 0.3f) + (0.06f * (1f - lifeRatio)); - float homingSpeed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 28f : 24f) + (12f * (1f - lifeRatio)); - float homingTurnSpeed = ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.36f : 0.33f) + (0.15f * (1f - lifeRatio)); + float speed = (death ? 18f : 15f) + (3f * (1f - lifeRatio)); + float turnSpeed = (death ? 0.33f : 0.3f) + (0.06f * (1f - lifeRatio)); + float homingSpeed = (death ? 28f : 24f) + (12f * (1f - lifeRatio)); + float homingTurnSpeed = (death ? 0.36f : 0.33f) + (0.15f * (1f - lifeRatio)); - // Go to ground phase sooner - if (Vector2.Distance(Main.player[npc.target].Center, vector) > 5600f) - phaseSwitch += 10; + // Go to ground phase sooner + if (tooFarAway) + { + if (revenge && laserWallPhase == 0) + Teleport(); + else + phaseSwitch += 10; + } - float num188 = speed; + float num188 = speed; float num189 = turnSpeed; Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); @@ -420,7 +454,7 @@ namespace CalamityMod.NPCs.DevourerofGods int num44 = (int)(Main.player[npc.target].Center.Y / 16f); // Charge at target for 1.5 seconds - bool flyAtTarget = (!speedBoost || speedBoost2) && phaseSwitch > phaseLimit - 90 && (CalamityWorld.revenge || CalamityWorld.bossRushActive); + bool flyAtTarget = (!speedBoost || speedBoost2) && phaseSwitch > phaseLimit - 90 && revenge; for (int num45 = num43 - 2; num45 <= num43 + 2; num45++) { @@ -618,14 +652,19 @@ namespace CalamityMod.NPCs.DevourerofGods phaseSwitch += 1; - float turnSpeed = 0.18f + (((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.14f : 0.12f) * (1f - lifeRatio)); - bool increaseSpeed = Vector2.Distance(Main.player[npc.target].Center, vector) > 3200f; + float turnSpeed = 0.18f + ((death ? 0.14f : 0.12f) * (1f - lifeRatio)); + bool increaseSpeed = distanceFromTarget > 3200f; - // Enrage - if (Vector2.Distance(Main.player[npc.target].Center, vector) > 5600f) - turnSpeed *= 6f; - else if (increaseSpeed) - turnSpeed *= 3f; + // Enrage + if (tooFarAway) + { + if (revenge && laserWallPhase == 0) + Teleport(); + else + turnSpeed *= 6f; + } + else if (increaseSpeed) + turnSpeed *= 3f; if (!flies) { @@ -725,8 +764,8 @@ namespace CalamityMod.NPCs.DevourerofGods } else { - double maximumSpeed1 = (increaseSpeed ? 1.2 : 0.4) + (double)(((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.14f : 0.12f) * (1f - lifeRatio)); - double maximumSpeed2 = (increaseSpeed ? 3.0 : 1.0) + (double)(((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.3f : 0.25f) * (1f - lifeRatio)); + double maximumSpeed1 = (increaseSpeed ? 1.2 : 0.4) + (double)((death ? 0.14f : 0.12f) * (1f - lifeRatio)); + double maximumSpeed2 = (increaseSpeed ? 3.0 : 1.0) + (double)((death ? 0.3f : 0.25f) * (1f - lifeRatio)); num193 = (float)Math.Sqrt((double)(num191 * num191 + num192 * num192)); float num25 = Math.Abs(num191); @@ -828,7 +867,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (((npc.velocity.X > 0f && npc.oldVelocity.X < 0f) || (npc.velocity.X < 0f && npc.oldVelocity.X > 0f) || (npc.velocity.Y > 0f && npc.oldVelocity.Y < 0f) || (npc.velocity.Y < 0f && npc.oldVelocity.Y > 0f)) && !npc.justHit) npc.netUpdate = true; - if (phaseSwitch > ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 600 : 900)) + if (phaseSwitch > (death ? 600 : 900)) { npc.ai[2] = 0f; phaseSwitch = 0; @@ -837,6 +876,95 @@ namespace CalamityMod.NPCs.DevourerofGods } } + private void Teleport() + { + postTeleportTimer = 255; + npc.alpha = postTeleportTimer; + + int playerWidth = Main.player[npc.target].width / 2; + int playerHeight = Main.player[npc.target].height / 2; + + float playerVelocityX = Main.player[npc.target].velocity.X; + float playerVelocityY = Main.player[npc.target].velocity.Y; + + int x = (int)Main.player[npc.target].position.X + playerWidth - 25; + int y = (int)Main.player[npc.target].position.Y + playerHeight - 25; + + float velocityThreshold = 0.05f; + int vectorAdjustment = 500; + if (playerVelocityX >= velocityThreshold) + { + x += vectorAdjustment; + yAdjustment(); + } + else if (playerVelocityX <= -velocityThreshold) + { + x -= vectorAdjustment; + yAdjustment(); + } + + void yAdjustment() + { + if (playerVelocityY >= velocityThreshold) + y += vectorAdjustment; + else if (playerVelocityY <= -velocityThreshold) + y -= vectorAdjustment; + } + + int x2 = x + 50; + int y2 = y + 50; + + float locationX = (float)Main.rand.Next(x, x2); + float locationY = (float)Main.rand.Next(y, y2); + Vector2 teleportLocation = new Vector2(locationX, locationY); + + npc.position = teleportLocation; + npc.netUpdate = true; + + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == ModContent.NPCType())) + { + Main.npc[i].position = teleportLocation; + Main.npc[i].netUpdate = true; + } + } + + Vector2 npcCenter = new Vector2(npc.position.X + (float)(npc.width / 2), npc.position.Y + (float)(npc.height / 2)); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LargeMechGaussRifle"), (int)npcCenter.X, (int)npcCenter.Y); + + int dustAmt = 50; + int random = 5; + + for (int j = 0; j < 10; j++) + { + random += j * 2; + int dustAmtSpawned = 0; + int scale = random * 13; + float dustPositionX = npcCenter.X - (float)(scale / 2); + float dustPositionY = npcCenter.Y - (float)(scale / 2); + while (dustAmtSpawned < dustAmt) + { + float dustVelocityX = (float)Main.rand.Next(-random, random); + float dustVelocityY = (float)Main.rand.Next(-random, random); + float dustVelocityScalar = (float)random * 2f; + float dustVelocity = (float)Math.Sqrt((double)(dustVelocityX * dustVelocityX + dustVelocityY * dustVelocityY)); + dustVelocity = dustVelocityScalar / dustVelocity; + dustVelocityX *= dustVelocity; + dustVelocityY *= dustVelocity; + int dust = Dust.NewDust(new Vector2(dustPositionX, dustPositionY), scale, scale, 173, 0f, 0f, 100, default, 5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].position.X = teleportLocation.X; + Main.dust[dust].position.Y = teleportLocation.Y; + Main.dust[dust].position.X += (float)Main.rand.Next(-10, 11); + Main.dust[dust].position.Y += (float)Main.rand.Next(-10, 11); + Main.dust[dust].velocity.X = dustVelocityX; + Main.dust[dust].velocity.Y = dustVelocityY; + dustAmtSpawned++; + } + } + } + public override void BossLoot(ref string name, ref int potionType) { potionType = ModContent.ItemType(); @@ -928,7 +1056,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (dist4 < minDist) minDist = dist4; - return minDist <= 80f && npc.alpha == 0; + return minDist <= 80f && npc.alpha <= 0; } // Projectiles can only hit within certain distance @@ -1048,7 +1176,7 @@ namespace CalamityMod.NPCs.DevourerofGods } // TODO: don't talk if the player has iframes - if (player.immune) + if (player.immune || player.immuneTime > 0) return; int num = Main.rand.Next(5); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 5bc4e4f723..51d993e8ac 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -224,7 +224,7 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(BuffID.Darkness, 180, true); // TODO: don't talk if the player has iframes - if (player.immuneTime > 0) + if (player.immuneTime > 0 || player.immune) return; int num = Main.rand.Next(2); diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index a2fdd88c89..4a467b2f0e 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.DevourerofGods } else { - npc.dontTakeDamage = false; + npc.dontTakeDamage = Main.npc[(int)npc.ai[2]].dontTakeDamage; } if (npc.ai[3] > 0f) { @@ -291,7 +291,7 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(BuffID.Darkness, 180, true); // TODO: don't talk if the player has iframes - if (player.immune) + if (player.immune || player.immuneTime > 0) return; int num = Main.rand.Next(2); diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 2bb2693a3b..26d59c074a 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -259,7 +259,7 @@ namespace CalamityMod.NPCs.HiveMind npc.alpha = 0; phase2timer = 0; deceleration = npc.velocity / 255f * reelbackFade; - if (CalamityWorld.death || CalamityWorld.bossRushActive) + if (CalamityWorld.revenge || CalamityWorld.bossRushActive) { state = 2; Main.PlaySound(36, (int)npc.Center.X, (int)npc.Center.Y, -1, 1f, 0f); @@ -305,16 +305,33 @@ namespace CalamityMod.NPCs.HiveMind if (nextState == 0) { npc.TargetClosest(true); - if (CalamityWorld.death || CalamityWorld.bossRushActive) + if ((CalamityWorld.revenge && (double)npc.life < (double)npc.lifeMax * 0.66) || CalamityWorld.death || CalamityWorld.bossRushActive) { - do - nextState = Main.rand.Next(3, 6); - while (nextState == previousState); - previousState = nextState; + if (CalamityWorld.death || CalamityWorld.bossRushActive) + { + do + nextState = Main.rand.Next(3, 6); + while (nextState == previousState); + previousState = nextState; + } + else if ((double)npc.life < (double)npc.lifeMax * 0.33) + { + do + nextState = Main.rand.Next(3, 6); + while (nextState == previousState); + previousState = nextState; + } + else + { + do + nextState = Main.rand.Next(3, 5); + while (nextState == previousState); + previousState = nextState; + } } else { - if (CalamityWorld.revenge && (Main.rand.NextBool(4) || reelCount == 3)) + if (CalamityWorld.revenge && (Main.rand.NextBool(3) || reelCount == 2)) { reelCount = 0; nextState = 2; @@ -322,7 +339,14 @@ namespace CalamityMod.NPCs.HiveMind else { reelCount++; - nextState = 1; + if (Main.expertMode && reelCount == 2) + { + reelCount = 0; + nextState = 2; + } + else + nextState = 1; + npc.ai[1] = 0f; npc.ai[2] = 0f; } @@ -418,9 +442,9 @@ namespace CalamityMod.NPCs.HiveMind npc.alpha = 255; npc.velocity = Vector2.Zero; dashStarted = false; - if (CalamityWorld.death || CalamityWorld.bossRushActive) + if ((CalamityWorld.revenge && (double)npc.life < (double)npc.lifeMax * 0.66) || CalamityWorld.death || CalamityWorld.bossRushActive) { - state = nextState; + state = nextState; nextState = 0; previousState = state; } @@ -436,7 +460,7 @@ namespace CalamityMod.NPCs.HiveMind rotationDirection = player.direction; } break; - case 3: //rev lunge + case 3: //lunge npc.netUpdate = true; if (npc.alpha > 0) { @@ -482,7 +506,7 @@ namespace CalamityMod.NPCs.HiveMind } } break; - case 4: //enemy spawn arc (death mode) + case 4: //enemy spawn arc if (npc.alpha > 0) { npc.alpha -= 5; @@ -537,7 +561,7 @@ namespace CalamityMod.NPCs.HiveMind } } break; - case 5: //raindash (death mode) + case 5: //raindash if (npc.alpha > 0) { npc.alpha -= 5; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index aeac5446ea..3dbc8ad134 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -110,12 +110,19 @@ namespace CalamityMod.NPCs.Perforator npc.timeLeft = 1800; } - bool wormAlive = false; - if (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType())) + int wormsAlive = 0; + bool largeWormAlive = false; + if (NPC.AnyNPCs(ModContent.NPCType())) { - wormAlive = true; + wormsAlive++; + largeWormAlive = true; } - if (wormAlive) + if (NPC.AnyNPCs(ModContent.NPCType())) + wormsAlive++; + if (NPC.AnyNPCs(ModContent.NPCType())) + wormsAlive++; + + if (largeWormAlive) { npc.dontTakeDamage = true; } @@ -132,10 +139,11 @@ namespace CalamityMod.NPCs.Perforator shoot += 3; } npc.localAI[0] += (float)Main.rand.Next(shoot); - if (npc.localAI[0] >= (float)Main.rand.Next(300, 900)) + if (npc.localAI[0] >= (float)Main.rand.Next(300, 901) && npc.position.Y + (float)npc.height < player.position.Y && Vector2.Distance(player.Center, npc.Center) > 80f) { npc.localAI[0] = 0f; Main.PlaySound(3, (int)npc.position.X, (int)npc.position.Y, 20); + for (int num621 = 0; num621 < 8; num621++) { int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 170, 0f, 0f, 100, default, 1f); @@ -146,6 +154,7 @@ namespace CalamityMod.NPCs.Perforator Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } + for (int num623 = 0; num623 < 16; num623++) { int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 1.5f); @@ -154,6 +163,7 @@ namespace CalamityMod.NPCs.Perforator num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 1f); Main.dust[num624].velocity *= 2f; } + float num179 = 8f; Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num180 = player.position.X + (float)player.width * 0.5f - value9.X; @@ -168,6 +178,7 @@ namespace CalamityMod.NPCs.Perforator int num185 = Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType(); value9.X += num180; value9.Y += num182; + for (int num186 = 0; num186 < 20; num186++) { num180 = player.position.X + (float)player.width * 0.5f - value9.X; @@ -183,29 +194,37 @@ namespace CalamityMod.NPCs.Perforator npc.rotation = npc.velocity.X * 0.04f; npc.spriteDirection = (npc.direction > 0) ? 1 : -1; - if (wormAlive) + + if (revenge) { - Movement(player, 4f, 1f, (CalamityWorld.bossRushActive ? 0.2f : 0.15f), 160f, 300f, 400f); - } - else - { - if (large) + if (wormsAlive == 1) { - Movement(player, 5f, 1.5f, (CalamityWorld.bossRushActive ? 0.195f : 0.13f), 330f, 10f, 65f); - } - else if (medium) - { - Movement(player, 6f, 2f, (CalamityWorld.bossRushActive ? 0.18f : 0.12f), 320f, 15f, 60f); - } - else if (small) - { - Movement(player, 7f, 2.5f, (CalamityWorld.bossRushActive ? 0.165f : 0.11f), 310f, 20f, 55f); + Movement(player, 4f, 1f, (CalamityWorld.bossRushActive ? 0.2f : 0.15f), 160f, 300f, 400f); } else { - Movement(player, 8f, 3f, (CalamityWorld.bossRushActive ? 0.15f : 0.1f), 300f, 25f, 50f); + if (large || CalamityWorld.death || CalamityWorld.bossRushActive) + { + Movement(player, 5f, 1.5f, (CalamityWorld.bossRushActive ? 0.195f : 0.13f), 360f, 10f, 50f); + } + else if (medium) + { + Movement(player, 6f, 2f, (CalamityWorld.bossRushActive ? 0.18f : 0.12f), 340f, 15f, 50f); + } + else if (small) + { + Movement(player, 7f, 2.5f, (CalamityWorld.bossRushActive ? 0.165f : 0.11f), 320f, 20f, 50f); + } + else + { + Movement(player, 8f, 3f, (CalamityWorld.bossRushActive ? 0.15f : 0.1f), 300f, 25f, 50f); + } } } + else + { + Movement(player, 4f, 1f, 0.1f, 160f, 300f, 400f); + } if (npc.ai[3] == 0f && npc.life > 0) { diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 7b671b4850..ef17d0f435 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -211,7 +211,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } while ((float)num596 == num595); - if (num596 == 0 && ((double)npc.life <= (double)npc.lifeMax * 0.8 || CalamityWorld.death || CalamityWorld.bossRushActive) && distFromPlayer.Length() < 1800f) + if (num596 == 0 && revenge && ((double)npc.life <= (double)npc.lifeMax * 0.8 || CalamityWorld.death || CalamityWorld.bossRushActive) && distFromPlayer.Length() < 1800f) { switch (Main.rand.Next(3)) { diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 2d65ce6355..dd68b01d8f 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -387,7 +387,15 @@ namespace CalamityMod.NPCs.Ravager npc.ai[1] += 1f; if (npc.ai[1] > 0f) { - if ((!rightClawActive && !leftClawActive) || npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (CalamityWorld.revenge || CalamityWorld.bossRushActive) + { + if (npc.Calamity().newAI[0] % 3f == 0f) + npc.ai[1] += 1f; + else if (npc.Calamity().newAI[0] % 2f == 0f) + npc.ai[1] += 1f; + } + + if ((!rightClawActive && !leftClawActive) || npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.ai[1] += 1f; if (!headActive || npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.ai[1] += 1f; @@ -401,20 +409,32 @@ namespace CalamityMod.NPCs.Ravager { npc.TargetClosest(true); - float velocityX = ((enrage || npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio)); - npc.velocity.X = velocityX * (float)npc.direction; + bool shouldFall = (Main.player[npc.target].position.Y >= npc.position.Y + (float)npc.height); + float velocityX = ((enrage || npc.Calamity().enraged > 0 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio)); + float velocityY = -16f; - if (CalamityWorld.revenge || CalamityWorld.bossRushActive) - { - if (Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height) - npc.velocity.Y = -15.2f; - else - npc.velocity.Y = 1f; + if (CalamityWorld.revenge || CalamityWorld.bossRushActive) + { + npc.noTileCollide = true; + if (shouldFall) + velocityY = 1f; - npc.noTileCollide = true; - } - else - npc.velocity.Y = -15.2f; + if (npc.Calamity().newAI[0] % 3f == 0f) + { + velocityX *= 2f; + if (!shouldFall) + velocityY *= 0.5f; + } + else if (npc.Calamity().newAI[0] % 2f == 0f) + { + velocityX *= 1.5f; + if (!shouldFall) + velocityY *= 0.75f; + } + } + + npc.velocity.X = velocityX * (float)npc.direction; + npc.velocity.Y = velocityY; npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -444,7 +464,10 @@ namespace CalamityMod.NPCs.Ravager } } - for (int stompDustArea = (int)npc.position.X - 30; stompDustArea < (int)npc.position.X + npc.width + 60; stompDustArea += 30) + if (CalamityWorld.revenge || CalamityWorld.bossRushActive) + npc.Calamity().newAI[0] += 1f; + + for (int stompDustArea = (int)npc.position.X - 30; stompDustArea < (int)npc.position.X + npc.width + 60; stompDustArea += 30) { for (int stompDustAmount = 0; stompDustAmount < 6; stompDustAmount++) { diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 9936f217bd..c6f69d537b 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -60,7 +60,9 @@ namespace CalamityMod.NPCs.Signus public override void AI() { - npc.alpha -= 3; + Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.75f, 0.75f, 0.75f); + + npc.alpha -= 3; if (npc.alpha < 0) { npc.alpha = 0; @@ -68,19 +70,21 @@ namespace CalamityMod.NPCs.Signus Main.dust[num1262].velocity *= 0.1f; Main.dust[num1262].noGravity = true; } + npc.rotation = npc.velocity.X * 0.08f; npc.spriteDirection = (npc.direction > 0) ? 1 : -1; npc.TargetClosest(true); + + bool revenge = CalamityWorld.revenge; + float playerDistNormMult = revenge ? 24f : 22f; + if (CalamityWorld.bossRushActive) + playerDistNormMult = 30f; + Vector2 vector145 = new Vector2(npc.Center.X, npc.Center.Y); float playerDistX = Main.player[npc.target].Center.X - vector145.X; float playerDistY = Main.player[npc.target].Center.Y - vector145.Y; float playerDistMagnitude = (float)Math.Sqrt((double)(playerDistX * playerDistX + playerDistY * playerDistY)); - bool revenge = CalamityWorld.revenge; - float playerDistNormMult = revenge ? 27f : 25f; - if (CalamityWorld.death || CalamityWorld.bossRushActive) - { - playerDistNormMult = 30f; - } + if (npc.localAI[0] < 85f) { playerDistNormMult = 0.1f; @@ -91,8 +95,10 @@ namespace CalamityMod.NPCs.Signus npc.localAI[0] += 1f; return; } + npc.dontTakeDamage = false; npc.chaseable = true; + playerDistMagnitude = playerDistNormMult / playerDistMagnitude; playerDistX *= playerDistMagnitude; playerDistY *= playerDistMagnitude; diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 59cdb85136..626c0d76cc 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -130,7 +130,17 @@ namespace CalamityMod.NPCs.Signus Player player = Main.player[npc.target]; npc.TargetClosest(true); - Vector2 vector142 = new Vector2(npc.Center.X, npc.Center.Y); + + int targetLightStrength = player.Calamity().abyssLightLevelStat * 15; + if (revenge) + { + int fadeIn = (int)((double)lifeToAlpha * 1.5) - targetLightStrength; + if (fadeIn < 0) + fadeIn = 0; + Main.BlackFadeIn = fadeIn; + } + + Vector2 vector142 = new Vector2(npc.Center.X, npc.Center.Y); Vector2 vectorCenter = npc.Center; float num1243 = player.Center.X - vector142.X; float num1244 = player.Center.Y - vector142.Y; @@ -220,7 +230,7 @@ namespace CalamityMod.NPCs.Signus } if (npc.ai[0] == 0f) { - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[1] += 1f; if (npc.localAI[1] >= 120f) @@ -360,21 +370,14 @@ namespace CalamityMod.NPCs.Signus Vector2 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2), npc.position.Y + (float)(npc.height / 2)); npc.ai[1] += 1f; bool flag104 = false; - if (npc.life < npc.lifeMax / 4 || CalamityWorld.death || CalamityWorld.bossRushActive) + if (npc.life < npc.lifeMax / 2 || CalamityWorld.death || CalamityWorld.bossRushActive) { - if (npc.ai[1] % 30f == 29f) + if (npc.ai[1] % 45f == 44f) { flag104 = true; } } - else if (npc.life < npc.lifeMax / 2) - { - if (npc.ai[1] % 35f == 34f) - { - flag104 = true; - } - } - else if (npc.ai[1] % 40f == 39f) + else if (npc.ai[1] % 65f == 64f) { flag104 = true; } @@ -554,7 +557,7 @@ namespace CalamityMod.NPCs.Signus } else if (chargeSwitch == 1) //pause before charge { - npc.velocity *= scaleFactor4; + npc.velocity *= scaleFactor4; npc.ai[1] += 1f; if (npc.ai[1] >= num1001) { diff --git a/NPCs/Signus/SignusBomb.cs b/NPCs/Signus/SignusBomb.cs index f6472cef7d..2ac2d59459 100644 --- a/NPCs/Signus/SignusBomb.cs +++ b/NPCs/Signus/SignusBomb.cs @@ -41,7 +41,8 @@ namespace CalamityMod.NPCs.Signus public override void AI() { - npc.rotation = npc.velocity.X * 0.04f; + Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.7f, 0.2f, 1.1f); + npc.rotation = npc.velocity.X * 0.04f; if (npc.ai[1] == 0f) { npc.scale -= 0.02f; diff --git a/NPCs/Signus/SignusScreenShaderData.cs b/NPCs/Signus/SignusScreenShaderData.cs new file mode 100644 index 0000000000..b144eaa9c2 --- /dev/null +++ b/NPCs/Signus/SignusScreenShaderData.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.Signus +{ + public class SignusScreenShaderData : ScreenShaderData + { + private int SignusIndex; + + public SignusScreenShaderData(string passName) + : base(passName) + { + } + + private void UpdateSIndex() + { + int SignusType = ModContent.NPCType(); + if (SignusIndex >= 0 && Main.npc[SignusIndex].active && Main.npc[SignusIndex].type == SignusType) + { + return; + } + SignusIndex = -1; + for (int i = 0; i < Main.npc.Length; i++) + { + if (Main.npc[i].active && Main.npc[i].type == SignusType) + { + SignusIndex = i; + break; + } + } + } + + public override void Apply() + { + UpdateSIndex(); + if (SignusIndex != -1) + { + UseTargetPosition(Main.npc[SignusIndex].Center); + } + base.Apply(); + } + } +} diff --git a/NPCs/Signus/SignusSky.cs b/NPCs/Signus/SignusSky.cs new file mode 100644 index 0000000000..b0f9eb3cad --- /dev/null +++ b/NPCs/Signus/SignusSky.cs @@ -0,0 +1,107 @@ +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Graphics.Effects; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.Signus +{ + public class SignusSky : CustomSky + { + private bool isActive = false; + private float intensity = 0f; + private int SignusIndex = -1; + + public override void Update(GameTime gameTime) + { + if (isActive && intensity < 1f) + { + intensity += 0.01f; + } + else if (!isActive && intensity > 0f) + { + intensity -= 0.01f; + } + } + + private float GetIntensity() + { + if (this.UpdateSIndex()) + { + float x = 0f; + if (this.SignusIndex != -1) + { + x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[this.SignusIndex].Center); + } + + float maxIntensity = 0.1f; + if (CalamityWorld.revenge) + { + maxIntensity = 1f - (float)Main.npc[this.SignusIndex].life / (float)Main.npc[this.SignusIndex].lifeMax; + } + return (1f - Utils.SmoothStep(3000f, 6000f, x)) * maxIntensity; + } + return 0f; + } + + public override Color OnTileColor(Color inColor) + { + float intensity = this.GetIntensity(); + return new Color(Vector4.Lerp(new Vector4(0.5f, 0.8f, 1f, 1f), inColor.ToVector4(), 1f - intensity)); + } + + private bool UpdateSIndex() + { + int SignusType = ModContent.NPCType(); + if (SignusIndex >= 0 && Main.npc[SignusIndex].active && Main.npc[SignusIndex].type == SignusType) + { + return true; + } + SignusIndex = -1; + for (int i = 0; i < Main.npc.Length; i++) + { + if (Main.npc[i].active && Main.npc[i].type == SignusType) + { + SignusIndex = i; + break; + } + } + return SignusIndex != -1; + } + + public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) + { + if (maxDepth >= 0 && minDepth < 0) + { + float intensity = this.GetIntensity(); + spriteBatch.Draw(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), Color.Black * intensity); + } + } + + public override float GetCloudAlpha() + { + return 0f; + } + + public override void Activate(Vector2 position, params object[] args) + { + isActive = true; + } + + public override void Deactivate(params object[] args) + { + isActive = false; + } + + public override void Reset() + { + isActive = false; + } + + public override bool IsActive() + { + return isActive || intensity > 0f; + } + } +} diff --git a/Projectiles/Boss/DarkEnergyBall2.cs b/Projectiles/Boss/DarkEnergyBall2.cs new file mode 100644 index 0000000000..a8e3327698 --- /dev/null +++ b/Projectiles/Boss/DarkEnergyBall2.cs @@ -0,0 +1,83 @@ +using System; +using System.IO; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Boss +{ + public class DarkEnergyBall2 : ModProjectile + { + private bool start = true; + private float startingPosX = 0f; + private float startingPosY = 0f; + private double distance = 0D; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dark Energy"); + Main.projFrames[projectile.type] = 6; + } + + public override void SetDefaults() + { + projectile.width = 80; + projectile.height = 80; + projectile.hostile = true; + projectile.tileCollide = false; + projectile.timeLeft = 600; + projectile.penetrate = -1; + cooldownSlot = 1; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(start); + writer.Write(startingPosX); + writer.Write(startingPosY); + writer.Write(distance); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + start = reader.ReadBoolean(); + startingPosX = reader.ReadSingle(); + startingPosY = reader.ReadSingle(); + distance = reader.ReadDouble(); + } + + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 5) + { + projectile.frame = 0; + } + + if (start) + { + startingPosX = projectile.Center.X; + startingPosY = projectile.Center.Y; + start = false; + } + + double deg = (double)projectile.ai[0]; + double rad = deg * (Math.PI / 180); + distance += (projectile.ai[1] == 1f ? 2D : 1D); + projectile.position.X = startingPosX - (int)(Math.Cos(rad) * distance) - projectile.width / 2; + projectile.position.Y = startingPosY - (int)(Math.Sin(rad) * distance) - projectile.height / 2; + projectile.ai[0] += 1f; + } + + public override void Kill(int timeLeft) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 90, 0f, 0f); + } + } + } +} diff --git a/Projectiles/Boss/DarkEnergyBall2.png b/Projectiles/Boss/DarkEnergyBall2.png new file mode 100644 index 0000000000000000000000000000000000000000..813ebf8eb06a308f7bdd0d709cbf763ad3176379 GIT binary patch literal 4562 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 Z%$M-lg^LT>(7zhJ-P`@Q-6R1S{|CuKVz&SQ literal 0 HcmV?d00001 diff --git a/Projectiles/Boss/MushBombFall.cs b/Projectiles/Boss/MushBombFall.cs index 18e741ac38..0c4d203b12 100644 --- a/Projectiles/Boss/MushBombFall.cs +++ b/Projectiles/Boss/MushBombFall.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Boss @@ -25,7 +27,8 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - projectile.velocity.Y = 5f; + projectile.velocity.Y = CalamityWorld.death ? 6f : 5f; + projectile.frameCounter++; if (projectile.frameCounter > 4) { @@ -36,12 +39,14 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } + if (projectile.timeLeft < 90) - { projectile.tileCollide = true; - } - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.3f / 255f); - projectile.velocity.X *= 0.99f; + + Lighting.AddLight(projectile.Center, 0f, 0.15f, 0.3f); + + if (Math.Abs(projectile.velocity.X) > 2f) + projectile.velocity.X *= 0.99f; } public override void Kill(int timeLeft) diff --git a/Projectiles/Healing/BurntSiennaProj.cs b/Projectiles/Healing/BurntSiennaProj.cs index 47f7ee6516..5af35de105 100644 --- a/Projectiles/Healing/BurntSiennaProj.cs +++ b/Projectiles/Healing/BurntSiennaProj.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Healing float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490)); if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && projectile.position.X + (float)projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && projectile.position.Y + (float)projectile.height > Main.player[num487].position.Y) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech) { int num492 = 3; Main.player[num487].HealEffect(num492, false); diff --git a/Projectiles/Healing/CactusHealOrb.cs b/Projectiles/Healing/CactusHealOrb.cs index 99fb20fee9..2a820f4f43 100644 --- a/Projectiles/Healing/CactusHealOrb.cs +++ b/Projectiles/Healing/CactusHealOrb.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Healing float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490)); if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && projectile.position.X + (float)projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && projectile.position.Y + (float)projectile.height > Main.player[num487].position.Y) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech) { int num492 = 25; Main.player[num487].HealEffect(num492, false); diff --git a/Projectiles/Healing/EssenceFlame.cs b/Projectiles/Healing/EssenceFlame.cs index f585af83bf..24f49646a4 100644 --- a/Projectiles/Healing/EssenceFlame.cs +++ b/Projectiles/Healing/EssenceFlame.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Healing float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490)); if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && projectile.position.X + (float)projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && projectile.position.Y + (float)projectile.height > Main.player[num487].position.Y) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech) { int num492 = 8; Main.player[num487].HealEffect(num492, false); diff --git a/Projectiles/Healing/PhoenixHeal.cs b/Projectiles/Healing/PhoenixHeal.cs index f6897b12b1..bfa15556d4 100644 --- a/Projectiles/Healing/PhoenixHeal.cs +++ b/Projectiles/Healing/PhoenixHeal.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Healing float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490)); if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && projectile.position.X + (float)projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && projectile.position.Y + (float)projectile.height > Main.player[num487].position.Y) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech) { int num492 = 10; Main.player[num487].HealEffect(num492, false); diff --git a/Projectiles/Healing/RainHeal.cs b/Projectiles/Healing/RainHeal.cs index a8836237a2..0c1b9dd154 100644 --- a/Projectiles/Healing/RainHeal.cs +++ b/Projectiles/Healing/RainHeal.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Healing float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490)); if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && projectile.position.X + (float)projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && projectile.position.Y + (float)projectile.height > Main.player[num487].position.Y) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech) { int num492 = 8; Main.player[num487].HealEffect(num492, false); diff --git a/Projectiles/Healing/TerracottaProj.cs b/Projectiles/Healing/TerracottaProj.cs index 34aec083e1..b40dda0f6a 100644 --- a/Projectiles/Healing/TerracottaProj.cs +++ b/Projectiles/Healing/TerracottaProj.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Healing float num491 = (float)Math.Sqrt((double)(num489 * num489 + num490 * num490)); if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + (float)Main.player[num487].width && projectile.position.X + (float)projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + (float)Main.player[num487].height && projectile.position.Y + (float)projectile.height > Main.player[num487].position.Y) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech) { int num492 = 9; Main.player[num487].HealEffect(num492, false); diff --git a/Projectiles/Magic/ForbiddenSunburst.cs b/Projectiles/Magic/ForbiddenSunburst.cs index f33abe16d7..7fb386a91a 100644 --- a/Projectiles/Magic/ForbiddenSunburst.cs +++ b/Projectiles/Magic/ForbiddenSunburst.cs @@ -39,28 +39,6 @@ namespace CalamityMod.Projectiles.Magic Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); projectile.localAI[0] += 1f; } - bool flag15 = false; - bool flag16 = false; - if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) - { - flag16 = true; - } - if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) - { - flag16 = true; - } - if (flag15 && flag16) - { - projectile.Kill(); - } float num461 = 25f; if (projectile.ai[0] > 180f) { diff --git a/Projectiles/Magic/HellfireExplosionFriendly.cs b/Projectiles/Magic/HellfireExplosionFriendly.cs index 2a7b33ef15..8eccc4e316 100644 --- a/Projectiles/Magic/HellfireExplosionFriendly.cs +++ b/Projectiles/Magic/HellfireExplosionFriendly.cs @@ -34,28 +34,6 @@ namespace CalamityMod.Projectiles.Magic Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); projectile.localAI[0] += 1f; } - bool flag15 = false; - bool flag16 = false; - if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) - { - flag16 = true; - } - if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) - { - flag16 = true; - } - if (flag15 && flag16) - { - projectile.Kill(); - } float num461 = 25f; if (projectile.ai[0] > 180f) { diff --git a/Projectiles/Magic/HellfireExplosionFriendly2.cs b/Projectiles/Magic/HellfireExplosionFriendly2.cs index 4ecd6564ff..aeb3b89c0f 100644 --- a/Projectiles/Magic/HellfireExplosionFriendly2.cs +++ b/Projectiles/Magic/HellfireExplosionFriendly2.cs @@ -32,28 +32,6 @@ namespace CalamityMod.Projectiles.Magic Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); projectile.localAI[0] += 1f; } - bool flag15 = false; - bool flag16 = false; - if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) - { - flag16 = true; - } - if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) - { - flag16 = true; - } - if (flag15 && flag16) - { - projectile.Kill(); - } float num461 = 25f; if (projectile.ai[0] > 180f) { diff --git a/Projectiles/Magic/SHPExplosion.cs b/Projectiles/Magic/SHPExplosion.cs index d979cd68e9..9472252545 100644 --- a/Projectiles/Magic/SHPExplosion.cs +++ b/Projectiles/Magic/SHPExplosion.cs @@ -30,28 +30,6 @@ namespace CalamityMod.Projectiles.Magic float num = (float)Main.rand.Next(90, 111) * 0.01f; num *= Main.essScale; Lighting.AddLight(projectile.Center, 5f * num, 1f * num, 4f * num); - bool flag15 = false; - bool flag16 = false; - if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) - { - flag16 = true; - } - if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) - { - flag16 = true; - } - if (flag15 && flag16) - { - projectile.Kill(); - } float num461 = 25f; if (projectile.ai[0] > 180f) { @@ -99,7 +77,6 @@ namespace CalamityMod.Projectiles.Magic Main.dust[num467].velocity.Y = num464; num462++; } - return; } } } diff --git a/Projectiles/Magic/VenusianExplosion.cs b/Projectiles/Magic/VenusianExplosion.cs index 2cd4168fd6..5355fa8dcf 100644 --- a/Projectiles/Magic/VenusianExplosion.cs +++ b/Projectiles/Magic/VenusianExplosion.cs @@ -35,28 +35,6 @@ namespace CalamityMod.Projectiles.Magic Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 74); projectile.localAI[0] += 1f; } - bool flag15 = false; - bool flag16 = false; - if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) - { - flag15 = true; - } - if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) - { - flag16 = true; - } - if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) - { - flag16 = true; - } - if (flag15 && flag16) - { - projectile.Kill(); - } float num461 = 25f; if (projectile.ai[0] > 180f) { From 5a70b61444feb30de0f0a7199847b967448e2a72 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 9 Jan 2020 20:57:49 -0500 Subject: [PATCH 19/26] made cosmilamp riv obtainable --- Items/Weapons/Summon/LanternoftheSoul.cs | 2 +- ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/Signus/Signus.cs | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/LanternoftheSoul.cs b/Items/Weapons/Summon/LanternoftheSoul.cs index 530a31b1f2..099220453d 100644 --- a/Items/Weapons/Summon/LanternoftheSoul.cs +++ b/Items/Weapons/Summon/LanternoftheSoul.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 180; + item.damage = 250; item.summon = true; item.sentry = true; item.mana = 10; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 52035cadab..24d899125b 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -392,7 +392,7 @@ namespace CalamityMod (Func)(() => CalamityWorld.downedSentinel3), ModContent.ItemType(), new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, - new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, + new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ItemID.SuperHealingPotion}, "Use a [i:" + ModContent.ItemType() + "] in the Underworld", "[c/BA55D3:The Devourer's assassin has finished its easy task.]"); diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 41cf37689c..59fbcc7d84 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -741,6 +741,13 @@ namespace CalamityMod.NPCs.Signus // Weapons DropHelper.DropItemChance(npc, ModContent.ItemType(), 3); DropHelper.DropItemChance(npc, ModContent.ItemType(), 3); + float f = Main.rand.NextFloat(); + bool replaceWithRare = f <= DropHelper.RareVariantDropRateFloat; // 1/40 chance overall of getting Lantern of the Soul + if (f < 0.3333333f) // 1/3 chance of getting Cosmilamp OR Lantern of the Soul replacing it + { + DropHelper.DropItemCondition(npc, ModContent.ItemType(), !replaceWithRare); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), replaceWithRare); + } //Equipment DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.revenge, 4, 1, 1); From 474f2e7e19387c045a9915951e910ad62a02d807 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 9 Jan 2020 20:02:24 -0600 Subject: [PATCH 20/26] Death Mode edits. --- CalPlayer/CalamityPlayer.cs | 24 ++++++++++++------------ CalPlayer/CalamityPlayerMiscEffects.cs | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 72062ccb73..57b0e413da 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4258,7 +4258,7 @@ namespace CalamityMod.CalPlayer { if (item.melee) { - damageMult += CalamityWorld.death ? (DHorHoD ? 7.6 : 6.8) : (DHorHoD ? 2.3 : 2.0); // Death Mode values: 8.9 and 8.0, rev: 2.3 and 2.0 + damageMult += (DHorHoD ? 2.3 : 2.0); } } else if (rageMode) @@ -4266,10 +4266,10 @@ namespace CalamityMod.CalPlayer if (item.melee) { double rageDamageBoost = 0.0 + - (rageBoostOne ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostTwo ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostThree ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0); // Death Mode values: 0.6, rev: 0.15 - double rageDamage = (CalamityWorld.death ? (DHorHoD ? 2.0 : 1.7) : (DHorHoD ? 0.65 : 0.5)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5 + (rageBoostOne ? 0.15 : 0.0) + + (rageBoostTwo ? 0.15 : 0.0) + + (rageBoostThree ? 0.15 : 0.0); + double rageDamage = (DHorHoD ? 0.65 : 0.5) + rageDamageBoost; damageMult += rageDamage; } } @@ -4277,7 +4277,7 @@ namespace CalamityMod.CalPlayer { if (item.melee) { - double damageMultAdr = (CalamityWorld.death ? 5.0 : 1.5) * (double)adrenalineDmgMult; // Death Mode values: 6, rev: 1.5 + double damageMultAdr = 1.5 * (double)adrenalineDmgMult; damageMult += damageMultAdr; } } @@ -4548,7 +4548,7 @@ namespace CalamityMod.CalPlayer { if (hasClassType) { - damageMult += CalamityWorld.death ? (DHorHoD ? 7.6 : 6.8) : (DHorHoD ? 2.3 : 2.0); // Death Mode values: 8.9 and 8.0, rev: 2.3 and 2.0 + damageMult += (DHorHoD ? 2.3 : 2.0); } } else if (rageMode) @@ -4556,10 +4556,10 @@ namespace CalamityMod.CalPlayer if (hasClassType) { double rageDamageBoost = 0.0 + - (rageBoostOne ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostTwo ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0) + // Death Mode values: 0.6, rev: 0.15 - (rageBoostThree ? (CalamityWorld.death ? 0.5 : 0.15) : 0.0); // Death Mode values: 0.6, rev: 0.15 - double rageDamage = (CalamityWorld.death ? (DHorHoD ? 2.0 : 1.7) : (DHorHoD ? 0.65 : 0.5)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5 + (rageBoostOne ? 0.15 : 0.0) + + (rageBoostTwo ? 0.15 : 0.0) + + (rageBoostThree ? 0.15 : 0.0); + double rageDamage = (DHorHoD ? 0.65 : 0.5) + rageDamageBoost; damageMult += rageDamage; } } @@ -4567,7 +4567,7 @@ namespace CalamityMod.CalPlayer { if (hasClassType) { - double damageMultAdr = (CalamityWorld.death ? 5.0 : 1.5) * (double)adrenalineDmgMult; // Death Mode values: 6, rev: 1.5 + double damageMultAdr = 1.5 * (double)adrenalineDmgMult; damageMult += damageMultAdr; } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 09f1e6a9e1..0cdf39e717 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2822,10 +2822,10 @@ namespace CalamityMod.CalPlayer (modPlayer.adrenalineBoostThree ? 5 : 0); bool DHorHoD = modPlayer.draedonsHeart || modPlayer.heartOfDarkness; int rageDamageBoost = 0 + - (modPlayer.rageBoostOne ? (CalamityWorld.death ? 50 : 15) : 0) + - (modPlayer.rageBoostTwo ? (CalamityWorld.death ? 50 : 15) : 0) + - (modPlayer.rageBoostThree ? (CalamityWorld.death ? 50 : 15) : 0); - modPlayer.rageDamageStat = (CalamityWorld.death ? (DHorHoD ? 200 : 170) : (DHorHoD ? 65 : 50)) + rageDamageBoost; // Death Mode values: 2.3 and 2.0, rev: 0.65 and 0.5 + (modPlayer.rageBoostOne ? 15 : 0) + + (modPlayer.rageBoostTwo ? 15 : 0) + + (modPlayer.rageBoostThree ? 15 : 0); + modPlayer.rageDamageStat = (DHorHoD ? 65 : 50) + rageDamageBoost; } #endregion From 021d7a0abc26f808124d0eb5c6aa86097cdfc49f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 9 Jan 2020 21:37:21 -0500 Subject: [PATCH 21/26] updated ripper tooltips to reflect Fab's changes --- Buffs/StatBuffs/AdrenalineMode.cs | 11 +---------- Buffs/StatBuffs/RageMode.cs | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Buffs/StatBuffs/AdrenalineMode.cs b/Buffs/StatBuffs/AdrenalineMode.cs index f5fefad9cc..fc160dabe4 100644 --- a/Buffs/StatBuffs/AdrenalineMode.cs +++ b/Buffs/StatBuffs/AdrenalineMode.cs @@ -6,13 +6,10 @@ namespace CalamityMod.Buffs.StatBuffs { public class AdrenalineMode : ModBuff { - public static string RevTip = "150% damage boost. Can burnout down to 49.5%."; - public static string DeathTip = "500% damage boost. Can burnout down to 165%."; - public override void SetDefaults() { DisplayName.SetDefault("Adrenaline Mode"); - Description.SetDefault(RevTip); + Description.SetDefault("150% damage boost. Can burnout down to 49.5%."); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; @@ -24,11 +21,5 @@ namespace CalamityMod.Buffs.StatBuffs { player.Calamity().adrenalineMode = true; } - - public override void ModifyBuffTip(ref string tip, ref int rare) - { - if (CalamityWorld.death) - tip = DeathTip; - } } } diff --git a/Buffs/StatBuffs/RageMode.cs b/Buffs/StatBuffs/RageMode.cs index 9e4e76b70c..9fcb1a870a 100644 --- a/Buffs/StatBuffs/RageMode.cs +++ b/Buffs/StatBuffs/RageMode.cs @@ -6,13 +6,10 @@ namespace CalamityMod.Buffs.StatBuffs { public class RageMode : ModBuff { - public static string RevTip = "50% damage boost. Can be boosted by other items up to 110%."; - public static string DeathTip = "170% damage boost. Can be boosted by other items up to 350%."; - public override void SetDefaults() { DisplayName.SetDefault("Rage Mode"); - Description.SetDefault(RevTip); + Description.SetDefault("50% damage boost. Can be boosted by other items up to 110%."); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; @@ -24,11 +21,5 @@ namespace CalamityMod.Buffs.StatBuffs { player.Calamity().rageMode = true; } - - public override void ModifyBuffTip(ref string tip, ref int rare) - { - if (CalamityWorld.death) - tip = DeathTip; - } } } From 2312c03657ee9c4b53761370a4afc6844f05765c Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 10 Jan 2020 01:24:34 -0600 Subject: [PATCH 22/26] Death Mode HP boost removal, changed version number to 1.4.2.201 --- CalamityMod.cs | 1 - NPCs/AquaticScourge/AquaticParasite.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeBody.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeHead.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeTail.cs | 2 +- NPCs/AstrumAureus/AstrumAureus.cs | 2 +- NPCs/AstrumAureus/AureusSpawn.cs | 2 +- NPCs/AstrumDeus/AstrumDeusBody.cs | 2 +- NPCs/AstrumDeus/AstrumDeusBodySpectral.cs | 10 +--------- NPCs/AstrumDeus/AstrumDeusHead.cs | 12 ++--------- NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs | 12 ++--------- NPCs/AstrumDeus/AstrumDeusTail.cs | 12 ++--------- NPCs/AstrumDeus/AstrumDeusTailSpectral.cs | 12 ++--------- NPCs/BrimstoneElemental/Brimling.cs | 4 ---- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 2 +- NPCs/Bumblebirb/Bumblefuck.cs | 2 +- NPCs/Bumblebirb/Bumblefuck2.cs | 2 +- NPCs/Calamitas/Calamitas.cs | 2 +- NPCs/Calamitas/CalamitasRun.cs | 2 +- NPCs/Calamitas/CalamitasRun2.cs | 2 +- NPCs/Calamitas/CalamitasRun3.cs | 2 +- NPCs/Calamitas/SoulSeeker.cs | 2 +- NPCs/Crabulon/CrabulonIdle.cs | 2 +- NPCs/Cryogen/Cryogen.cs | 2 +- NPCs/DesertScourge/DesertScourgeBody.cs | 2 +- NPCs/DesertScourge/DesertScourgeHead.cs | 2 +- NPCs/DesertScourge/DesertScourgeTail.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsBody.cs | 6 +----- NPCs/DevourerofGods/DevourerofGodsBodyS.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 8 ++------ NPCs/DevourerofGods/DevourerofGodsHeadS.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsTail.cs | 8 ++------ NPCs/DevourerofGods/DevourerofGodsTailS.cs | 2 +- NPCs/GreatSandShark/GreatSandShark.cs | 6 +----- NPCs/HiveMind/HiveMind.cs | 2 +- NPCs/HiveMind/HiveMindP2.cs | 2 +- NPCs/Leviathan/Leviathan.cs | 2 +- NPCs/Leviathan/Siren.cs | 2 +- NPCs/Perforator/PerforatorBodyLarge.cs | 6 +----- NPCs/Perforator/PerforatorBodyMedium.cs | 6 +----- NPCs/Perforator/PerforatorBodySmall.cs | 6 +----- NPCs/Perforator/PerforatorHeadLarge.cs | 8 ++------ NPCs/Perforator/PerforatorHeadMedium.cs | 8 ++------ NPCs/Perforator/PerforatorHeadSmall.cs | 8 ++------ NPCs/Perforator/PerforatorHive.cs | 2 +- NPCs/Perforator/PerforatorTailLarge.cs | 8 ++------ NPCs/Perforator/PerforatorTailMedium.cs | 8 ++------ NPCs/Perforator/PerforatorTailSmall.cs | 8 ++------ .../PlaguebringerGoliath.cs | 10 +--------- .../PlaguebringerShade.cs | 2 +- NPCs/Polterghast/PolterPhantom.cs | 10 +--------- NPCs/Polterghast/Polterghast.cs | 3 +-- .../ProfanedGuardians/ProfanedGuardianBoss.cs | 2 +- .../ProfanedGuardianBoss2.cs | 2 +- .../ProfanedGuardianBoss3.cs | 2 +- NPCs/Providence/ProvSpawnDefense.cs | 2 +- NPCs/Providence/ProvSpawnHealer.cs | 2 +- NPCs/Providence/ProvSpawnOffense.cs | 2 +- NPCs/Providence/Providence.cs | 2 +- NPCs/Ravager/RavagerBody.cs | 2 +- NPCs/Ravager/RavagerClawLeft.cs | 2 +- NPCs/Ravager/RavagerClawRight.cs | 2 +- NPCs/Ravager/RavagerHead.cs | 2 +- NPCs/Ravager/RavagerLegLeft.cs | 2 +- NPCs/Ravager/RavagerLegRight.cs | 2 +- NPCs/Signus/Signus.cs | 14 +++---------- NPCs/SlimeGod/SlimeGod.cs | 2 +- NPCs/SlimeGod/SlimeGodCore.cs | 2 +- NPCs/SlimeGod/SlimeGodRun.cs | 2 +- NPCs/SlimeGod/SlimeGodRunSplit.cs | 2 +- NPCs/SlimeGod/SlimeGodSplit.cs | 2 +- NPCs/StormWeaver/StormWeaverBody.cs | 10 +++------- NPCs/StormWeaver/StormWeaverBodyNaked.cs | 11 ++++------ NPCs/StormWeaver/StormWeaverHead.cs | 12 ++++------- NPCs/StormWeaver/StormWeaverHeadNaked.cs | 12 ++++------- NPCs/StormWeaver/StormWeaverTail.cs | 12 ++++------- NPCs/StormWeaver/StormWeaverTailNaked.cs | 12 ++++------- NPCs/SupremeCalamitas/SCalWormHeart.cs | 20 ++++++------------- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 6 +----- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 10 +--------- NPCs/SupremeCalamitas/SupremeCataclysm.cs | 6 +----- NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 6 +----- NPCs/Yharon/Yharon.cs | 2 +- Utilities/CalamityUtils.cs | 10 ++-------- World/CalamityWorld.cs | 4 +--- build.txt | 2 +- 87 files changed, 122 insertions(+), 303 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index a7d0ad1a96..ce26b89663 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -3478,6 +3478,5 @@ namespace CalamityMod ArmageddonBoolSync, DemonTrophyBoolSync, NPCRegenerationSync - //DistanceFromBossSync } } diff --git a/NPCs/AquaticScourge/AquaticParasite.cs b/NPCs/AquaticScourge/AquaticParasite.cs index e1395c84d4..81b70b4dbc 100644 --- a/NPCs/AquaticScourge/AquaticParasite.cs +++ b/NPCs/AquaticScourge/AquaticParasite.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.AquaticScourge npc.width = 28; npc.height = 28; npc.defense = 5; - npc.LifeMaxNERD((Main.hardMode ? 200 : 30), bossRush: 30000); + npc.LifeMaxNERB((Main.hardMode ? 200 : 30), bossRush: 30000); npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 28c9da387b..a80e00786f 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AquaticScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); + npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 65c2c17cf4..b561c24d10 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AquaticScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); + npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 794b62ce71..20004252b8 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.AquaticScourge npc.Calamity().RevPlusDR(0.1f); npc.aiStyle = -1; aiType = -1; - npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); + npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 9a9eee58f5..5fd1e2ad9f 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.AquaticScourge aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; - npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000); + npc.LifeMaxNERB(73000, 85000, 10000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); for (int k = 0; k < npc.buffImmune.Length; k++) diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 8a82882d58..c751dd0650 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.AstrumAureus npc.height = 280; npc.defense = 50; npc.Calamity().RevPlusDR(0.15f); - npc.LifeMaxNERD(96000, NPC.downedMoonlord ? 440000 : 122000, NPC.downedMoonlord ? 660000 : 187000, 8400000, 9000000); // 30 seconds in boss rush + npc.LifeMaxNERB(96000, NPC.downedMoonlord ? 440000 : 122000, 8400000); // 30 seconds in boss rush npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 6599b57ea2..c3bbb5f50a 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstrumAureus global.DR = 0.999999f; global.unbreakableDR = true; npc.lifeMax = Main.expertMode ? 1007 : 1012; - if (CalamityWorld.death || CalamityWorld.bossRushActive) + if (CalamityWorld.bossRushActive) { npc.lifeMax = 1002; } diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 0fb82a3efc..bff566706c 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.height = 44; npc.defense = 40; npc.Calamity().RevPlusDR(0.1f); - npc.LifeMaxNERD(12000, 18000, 29100, 360000, 420000); + npc.LifeMaxNERB(12000, 18000, 360000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs index 1c5dc65b5d..9efde4a347 100644 --- a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs @@ -33,15 +33,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 38; npc.height = 44; npc.defense = 50; - npc.lifeMax = CalamityWorld.revenge ? 53800 : 37500; - if (CalamityWorld.death) - { - npc.lifeMax = 80700; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1500000 : 1300000; - } + npc.LifeMaxNERB(37500, 53800, 1300000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index c907765077..46ad5f5bdf 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -31,16 +31,8 @@ namespace CalamityMod.NPCs.AstrumDeus npc.height = 56; npc.defense = 20; npc.Calamity().RevPlusDR(0.1f); - npc.lifeMax = CalamityWorld.revenge ? 18000 : 12000; - if (CalamityWorld.death) - { - npc.lifeMax = 29100; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 420000 : 360000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(12000, 18000, 360000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index 91a5559ce9..4c9c4c3b3e 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -42,16 +42,8 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 56; npc.height = 56; npc.defense = 25; - npc.lifeMax = CalamityWorld.revenge ? 53800 : 37500; - if (CalamityWorld.death) - { - npc.lifeMax = 80700; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1500000 : 1300000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(37500, 53800, 1300000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 23d5a00c78..8c89e56531 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -29,16 +29,8 @@ namespace CalamityMod.NPCs.AstrumDeus npc.height = 68; npc.defense = 60; npc.Calamity().RevPlusDR(0.35f); - npc.lifeMax = CalamityWorld.revenge ? 18000 : 12000; - if (CalamityWorld.death) - { - npc.lifeMax = 29100; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 420000 : 360000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(12000, 18000, 360000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs index 1d400d1329..42a1eed897 100644 --- a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs @@ -29,16 +29,8 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 52; npc.height = 68; npc.defense = 75; - npc.lifeMax = CalamityWorld.revenge ? 53800 : 37500; - if (CalamityWorld.death) - { - npc.lifeMax = 80700; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1500000 : 1300000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(37500, 53800, 1300000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index 240df69803..6ed6d49f11 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -33,10 +33,6 @@ namespace CalamityMod.NPCs.BrimstoneElemental npc.defense = 0; npc.Calamity().DR = normalDR; npc.lifeMax = 4000; - if (CalamityWorld.death) - { - npc.lifeMax = 6000; - } npc.knockBackResist = 0f; for (int k = 0; k < npc.buffImmune.Length; k++) { diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index c6809a4c87..627648a9f9 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental npc.height = 150; npc.defense = 15; npc.value = Item.buyPrice(0, 12, 0, 0); - npc.LifeMaxNERD(26000, 35708, 54050, 6500000, 7000000); + npc.LifeMaxNERB(26000, 35708, 6500000); if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive) { npc.damage *= 3; diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 1575c3da7e..b514cd8a7d 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Bumblebirb npc.width = 80; npc.height = 80; npc.defense = 40; - npc.LifeMaxNERD(227500, 252500, 302500, 3000000, 3200000); + npc.LifeMaxNERB(227500, 252500, 3000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index e28d0b3f1b..bd41190d91 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Bumblebirb npc.height = 80; npc.scale = 0.66f; npc.defense = 20; - npc.LifeMaxNERD(25000, 30000, 35000, 60000, 65000); + npc.LifeMaxNERB(25000, 30000, 60000); npc.knockBackResist = 0f; for (int k = 0; k < npc.buffImmune.Length; k++) { diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index 080d31a914..a93d2963ea 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas npc.defense = 15; npc.Calamity().RevPlusDR(0.15f); npc.value = 0f; - npc.LifeMaxNERD(37500, 51750, 82750, 5200000, 5500000); + npc.LifeMaxNERB(37500, 51750, 5200000); if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive) { npc.damage *= 3; diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 42c62cfb2f..ab4677add6 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas npc.height = 120; npc.defense = 10; npc.Calamity().RevPlusDR(0.15f); - npc.LifeMaxNERD(9000, 13200, 15000, 800000, 900000); + npc.LifeMaxNERB(9000, 13200, 800000); if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive) { npc.damage *= 3; diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index c017185ffa..dec44d379f 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Calamitas npc.height = 120; npc.defense = 10; npc.Calamity().RevPlusDR(0.15f); - npc.LifeMaxNERD(7500, 11025, 13200, 800000, 900000); + npc.LifeMaxNERB(7500, 11025, 800000); if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive) { npc.damage *= 3; diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index df3e53b13e..6443f13ae7 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Calamitas npc.defense = 25; npc.value = Item.buyPrice(0, 15, 0, 0); npc.Calamity().RevPlusDR(0.15f); - npc.LifeMaxNERD(28125, 38812, 62062, 3900000, 4125000); + npc.LifeMaxNERB(28125, 38812, 3900000); if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive) { npc.damage *= 3; diff --git a/NPCs/Calamitas/SoulSeeker.cs b/NPCs/Calamitas/SoulSeeker.cs index 89e1f51de9..ab435b6921 100644 --- a/NPCs/Calamitas/SoulSeeker.cs +++ b/NPCs/Calamitas/SoulSeeker.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Calamitas npc.lifeMax = 2500; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 200000 : 150000; + npc.lifeMax = 150000; } for (int k = 0; k < npc.buffImmune.Length; k++) { diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index a268ac8b1c..a0cb29247a 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.Crabulon npc.width = 280; npc.height = 160; npc.defense = 8; - npc.LifeMaxNERD(3000, 4000, 6930, 11000000, 10000000); + npc.LifeMaxNERB(3000, 4000, 11000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index b9f7cc71ab..ca881e204e 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Cryogen npc.height = 80; npc.defense = 12; npc.Calamity().RevPlusDR(0.1f); - npc.LifeMaxNERD(17900, 26300, 39900, 3000000, 3200000); + npc.LifeMaxNERB(17900, 26300, 3000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index 6dc5414913..0abc195b7a 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.DesertScourge npc.height = 36; npc.defense = 6; npc.Calamity().RevPlusDR(0.05f); - npc.LifeMaxNERD(2300, 2650, 5100, 16500000, 17500000); + npc.LifeMaxNERB(2300, 2650, 16500000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index ddd14e91eb..5195acc985 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.DesertScourge npc.npcSlots = 12f; npc.width = 32; npc.height = 80; - npc.LifeMaxNERD(2300, 2650, 5100, 16500000, 17500000); + npc.LifeMaxNERB(2300, 2650, 16500000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index b3b89a5b5e..3c4bced03a 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.DesertScourge npc.height = 48; npc.defense = 9; npc.Calamity().RevPlusDR(0.1f); - npc.LifeMaxNERD(2300, 2650, 5100, 16500000, 17500000); + npc.LifeMaxNERB(2300, 2650, 16500000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 9445a424f8..e14a57a1e3 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -29,11 +29,7 @@ namespace CalamityMod.NPCs.DevourerofGods CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.death ? 0.95f : 0.925f; global.unbreakableDR = true; - npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000; - if (CalamityWorld.death) - { - npc.lifeMax = 1300000; - } + npc.LifeMaxNERB(675000, 750000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs index 8b42ab4d73..fba06b5c70 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.DevourerofGods CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.death ? 0.97f : 0.955f; global.unbreakableDR = true; - npc.LifeMaxNERD(1150000, 1350000, 2100000, 9200000, 10000000); + npc.LifeMaxNERB(1150000, 1350000, 9200000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 923c464fdf..468e111283 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -35,12 +35,8 @@ namespace CalamityMod.NPCs.DevourerofGods npc.width = 104; npc.height = 104; npc.defense = 50; - npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000; - if (CalamityWorld.death) - { - npc.lifeMax = 1300000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(675000, 750000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.takenDamageMultiplier = 1.25f; npc.aiStyle = -1; diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 568725c263..6f740652dc 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -54,7 +54,7 @@ namespace CalamityMod.NPCs.DevourerofGods npc.width = 186; npc.height = 186; npc.defense = 50; - npc.LifeMaxNERD(1150000, 1350000, 2100000, 9200000, 10000000); + npc.LifeMaxNERB(1150000, 1350000, 9200000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.takenDamageMultiplier = 1.25f; diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index 51d993e8ac..72dfc064c7 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -24,12 +24,8 @@ namespace CalamityMod.NPCs.DevourerofGods npc.width = 66; npc.height = 66; npc.defense = 50; - npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000; - if (CalamityWorld.death) - { - npc.lifeMax = 1300000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(675000, 750000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; aiType = -1; diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index 4a467b2f0e..c60a9e7288 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.DevourerofGods npc.width = 80; npc.height = 140; npc.defense = 50; - npc.LifeMaxNERD(1150000, 1350000, 2100000, 9200000, 10000000); + npc.LifeMaxNERB(1150000, 1350000, 9200000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.takenDamageMultiplier = 1.25f; diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 69cb4c2a10..e1eb21156e 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -34,11 +34,7 @@ namespace CalamityMod.NPCs.GreatSandShark npc.height = 120; npc.defense = 60; npc.Calamity().RevPlusDR(0.25f); - npc.lifeMax = CalamityWorld.revenge ? 11000 : 8000; - if (CalamityWorld.death) - { - npc.lifeMax = 16000; - } + npc.LifeMaxNERB(8000, 11000); npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 9d36be3470..b5fb63ae44 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.HiveMind npc.width = 150; npc.height = 120; npc.defense = 10; - npc.LifeMaxNERD(1200, 1800, 3300, 350000, 400000); + npc.LifeMaxNERB(1200, 1800, 350000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 26d59c074a..274b576af3 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.HiveMind npc.width = 150; npc.height = 120; npc.defense = 5; - npc.LifeMaxNERD(5800, 7560, 12500, 3000000, 3200000); + npc.LifeMaxNERB(5800, 7560, 3000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index cc780f9e3d..f546ba29f4 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Leviathan npc.height = 450; npc.defense = 40; npc.Calamity().RevPlusDR(0.35f); - npc.LifeMaxNERD(69000, 90700, 189750, 7000000, 7500000); + npc.LifeMaxNERB(69000, 90700, 7000000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index c294c62021..fb3ab78546 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Leviathan npc.height = 100; npc.defense = 20; npc.Calamity().RevPlusDR(0.05f); - npc.LifeMaxNERD(27400, 41600, 58650, 2600000, 2800000); + npc.LifeMaxNERB(27400, 41600, 2600000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index ba35e4900e..334a91ec24 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -25,11 +25,7 @@ namespace CalamityMod.NPCs.Perforator npc.width = 60; npc.height = 60; npc.defense = 8; - npc.lifeMax = 2500; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1000000 : 800000; - } + npc.LifeMaxNERB(2500, 2700, 800000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 29a58a5e95..56397cbdc4 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -24,11 +24,7 @@ namespace CalamityMod.NPCs.Perforator npc.width = 54; npc.height = 54; npc.defense = 6; - npc.lifeMax = 2000; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 900000 : 700000; - } + npc.LifeMaxNERB(2000, 2200, 700000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 51921c633c..2ef3c2612a 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -24,11 +24,7 @@ namespace CalamityMod.NPCs.Perforator npc.width = 42; npc.height = 42; npc.defense = 4; - npc.lifeMax = 1250; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 600000 : 500000; - } + npc.LifeMaxNERB(1250, 1500, 500000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index ac4de30059..6212207bc5 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -32,12 +32,8 @@ namespace CalamityMod.NPCs.Perforator npc.width = 70; npc.height = 84; npc.defense = 4; - npc.lifeMax = 2500; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1000000 : 800000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(2500, 2700, 800000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 401d0700e7..5346f034a3 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -31,12 +31,8 @@ namespace CalamityMod.NPCs.Perforator npc.width = 58; npc.height = 68; npc.defense = 2; - npc.lifeMax = 2000; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 900000 : 700000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(2000, 2200, 700000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 1a45d54551..d169ae0274 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -30,12 +30,8 @@ namespace CalamityMod.NPCs.Perforator npc.npcSlots = 5f; npc.width = 42; npc.height = 62; - npc.lifeMax = 1250; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 600000 : 500000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(1250, 1500, 500000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 3dbc8ad134..2a8ee9a2f1 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator npc.width = 110; npc.height = 100; npc.defense = 4; - npc.LifeMaxNERD(3750, 5400, 7600, 2700000, 3000000); + npc.LifeMaxNERB(3750, 5400, 2700000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index f597060d08..6cfb04c3a4 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -22,12 +22,8 @@ namespace CalamityMod.NPCs.Perforator npc.width = 60; npc.height = 78; npc.defense = 12; - npc.lifeMax = 2500; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1000000 : 800000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(2500, 2700, 800000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 8aea588f04..93aaa5a38b 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -22,12 +22,8 @@ namespace CalamityMod.NPCs.Perforator npc.width = 44; npc.height = 58; npc.defense = 10; - npc.lifeMax = 2000; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 900000 : 700000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(2000, 2200, 700000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index 4f8c4cca08..a985330100 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -22,12 +22,8 @@ namespace CalamityMod.NPCs.Perforator npc.width = 40; npc.height = 34; npc.defense = 8; - npc.lifeMax = 1250; - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 600000 : 500000; - } - double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; + npc.LifeMaxNERB(1250, 1500, 500000); + double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = 6; aiType = -1; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index ef17d0f435..3499a21e0a 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -49,15 +49,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.height = 198; npc.defense = 40; npc.Calamity().RevPlusDR(0.25f); - npc.lifeMax = CalamityWorld.revenge ? 77275 : 58500; - if (CalamityWorld.death) - { - npc.lifeMax = 110000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 4000000 : 3700000; - } + npc.LifeMaxNERB(58500, 77275, 3700000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs index 2e124fa59e..06e32ad970 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerShade.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.height = 66; npc.defense = 30; npc.Calamity().RevPlusDR(0.2f); - npc.lifeMax = CalamityWorld.death ? 4000 : 3000; + npc.lifeMax = 3000; npc.value = Item.buyPrice(0, 1, 50, 0); if (CalamityWorld.bossRushActive) { diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 5e1a84c03a..f6e88a450b 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -26,15 +26,7 @@ namespace CalamityMod.NPCs.Polterghast npc.damage = 210; npc.width = 90; npc.height = 120; - npc.lifeMax = CalamityWorld.revenge ? 150000 : 130000; - if (CalamityWorld.death) - { - npc.lifeMax = 225000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 1100000 : 900000; - } + npc.LifeMaxNERB(130000, 150000, 900000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index f0922925af..251e59a17b 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -27,7 +27,6 @@ namespace CalamityMod.NPCs.Polterghast { private int despawnTimer = 600; private bool spawnGhost = false; - private bool boostDR = false; public static float phase1DR = 0.1f; public static float phase2DR = 0.15f; @@ -52,7 +51,7 @@ namespace CalamityMod.NPCs.Polterghast global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.88f); global.multDRReductions.Add(BuffID.CursedInferno, 0.9f); - npc.LifeMaxNERD(412500, 495000, 660000, 3250000, 3500000); + npc.LifeMaxNERB(412500, 495000, 3250000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index 125c7215ae..9252cdd494 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians npc.height = 80; npc.defense = 50; npc.Calamity().RevPlusDR(0.4f); - npc.LifeMaxNERD(102500, 112500, 152500, 1650000, 1800000); + npc.LifeMaxNERB(102500, 112500, 1650000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs index c642a9e609..8d81ddf842 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians npc.height = 80; npc.defense = 50; npc.Calamity().RevPlusDR(0.25f); - npc.LifeMaxNERD(40000, 50000, 80000, 300000, 400000); + npc.LifeMaxNERB(40000, 50000, 300000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs index 87041de0d0..907386105b 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians npc.height = 80; npc.defense = 35; npc.Calamity().RevPlusDR(0.05f); - npc.LifeMaxNERD(25000, 35000, 50000, 200000, 240000); + npc.LifeMaxNERB(25000, 35000, 200000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 3e74731ebb..34f1e3aaf1 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Providence npc.lifeMax = 25000; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 360000 : 300000; + npc.lifeMax = 300000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 74493635b3..b5c3d0aa46 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Providence npc.lifeMax = 40000; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 500000 : 400000; + npc.lifeMax = 400000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index d98b1d79a9..022bc5093d 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.Providence npc.lifeMax = 42500; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 500000 : 400000; + npc.lifeMax = 400000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 78f3c0cc97..bbf5754a75 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.Providence global.customDR = true; global.flatDRReductions.Add(BuffID.Ichor, 0.05f); global.flatDRReductions.Add(BuffID.CursedInferno, 0.05f); - npc.LifeMaxNERD(440000, 500000, 715000, 12500000, 15000000); + npc.LifeMaxNERB(440000, 500000, 12500000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 58d9e77c2b..63525ab4b6 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.Ravager npc.defense = 55; npc.value = Item.buyPrice(0, 25, 0, 0); npc.Calamity().RevPlusDR(0.4f); - npc.LifeMaxNERD(42700, 53500, 90000, 4600000, 4800000); + npc.LifeMaxNERB(42700, 53500, 4600000); if (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive) { npc.damage *= 2; diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index 8a4a49d3c8..ed70df4d19 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Ravager } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 300000 : 260000; + npc.lifeMax = 260000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index 5f98995b37..656a1bdae6 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.Ravager } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 300000 : 260000; + npc.lifeMax = 260000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Ravager/RavagerHead.cs b/NPCs/Ravager/RavagerHead.cs index 57e1fd1618..842341eed6 100644 --- a/NPCs/Ravager/RavagerHead.cs +++ b/NPCs/Ravager/RavagerHead.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Ravager } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 500000 : 450000; + npc.lifeMax = 450000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Ravager/RavagerLegLeft.cs b/NPCs/Ravager/RavagerLegLeft.cs index e385af4b4d..e9760f3025 100644 --- a/NPCs/Ravager/RavagerLegLeft.cs +++ b/NPCs/Ravager/RavagerLegLeft.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.Ravager } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 450000 : 400000; + npc.lifeMax = 400000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Ravager/RavagerLegRight.cs b/NPCs/Ravager/RavagerLegRight.cs index 4e62aadedd..37400ad850 100644 --- a/NPCs/Ravager/RavagerLegRight.cs +++ b/NPCs/Ravager/RavagerLegRight.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.Ravager } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 450000 : 400000; + npc.lifeMax = 400000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index ab21139cdf..0682db7d64 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -46,23 +46,15 @@ namespace CalamityMod.NPCs.Signus music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss4; - npc.lifeMax = CalamityWorld.revenge ? 109500 : 70000; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 280000 : 70000, notDoGFight ? 445500 : 109500, 2400000); + if (notDoGFight) { npc.value = Item.buyPrice(0, 35, 0, 0); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Signus"); else music = MusicID.Boss4; - npc.lifeMax = CalamityWorld.revenge ? 445500 : 280000; - if (CalamityWorld.death) - { - npc.lifeMax = 722250; - } - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 2600000 : 2400000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index f6902ec2ec..7cb5bc2b8d 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.height = 92; npc.scale = 1.1f; npc.defense = 10; - npc.LifeMaxNERD(4000, 5500, 7700, 2200000, 2400000); + npc.LifeMaxNERB(4000, 5500, 2200000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 52a056f602..dbdb8f56f9 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.width = 44; npc.height = 44; npc.defense = 6; - npc.LifeMaxNERD(3000, 3750, 5250, 2500000, 2700000); + npc.LifeMaxNERB(3000, 3750, 2500000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); NPCID.Sets.TrailCacheLength[npc.type] = 8; diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index 9a0b639c0e..77c96319c5 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.height = 92; npc.scale = 1.1f; npc.defense = 12; - npc.LifeMaxNERD(3500, 4813, 6738, 1600000, 1700000); + npc.LifeMaxNERB(3500, 4813, 1600000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 3a5ff68b1f..cc0d8be73a 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetDefaults() { - npc.LifeMaxNERD(1750, 2407, 3369, 800000, 850000); + npc.LifeMaxNERB(1750, 2407, 800000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.damage = 45; diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index 06e4b04b41..0ec933f954 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetDefaults() { - npc.LifeMaxNERD(2000, 2750, 3850, 1100000, 1200000); + npc.LifeMaxNERB(2000, 2750, 1100000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.damage = 40; diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index f0d04360f9..da2f55fe2b 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -25,23 +25,19 @@ namespace CalamityMod.NPCs.StormWeaver CalamityGlobalNPC global = npc.Calamity(); global.DR = 0.999999f; global.unbreakableDR = true; - npc.lifeMax = 20000; + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 100000 : 20000, notDoGFight ? 100000 : 20000, 170000); Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss3; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + if (notDoGFight) { if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); else music = MusicID.Boss3; - npc.lifeMax = 100000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = 170000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/StormWeaver/StormWeaverBodyNaked.cs b/NPCs/StormWeaver/StormWeaverBodyNaked.cs index ee3c2ce1b3..1d5d48daa0 100644 --- a/NPCs/StormWeaver/StormWeaverBodyNaked.cs +++ b/NPCs/StormWeaver/StormWeaverBodyNaked.cs @@ -26,22 +26,19 @@ namespace CalamityMod.NPCs.StormWeaver npc.width = 40; npc.height = 40; npc.lifeMax = 100000; - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 600000 : 100000, notDoGFight ? 600000 : 100000, 3500000); + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss3; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + if (notDoGFight) { if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); else music = MusicID.Boss3; - npc.lifeMax = 600000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = 3500000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 0714e85584..9b89842767 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -34,23 +34,19 @@ namespace CalamityMod.NPCs.StormWeaver CalamityGlobalNPC global = npc.Calamity(); global.DR = 0.999999f; global.unbreakableDR = true; - npc.lifeMax = 20000; - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 100000 : 20000, notDoGFight ? 100000 : 20000, 170000); + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss3; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + if (notDoGFight) { if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); else music = MusicID.Boss3; - npc.lifeMax = 100000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = 170000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index d1b2c18a6b..90e8bce169 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -35,24 +35,20 @@ namespace CalamityMod.NPCs.StormWeaver npc.npcSlots = 5f; npc.width = 74; npc.height = 74; - npc.lifeMax = 100000; - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 600000 : 100000, notDoGFight ? 600000 : 100000, 3500000); + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss3; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + if (notDoGFight) { npc.value = Item.buyPrice(0, 35, 0, 0); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); else music = MusicID.Boss3; - npc.lifeMax = 600000; - } - if (CalamityWorld.bossRushActive) // 30 seconds - { - npc.lifeMax = 3500000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index efdc4972ac..e55d461a8d 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -19,25 +19,21 @@ namespace CalamityMod.NPCs.StormWeaver npc.npcSlots = 5f; npc.width = 48; npc.height = 80; - npc.lifeMax = 20000; npc.defense = 0; npc.takenDamageMultiplier = CalamityWorld.death ? 3f : 10f; - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 100000 : 20000, notDoGFight ? 100000 : 20000, 170000); + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss3; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + if (notDoGFight) { if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); else music = MusicID.Boss3; - npc.lifeMax = 100000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = 170000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/StormWeaver/StormWeaverTailNaked.cs b/NPCs/StormWeaver/StormWeaverTailNaked.cs index 494003ada5..dfbcbc105c 100644 --- a/NPCs/StormWeaver/StormWeaverTailNaked.cs +++ b/NPCs/StormWeaver/StormWeaverTailNaked.cs @@ -24,23 +24,19 @@ namespace CalamityMod.NPCs.StormWeaver npc.npcSlots = 5f; npc.width = 48; npc.height = 80; - npc.lifeMax = 100000; - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0; + npc.LifeMaxNERB(notDoGFight ? 600000 : 100000, notDoGFight ? 600000 : 100000, 3500000); + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else music = MusicID.Boss3; - if (CalamityWorld.DoGSecondStageCountdown <= 0) + if (notDoGFight) { if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); else music = MusicID.Boss3; - npc.lifeMax = 600000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = 3500000; } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); diff --git a/NPCs/SupremeCalamitas/SCalWormHeart.cs b/NPCs/SupremeCalamitas/SCalWormHeart.cs index ef3b7c3380..bba5e562b1 100644 --- a/NPCs/SupremeCalamitas/SCalWormHeart.cs +++ b/NPCs/SupremeCalamitas/SCalWormHeart.cs @@ -15,21 +15,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetDefaults() { - npc.damage = 0; //70 - npc.width = 24; //324 - npc.height = 24; //216 + npc.damage = 0; + npc.width = 24; + npc.height = 24; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 180000 : 160000; - if (CalamityWorld.death) - { - npc.lifeMax = 240000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 120000 : 90000; - } - npc.aiStyle = -1; //new - aiType = -1; //new + npc.LifeMaxNERB(160000, 180000, 90000); + npc.aiStyle = -1; + aiType = -1; npc.knockBackResist = 0f; npc.alpha = 255; npc.noGravity = true; diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index fb164671b4..f966412e7e 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -31,11 +31,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.damage = 0; npc.defense = 80; npc.Calamity().RevPlusDR(0.35f); - npc.lifeMax = Main.expertMode ? 90000 : 50000; - if (CalamityWorld.revenge) - { - npc.lifeMax = CalamityWorld.death ? 100000 : 170000; - } + npc.LifeMaxNERB(Main.expertMode ? 90000 : 50000, 170000); for (int k = 0; k < npc.buffImmune.Length; k++) { npc.buffImmune[k] = true; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 9c80ec4a74..a3a4f4ae25 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -91,15 +91,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.multDRReductions.Add(BuffID.Ichor, 0.9f); global.multDRReductions.Add(BuffID.CursedInferno, 0.91f); npc.value = Item.buyPrice(10, 0, 0, 0); - npc.lifeMax = CalamityWorld.revenge ? 5500000 : 5000000; - if (CalamityWorld.death) - { - npc.lifeMax = 6250000; - } - if (CalamityWorld.bossRushActive) - { - npc.lifeMax = CalamityWorld.death ? 2300000 : 2100000; - } + npc.LifeMaxNERB(5000000, 5500000, 2100000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index bfb375d5f6..d5e275ebc2 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -34,11 +34,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.9f); global.multDRReductions.Add(BuffID.CursedInferno, 0.91f); - npc.lifeMax = CalamityWorld.revenge ? 2100000 : 1800000; - if (CalamityWorld.death) - { - npc.lifeMax = 1500000; - } + npc.LifeMaxNERB(1800000, 2100000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index ff56b3e06e..8fb914cdd4 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -34,11 +34,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.9f); global.multDRReductions.Add(BuffID.CursedInferno, 0.91f); - npc.lifeMax = CalamityWorld.revenge ? 2100000 : 1800000; - if (CalamityWorld.death) - { - npc.lifeMax = 1500000; - } + npc.LifeMaxNERB(1800000, 2100000); double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 13867b0435..4cd3dd0b07 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -63,7 +63,7 @@ namespace CalamityMod.NPCs.Yharon npc.width = 200; npc.height = 200; npc.defense = 150; - npc.LifeMaxNERD(2275000, 2525000, 3025000, 3700000, 4000000); + npc.LifeMaxNERB(2275000, 2525000, 3700000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index bd9c05f2e5..2cba89e05a 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -82,20 +82,14 @@ namespace CalamityMod /// The NPC whose lifeMax value you are trying to set. /// The value lifeMax will be set to in normal mode, this value gets doubled automatically in Expert mode. /// The value lifeMax will be set to in Revegeneance mode. - /// The value lifeMax will be set to in Death mode. /// The value lifeMax will be set to during the Boss Rush. - /// The value lifeMax will be set to during the Boss Rush, if Death mode is active. - public static void LifeMaxNERD(this NPC npc, int normal, int? revengeance = null, int? death = null, int? bossRush = null, int? bossRushDeath = null) + public static void LifeMaxNERB(this NPC npc, int normal, int? revengeance = null, int? bossRush = null) { npc.lifeMax = normal; if (bossRush.HasValue && CalamityWorld.bossRushActive) { - npc.lifeMax = bossRushDeath.HasValue && CalamityWorld.death ? bossRushDeath.Value : bossRush.Value; - } - else if (death.HasValue && CalamityWorld.death) - { - npc.lifeMax = death.Value; + npc.lifeMax = bossRush.Value; } else if (revengeance.HasValue && CalamityWorld.revenge) { diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index b699ce31e7..59cefeaa0a 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1172,9 +1172,7 @@ namespace CalamityMod.World { double spawnRate = 100000D; - if (death) - spawnRate *= 0.75D; - else if (revenge) + if (revenge) spawnRate *= 0.85D; if (demonMode) diff --git a/build.txt b/build.txt index e219de0dbf..cd6893e7a2 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 1.4.2.111 +version = 1.4.2.201 displayName = Calamity Mod (No Calamity Music) homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/ buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes From 622ad0c8eca8fc8be1b26bc2b9936709828f9d4a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 10 Jan 2020 17:01:20 -0500 Subject: [PATCH 23/26] flamethrower tanks, random crap, offset, and more --- CalPlayer/CalamityPlayer.cs | 93 +++++++++++++----- ExtraTextures/Tanks/Backpack_BlightSpewer.png | Bin 0 -> 405 bytes .../Tanks/Backpack_BrimstoneFlameblaster.png | Bin 0 -> 438 bytes .../Tanks/Backpack_CleansingBlaze.png | Bin 0 -> 418 bytes .../Tanks/Backpack_ElementalEruption.png | Bin 0 -> 489 bytes ...ull.png => Backpack_FlurrystormCannon.png} | Bin .../Tanks/Backpack_HalleysInferno.png | Bin 0 -> 461 bytes ExtraTextures/Tanks/Backpack_HavocsBreath.png | Bin 0 -> 444 bytes ExtraTextures/Tanks/Backpack_Meowthrower.png | Bin 0 -> 459 bytes .../Tanks/Backpack_OverloadedBlaster.png | Bin 0 -> 412 bytes .../Tanks/Backpack_Photoviscerator.png | Bin 0 -> 672 bytes ExtraTextures/Tanks/Backpack_Shadethrower.png | Bin 0 -> 445 bytes .../Tanks/Backpack_SparkSpreader.png | Bin 0 -> 312 bytes .../Tanks/Backpack_TerraFlameburster.png | Bin 0 -> 528 bytes ExtraTextures/Tanks/Backpack_TheEmpyrean.png | Bin 0 -> 508 bytes Items/Weapons/Ranged/BrimstoneFlameblaster.cs | 6 ++ Items/Weapons/Ranged/BrimstoneFlamesprayer.cs | 6 ++ Items/Weapons/Ranged/ChickenCannon.cs | 6 ++ Items/Weapons/Ranged/DragonsBreath.cs | 2 +- Items/Weapons/Ranged/ElementalEruption.cs | 5 + Items/Weapons/Ranged/FirestormCannon.cs | 6 ++ Items/Weapons/Ranged/Meowthrower.cs | 5 + Items/Weapons/Ranged/MepheticSprayer.cs | 6 ++ Items/Weapons/Ranged/MineralMortar.cs | 6 ++ Items/Weapons/Ranged/OverloadedBlaster.cs | 2 +- Items/Weapons/Ranged/Scorpion.cs | 6 ++ Items/Weapons/Ranged/SpectralstormCannon.cs | 6 ++ Items/Weapons/Ranged/StormSurge.cs | 6 ++ Items/Weapons/Ranged/TerraFlameburster.cs | 6 ++ Items/Weapons/Ranged/TheEmpyrean.cs | 6 ++ Items/Weapons/Ranged/TheHive.cs | 5 + Items/Weapons/Rogue/SludgeSplotch.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 49 +++++---- 33 files changed, 174 insertions(+), 55 deletions(-) create mode 100644 ExtraTextures/Tanks/Backpack_BlightSpewer.png create mode 100644 ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster.png create mode 100644 ExtraTextures/Tanks/Backpack_CleansingBlaze.png create mode 100644 ExtraTextures/Tanks/Backpack_ElementalEruption.png rename ExtraTextures/Tanks/{FlurrystormCannonTankFull.png => Backpack_FlurrystormCannon.png} (100%) create mode 100644 ExtraTextures/Tanks/Backpack_HalleysInferno.png create mode 100644 ExtraTextures/Tanks/Backpack_HavocsBreath.png create mode 100644 ExtraTextures/Tanks/Backpack_Meowthrower.png create mode 100644 ExtraTextures/Tanks/Backpack_OverloadedBlaster.png create mode 100644 ExtraTextures/Tanks/Backpack_Photoviscerator.png create mode 100644 ExtraTextures/Tanks/Backpack_Shadethrower.png create mode 100644 ExtraTextures/Tanks/Backpack_SparkSpreader.png create mode 100644 ExtraTextures/Tanks/Backpack_TerraFlameburster.png create mode 100644 ExtraTextures/Tanks/Backpack_TheEmpyrean.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 57b0e413da..c387f8a456 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7439,8 +7439,7 @@ namespace CalamityMod.CalPlayer if ((drawPlayer.itemAnimation > 0 && item.useStyle != 0) || (item.holdStyle > 0 && !drawPlayer.pulley)) { // Staff - if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || - item.type == ModContent.ItemType()) + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) { Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow"); if (item.type == ModContent.ItemType()) @@ -7562,33 +7561,75 @@ namespace CalamityMod.CalPlayer Main.playerDrawData.Add(data); } } - - //NOTE -- This doesn't work and I don't know what I'm doing - - /*Microsoft.Xna.Framework.Color color12 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int) ((double) drawPlayer.position.X + (double) drawPlayer.width * 0.5) / 16, (int) ((double) drawPlayer.position.Y + (double) drawPlayer.height * 0.5) / 16, Microsoft.Xna.Framework.Color.White), drawInfo.shadow);*/ - - if (item.type == ModContent.ItemType()) - //32 is the height of the texture, 14 is the width of the texture - { - Texture2D texture = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/FlurrystormCannonTankFull"); - - DrawData data = new DrawData(texture, - new Vector2((float) (int) ((double) drawPlayer.position.X - (double) Main.screenPosition.X + (double) (drawPlayer.width / 2) - (double) (9 * drawPlayer.direction)) + -4f * (float) drawPlayer.direction, - (float) (int) ((double) drawPlayer.position.Y - (double) Main.screenPosition.Y + (double) (drawPlayer.height / 2) + 2.0 * (double) drawPlayer.gravDir + (double) -8f * (double) drawPlayer.gravDir)), - new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, 0, 14, 32)), - Color.White, - drawPlayer.bodyRotation, - new Vector2((float) (14 / 2), - (float) (32 / 2)), - 1f, - effect, - 0); - - Main.playerDrawData.Add(data); - } } }); + public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo) + { + if (drawInfo.shadow != 0f) + return; + + Player drawPlayer = drawInfo.drawPlayer; + Item item = drawPlayer.inventory[drawPlayer.selectedItem]; + + if (!drawPlayer.frozen && + item.type > 0 && + !drawPlayer.dead && + !item.noUseGraphic && + (!drawPlayer.wet || !item.noWet)) + { + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + { + Color color89 = drawInfo.middleArmorColor = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)(drawPlayer.position.X + drawPlayer.width * 0.5) / 16, (int)(drawPlayer.position.Y + drawPlayer.height * 0.5) / 16, Color.White), drawInfo.shadow); + SpriteEffects spriteEffects = player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + Texture2D thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_FlurrystormCannon"); + if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BlightSpewer"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HavocsBreath"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_SparkSpreader"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_HalleysInferno"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_CleansingBlaze"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_ElementalEruption"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TheEmpyrean"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Meowthrower"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_OverloadedBlaster"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_TerraFlameburster"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Photoviscerator"); + else if (item.type == ModContent.ItemType()) + thingToDraw = ModContent.GetTexture("CalamityMod/ExtraTextures/Tanks/Backpack_Shadethrower"); + + float num25 = -4f; + float num24 = -8f; + DrawData howDoIDrawThings = new DrawData(thingToDraw, + new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) + num25 * drawPlayer.direction, + (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir + num24 * drawPlayer.gravDir)), + new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height), + color89, + drawPlayer.bodyRotation, + new Vector2(thingToDraw.Width / 2, + thingToDraw.Height / 2), + 1f, + spriteEffects, + 0); + howDoIDrawThings.shader = 0; + Main.playerDrawData.Add(howDoIDrawThings); + } + } + } + public override void ModifyDrawLayers(List list) { MiscEffectsBack.visible = true; diff --git a/ExtraTextures/Tanks/Backpack_BlightSpewer.png b/ExtraTextures/Tanks/Backpack_BlightSpewer.png new file mode 100644 index 0000000000000000000000000000000000000000..131777084bd7f2baab583b59ecdba7a70db03a26 GIT binary patch literal 405 zcmV;G0c!qPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0V+vEK~zXfW1u@= zgwk-p!71_|%0vM_zP~|H%LJuK25?hgHg&Dm1@n{5#K5%Ibcm9Z9ecnu%x1D}#HkTv z69@+zzXW3#0J#i=$@e47Z+1aWV1e(qUw~;QZz(YSZ|gHKjSeWcF}1NAEC2&HFP;X| zht}-_)98S58_@yG&oBV9nc{earyTpn2(ZntI9uKH7ff@iN`Pr}zmjhwx=rZd_BAgk z3j$!FO}33JP#O-cT&VSsw^2m`QO zLH&57e_DmvXsW9P7J&H)256TbVK&0Rqc6X}^!GP!!8AIc+{W96YG485JCHQ_GEoCe zi_gCSrq8NC(x~eBTVR^mT7jKF800000NkvXXu0mjfqD-X- literal 0 HcmV?d00001 diff --git a/ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster.png b/ExtraTextures/Tanks/Backpack_BrimstoneFlameblaster.png new file mode 100644 index 0000000000000000000000000000000000000000..942eebc4e641b3f3aa148b73ac33ad50ad4bda87 GIT binary patch literal 438 zcmV;n0ZIOeP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0ZU0lK~zXfV`Lx$ z{Qv(S%3@$(g3@FIMloJ_gmFOd>hnXetI)-90qVJ6d8sB?U~=C*Fzw~Q0;ZLXH#oav-c~QhJ_XN!rD+n3%4(|2A%l*8mHb^$z?Tb#MU^tJmUWk+801K#TGJ|PYSioEW3{XEMqPqkJU||4Dk+AeaeHXw0 z%q5=DieMTRJLq|Wc42@k9iW#?v~vLrz+8e3j{W@!rm5!w7{KKcT!3;HAlLQCK%7qj gy964b&;<+(03Bb24MyEcaR2}S07*qoM6N<$f<+~-IRF3v literal 0 HcmV?d00001 diff --git a/ExtraTextures/Tanks/Backpack_CleansingBlaze.png b/ExtraTextures/Tanks/Backpack_CleansingBlaze.png new file mode 100644 index 0000000000000000000000000000000000000000..52118e70910a5dab12d79d9442ab50be90c6ddd3 GIT binary patch literal 418 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<5!3HFyJAa%3QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`ISV`@iy0XB4ude`@%$AjKn>=eE{-7{-pMHr%uzvX{}=ig?D+PEsZA>7 z0L#*oY!PkLeq*K^cOA%# z*@+EB;zuIRGTz>EAc9|~fzRk)Jkw>xmwpMmEcP<`#M^G`uzK0R>Sb*3`_RmU59Ocb z4gNlsnbE}Tt!yp9TV{DwPvI6rz%B=WX$6P91`R(YWow@8<4bi6dhoHh{ea2Uq{aj< z8{Lm=K8Fvyo^2rR$naFJ;i+3_Zu$lWo{m-7PLTo(nx(5Y*!m=x9X{nCu^?_G&(enscUcYgU)rD6#3*(B91jn}E&U3QX?N5Tf#J&F>FVdQ I&MBb@01F74l>h($ literal 0 HcmV?d00001 diff --git a/ExtraTextures/Tanks/Backpack_ElementalEruption.png b/ExtraTextures/Tanks/Backpack_ElementalEruption.png new file mode 100644 index 0000000000000000000000000000000000000000..61c5a1cfb8395a1d9ca94c6cec979e85854643a8 GIT binary patch literal 489 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0e(qDK~zXfV`M-B zy1GvPp-jBs^5uOfdYPa!#Q<(9%q3b*?qGh)gd8vp1AEqAhq54GT74OqhPjM(F5*>` z0rO$t^Zh4K76icLWfir-^tF9E!8Fxe#Nuq!fEr6s2XIE@g6V}Dzk%tACpf_L!L)EN z%>Z=~3{cNSP?|w=YBre8xA+0385kfgDeUF~(=dP@hA=?=Sc8RCBAY*$Z>kJ&iJCq? znATey1*Xws?eYDqV48X^f~B8JvCF^$3|?O$^fqoVb?f3sFdcF!6HLQWJ`6b6JA-NJ zy9hmx!SdFDgL}a=48X!9HX#p8!vOVNq+Qnq7WnG~Nk7c{AhC9F?R+rJauwo2+J_O8 zW>}^e4R)D@!Fe#>o81vi>jx)->8nkU@`v{62<8%>vddrrUT0P?4FmVfze8CN5cAgr zOw+79g1ZPEz`{zz4PHQif%P;IFb#`6>bnR^51uj`!$mN^!%{2^pyxT5OK4ZG!2rx< fgaD1|eg*~r4KIJee(yrO00000NkvXXu0mjf9s$Q= literal 0 HcmV?d00001 diff --git a/ExtraTextures/Tanks/FlurrystormCannonTankFull.png b/ExtraTextures/Tanks/Backpack_FlurrystormCannon.png similarity index 100% rename from ExtraTextures/Tanks/FlurrystormCannonTankFull.png rename to ExtraTextures/Tanks/Backpack_FlurrystormCannon.png diff --git a/ExtraTextures/Tanks/Backpack_HalleysInferno.png b/ExtraTextures/Tanks/Backpack_HalleysInferno.png new file mode 100644 index 0000000000000000000000000000000000000000..9c7967d20c098fb90f8c9dc776329b36a833c5bf GIT binary patch literal 461 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, damage, knockBack, player.whoAmI, 0f, 0f); diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index a02a75c510..0efe260b0d 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() { - return new Vector2(-5, 10); + return new Vector2(-5, 5); } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index f49481286c..2059db310d 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -37,6 +37,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.Calamity().postMoonLordRarity = 12; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int num6 = Main.rand.Next(3, 5); diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 6bf6fed861..66688140de 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Ranged { @@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 931; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 70) diff --git a/Items/Weapons/Ranged/Meowthrower.cs b/Items/Weapons/Ranged/Meowthrower.cs index d3772a85c6..a3a7a49b2c 100644 --- a/Items/Weapons/Ranged/Meowthrower.cs +++ b/Items/Weapons/Ranged/Meowthrower.cs @@ -35,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 23; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) diff --git a/Items/Weapons/Ranged/MepheticSprayer.cs b/Items/Weapons/Ranged/MepheticSprayer.cs index c5ae543053..323b676624 100644 --- a/Items/Weapons/Ranged/MepheticSprayer.cs +++ b/Items/Weapons/Ranged/MepheticSprayer.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,5 +32,10 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 7.5f; item.useAmmo = 23; } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } } } diff --git a/Items/Weapons/Ranged/MineralMortar.cs b/Items/Weapons/Ranged/MineralMortar.cs index 534c0a9458..301b2db2d3 100644 --- a/Items/Weapons/Ranged/MineralMortar.cs +++ b/Items/Weapons/Ranged/MineralMortar.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -33,6 +34,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 771; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); diff --git a/Items/Weapons/Ranged/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 230d977a10..0efa5290df 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() { - return new Vector2(-4, 0); + return new Vector2(-4, -5); } public override bool ConsumeAmmo(Player player) diff --git a/Items/Weapons/Ranged/Scorpion.cs b/Items/Weapons/Ranged/Scorpion.cs index 3713012f1f..f1c4b2a38a 100644 --- a/Items/Weapons/Ranged/Scorpion.cs +++ b/Items/Weapons/Ranged/Scorpion.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 771; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool AltFunctionUse(Player player) { return true; diff --git a/Items/Weapons/Ranged/SpectralstormCannon.cs b/Items/Weapons/Ranged/SpectralstormCannon.cs index 90c3ae7a96..ae113acfa4 100644 --- a/Items/Weapons/Ranged/SpectralstormCannon.cs +++ b/Items/Weapons/Ranged/SpectralstormCannon.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Ranged { @@ -33,6 +34,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 931; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 70) diff --git a/Items/Weapons/Ranged/StormSurge.cs b/Items/Weapons/Ranged/StormSurge.cs index 429fe5b46a..ffabd498be 100644 --- a/Items/Weapons/Ranged/StormSurge.cs +++ b/Items/Weapons/Ranged/StormSurge.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 12f; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index 9b3b2f92b5..fd3d4a88d5 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 23; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 80) diff --git a/Items/Weapons/Ranged/TheEmpyrean.cs b/Items/Weapons/Ranged/TheEmpyrean.cs index 96fd90bab3..66b8fc20b0 100644 --- a/Items/Weapons/Ranged/TheEmpyrean.cs +++ b/Items/Weapons/Ranged/TheEmpyrean.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,6 +35,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 23; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool ConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 70) diff --git a/Items/Weapons/Ranged/TheHive.cs b/Items/Weapons/Ranged/TheHive.cs index 112313875e..ff9cd81e5f 100644 --- a/Items/Weapons/Ranged/TheHive.cs +++ b/Items/Weapons/Ranged/TheHive.cs @@ -34,6 +34,11 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 771; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { switch (Main.rand.Next(4)) diff --git a/Items/Weapons/Rogue/SludgeSplotch.cs b/Items/Weapons/Rogue/SludgeSplotch.cs index 572adae7c0..f2bb5e884d 100644 --- a/Items/Weapons/Rogue/SludgeSplotch.cs +++ b/Items/Weapons/Rogue/SludgeSplotch.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.height = 30; item.maxStack = 999; item.value = Item.buyPrice(0, 1, 0, 0); - item.rare = 0; + item.rare = 1; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.Calamity().rogue = true; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 344a4586c4..3f33929f0b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -609,34 +609,31 @@ namespace CalamityMod.NPCs { BossRushStatChanges(npc, mod); } - else - { - if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss) - { - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[BuffID.Webbed] = true; - npc.buffImmune[BuffID.Slow] = true; - } + if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss) + { + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[BuffID.Webbed] = true; + npc.buffImmune[BuffID.Slow] = true; + } - if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) - { - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } + if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) + { + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } - if (npc.townNPC) - { - npc.buffImmune[BuffID.Wet] = false; - npc.buffImmune[BuffID.Slimed] = false; - npc.buffImmune[BuffID.Lovestruck] = false; - npc.buffImmune[BuffID.Stinky] = false; - } - } - } + if (npc.townNPC) + { + npc.buffImmune[BuffID.Wet] = false; + npc.buffImmune[BuffID.Slimed] = false; + npc.buffImmune[BuffID.Lovestruck] = false; + npc.buffImmune[BuffID.Stinky] = false; + } + } if (npc.buffImmune[BuffID.Venom] == false) { From d1ed4f251024f517a4bc922ed878cb7deb37d0c1 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Fri, 10 Jan 2020 22:14:32 +0000 Subject: [PATCH 24/26] Buffed Shattered Sun meteor velocity to keep up better --- Projectiles/Rogue/ShatteredSunFireball.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projectiles/Rogue/ShatteredSunFireball.cs b/Projectiles/Rogue/ShatteredSunFireball.cs index 09773911cd..d577bb0adf 100644 --- a/Projectiles/Rogue/ShatteredSunFireball.cs +++ b/Projectiles/Rogue/ShatteredSunFireball.cs @@ -42,7 +42,9 @@ namespace CalamityMod.Projectiles.Rogue } if (counter % 5 == 0) { - multiplier -= 0.05f; + multiplier -= 0.06f; + projectile.velocity.X += 0.1f; + projectile.velocity.Y += 0.1f; } projectile.frameCounter++; if (projectile.frameCounter > 8) From 1cd865c3270a14a1a46f6be7a2f8193b30b958cc Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 10 Jan 2020 17:23:10 -0500 Subject: [PATCH 25/26] more stuff --- NPCs/CalamityGlobalNPC.cs | 72 ++++++++++++++++++-------------- Projectiles/Summon/SiriusBeam.cs | 2 +- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3f33929f0b..86b96ed433 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -593,7 +593,7 @@ namespace CalamityMod.NPCs if (npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && - npc.type != ModContent.NPCType()) + npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType()) { if (Main.netMode != NetmodeID.Server) { @@ -609,38 +609,8 @@ namespace CalamityMod.NPCs { BossRushStatChanges(npc, mod); } - if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss) - { - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[BuffID.Webbed] = true; - npc.buffImmune[BuffID.Slow] = true; - } - if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) - { - for (int k = 0; k < npc.buffImmune.Length; k++) - { - npc.buffImmune[k] = true; - } - - if (npc.townNPC) - { - npc.buffImmune[BuffID.Wet] = false; - npc.buffImmune[BuffID.Slimed] = false; - npc.buffImmune[BuffID.Lovestruck] = false; - npc.buffImmune[BuffID.Stinky] = false; - } - } - - if (npc.buffImmune[BuffID.Venom] == false) - { - npc.buffImmune[ModContent.BuffType()] = false; - } - - npc.buffImmune[ModContent.BuffType()] = false; + DebuffImmunities(npc); BossValueChanges(npc); @@ -688,6 +658,44 @@ namespace CalamityMod.NPCs } #endregion + #region Debuff Immunities + private void DebuffImmunities(NPC npc) + { + if (CalamityMod.enemyImmunityList.Contains(npc.type) || npc.boss) + { + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[BuffID.Webbed] = true; + npc.buffImmune[BuffID.Slow] = true; + } + + if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC) + { + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + + if (npc.townNPC) + { + npc.buffImmune[BuffID.Wet] = false; + npc.buffImmune[BuffID.Slimed] = false; + npc.buffImmune[BuffID.Lovestruck] = false; + npc.buffImmune[BuffID.Stinky] = false; + } + } + + if (npc.buffImmune[BuffID.Venom] == false) + { + npc.buffImmune[ModContent.BuffType()] = false; + } + + npc.buffImmune[ModContent.BuffType()] = false; + } + #endregion + #region Boss Value Changes private void BossValueChanges(NPC npc) { diff --git a/Projectiles/Summon/SiriusBeam.cs b/Projectiles/Summon/SiriusBeam.cs index 277dde9f12..d59e7333bb 100644 --- a/Projectiles/Summon/SiriusBeam.cs +++ b/Projectiles/Summon/SiriusBeam.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 9f) + if (projectile.localAI[0] > 3f) { for (int num447 = 0; num447 < 4; num447++) { From 4c9e201fb55cea3a0f5126040cbdeeeb96d3b604 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Fri, 10 Jan 2020 23:41:48 +0000 Subject: [PATCH 26/26] More balancing --- Projectiles/Rogue/ShatteredSunFireball.cs | 22 ++++++++++++++++------ Projectiles/Rogue/ShatteredSunKnife.cs | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Projectiles/Rogue/ShatteredSunFireball.cs b/Projectiles/Rogue/ShatteredSunFireball.cs index d577bb0adf..e66da48de1 100644 --- a/Projectiles/Rogue/ShatteredSunFireball.cs +++ b/Projectiles/Rogue/ShatteredSunFireball.cs @@ -12,6 +12,9 @@ namespace CalamityMod.Projectiles.Rogue { int counter = 0; float multiplier = 1f; + Vector2 originalVelocity; + bool stealthOrigin = false; + public override void SetStaticDefaults() { DisplayName.SetDefault("Flare"); @@ -35,16 +38,22 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { + counter++; - if (counter == 20 && !projectile.Calamity().stealthStrike) + if (counter == 1) + { + stealthOrigin = projectile.ai[0] == 1f; + projectile.ai[0] = 0f; + originalVelocity = projectile.velocity; + } + if (counter == 20 && !projectile.Calamity().stealthStrike && !stealthOrigin) { projectile.tileCollide = true; } if (counter % 5 == 0) { - multiplier -= 0.06f; - projectile.velocity.X += 0.1f; - projectile.velocity.Y += 0.1f; + multiplier -= 0.07f; + projectile.velocity *= 1.1f; } projectile.frameCounter++; if (projectile.frameCounter > 8) @@ -148,10 +157,11 @@ namespace CalamityMod.Projectiles.Rogue int spread = 6; for (int i = 0; i < numProj; i++) { - Vector2 perturbedspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); + Vector2 perturbedspeed = new Vector2(originalVelocity.X, originalVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); Vector2 position = Main.player[projectile.owner].position; - Projectile.NewProjectile(position.X, position.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.3), 1f, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(position.X, position.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.3), 1f, projectile.owner, 0f, 0f); spread -= Main.rand.Next(2, 6); + Main.projectile[proj].ai[0] = 1f; } projectile.active = false; } diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index 8082b784e9..72f6a40d4c 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < numProj; i++) { Vector2 perturbedspeed = new Vector2(projectile.velocity.X, projectile.velocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedspeed.X * 0.8f, perturbedspeed.Y * 0.8f, ModContent.ProjectileType(), (int)((double)projectile.damage * 1.5), 1f, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedspeed.X * 0.2f, perturbedspeed.Y * 0.2f, ModContent.ProjectileType(), (int)((double)projectile.damage * 1.5), 1f, projectile.owner, 0f, 0f); Main.projectile[proj].Calamity().stealthStrike = projectile.Calamity().stealthStrike; spread -= Main.rand.Next(2, 6); }