From 995485951578a9f1d4fd0470379d0fe5441d1cc6 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 20 Jun 2020 14:23:08 -0400 Subject: [PATCH 001/128] fixed penumbra bufftip --- Buffs/Potions/PenumbraBuff.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Buffs/Potions/PenumbraBuff.cs b/Buffs/Potions/PenumbraBuff.cs index 9aa3385d32..371d848858 100644 --- a/Buffs/Potions/PenumbraBuff.cs +++ b/Buffs/Potions/PenumbraBuff.cs @@ -8,8 +8,9 @@ namespace CalamityMod.Buffs.Potions public override void SetDefaults() { DisplayName.SetDefault("Penumbra"); - Description.SetDefault("Stealth regenerates at 10% speed while moving\n" + - "The boost increases to 20% at night and to 30% during an eclipse"); + Description.SetDefault("Stealth regenerates 15% faster while moving\n" + + "At night, stealth additionally regenerates 15% faster while standing still\n" + + "Both boosts increase to 20% during a solar eclipse"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; From f4b3122b631a8520c67765a55360fe0a6dccbd5c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 20 Jun 2020 21:24:54 -0400 Subject: [PATCH 002/128] plantation staff now can fire spore clouds and shotgun seeds when enraged --- Items/Weapons/Ranged/Galeforce.cs | 2 +- Items/Weapons/Summon/PlantationStaff.cs | 120 ++-- Projectiles/CalamityGlobalProjectile.cs | 2 +- Projectiles/Summon/PlantSeed.cs | 5 + Projectiles/Summon/PlantSeedGreen.cs | 9 + Projectiles/Summon/PlantSporeCloud.cs | 70 +++ Projectiles/Summon/PlantSporeCloud.png | Bin 0 -> 635 bytes Projectiles/Summon/PlantSporeCloud2.png | Bin 0 -> 555 bytes Projectiles/Summon/PlantSporeCloud3.png | Bin 0 -> 556 bytes Projectiles/Summon/PlantSummon.cs | 745 ++++++++++++------------ Projectiles/Summon/PlantThornBall.cs | 9 + 11 files changed, 525 insertions(+), 437 deletions(-) create mode 100644 Projectiles/Summon/PlantSporeCloud.cs create mode 100644 Projectiles/Summon/PlantSporeCloud.png create mode 100644 Projectiles/Summon/PlantSporeCloud2.png create mode 100644 Projectiles/Summon/PlantSporeCloud3.png diff --git a/Items/Weapons/Ranged/Galeforce.cs b/Items/Weapons/Ranged/Galeforce.cs index 5a943c7e28..f6524c3c2e 100644 --- a/Items/Weapons/Ranged/Galeforce.cs +++ b/Items/Weapons/Ranged/Galeforce.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged for (int i = -8; i <= 8; i += 8) { Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i)); - Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), damage / 4, 0f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType(), damage / 4, 0f, player.whoAmI, 0f, 0f); } return true; } diff --git a/Items/Weapons/Summon/PlantationStaff.cs b/Items/Weapons/Summon/PlantationStaff.cs index e11daf2b26..50228da310 100644 --- a/Items/Weapons/Summon/PlantationStaff.cs +++ b/Items/Weapons/Summon/PlantationStaff.cs @@ -9,84 +9,82 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { public class PlantationStaff : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Plantation Staff"); - Tooltip.SetDefault("Summons a miniature plantera to protect you\n" + + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Plantation Staff"); + Tooltip.SetDefault("Summons a miniature plantera to protect you\n" + "Fires seeds and spiky balls from afar to poison targets\n" + "Enrages when you get under 50% health and begins ramming enemies\n" + + "While enraged, it will additionally start firing spore clouds\n" + "Occupies 2 minion slots and there can only be one"); - } + } - public override void SetDefaults() - { - item.damage = 70; - item.mana = 10; - item.width = 66; - item.height = 70; - item.useTime = item.useAnimation = 20; - item.useStyle = ItemUseStyleID.SwingThrow; - item.noMelee = true; - item.knockBack = 1f; - item.value = Item.buyPrice(0, 80, 0, 0); - item.rare = 8; - item.UseSound = SoundID.Item76; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 10f; - item.summon = true; - } + public override void SetDefaults() + { + item.damage = 70; + item.mana = 10; + item.width = 66; + item.height = 70; + item.useTime = item.useAnimation = 20; + item.useStyle = ItemUseStyleID.SwingThrow; + item.noMelee = true; + item.knockBack = 1f; + item.value = Item.buyPrice(0, 80, 0, 0); + item.rare = 8; + item.UseSound = SoundID.Item76; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.summon = true; + } - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && player.maxMinions >= 2; + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0 && player.maxMinions >= 2; - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.OpticStaff); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.OpticStaff); + recipe.AddTile(TileID.MythrilAnvil); + 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.altFunctionUse != 2) - { - int i = Main.myPlayer; - float num72 = item.shootSpeed; - float num74 = knockBack; - num74 = player.GetWeaponKnockback(item, num74); + { + if (player.altFunctionUse != 2) + { + float speed = item.shootSpeed; player.itemTime = item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 playerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float directionX = (float)Main.mouseX + Main.screenPosition.X - playerPos.X; + float directionY = (float)Main.mouseY + Main.screenPosition.Y - playerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + directionY = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - playerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + Vector2 spinningpoint = new Vector2(directionX, directionY); + float vectorDist = spinningpoint.Length(); + if ((float.IsNaN(spinningpoint.X) && float.IsNaN(spinningpoint.Y)) || (spinningpoint.X == 0f && spinningpoint.Y == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + spinningpoint.X = (float)player.direction; + spinningpoint.Y = 0f; + vectorDist = speed; } else { - num80 = num72 / num80; + vectorDist = speed / vectorDist; } - num78 *= num80; - num79 *= num80; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Vector2 spinningpoint = new Vector2(num78, num79); - spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default); - Projectile.NewProjectile(vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, num74, i, 0f, 0f); + spinningpoint.X *= vectorDist; + spinningpoint.Y *= vectorDist; + playerPos.X = (float)Main.mouseX + Main.screenPosition.X; + playerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; + spinningpoint = spinningpoint.RotatedBy(MathHelper.PiOver2, default); + Projectile.NewProjectile(playerPos + spinningpoint, spinningpoint, type, damage, knockBack, player.whoAmI, 0f, 0f); } return false; - } - } + } + } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 1c692aa799..88826a65c1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1035,7 +1035,7 @@ namespace CalamityMod.Projectiles if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && projectile.friendly) { - if (projectile.type == (ProjectileID.StardustDragon1 | ProjectileID.StardustDragon2 | ProjectileID.StardustDragon3 | ProjectileID.StardustDragon4)) + if (ProjectileID.Sets.StardustDragon[projectile.type]) { target.immune[projectile.owner] = 10; } diff --git a/Projectiles/Summon/PlantSeed.cs b/Projectiles/Summon/PlantSeed.cs index f7c7cd3949..c37fb8cb9b 100644 --- a/Projectiles/Summon/PlantSeed.cs +++ b/Projectiles/Summon/PlantSeed.cs @@ -56,5 +56,10 @@ namespace CalamityMod.Projectiles.Summon { target.AddBuff(BuffID.Poisoned, 60); } + + public override void OnHitPvp(NPC target, int damage, bool crit) + { + target.AddBuff(BuffID.Poisoned, 60); + } } } diff --git a/Projectiles/Summon/PlantSeedGreen.cs b/Projectiles/Summon/PlantSeedGreen.cs index 0e31c597c2..2ed35badce 100644 --- a/Projectiles/Summon/PlantSeedGreen.cs +++ b/Projectiles/Summon/PlantSeedGreen.cs @@ -55,6 +55,15 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Poisoned, 180); + if (projectile.ai[1] == 1f) + target.AddBuff(BuffID.Venom, 180); + } + + public override void OnHitPvp(NPC target, int damage, bool crit) + { + target.AddBuff(BuffID.Poisoned, 180); + if (projectile.ai[1] == 1f) + target.AddBuff(BuffID.Venom, 180); } } } diff --git a/Projectiles/Summon/PlantSporeCloud.cs b/Projectiles/Summon/PlantSporeCloud.cs new file mode 100644 index 0000000000..32401c1a67 --- /dev/null +++ b/Projectiles/Summon/PlantSporeCloud.cs @@ -0,0 +1,70 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Summon +{ + public class PlantSporeCloud : ModProjectile + { + private int counter = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spore Cloud"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 32; + projectile.friendly = true; + projectile.alpha = 60; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.minion = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + } + + public override void AI() + { + projectile.velocity.X *= 0.985f; + projectile.velocity.Y *= 0.985f; + projectile.rotation += projectile.direction * 0.05f; + + if (counter % 5 == 0) + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 107, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + + counter++; + if (counter > 300) + projectile.alpha += 5; + if (projectile.alpha >= 255) + projectile.Kill(); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + if (projectile.ai[0] == 1f) + tex = ModContent.GetTexture("CalamityMod/Projectiles/Summon/PlantSporeCloud2"); + if (projectile.ai[0] == 2f) + tex = ModContent.GetTexture("CalamityMod/Projectiles/Summon/PlantSporeCloud3"); + + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Poisoned, 180); + } + + public override void OnHitPvp(NPC target, int damage, bool crit) + { + target.AddBuff(BuffID.Poisoned, 180); + } + } +} diff --git a/Projectiles/Summon/PlantSporeCloud.png b/Projectiles/Summon/PlantSporeCloud.png new file mode 100644 index 0000000000000000000000000000000000000000..c8ac75bf7fdc88ddb77354960428321fe7087f12 GIT binary patch literal 635 zcmV->0)+jEP)Px%HAzH4R9J=0mrrZdKp4hho0$Bxx)1 zoqMnM%z6KWOaC?6U!Yacmz2BtvBvd?7eLuwvd{lQ&@N-HVfgb{0JL1WPI)DVxpC@OKt1G? zNB|x@Thu0+-_ZZ~LmT&=+$xQokE_;o?|Ti)f{XC-)jMFyRJEoOIcO)S@``)22SBjn z0}W7M#slqTxu?^kSaYxGiK;mH6$yad7oQ5pYgb^#167%qWrgy__SOIZ*INLl3Wx8% zXmOgSKvgK_3jY3zY*Xe6BmaEveWJMvc>MzawzuSanHREe-#7YGMJ__^3J7%@4#zeC zaV$U8;CQLJ-zrj0Ab6bcj&(7-GZxq3ij6p5|?I6aDisWS1o+;cRswE6ax zPykHEj;UOs`;`*4E6~DVp8Lxs0GF?23=)80;0l0fVrk5B%**PB!tq8Zph2DCW?qx- zypz@sqrg@DRV%56o`m68-v5KcuEyl#P*y}&um1*St72y(%X7^m7);H)H&MF+e*i%K Vx`)o;#CQMz002ovPDHLkV1oWtCzb#J literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/PlantSporeCloud2.png b/Projectiles/Summon/PlantSporeCloud2.png new file mode 100644 index 0000000000000000000000000000000000000000..230cd387e93f9ab9a0465684663f3f106ae6c4a1 GIT binary patch literal 555 zcmV+`0@VG9P)Px$O_5OjFOiSq*#DQ~<3uq)d*=tS{gtZ+J>-91RWMjSEgQ#= z4O+l|YdosM;M~{R3cxGm0C+9c^nN1=T_Y#(Yjp{nht#RPD}ZLH3P88s@&VkXX$6qZ zX8>?=E&!FAcJEs302UC4%mD^C7dbiC2XN}H0>~6*RWPn=Z7rh!D#fY~77$P?Co7?V zWOZhBHkN?C|Gh#^#f>}K+5q6v~@p8><^=1hi~lFcH?YQ0~Ni<(a#z1({G1Z*IX znr!td(_`L;K8a?-`;IFgAiJ6Dfx2@c>aH#-fLf_{{4~lRmQ=#@;VuB)%qsw$)&v0E zwiC+wo#Uy{z}vGIV?0W7KiUaAdIEYth>-9!6h)B;I5*BcasqMR10ns?39W93ZqNR< z0DA}o-n~fj!-u}}C`mnOzom!D9eW4_q<_yVEe`aF7@QmL56G@MU?LFpCu58o-g%-w tqSoa#U;%;HRmRD%YmCmtX_Q7z;0xv(oy`oKne6}o002ovPDHLkV1j$=@r(cf literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/PlantSporeCloud3.png b/Projectiles/Summon/PlantSporeCloud3.png new file mode 100644 index 0000000000000000000000000000000000000000..297365d2a58247781fd8974bb5d1ab6664521c3e GIT binary patch literal 556 zcmV+{0@MA8P)Px$=1D|BR9J=0mrXANK^Vt>L*Hnn?L`lgl90IJ!kxsYAaU?rd`v*K=)udiB7 zZyU%i6*Us6!c5Q>XSDbCR#yNxyL$kjUHwo1?Y9pA8c)@c3y7USf_~0@fMg+~AR4iE z`3OL1ds&-6A{WW~)$14OGS3UmYfcalDS+99JP^&b8Tl{?sR5b0OCu6Hf!=B|yPE)% z)>A>dk@lhQa*>(yVcsxFw3=xJ;GN%V{jn2>R73Bk?T0M@dq<-uFeC4s3*qzaNezJF zd~hDf$tx#p>;xhn7?8FL)(+;h!C|>KW!V)993o)*M>JOCUS&RL!yKFMN$yMK(F=&3 zfXxHe>iAowXIly&k^BOn+nEO7vzY;0AYgI7=qD0d6)lxtfxb6HiBv}cblXXDK6k32 zR;{x61^`pjUqN-uwS0j3dp3x~$f3xLT;`L=Erfhsx7#(3%&vP&zvej;3j(); + private int greenSeed = ModContent.ProjectileType(); + private int thornBall = ModContent.ProjectileType(); + private int sporeClouds = ModContent.ProjectileType(); public override void SetStaticDefaults() { @@ -42,6 +47,7 @@ namespace CalamityMod.Projectiles.Summon { Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); + CalamityGlobalProjectile modProj = projectile.Calamity(); if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) { @@ -56,11 +62,355 @@ namespace CalamityMod.Projectiles.Summon projectile.extraUpdates = 0; } - projectile.frameCounter++; - if (projectile.frameCounter > 8) + Framing(); + + if (!initialized) + { + modProj.spawnedPlayerMinionDamageValue = player.MinionDamage(); + modProj.spawnedPlayerMinionProjectileDamageValue = projectile.damage; + SpawnDust(); + initialized = true; + } + if (player.MinionDamage() != modProj.spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue / + modProj.spawnedPlayerMinionDamageValue * player.MinionDamage()); + projectile.damage = damage2; + } + + bool correctMinion = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (correctMinion) + { + if (player.dead) + { + modPlayer.plantera = false; + } + if (modPlayer.plantera) + { + projectile.timeLeft = 2; + } + } + + float range = 1000f; + Vector2 half = new Vector2(0.5f); + + //shouldn't need anti clump because there can only be one + + if (!enraged) + { + if (projectile.ai[0] >= 2f) + projectile.ai[0] = 0f; + Vector2 targetVec = projectile.position; + bool foundTarget = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + Vector2 sizeCheck = npc.position + npc.Size * half; + float npcDist = Vector2.Distance(npc.Center, projectile.Center); + if (!foundTarget && npcDist < range) + { + range = npcDist; + targetVec = sizeCheck; + foundTarget = true; + } + } + } + else + { + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC npc = Main.npc[i]; + if (npc.CanBeChasedBy(projectile, false)) + { + Vector2 sizeCheck = npc.position + npc.Size * half; + float npcDist = Vector2.Distance(npc.Center, projectile.Center); + if (!foundTarget && npcDist < range) + { + range = npcDist; + targetVec = sizeCheck; + foundTarget = true; + } + } + } + } + + CheckIfShouldReturnToPlayer(foundTarget); + + if (foundTarget && projectile.ai[0] == 0f) + { + StayCertainDistFromTarget(targetVec); + } + else + { + PassiveAI(); + } + + HandleRotation(foundTarget, targetVec); + + IncrementAttackCounter(); + if (projectile.ai[0] == 0f) + { + float projSpeed = 6f; + int projType = Main.rand.NextBool(2) ? greenSeed : pinkSeed; + int projDmg = (int)(projectile.damage * 0.7f); + float speedMult = 1f; + if (Main.rand.NextBool(4)) + { + projType = thornBall; + } + if (projType == thornBall) + { + speedMult = 2f; + projDmg = (int)(projectile.damage * 1.2f); + } + if (projectile.ai[1] == 0f && foundTarget && range < 500f) + { + Main.PlaySound(SoundID.Item20, projectile.position); + projectile.ai[1] += 1f; + if (Main.myPlayer == projectile.owner) + { + Vector2 velocity = targetVec - projectile.Center; + velocity.Normalize(); + velocity *= projSpeed; + velocity *= speedMult; + Projectile.NewProjectile(projectile.Center, velocity, projType, projDmg, projectile.knockBack, projectile.owner, 0f, 0f); + projectile.netUpdate = true; + } + } + } + } + else //enraged + { + bool charging = false; + if (projectile.ai[0] == 2f) + { + projectile.ai[1] += 1f; + projectile.extraUpdates = 1; + if (projectile.ai[1] > 30f) + { + projectile.ai[1] = 1f; + projectile.ai[0] = 0f; + projectile.extraUpdates = 0; + projectile.numUpdates = 0; + projectile.netUpdate = true; + } + else + { + charging = true; + } + } + if (charging) + { + return; + } + Vector2 targetVec = projectile.position; + bool foundTarget = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + Vector2 sizeCheck = npc.position + npc.Size * half; + float npcDist = Vector2.Distance(npc.Center, projectile.Center); + if (!foundTarget && npcDist < range) + { + range = npcDist; + targetVec = sizeCheck; + foundTarget = true; + } + } + } + else + { + for (int num645 = 0; num645 < Main.maxNPCs; num645++) + { + NPC npc = Main.npc[num645]; + if (npc.CanBeChasedBy(projectile, false)) + { + Vector2 sizeCheck = npc.position + npc.Size * half; + float npcDist = Vector2.Distance(npc.Center, projectile.Center); + if (!foundTarget && npcDist < range) + { + range = npcDist; + targetVec = sizeCheck; + foundTarget = true; + } + } + } + } + + HandleRotation(foundTarget, targetVec); + + CheckIfShouldReturnToPlayer(foundTarget); + + if (foundTarget && projectile.ai[0] == 0f) + { + StayCertainDistFromTarget(targetVec); + } + else + { + PassiveAI(); + } + IncrementAttackCounter(); + if (projectile.ai[0] == 0f) + { + if (projectile.ai[1] == 0f && foundTarget && range < 500f) + { + projectile.ai[1] += 1f; + if (Main.myPlayer == projectile.owner) + { + projectile.ai[0] = 2f; + Vector2 whereIsTarget = targetVec - projectile.Center; + whereIsTarget.Normalize(); + int projType = thornBall; + if (Main.rand.NextBool(2)) + { + Vector2 projVelocity = whereIsTarget * 2f; + int projDmg = (int)(projectile.damage * 1.5f); + Projectile.NewProjectile(projectile.Center, projVelocity, projType, projDmg, projectile.knockBack, projectile.owner, 0f, 1f); + } + if (Main.rand.NextBool(3)) + { + float projSpeedMult = 3f; + if (Main.rand.NextBool(2) && CalamityUtils.CountProjectiles(sporeClouds) < 9) + { + projType = sporeClouds; + projSpeedMult = 10f; + } + else + { + projType = Main.rand.NextBool(2) ? greenSeed : pinkSeed; + } + int projDmg = (int)(projectile.damage * 0.8f); + Vector2 projVelocity = whereIsTarget * projSpeedMult; + for (int i = -8; i <= 8; i += 8) + { + Vector2 perturbedSpeed = projVelocity.RotatedBy(MathHelper.ToRadians(i)); + Projectile.NewProjectile(projectile.Center, perturbedSpeed, projType, projDmg, projectile.knockBack * 0.8f, player.whoAmI, Main.rand.Next(3), 1f); + } + } + float chargeSpeed = 8f; + projectile.velocity = whereIsTarget * chargeSpeed; + projectile.netUpdate = true; + } + } + } + } + } + + private void CheckIfShouldReturnToPlayer(bool targetLocated) + { + Player player = Main.player[projectile.owner]; + float separationAnxietyDist = 1300f; + if (targetLocated) + { + separationAnxietyDist = 2600f; + } + if (Vector2.Distance(player.Center, projectile.Center) > separationAnxietyDist) + { + projectile.ai[0] = 1f; + projectile.netUpdate = true; + } + } + + private void StayCertainDistFromTarget(Vector2 whereIsTarget) + { + Vector2 targetPos = whereIsTarget - projectile.Center; + float targetDist = targetPos.Length(); + targetPos.Normalize(); + if (targetDist > 200f) + { + float speedMult = 8f; + targetPos *= speedMult; + projectile.velocity = (projectile.velocity * 40f + targetPos) / 41f; + } + else + { + float reverseSpeedMult = 4f; + targetPos *= -reverseSpeedMult; + projectile.velocity = (projectile.velocity * 40f + targetPos) / 41f; + } + } + + private void PassiveAI() + { + Player player = Main.player[projectile.owner]; + bool returningToPlayer = false; + if (!returningToPlayer) + { + returningToPlayer = projectile.ai[0] == 1f; + } + float returnSpeed = 12f; + if (returningToPlayer) + { + returnSpeed = 30f; + } + Vector2 playerVec = player.Center - projectile.Center + new Vector2(0f, -120f); + float playerDist = playerVec.Length(); + if (playerDist > 200f && returnSpeed < 16f) + { + returnSpeed = 16f; + } + if (playerDist < 600f && returningToPlayer) + { + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + if (playerDist > 2000f) + { + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (playerDist > 70f) + { + playerVec.Normalize(); + playerVec *= returnSpeed; + projectile.velocity = (projectile.velocity * 40f + playerVec) / 41f; + } + else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) + { + projectile.velocity.X = -0.15f; + projectile.velocity.Y = -0.05f; + } + } + + private void IncrementAttackCounter() + { + if (projectile.ai[1] > 0f) + { + projectile.ai[1] += (float)Main.rand.Next(1, 4); + } + if (projectile.ai[1] > 40f) + { + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + } + + private void HandleRotation(bool targetFound, Vector2 whereIsTarget) + { + if (targetFound && !enraged) + { + projectile.rotation = projectile.rotation.AngleTowards(projectile.AngleTo(whereIsTarget) + MathHelper.Pi, 0.1f); + } + else + { + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.Pi; + } + /*if (enraged) + projectile.rotation = (whereIsTarget - projectile.Center).ToRotation() + MathHelper.Pi; + else*/ + } + + private void Framing() + { + if (projectile.frameCounter++ % 8 == 7) { projectile.frame++; - projectile.frameCounter = 0; } if (!enraged) { @@ -76,387 +426,34 @@ namespace CalamityMod.Projectiles.Summon projectile.frame = 4; } } + } - if (projectile.localAI[0] == 0f) - { - projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); - projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) - { - Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + projectile.Center; - Vector2 vector7 = vector6 - projectile.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 107, vector7.X * 1.75f, vector7.Y * 1.75f, 100, default, 1.1f); - Main.dust[num228].noGravity = true; - Main.dust[num228].velocity = vector7; - } - projectile.localAI[0] += 1f; - } - if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) - { - int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / - projectile.Calamity().spawnedPlayerMinionDamageValue * - player.MinionDamage()); - projectile.damage = damage2; - } - - bool flag64 = projectile.type == ModContent.ProjectileType(); - player.AddBuff(ModContent.BuffType(), 3600); - if (flag64) - { - if (player.dead) - { - modPlayer.plantera = false; - } - if (modPlayer.plantera) - { - projectile.timeLeft = 2; - } - } - - float num633 = 1000f; - float num634 = 1300f; - float num635 = 2600f; - float num636 = 600f; - - //idle movement - projectile.MinionAntiClump(); - - if (!enraged) + private void SpawnDust() + { + int dustAmt = 36; + for (int dustIndex = 0; dustIndex < dustAmt; dustIndex++) { - if (projectile.ai[0] >= 2f) - projectile.ai[0] = 0f; - Vector2 vector46 = projectile.position; - bool flag25 = false; - Vector2 value = new Vector2(0.5f); - if (player.HasMinionAttackTargetNPC) - { - NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false)) - { - Vector2 vector2 = npc.position + npc.Size * value; - float num646 = Vector2.Distance(npc.Center, projectile.Center); - if (!flag25 && num646 < num633) - { - num633 = num646; - vector46 = vector2; - flag25 = true; - } - } - } - else - { - for (int num645 = 0; num645 < Main.maxNPCs; num645++) - { - NPC npc = Main.npc[num645]; - if (npc.CanBeChasedBy(projectile, false)) - { - Vector2 vector2 = npc.position + npc.Size * value; - float num646 = Vector2.Distance(npc.Center, projectile.Center); - if (!flag25 && num646 < num633) - { - num633 = num646; - vector46 = vector2; - flag25 = true; - } - } - } - } - float num647 = num634; - if (flag25) - { - num647 = num635; - } - if (Vector2.Distance(player.Center, projectile.Center) > num647) - { - projectile.ai[0] = 1f; - projectile.netUpdate = true; - } - if (flag25 && projectile.ai[0] == 0f) - { - Vector2 vector47 = vector46 - projectile.Center; - float num648 = vector47.Length(); - vector47.Normalize(); - if (num648 > 200f) - { - float scaleFactor2 = 18f; //12 - vector47 *= scaleFactor2; - projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; - } - else - { - float num649 = 9f; - vector47 *= -num649; - projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; - } - } - else - { - bool flag26 = false; - if (!flag26) - { - flag26 = projectile.ai[0] == 1f; - } - float num650 = 12f; - if (flag26) - { - num650 = 30f; - } - Vector2 center2 = projectile.Center; - Vector2 vector48 = player.Center - center2 + new Vector2(0f, -120f); - float num651 = vector48.Length(); - if (num651 > 200f && num650 < 16f) - { - num650 = 16f; - } - if (num651 < num636 && flag26) - { - projectile.ai[0] = 0f; - projectile.netUpdate = true; - } - if (num651 > 2000f) - { - projectile.position.X = player.Center.X - (float)(projectile.width / 2); - projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); - projectile.netUpdate = true; - } - if (num651 > 70f) - { - vector48.Normalize(); - vector48 *= num650; - projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; - } - else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) - { - projectile.velocity.X = -0.15f; - projectile.velocity.Y = -0.05f; - } - } - if (flag25) - { - projectile.rotation = projectile.rotation.AngleTowards(projectile.AngleTo(vector46) + MathHelper.Pi, 0.1f); - } - else - { - projectile.rotation = projectile.velocity.ToRotation() + MathHelper.Pi; - } - if (projectile.ai[1] > 0f) - { - projectile.ai[1] += (float)Main.rand.Next(1, 4); - } - if (projectile.ai[1] > 90f) - { - projectile.ai[1] = 0f; - projectile.netUpdate = true; - } - if (projectile.ai[0] == 0f) - { - float scaleFactor3 = 6f; - int projType = (Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType()); - int projDmg = (int)(projectile.damage * 0.7f); - float speedMult = 1f; - if (Main.rand.NextBool(4)) - { - projType = ModContent.ProjectileType(); - } - if (projType == ModContent.ProjectileType()) - { - speedMult = 2f; - projDmg = (int)(projectile.damage * 1.2f); - } - if (projectile.ai[1] == 0f && flag25 && num633 < 500f) - { - Main.PlaySound(SoundID.Item20, projectile.position); - projectile.ai[1] += 1f; - if (Main.myPlayer == projectile.owner) - { - Vector2 value19 = vector46 - projectile.Center; - value19.Normalize(); - value19 *= scaleFactor3; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X * speedMult, value19.Y * speedMult, projType, projDmg, 0f, projectile.owner, 0f, 0f); - projectile.netUpdate = true; - } - } - } + Vector2 source = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; + source = source.RotatedBy((double)((float)(dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + projectile.Center; + Vector2 dustVel = source - projectile.Center; + int terra = Dust.NewDust(source + dustVel, 0, 0, 107, dustVel.X * 1.75f, dustVel.Y * 1.75f, 100, default, 1.1f); + Main.dust[terra].noGravity = true; + Main.dust[terra].velocity = dustVel; } - else //enraged - { - bool flag24 = false; - if (projectile.ai[0] == 2f) - { - projectile.ai[1] += 1f; - projectile.extraUpdates = 1; - if (projectile.ai[1] > 30f) - { - projectile.ai[1] = 1f; - projectile.ai[0] = 0f; - projectile.extraUpdates = 0; - projectile.numUpdates = 0; - projectile.netUpdate = true; - } - else - { - flag24 = true; - } - } - if (flag24) - { - return; - } - Vector2 vector46 = projectile.position; - bool flag25 = false; - Vector2 value = new Vector2(0.5f); - if (player.HasMinionAttackTargetNPC) - { - NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false)) - { - Vector2 vector2 = npc.position + npc.Size * value; - float num646 = Vector2.Distance(npc.Center, projectile.Center); - if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) - { - num633 = num646; - vector46 = vector2; - flag25 = true; - } - } - } - else - { - for (int num645 = 0; num645 < Main.maxNPCs; num645++) - { - NPC npc = Main.npc[num645]; - if (npc.CanBeChasedBy(projectile, false)) - { - Vector2 vector2 = npc.position + npc.Size * value; - float num646 = Vector2.Distance(npc.Center, projectile.Center); - if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) - { - num633 = num646; - vector46 = vector2; - flag25 = true; - } - } - } - } - if (flag25) - { - projectile.rotation = (vector46 - projectile.Center).ToRotation() + 3.14159274f; - } - else - { - projectile.rotation = projectile.velocity.ToRotation() + 3.14159274f; - } - float num647 = num634; - if (flag25) - { - num647 = num635; - } - if (Vector2.Distance(player.Center, projectile.Center) > num647) - { - projectile.ai[0] = 1f; - projectile.netUpdate = 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; - } - } - else - { - bool flag26 = false; - if (!flag26) - { - flag26 = projectile.ai[0] == 1f; - } - float num650 = 6f; - if (flag26) - { - num650 = 15f; - } - Vector2 center2 = projectile.Center; - Vector2 vector48 = player.Center - center2 + new Vector2(0f, -60f); - float num651 = vector48.Length(); - if (num651 > 200f && num650 < 8f) - { - num650 = 8f; - } - if (num651 < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.ai[0] = 0f; - projectile.netUpdate = true; - } - if (num651 > 2000f) - { - projectile.position.X = player.Center.X - (float)(projectile.width / 2); - projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); - projectile.netUpdate = true; - } - if (num651 > 70f) - { - vector48.Normalize(); - vector48 *= num650; - projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; - } - else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) - { - projectile.velocity.X = -0.15f; - projectile.velocity.Y = -0.05f; - } - } - if (projectile.ai[1] > 0f) - { - projectile.ai[1] += (float)Main.rand.Next(1, 4); - } - if (projectile.ai[1] > 40f) - { - projectile.ai[1] = 0f; - projectile.netUpdate = true; - } - if (projectile.ai[0] == 0f) - { - if (projectile.ai[1] == 0f && flag25 && num633 < 500f) - { - projectile.ai[1] += 1f; - if (Main.myPlayer == projectile.owner) - { - projectile.ai[0] = 2f; - Vector2 value20 = vector46 - projectile.Center; - value20.Normalize(); - if (Main.rand.NextBool(2)) - { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value20.X * 2f, value20.Y * 2f, ModContent.ProjectileType(), (int)(projectile.damage * 1.5f), 0f, Main.myPlayer, 0f, 0f); - } - projectile.velocity = value20 * 8f; - projectile.netUpdate = true; - } - } - } - } - } + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Poisoned, 300); + target.AddBuff(BuffID.Venom, 300); } - public override bool CanDamage() + public override void OnHitPvp(Player target, int damage, bool crit) { - return enraged == true; + target.AddBuff(BuffID.Poisoned, 300); + target.AddBuff(BuffID.Venom, 300); } + + public override bool CanDamage() => enraged; } } diff --git a/Projectiles/Summon/PlantThornBall.cs b/Projectiles/Summon/PlantThornBall.cs index 76e3d07270..b8ba0f26fa 100644 --- a/Projectiles/Summon/PlantThornBall.cs +++ b/Projectiles/Summon/PlantThornBall.cs @@ -52,6 +52,15 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Poisoned, 180); + if (projectile.ai[1] == 1f) + target.AddBuff(BuffID.Venom, 180); + } + + public override void OnHitPvp(NPC target, int damage, bool crit) + { + target.AddBuff(BuffID.Poisoned, 180); + if (projectile.ai[1] == 1f) + target.AddBuff(BuffID.Venom, 180); } } } From d88094e395cd15bc57e0c87dd32e024a40da8299 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 20 Jun 2020 23:06:12 -0500 Subject: [PATCH 003/128] Changed bandit theft system (also fixed errors) --- CalPlayer/CalamityPlayer.cs | 23 ++++++++++++++--------- Items/CalamityGlobalItem.cs | 7 ++----- NPCs/CalamityGlobalNPC.cs | 2 +- NPCs/TownNPCs/THIEF.cs | 13 +++++++------ Projectiles/Summon/PlantSeed.cs | 4 ++-- Projectiles/Summon/PlantSeedGreen.cs | 2 +- Projectiles/Summon/PlantSporeCloud.cs | 2 +- Projectiles/Summon/PlantThornBall.cs | 2 +- World/CalamityWorld.cs | 16 ++++++++++++++++ 9 files changed, 45 insertions(+), 26 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index ca6e5f0f83..8b520ab10c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -192,9 +192,7 @@ namespace CalamityMod.CalPlayer public int tarraLifeAuraTimer = 0; public int bloodflareHeartTimer = 180; public int bloodflareManaTimer = 180; - public int moneyStolenByBandit = 0; public int polarisBoostCounter = 0; - public int reforges = 0; public int gaelSwipes = 0; public float modStealth = 1f; public float aquaticBoost = 1f; @@ -1058,8 +1056,6 @@ namespace CalamityMod.CalPlayer { "rogueLevel", rogueLevel }, { "exactRogueLevel", exactRogueLevel }, { "deathCount", deathCount }, - { "moneyStolenByBandit", moneyStolenByBandit }, - { "reforges", reforges }, { "deathModeUnderworldTime", deathModeUnderworldTime }, { "deathModeBlizzardTime", deathModeBlizzardTime } }; @@ -1116,8 +1112,13 @@ namespace CalamityMod.CalPlayer sCalDeathCount = tag.GetInt("sCalDeathCount"); sCalKillCount = tag.GetInt("sCalKillCount"); deathCount = tag.GetInt("deathCount"); - moneyStolenByBandit = tag.GetInt("moneyStolenByBandit"); - reforges = tag.GetInt("reforges"); + + // These two variables are no longer used, as the code was moved into CalamityWorld.cs to support multiplayer. + // As a result, their values are simply fed into a discard. + + _ = tag.GetInt("moneyStolenByBandit"); + _ = tag.GetInt("reforges"); + deathModeUnderworldTime = tag.GetInt("deathModeUnderworldTime"); deathModeBlizzardTime = tag.GetInt("deathModeBlizzardTime"); @@ -1141,8 +1142,13 @@ namespace CalamityMod.CalPlayer sCalDeathCount = reader.ReadInt32(); sCalKillCount = reader.ReadInt32(); deathCount = reader.ReadInt32(); - moneyStolenByBandit = reader.ReadInt32(); - reforges = reader.ReadInt32(); + + // These two variables are no longer used, as the code was moved into CalamityWorld.cs to support multiplayer. + // As a result, their values are simply fed into a discard. + + _ = reader.ReadInt32(); // moneyStolenByBandit + _ = reader.ReadInt32(); // reforges + deathModeUnderworldTime = reader.ReadInt32(); deathModeBlizzardTime = reader.ReadInt32(); @@ -1943,7 +1949,6 @@ namespace CalamityMod.CalPlayer acidRoundMultiplier = 1D; externalAbyssLight = 0; externalColdImmunity = externalHeatImmunity = false; - reforges = 0; polarisBoostCounter = 0; spectralVeilImmunity = 0; jetPackCooldown = 0; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index b059ce17ab..75cf45d9c3 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -3506,11 +3506,8 @@ Provides heat and cold protection in Death Mode"; { int value = item.value; ItemLoader.ReforgePrice(item, ref value, ref Main.LocalPlayer.discount); - if (Main.LocalPlayer.Calamity().reforges <= 9) //to be reset later - { - Main.LocalPlayer.Calamity().moneyStolenByBandit += value / 5; - Main.LocalPlayer.Calamity().reforges++; - } + CalamityWorld.MoneyStolenByBandit += value / 5; + CalamityWorld.Reforges++; } } #endregion diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 1f812460ae..12d6e45ca6 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5304,7 +5304,7 @@ namespace CalamityMod.NPCs break; case NPCID.GoblinTinkerer: - if (Main.rand.NextBool(3) && thief != -1 && Main.LocalPlayer.Calamity().reforges >= 10) + if (Main.rand.NextBool(3) && thief != -1 && CalamityWorld.Reforges >= 1) { chat = $"Hey, is it just me or have my pockets gotten lighter ever since " + Main.npc[thief].GivenName + " arrived?"; } diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index e7d0e8556a..f4a75b7319 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -192,13 +192,13 @@ namespace CalamityMod.NPCs.TownNPCs public string Refund() { int goblinIndex = NPC.FindFirstNPC(NPCID.GoblinTinkerer); - if (goblinIndex != -1 && Main.LocalPlayer.Calamity().reforges >= 10) + if (goblinIndex != -1 && CalamityWorld.Reforges >= 1) { - Main.LocalPlayer.Calamity().reforges = 0; - Main.LocalPlayer.SellItem((int)Main.LocalPlayer.Calamity().moneyStolenByBandit, 1); - Main.LocalPlayer.Calamity().moneyStolenByBandit = 0; + CalamityWorld.Reforges = 0; + Main.LocalPlayer.SellItem(CalamityWorld.MoneyStolenByBandit, 1); + CalamityWorld.MoneyStolenByBandit = 0; NPC goblinFucker = Main.npc[goblinIndex]; - Main.PlaySound(SoundID.Coins, -1, -1, 1, 1f, 0f); //money dink sound + Main.PlaySound(SoundID.Coins, -1, -1, 1, 1f, 0f); // Money dink sound switch (Main.rand.Next(2)) { case 0: @@ -206,8 +206,9 @@ namespace CalamityMod.NPCs.TownNPCs case 1: return "Hey, if government officials can get tax, why can't I? The heck do you mean that these two things are nothing alike?"; } + CalamityMod.UpdateServerBoolean(); } - return "Sorry, I got nothing."; + return "Sorry, I got nothing. Perhaps you could reforge something and come back later..."; } public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) diff --git a/Projectiles/Summon/PlantSeed.cs b/Projectiles/Summon/PlantSeed.cs index c37fb8cb9b..09ba64cec6 100644 --- a/Projectiles/Summon/PlantSeed.cs +++ b/Projectiles/Summon/PlantSeed.cs @@ -57,9 +57,9 @@ namespace CalamityMod.Projectiles.Summon target.AddBuff(BuffID.Poisoned, 60); } - public override void OnHitPvp(NPC target, int damage, bool crit) + public override void OnHitPvp(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Poisoned, 60); + target.AddBuff(BuffID.Poisoned, 60); } } } diff --git a/Projectiles/Summon/PlantSeedGreen.cs b/Projectiles/Summon/PlantSeedGreen.cs index 2ed35badce..78a91fef24 100644 --- a/Projectiles/Summon/PlantSeedGreen.cs +++ b/Projectiles/Summon/PlantSeedGreen.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Summon target.AddBuff(BuffID.Venom, 180); } - public override void OnHitPvp(NPC target, int damage, bool crit) + public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(BuffID.Poisoned, 180); if (projectile.ai[1] == 1f) diff --git a/Projectiles/Summon/PlantSporeCloud.cs b/Projectiles/Summon/PlantSporeCloud.cs index 32401c1a67..e260a8449c 100644 --- a/Projectiles/Summon/PlantSporeCloud.cs +++ b/Projectiles/Summon/PlantSporeCloud.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Summon target.AddBuff(BuffID.Poisoned, 180); } - public override void OnHitPvp(NPC target, int damage, bool crit) + public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(BuffID.Poisoned, 180); } diff --git a/Projectiles/Summon/PlantThornBall.cs b/Projectiles/Summon/PlantThornBall.cs index b8ba0f26fa..be0abf75a2 100644 --- a/Projectiles/Summon/PlantThornBall.cs +++ b/Projectiles/Summon/PlantThornBall.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon target.AddBuff(BuffID.Venom, 180); } - public override void OnHitPvp(NPC target, int damage, bool crit) + public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(BuffID.Poisoned, 180); if (projectile.ai[1] == 1f) diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ccb0c8ee0b..60f9ab1c6c 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -60,6 +60,8 @@ namespace CalamityMod.World public static bool dragonScalesBought = false; private const int saveVersion = 0; public static int ArmoredDiggerSpawnCooldown = 0; + public static int MoneyStolenByBandit = 0; + public static int Reforges; //Boss Rush public static bool bossRushActive = false; //Whether Boss Rush is active or not @@ -379,6 +381,12 @@ namespace CalamityMod.World }, { "acidRainPoints", acidRainPoints + }, + { + "Reforges", Reforges + }, + { + "MoneyStolenByBandit", MoneyStolenByBandit } }; } @@ -442,6 +450,8 @@ namespace CalamityMod.World abyssChasmBottom = tag.GetInt("abyssChasmBottom"); acidRainPoints = tag.GetInt("acidRainPoints"); + Reforges = tag.GetInt("Reforges"); + MoneyStolenByBandit = tag.GetInt("MoneyStolenByBandit"); } #endregion @@ -451,6 +461,8 @@ namespace CalamityMod.World int loadVersion = reader.ReadInt32(); abyssChasmBottom = reader.ReadInt32(); acidRainPoints = reader.ReadInt32(); + Reforges = reader.ReadInt32(); + MoneyStolenByBandit = reader.ReadInt32(); if (loadVersion == 0) { @@ -636,6 +648,8 @@ namespace CalamityMod.World writer.Write(flags8); writer.Write(abyssChasmBottom); writer.Write(acidRainPoints); + writer.Write(Reforges); + writer.Write(MoneyStolenByBandit); } #endregion @@ -725,6 +739,8 @@ namespace CalamityMod.World abyssChasmBottom = reader.ReadInt32(); acidRainPoints = reader.ReadInt32(); + Reforges = reader.ReadInt32(); + MoneyStolenByBandit = reader.ReadInt32(); } #endregion From d65fd88530c7dfe4ab7f84168b8c785b5cdd4443 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 21 Jun 2020 03:13:49 -0500 Subject: [PATCH 004/128] Fixed a problem with palm trees in sulph sea generation --- World/Abyss.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/World/Abyss.cs b/World/Abyss.cs index 802985206d..63c984ff20 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -672,7 +672,9 @@ namespace CalamityMod.World int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; for (int y = YStart - 100; y < YStart + 60; y++) { - if (YStartWhitelist.Contains(CalamityUtils.ParanoidTileRetrieval(trueX, y).type)) + int type = CalamityUtils.ParanoidTileRetrieval(trueX, y).type; + if (YStartWhitelist.Contains(type) || + type == TileID.PalmTree) { if (Main.tile[trueX, y] == null) Main.tile[trueX, y] = new Tile(); From 7c7d7717b74425e15e6656959bfe486b6a8e4eaf Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 21 Jun 2020 08:16:24 -0400 Subject: [PATCH 005/128] fixed wall of flesh eyes not getting debuff icon display --- CalamityMod.cs | 7 +++++++ NPCs/CalamityGlobalNPC.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 0cdcda1a3b..14f896e00c 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -181,6 +181,7 @@ namespace CalamityMod public static List revengeanceProjectileBuffList5Percent; public static List revengeanceLifeStealExceptionList; public static List movementImpairImmuneList; + public static List needsDebuffIconDisplayList; public static List trapProjectileList; public static List scopedWeaponList; public static List boomerangList; @@ -407,6 +408,7 @@ namespace CalamityMod revengeanceProjectileBuffList5Percent = null; revengeanceLifeStealExceptionList = null; movementImpairImmuneList = null; + needsDebuffIconDisplayList = null; trapProjectileList = null; scopedWeaponList = null; boomerangList = null; @@ -1966,6 +1968,11 @@ namespace CalamityMod NPCID.QueenBee, }; + needsDebuffIconDisplayList = new List() + { + NPCID.WallofFleshEye + }; + trapProjectileList = new List() { ProjectileID.PoisonDartTrap, diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 12d6e45ca6..7150227c6a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4528,7 +4528,7 @@ namespace CalamityMod.NPCs { if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f)) { - if (CalamityConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type))) + if (CalamityConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityMod.needsDebuffIconDisplayList.Contains(npc.type))) { List buffTextureList = new List(); From 489e26548b48d8f59db33478bbe1c284ab697545 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 21 Jun 2020 08:35:54 -0400 Subject: [PATCH 006/128] vampiric talisman now uses spawnlifestealproj code --- Projectiles/CalamityGlobalProjectile.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 88826a65c1..3482160fb1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1137,8 +1137,10 @@ namespace CalamityMod.Projectiles if (modPlayer.vampiricTalisman && rogue && crit) { float heal = MathHelper.Clamp(damage * 0.015f, 0f, 6f); - Main.player[Main.myPlayer].lifeSteal -= heal * 2f; - Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, projectile.owner, heal); + if ((int)heal > 0) + { + SpawnLifeStealProjectile(projectile, player, heal, ProjectileID.VampireHeal, 1200f, 2f); + } } if ((modPlayer.bloodyGlove || modPlayer.electricianGlove) && rogue && stealthStrike) From a25481ab9dd06ab5961d9b0ac0af780cf8f7d080 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 21 Jun 2020 08:43:34 -0400 Subject: [PATCH 007/128] nerfed umbraphile debuffs and prevented self proc --- CalPlayer/CalamityPlayer.cs | 2 +- Projectiles/Rogue/UmbraphileBoom.cs | 180 ++++++++++++++-------------- 2 files changed, 93 insertions(+), 89 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8b520ab10c..4a22fb8f8d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5633,7 +5633,7 @@ namespace CalamityMod.CalPlayer Main.projectile[fire].netUpdate = true; } } - if (umbraphileSet && proj.Calamity().rogue && (Main.rand.NextBool(4) || proj.Calamity().stealthStrike)) + if (umbraphileSet && proj.Calamity().rogue && (Main.rand.NextBool(4) || proj.Calamity().stealthStrike) && proj.type != ModContent.ProjectileType()) { Projectile.NewProjectile(proj.Center.X, proj.Center.Y, 0f, 0f, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(proj.damage * 0.25, 50), 0f, player.whoAmI, 0f, 0f); } diff --git a/Projectiles/Rogue/UmbraphileBoom.cs b/Projectiles/Rogue/UmbraphileBoom.cs index d06797acad..c214256e09 100644 --- a/Projectiles/Rogue/UmbraphileBoom.cs +++ b/Projectiles/Rogue/UmbraphileBoom.cs @@ -6,97 +6,101 @@ using Terraria.ModLoader; using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Rogue { - public class UmbraphileBoom : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Explosion"); - } + public class UmbraphileBoom : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + } - public override void SetDefaults() - { - projectile.width = 60; - projectile.height = 60; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.tileCollide = false; - projectile.penetrate = -1; - projectile.timeLeft = 5; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = -1; + public override void SetDefaults() + { + projectile.width = 60; + projectile.height = 60; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = 5; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -1; projectile.Calamity().rogue = true; - } + } - public override void Kill(int timeLeft) - { - int dustType = Main.rand.NextBool(2) ? 246 : 176; - 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) - { - num461 -= (projectile.ai[0] - 180f) / 2f; - } - if (num461 <= 0f) - { - num461 = 0f; - projectile.Kill(); - } - num461 *= 0.7f; - projectile.ai[0] += 4f; - int num462 = 0; - while ((float)num462 < num461) - { - float num463 = (float)Main.rand.Next(-10, 11); - float num464 = (float)Main.rand.Next(-10, 11); - float num465 = (float)Main.rand.Next(3, 9); - float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464)); - num466 = num465 / num466; - num463 *= num466; - num464 *= num466; - int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1f); - Dust dust = Main.dust[num467]; - dust.noGravity = true; - dust.position.X = projectile.Center.X; - dust.position.Y = projectile.Center.Y; - dust.position.X += (float)Main.rand.Next(-10, 11); - dust.position.Y += (float)Main.rand.Next(-10, 11); - dust.velocity.X = num463; - dust.velocity.Y = num464; - num462++; - } - return; - } + public override void Kill(int timeLeft) + { + int dustType = Main.rand.NextBool(2) ? 246 : 176; + 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) + { + num461 -= (projectile.ai[0] - 180f) / 2f; + } + if (num461 <= 0f) + { + num461 = 0f; + projectile.Kill(); + } + num461 *= 0.7f; + projectile.ai[0] += 4f; + int num462 = 0; + while ((float)num462 < num461) + { + float num463 = (float)Main.rand.Next(-10, 11); + float num464 = (float)Main.rand.Next(-10, 11); + float num465 = (float)Main.rand.Next(3, 9); + float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464)); + num466 = num465 / num466; + num463 *= num466; + num464 *= num466; + int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1f); + Dust dust = Main.dust[num467]; + dust.noGravity = true; + dust.position.X = projectile.Center.X; + dust.position.Y = projectile.Center.Y; + dust.position.X += (float)Main.rand.Next(-10, 11); + dust.position.Y += (float)Main.rand.Next(-10, 11); + dust.velocity.X = num463; + dust.velocity.Y = num464; + num462++; + } + return; + } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.Daybreak, 180); - target.AddBuff(ModContent.BuffType(), 180); - } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.dayTime || Main.rand.Next(3)) //100% during day, 33.33% chance at night + target.AddBuff(BuffID.Daybreak, 60); - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 180); - } - } + if (!Main.dayTime || Main.rand.Next(3)) //100% at night, 33.33% chance during day + target.AddBuff(ModContent.BuffType(), 60); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + if (!Main.dayTime || Main.rand.Next(3)) //100% at night, 33.33% chance during day + target.AddBuff(ModContent.BuffType(), 60); + } + } } From 23f9d503e980aef157f3244fec63bff2e53af183 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 21 Jun 2020 21:23:43 -0400 Subject: [PATCH 008/128] plaguebringer and plague reaper now only reduce plague damage --- CalPlayer/CalamityPlayer.cs | 2 ++ CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- Items/Accessories/AlchemicalFlask.cs | 1 + Items/Accessories/PlagueHive.cs | 1 + Items/Armor/PlagueReaperVest.cs | 4 ++-- Items/Armor/PlaguebringerCarapace.cs | 4 ++-- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4a22fb8f8d..927a13c79d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -458,6 +458,7 @@ namespace CalamityMod.CalPlayer public bool shadowMinions = false; public bool tearMinions = false; public bool alchFlask = false; + public bool reducedPlagueDmg = false; public bool abaddon = false; public bool community = false; public bool fleshTotem = false; @@ -1509,6 +1510,7 @@ namespace CalamityMod.CalPlayer shadowMinions = false; tearMinions = false; alchFlask = false; + reducedPlagueDmg = false; abaddon = false; community = false; stressPills = false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index ad9956bef2..b8abd8b2cc 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -205,7 +205,7 @@ namespace CalamityMod.CalPlayer player.lifeRegen = 0; player.lifeRegenTime = 0; - lifeRegenLost += modPlayer.alchFlask ? 10 : 20; + lifeRegenLost += modPlayer.reducedPlagueDmg ? 10 : 20; } if (modPlayer.bBlood) diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs index 135985faea..465e3709fa 100644 --- a/Items/Accessories/AlchemicalFlask.cs +++ b/Items/Accessories/AlchemicalFlask.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.alchFlask = true; + modPlayer.reducedPlagueDmg = true; } public override void AddRecipes() diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index 839cc07166..5509810c03 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories modPlayer.uberBees = true; player.strongBees = true; modPlayer.alchFlask = true; + modPlayer.reducedPlagueDmg = true; int plagueCounter = 0; Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.1f, 2f, 0.2f); int num = ModContent.BuffType(); diff --git a/Items/Armor/PlagueReaperVest.cs b/Items/Armor/PlagueReaperVest.cs index 797920e71e..32ec1ac593 100644 --- a/Items/Armor/PlagueReaperVest.cs +++ b/Items/Armor/PlagueReaperVest.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Plague Reaper Vest"); - Tooltip.SetDefault("Immunity to the Plague\n" + + Tooltip.SetDefault("Reduces the damage caused to you by the plague\n" + "15% increased ranged damage and 5% increased ranged critical strike chance"); } @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor { player.rangedDamage += 0.15f; player.rangedCrit += 5; - player.buffImmune[ModContent.BuffType()] = true; + player.Calamity().reducedPlagueDmg = true; } public override void AddRecipes() diff --git a/Items/Armor/PlaguebringerCarapace.cs b/Items/Armor/PlaguebringerCarapace.cs index 066a4dafbb..8a9461f946 100644 --- a/Items/Armor/PlaguebringerCarapace.cs +++ b/Items/Armor/PlaguebringerCarapace.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Plaguebringer Carapace"); - Tooltip.SetDefault("Immunity to the Plague\n" + + Tooltip.SetDefault("Reduces the damage caused to you by the plague\n" + "12% increased minion damage and +1 max minions\n" + "Friendly bees inflict the plague"); } @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Armor player.Calamity().plaguebringerCarapace = true; player.maxMinions += 2; player.minionDamage += 0.12f; - player.buffImmune[ModContent.BuffType()] = true; + player.Calamity().reducedPlagueDmg = true; } public override void AddRecipes() From 9a95147a041b061016996a19fbcc7e71a4cdea52 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 23 Jun 2020 07:04:43 -0500 Subject: [PATCH 009/128] Small sulph sea cleanup (also error fix) --- Projectiles/Rogue/UmbraphileBoom.cs | 6 ++--- World/Abyss.cs | 42 ++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/Projectiles/Rogue/UmbraphileBoom.cs b/Projectiles/Rogue/UmbraphileBoom.cs index c214256e09..eb6d987646 100644 --- a/Projectiles/Rogue/UmbraphileBoom.cs +++ b/Projectiles/Rogue/UmbraphileBoom.cs @@ -90,16 +90,16 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (Main.dayTime || Main.rand.Next(3)) //100% during day, 33.33% chance at night + if (Main.dayTime || Main.rand.NextBool(3)) //100% during day, 33.33% chance at night target.AddBuff(BuffID.Daybreak, 60); - if (!Main.dayTime || Main.rand.Next(3)) //100% at night, 33.33% chance during day + if (!Main.dayTime || Main.rand.NextBool(3)) //100% at night, 33.33% chance during day target.AddBuff(ModContent.BuffType(), 60); } public override void OnHitPvp(Player target, int damage, bool crit) { - if (!Main.dayTime || Main.rand.Next(3)) //100% at night, 33.33% chance during day + if (!Main.dayTime || Main.rand.NextBool(3)) //100% at night, 33.33% chance during day target.AddBuff(ModContent.BuffType(), 60); } } diff --git a/World/Abyss.cs b/World/Abyss.cs index 63c984ff20..e74b91323e 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -665,21 +665,53 @@ namespace CalamityMod.World #endregion #region Removal of stupid Tiles above the Sea + + public static List OtherTilesForSulphSeaToDestroy = new List() + { + TileID.PalmTree, + TileID.Sunflower, + TileID.CorruptThorns, + TileID.CrimtaneThorns, + TileID.CorruptGrass, + TileID.CorruptPlants, + TileID.Stalactite, + TileID.ImmatureHerbs, + TileID.MatureHerbs, + }; + + public static List WallsForSulphSeaToDestroy = new List() + { + WallID.Dirt, + WallID.DirtUnsafe, + WallID.DirtUnsafe1, + WallID.DirtUnsafe2, + WallID.DirtUnsafe3, + WallID.DirtUnsafe4, + WallID.Cave6Unsafe, // Rocky dirt wall + WallID.GrassUnsafe, + WallID.CorruptGrassUnsafe, + WallID.EbonstoneUnsafe, + WallID.CrimstoneUnsafe, + }; public static void RemoveStupidTilesAboveSea() { for (int x = 0; x < BiomeWidth; x++) { int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; - for (int y = YStart - 100; y < YStart + 60; y++) + for (int y = YStart - 140; y < YStart + 80; y++) { int type = CalamityUtils.ParanoidTileRetrieval(trueX, y).type; if (YStartWhitelist.Contains(type) || - type == TileID.PalmTree) + OtherTilesForSulphSeaToDestroy.Contains(type)) { if (Main.tile[trueX, y] == null) Main.tile[trueX, y] = new Tile(); Main.tile[trueX, y].active(false); } + if (WallsForSulphSeaToDestroy.Contains(Main.tile[trueX, y].wall)) + { + Main.tile[trueX, y].wall = 0; + } } } } @@ -725,11 +757,9 @@ namespace CalamityMod.World public static void DetermineYStart() { int maxHeight = 0; - for (int i = 0; i < BiomeWidth - 18; i++) + for (int i = 40; i < BiomeWidth + 30; i++) { - int xCheck = CalamityWorld.abyssSide ? - BiomeWidth - i : - Main.maxTilesX - BiomeWidth + i; + int xCheck = CalamityWorld.abyssSide ? i : Main.maxTilesX - i; int YStart = (int)WorldGen.worldSurfaceLow - 20; // 30 tiles below the absolute lowest a floating island can spawn while (!Main.tile[xCheck, YStart].active() || !YStartWhitelist.Contains(Main.tile[xCheck, YStart].type)) { From 2853a5e0628fc144a19c3618a65b3149a802cfe8 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 23 Jun 2020 22:42:41 -0500 Subject: [PATCH 010/128] Andromeda Hitbox adjustment and item use fix --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/CalamityGlobalItem.cs | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3803891113..87a98ac55c 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -342,7 +342,7 @@ namespace CalamityMod.CalPlayer if (player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot) { - player.width = 152; + player.width = 80; player.height = 212; player.position.Y -= 170; } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 75cf45d9c3..4c07c98f6d 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -878,16 +878,15 @@ namespace CalamityMod.Items return false; } - if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 && - item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee)) + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) { - if (player.altFunctionUse == 0) + if (item.pick > 0 && item.axe > 0 && item.hammer > 0) + return false; + if (item.Calamity().rogue || item.magic || item.ranged || item.melee) { - return PerformAndromedaAttacks(item, player); - } - else - { - return AltFunctionUse(item, player); + if (player.altFunctionUse == 0) + return PerformAndromedaAttacks(item, player); + else return false; } } From 3bae96fc08d9c4b7658acb87fdadb44fc6ae8b86 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 24 Jun 2020 18:35:46 -0500 Subject: [PATCH 011/128] Fixed subsuming vortex problem in MP --- Projectiles/Magic/EnormousConsumingVortex.cs | 4 ++-- Projectiles/Magic/Vortex.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Magic/EnormousConsumingVortex.cs b/Projectiles/Magic/EnormousConsumingVortex.cs index 12665a5124..9daf7066d8 100644 --- a/Projectiles/Magic/EnormousConsumingVortex.cs +++ b/Projectiles/Magic/EnormousConsumingVortex.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic if (Time < 300) { TargetingMovement(); - if (Time % TentacleSpawnRate == TentacleSpawnRate - 1 && Main.netMode != NetmodeID.MultiplayerClient) + if (Time % TentacleSpawnRate == TentacleSpawnRate - 1 && Main.myPlayer == projectile.owner) { ProduceSubsumingHentai(); } @@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Magic dust.noGravity = true; } } - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.myPlayer == projectile.owner) { NPC closestTarget = projectile.Center.ClosestNPCAt(1600f, true); for (int i = 0; i < 12; i++) diff --git a/Projectiles/Magic/Vortex.cs b/Projectiles/Magic/Vortex.cs index 86462050c7..8c8831843c 100644 --- a/Projectiles/Magic/Vortex.cs +++ b/Projectiles/Magic/Vortex.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Magic int dustCount = 5; for (int i = 0; i < dustCount; i++) { - Vector2 spawnPosition = projectile.Center + projectile.Size.RotatedBy(i / (float)dustCount * MathHelper.TwoPi) * 0.5f; + Vector2 spawnPosition = projectile.Center + projectile.Size.RotatedBy(i / (float)dustCount * MathHelper.TwoPi) * 0.333f; Vector2 velocity = Main.rand.NextFloat(MathHelper.TwoPi).ToRotationVector2() * Main.rand.NextFloat(6f, 16f); Dust dust = Dust.NewDustPerfect(spawnPosition, 66, velocity, 0, Main.DiscoColor, 0.7f); dust.noGravity = true; From 3afd2ada38620d69b8853d98984171fa54115989 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 25 Jun 2020 19:20:35 -0400 Subject: [PATCH 012/128] natural death boss spawns now check for vanilla natural boss spawns --- World/CalamityWorld.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 60f9ab1c6c..19b5b3b4bb 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1692,7 +1692,7 @@ namespace CalamityMod.World } } - if (death && !CalamityPlayer.areThereAnyDamnBosses && !Main.snowMoon && !Main.pumpkinMoon && !DD2Event.Ongoing && player.statLifeMax2 >= 300) //does not occur while a boss is alive or during certain events + if (death && !CalamityPlayer.areThereAnyDamnBosses && !Main.snowMoon && !Main.pumpkinMoon && !DD2Event.Ongoing && player.statLifeMax2 >= 300 && !WorldGen.spawnEye && WorldGen.spawnHardBoss <= 0) //does not occur while a boss is alive or during certain events { if (bossSpawnCountdown <= 0 && deathBossSpawnCooldown <= 0) // Check for countdown and cooldown being 0 { From 5eaea738c417f48b1687f8d054447f6a9dfebf2b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 25 Jun 2020 20:36:48 -0400 Subject: [PATCH 013/128] slightly buffed grand gelatin but added cryonic bars to the recipe --- Items/Accessories/GrandGelatin.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/GrandGelatin.cs b/Items/Accessories/GrandGelatin.cs index a34f996431..77f06d49c9 100644 --- a/Items/Accessories/GrandGelatin.cs +++ b/Items/Accessories/GrandGelatin.cs @@ -1,3 +1,4 @@ +using CalamityMod.Items.Materials; using System; using Terraria; using Terraria.ID; @@ -12,7 +13,7 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Grand Gelatin"); Tooltip.SetDefault("10% increased movement speed\n" + "200% increased jump speed\n" + - "+20 max life and mana\n" + + "+40 max life and mana\n" + "Standing still boosts life and mana regen"); } @@ -29,9 +30,9 @@ namespace CalamityMod.Items.Accessories { player.moveSpeed += 0.1f; player.jumpSpeedBoost += player.autoJump ? 0.5f : 2.0f; - player.statLifeMax2 += 20; - player.statManaMax2 += 20; - if ((double)Math.Abs(player.velocity.X) < 0.05 && (double)Math.Abs(player.velocity.Y) < 0.05 && player.itemAnimation == 0) + player.statLifeMax2 += 40; + player.statManaMax2 += 40; + if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0) { player.lifeRegen += 2; player.manaRegenBonus += 2; @@ -44,6 +45,7 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); From 74c44b33b94168154c5216ef8bb3ec3fc66979e8 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 26 Jun 2020 01:41:53 -0500 Subject: [PATCH 014/128] Andromeda small transformation draw fix --- CalPlayer/CalamityPlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e4afe190d0..f10db225a3 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -9813,7 +9813,7 @@ namespace CalamityMod.CalPlayer Texture2D robotTexture = ModContent.GetTexture("CalamityMod/Projectiles/Summon/AndromedaSmall"); Rectangle frame = new Rectangle(0, robotEntityInstance.CurrentFrame * 54, robotTexture.Width, robotTexture.Height / 21); DrawData drawData = new DrawData(robotTexture, - drawPlayer.Center + new Vector2(0f, -8f) - Main.screenPosition, + drawPlayer.Center + new Vector2(drawPlayer.direction == 1 ? -24 : -10, -8f) - Main.screenPosition, frame, Color.White, 0f, From b177c3b12795d96805d83427ff7ddfa5b035c53c Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Fri, 26 Jun 2020 04:28:21 -0500 Subject: [PATCH 015/128] Changed Andromeda shadowspec bar count to 5 --- Items/Weapons/Summon/PrototypeAndromechaRing.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/PrototypeAndromechaRing.cs b/Items/Weapons/Summon/PrototypeAndromechaRing.cs index 54ee78dbdc..40e99b27d8 100644 --- a/Items/Weapons/Summon/PrototypeAndromechaRing.cs +++ b/Items/Weapons/Summon/PrototypeAndromechaRing.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 100); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 4); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.WingsVortex); From 0e4062eb31bc8394bbff501ce0cbf97d0bbf25f0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 11:51:28 -0400 Subject: [PATCH 016/128] fixed certain healing pots working under iron heart --- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- .../Fishing/BrimstoneCragCatches/Bloodfin.cs | 9 ++++-- Items/Potions/Alcohol/GrapeBeer.cs | 9 ++++-- Items/Potions/Alcohol/Margarita.cs | 9 ++++-- Items/Potions/Alcohol/RedWine.cs | 31 ++++++------------- Items/Potions/SunkenStew.cs | 9 ++++-- 6 files changed, 34 insertions(+), 35 deletions(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 5ae4267a8a..f98769fada 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -391,7 +391,7 @@ namespace CalamityMod.CalPlayer if (player.whoAmI == Main.myPlayer && modPlayer.bloodfinTimer <= 0) { modPlayer.bloodfinTimer = 30; - if (player.statLife <= (int)(player.statLifeMax2 * 0.75)) + if (player.statLife <= (int)(player.statLifeMax2 * 0.75) && !CalamityWorld.ironHeart) player.statLife += 1; } } diff --git a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs index 4ea4280573..a7b68b1b4a 100644 --- a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs +++ b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Buffs.Potions; +using CalamityMod.World; using System.Collections.Generic; namespace CalamityMod.Items.Fishing.BrimstoneCragCatches @@ -38,14 +39,16 @@ The life regen boost is stronger if below 75% health"); public override void OnConsumeItem(Player player) { - player.statLife += 240; + int healAmt = CalamityWorld.ironHeart ? 0 : 240; + player.statLife += healAmt; if (player.statLife > player.statLifeMax2) { player.statLife = player.statLifeMax2; } if (Main.myPlayer == player.whoAmI) { - player.HealEffect(240, true); + if (!CalamityWorld.ironHeart) + player.HealEffect(healAmt, true); } player.AddBuff(ModContent.BuffType(), 600); @@ -63,7 +66,7 @@ The life regen boost is stronger if below 75% health"); // Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function). public override void ModifyTooltips(List tooltips) { - tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life"; + tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life"; } } } diff --git a/Items/Potions/Alcohol/GrapeBeer.cs b/Items/Potions/Alcohol/GrapeBeer.cs index 68c3e97a5e..4f0a0bc2f4 100644 --- a/Items/Potions/Alcohol/GrapeBeer.cs +++ b/Items/Potions/Alcohol/GrapeBeer.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using CalamityMod.World; using System.Collections.Generic; using Terraria; using Terraria.ID; @@ -40,7 +41,8 @@ Reduces defense by 2 and movement speed by 5%"); public override void OnConsumeItem(Player player) { - player.statLife += 100; + int healAmt = CalamityWorld.ironHeart ? 0 : 100; + player.statLife += healAmt; player.statMana += 100; if (player.statLife > player.statLifeMax2) { @@ -53,7 +55,8 @@ Reduces defense by 2 and movement speed by 5%"); player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); if (Main.myPlayer == player.whoAmI) { - player.HealEffect(100, true); + if (!CalamityWorld.ironHeart) + player.HealEffect(healAmt, true); player.ManaEffect(100); } player.AddBuff(ModContent.BuffType(), 3600); @@ -68,7 +71,7 @@ Reduces defense by 2 and movement speed by 5%"); // Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function). public override void ModifyTooltips(List tooltips) { - tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life"; + tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life"; } } } diff --git a/Items/Potions/Alcohol/Margarita.cs b/Items/Potions/Alcohol/Margarita.cs index 613329475c..884fd01e9d 100644 --- a/Items/Potions/Alcohol/Margarita.cs +++ b/Items/Potions/Alcohol/Margarita.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using CalamityMod.World; using System.Collections.Generic; using Terraria; using Terraria.ID; @@ -43,7 +44,8 @@ Reduces defense by 6 and life regen by 1"); public override void OnConsumeItem(Player player) { - player.statLife += 200; + int healAmt = CalamityWorld.ironHeart ? 0 : 200; + player.statLife += healAmt; player.statMana += 200; if (player.statLife > player.statLifeMax2) { @@ -56,7 +58,8 @@ Reduces defense by 6 and life regen by 1"); player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); if (Main.myPlayer == player.whoAmI) { - player.HealEffect(200, true); + if (!CalamityWorld.ironHeart) + player.HealEffect(healAmt, true); player.ManaEffect(200); } player.AddBuff(ModContent.BuffType(), 10800); @@ -71,7 +74,7 @@ Reduces defense by 6 and life regen by 1"); // Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function). public override void ModifyTooltips(List tooltips) { - tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life"; + tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life"; } } } diff --git a/Items/Potions/Alcohol/RedWine.cs b/Items/Potions/Alcohol/RedWine.cs index 48facc24f6..d982e67b2d 100644 --- a/Items/Potions/Alcohol/RedWine.cs +++ b/Items/Potions/Alcohol/RedWine.cs @@ -34,33 +34,20 @@ Reduces life regen by 1"); public override bool CanUseItem(Player player) { - return player.FindBuffIndex(BuffID.PotionSickness) == -1; + if (player.Calamity().baguette) + { + item.healLife = 250; + } + else + { + item.healLife = 200; + } + return base.CanUseItem(player); } public override void OnConsumeItem(Player player) { - player.statLife += (player.Calamity().baguette ? 250 : 200); - if (player.statLife > player.statLifeMax2) - { - player.statLife = player.statLifeMax2; - } - if (Main.myPlayer == player.whoAmI) - { - player.HealEffect((player.Calamity().baguette ? 250 : 200), true); - } player.AddBuff(ModContent.BuffType(), 900); } - - // Zeroes out the hardcoded healing function from having a healLife value. The item still heals in the UseItem hook. - public override void GetHealLife(Player player, bool quickHeal, ref int healValue) - { - healValue = 0; - } - - // Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function). - public override void ModifyTooltips(List tooltips) - { - tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life"; - } } } \ No newline at end of file diff --git a/Items/Potions/SunkenStew.cs b/Items/Potions/SunkenStew.cs index 2376a0ab90..3c4ec5bf6a 100644 --- a/Items/Potions/SunkenStew.cs +++ b/Items/Potions/SunkenStew.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Placeables; using CalamityMod.Items.Fishing.BrimstoneCragCatches; +using CalamityMod.World; using System.Collections.Generic; using Terraria; using Terraria.ID; @@ -43,7 +44,8 @@ Grants Well Fed"); public override bool UseItem(Player player) { - player.statLife += 120; + int healAmt = CalamityWorld.ironHeart ? 0 : 120; + player.statLife += healAmt; player.statMana += 150; if (player.statLife > player.statLifeMax2) { @@ -56,7 +58,8 @@ Grants Well Fed"); player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); if (Main.myPlayer == player.whoAmI) { - player.HealEffect(120, true); + if (!CalamityWorld.ironHeart) + player.HealEffect(healAmt, true); player.ManaEffect(150); } @@ -76,7 +79,7 @@ Grants Well Fed"); // Forces the "Restores X life" tooltip to display the actual life restored instead of zero (due to the previous function). public override void ModifyTooltips(List tooltips) { - tooltips.Find(line => line.Name == "HealLife").text = "Restores " + item.healLife + " life"; + tooltips.Find(line => line.Name == "HealLife").text = "Restores " + (CalamityWorld.ironHeart ? 0 : item.healLife) + " life"; } public override void AddRecipes() From a593b188e7ae4f212e92f7da84329cbcb1afe2e5 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 12:17:18 -0400 Subject: [PATCH 017/128] rewrote a few variables and such in some scal projectiles --- Projectiles/Boss/BrimstoneBarrage.cs | 2 +- Projectiles/Boss/BrimstoneFireblast.cs | 47 +++++++++++------------ Projectiles/Boss/BrimstoneGigaBlast.cs | 51 ++++++++++++------------- Projectiles/Boss/BrimstoneHellblast2.cs | 8 ++-- 4 files changed, 53 insertions(+), 55 deletions(-) diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index 2fdcad9788..8bbb9d2785 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Boss if (projectile.velocity.Length() < (projectile.ai[1] == 0f ? 14f : 10f)) projectile.velocity *= 1.01f; - projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; projectile.frameCounter++; if (projectile.frameCounter > 4) diff --git a/Projectiles/Boss/BrimstoneFireblast.cs b/Projectiles/Boss/BrimstoneFireblast.cs index 04b877bd74..bf53bdbcdb 100644 --- a/Projectiles/Boss/BrimstoneFireblast.cs +++ b/Projectiles/Boss/BrimstoneFireblast.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Boss Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, 0f, 0f); - projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; if (projectile.localAI[0] == 0f) { @@ -55,27 +55,27 @@ namespace CalamityMod.Projectiles.Boss Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 20); } - int num103 = Player.FindClosest(projectile.Center, 1, 1); + int target = Player.FindClosest(projectile.Center, 1, 1); projectile.ai[0] += 1f; if (projectile.ai[0] > 20f) { - float scaleFactor2 = projectile.velocity.Length(); - Vector2 vector11 = Main.player[num103].Center - projectile.Center; - vector11.Normalize(); - vector11 *= scaleFactor2; - projectile.velocity = (projectile.velocity * 24f + vector11) / 25f; + float projSpeed = projectile.velocity.Length(); + Vector2 playerVec = Main.player[target].Center - projectile.Center; + playerVec.Normalize(); + playerVec *= projSpeed; + projectile.velocity = (projectile.velocity * 24f + playerVec) / 25f; projectile.velocity.Normalize(); - projectile.velocity *= scaleFactor2; + projectile.velocity *= projSpeed; } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; + Texture2D texture = Main.projectileTexture[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int drawStart = frameHeight * projectile.frame; lightColor.R = (byte)(255 * projectile.Opacity); - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), projectile.scale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } @@ -96,14 +96,13 @@ namespace CalamityMod.Projectiles.Boss if (projectile.ai[1] == 0f) { - float spread = 12f * 0.0174f; + float spread = 12f * MathHelper.PiOver2 * 0.01f; double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; double deltaAngle = spread / 30f; double offsetAngle; - int i; if (projectile.owner == Main.myPlayer) { - for (i = 0; i < 30; i++) + for (int i = 0; i < 30; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 1f); @@ -112,18 +111,18 @@ namespace CalamityMod.Projectiles.Boss } } - for (int num193 = 0; num193 < 2; num193++) + for (int j = 0; j < 2; j++) { - Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); } - for (int num194 = 0; num194 < 20; num194++) + for (int k = 0; k < 20; k++) { - int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.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, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); - Main.dust[num195].velocity *= 2f; - Main.dust[num195].noGravity = true; + int redFire = Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.5f); + Main.dust[redFire].noGravity = true; + Main.dust[redFire].velocity *= 3f; + redFire = Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + Main.dust[redFire].velocity *= 2f; + Main.dust[redFire].noGravity = true; } } diff --git a/Projectiles/Boss/BrimstoneGigaBlast.cs b/Projectiles/Boss/BrimstoneGigaBlast.cs index 866d3ab238..4134292304 100644 --- a/Projectiles/Boss/BrimstoneGigaBlast.cs +++ b/Projectiles/Boss/BrimstoneGigaBlast.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss else projectile.Opacity = MathHelper.Clamp(1f - ((projectile.timeLeft - 90) / 60f), 0f, 1f); - projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; if (projectile.localAI[0] == 0f) { @@ -58,19 +58,19 @@ namespace CalamityMod.Projectiles.Boss Main.PlaySound(SoundID.Item, (int)projectile.position.X, (int)projectile.position.Y, 20); } - float num953 = revenge ? 100f : 80f; //100 - float scaleFactor12 = revenge ? 20f : 15f; //5 - float num954 = 40f; - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + float turnSpeed = revenge ? 100f : 80f; //100 + float homeSpeed = revenge ? 20f : 15f; //5 + float minDist = 40f; + int target = (int)projectile.ai[0]; + if (target >= 0 && Main.player[target].active && !Main.player[target].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[target].Center) > minDist) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); - if (vector102.HasNaNs()) - vector102 = Vector2.UnitY; + Vector2 targetVec = projectile.DirectionTo(Main.player[target].Center); + if (targetVec.HasNaNs()) + targetVec = Vector2.UnitY; - projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953; + projectile.velocity = (projectile.velocity * (turnSpeed - 1f) + targetVec * homeSpeed) / turnSpeed; } } else @@ -85,11 +85,11 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; + Texture2D texture = Main.projectileTexture[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int drawStart = frameHeight * projectile.frame; lightColor.R = (byte)(255 * projectile.Opacity); - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), projectile.scale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } @@ -110,14 +110,13 @@ namespace CalamityMod.Projectiles.Boss if (projectile.ai[1] == 0f) { - float spread = 45f * 0.0174f; + float spread = 45f * MathHelper.PiOver2 * 0.01f; double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; double deltaAngle = spread / 8f; double offsetAngle; - int i; if (projectile.owner == Main.myPlayer) { - for (i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 7f), (float)(Math.Cos(offsetAngle) * 7f), ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 1f); @@ -126,15 +125,15 @@ namespace CalamityMod.Projectiles.Boss } } - Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); - for (int num194 = 0; num194 < 10; num194++) + Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + for (int j = 0; j < 10; j++) { - int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.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, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); - Main.dust[num195].velocity *= 2f; - Main.dust[num195].noGravity = true; + int redFire = Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.5f); + Main.dust[redFire].noGravity = true; + Main.dust[redFire].velocity *= 3f; + redFire = Dust.NewDust(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 50, default, 1f); + Main.dust[redFire].velocity *= 2f; + Main.dust[redFire].noGravity = true; } } diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index bb0dc2ae76..be51d96d10 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -61,11 +61,11 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; + Texture2D texture = Main.projectileTexture[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int drawStart = frameHeight * projectile.frame; lightColor.R = (byte)(255 * projectile.Opacity); - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), projectile.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, spriteEffects, 0f); return false; } From 2cd6c06812efc658d91605f738cf48c484529545 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 14:57:40 -0400 Subject: [PATCH 018/128] nerfed gladiator armor defense --- Items/CalamityGlobalItem.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 4c07c98f6d..1305a422e1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -154,12 +154,12 @@ namespace CalamityMod.Items item.defense = 41; //7 more defense else if (item.type == ItemID.SolarFlareLeggings) item.defense = 24; //4 more defense - else if (item.type == ItemID.GladiatorHelmet) //total defense pre-buff = 7 post-buff = 21 - item.defense = 4; //2 more defense + else if (item.type == ItemID.GladiatorHelmet) //total defense pre-buff = 7 post-buff = 15 + item.defense = 3; //1 more defense else if (item.type == ItemID.GladiatorBreastplate) - item.defense = 7; //4 more defense + item.defense = 5; //2 more defense else if (item.type == ItemID.GladiatorLeggings) - item.defense = 5; //3 more defense + item.defense = 4; //2 more defense else if (item.type == ItemID.HallowedPlateMail) //total defense pre-buff = 31, 50, 35 post-buff = 36, 55, 40 item.defense = 18; //3 more defense else if (item.type == ItemID.HallowedGreaves) @@ -1731,7 +1731,7 @@ namespace CalamityMod.Items { if (line2.mod == "Terraria" && line2.Name == "Defense") { - line2.text = "4 defense\n" + + line2.text = "3 defense\n" + "3% increased rogue damage"; } } @@ -1742,7 +1742,7 @@ namespace CalamityMod.Items { if (line2.mod == "Terraria" && line2.Name == "Defense") { - line2.text = "7 defense\n" + + line2.text = "5 defense\n" + "3% increased rogue critical strike chance"; } } @@ -1753,7 +1753,7 @@ namespace CalamityMod.Items { if (line2.mod == "Terraria" && line2.Name == "Defense") { - line2.text = "5 defense\n" + + line2.text = "4 defense\n" + "3% increased rogue velocity"; } } @@ -2933,8 +2933,8 @@ Provides heat and cold protection in Death Mode"; modPlayer.wearingRogueArmor = true; player.Calamity().throwingDamage += 0.05f; player.Calamity().throwingVelocity += 0.1f; - player.statDefense += 5; - player.setBonus = "+5 defense\n" + + player.statDefense += 3; + player.setBonus = "+3 defense\n" + "5% increased rogue damage and 10% increased velocity\n" + "Rogue stealth builds while not attacking and not moving, up to a max of 70\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + From b1f96f89e435e3f9a44dfe80eeaba74081a9746c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 15:27:32 -0400 Subject: [PATCH 019/128] compressed revengeance tooltip a tad --- Items/DifficultyItems/Revenge.cs | 43 +++++++++++++++++++------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index a681d76e41..2736aca44a 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -1,6 +1,7 @@ using CalamityMod.NPCs.SlimeGod; using CalamityMod.World; using Microsoft.Xna.Framework; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -13,23 +14,21 @@ namespace CalamityMod.Items.DifficultyItems public override void SetStaticDefaults() { DisplayName.SetDefault("Revengeance"); - Tooltip.SetDefault("Activates Revengeance Mode, can only be used in expert mode.\n" + - "Activates rage. When rage is maxed press V to activate rage mode.\n" + + Tooltip.SetDefault("Enables/disables Revengeance Mode, can only be used in expert mode.\n" + + "RAGE TOOLTIP LINE HERE\n" + "You gain rage whenever you take damage or hit an enemy with a true melee weapon.\n" + - "Activates adrenaline. When adrenaline is maxed press B to activate adrenaline mode.\n" + + "ADRENALINE TOOLTIP LINE HERE\n" + "You gain adrenaline whenever a boss is alive. Getting hit drops adrenaline back to 0.\n" + - "All enemies drop 50% more cash.\n" + + "All enemies drop 50% more cash and spawn 15% more frequently\n" + + "Certain enemies and projectiles deal between 5% and 25% more damage.\n" + "Makes certain enemies immune to life steal and nerfs the effectiveness of life steal.\n" + - "Increases enemy damage by 25% and spawn rates by 15%.\n" + "Nerfs the effectiveness of the Titanium Armor set bonus.\n" + "Makes life regen scale with your current HP, the higher your HP the lower your life regen (this is not based on max HP).\n" + - "Reduces maximum asphalt run speed by 33%.\n" + - "Increases Nurse healing price.\n" + + "Asphalt run speed is reduced by 33%, and the Nurse's healing cost is increased\n" + "Allows certain enemies to inflict the Horror and Marked debuffs.\n" + "Before you have killed your first boss you take 20% less damage from everything.\n" + "Changes ALL boss AIs and some enemy AIs in vanilla and the Calamity Mod.\n" + - "DO NOT USE IF A BOSS IS ALIVE!\n" + - "Can be toggled on and off."); + "Using this while a boss is alive will instantly kill you and despawn the boss."); } public override void SetDefaults() @@ -44,25 +43,35 @@ namespace CalamityMod.Items.DifficultyItems item.consumable = false; } - public override bool CanUseItem(Player player) + public override void ModifyTooltips(List list) { - if (!Main.expertMode || CalamityWorld.bossRushActive) + string rageKey = CalamityMod.RageHotKey.TooltipHotkeyString(); + string adrenKey = CalamityMod.AdrenalineHotKey.TooltipHotkeyString(); + foreach (TooltipLine line2 in list) { - return false; + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + { + line2.text = "Activates rage. When rage is maxed press " + rageKey + " to activate rage mode."; + } + if (line2.mod == "Terraria" && line2.Name == "Tooltip3") + { + line2.text = "Activates adrenaline. When adrenaline is maxed press " + adrenKey + " to activate adrenaline mode."; + } } - return true; } + public override bool CanUseItem(Player player) => Main.expertMode && !CalamityWorld.bossRushActive; + public override bool UseItem(Player player) { for (int doom = 0; doom < Main.npc.Length; doom++) { - if ((Main.npc[doom].active && (Main.npc[doom].boss || Main.npc[doom].type == NPCID.EaterofWorldsHead || Main.npc[doom].type == NPCID.EaterofWorldsTail || Main.npc[doom].type == ModContent.NPCType() || - Main.npc[doom].type == ModContent.NPCType() || Main.npc[doom].type == ModContent.NPCType() || Main.npc[doom].type == ModContent.NPCType())) || CalamityWorld.DoGSecondStageCountdown > 0) + NPC npc = Main.npc[doom]; + if ((npc.active && (npc.boss || npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsTail || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType())) || CalamityWorld.DoGSecondStageCountdown > 0) { player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to change the rules."), 1000.0, 0, false); - Main.npc[doom].active = Main.npc[doom].friendly; - Main.npc[doom].netUpdate = true; + npc.active = npc.friendly; + npc.netUpdate = true; } } if (!CalamityWorld.revenge) From 1cabebb1026c317ff7de063c133c4f511039eb89 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 15:28:56 -0400 Subject: [PATCH 020/128] fixed victide armor set bonus tooltips --- Items/Armor/VictideHelm.cs | 2 +- Items/Armor/VictideHelmet.cs | 2 +- Items/Armor/VictideMask.cs | 2 +- Items/Armor/VictideVisage.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Armor/VictideHelm.cs b/Items/Armor/VictideHelm.cs index 7d1d7582b0..786d277b0b 100644 --- a/Items/Armor/VictideHelm.cs +++ b/Items/Armor/VictideHelm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Increased life regen and melee damage while submerged in liquid\n" + "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + - "Slightly reduces breath loss in the abyss"; + "Provides increased underwater mobility and slightly reduces breath loss in the abyss"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; diff --git a/Items/Armor/VictideHelmet.cs b/Items/Armor/VictideHelmet.cs index 8f8c1a1996..55b19a5e9c 100644 --- a/Items/Armor/VictideHelmet.cs +++ b/Items/Armor/VictideHelmet.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor "Summons a sea urchin to protect you\n" + "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + - "Slightly reduces breath loss in the abyss"; + "Provides increased underwater mobility and slightly reduces breath loss in the abyss"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; modPlayer.urchin = true; diff --git a/Items/Armor/VictideMask.cs b/Items/Armor/VictideMask.cs index 8cd1e26784..e1852913c2 100644 --- a/Items/Armor/VictideMask.cs +++ b/Items/Armor/VictideMask.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Increased life regen and magic damage while submerged in liquid\n" + "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + - "Slightly reduces breath loss in the abyss"; + "Provides increased underwater mobility and slightly reduces breath loss in the abyss"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; diff --git a/Items/Armor/VictideVisage.cs b/Items/Armor/VictideVisage.cs index 86641b1a04..98dc42a033 100644 --- a/Items/Armor/VictideVisage.cs +++ b/Items/Armor/VictideVisage.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Increased life regen and ranged damage while submerged in liquid\n" + "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + - "Slightly reduces breath loss in the abyss"; + "Provides increased underwater mobility and slightly reduces breath loss in the abyss"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; From e025231cc9b839e9c99aaa67e34aed5ebfa677b3 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 15:32:44 -0400 Subject: [PATCH 021/128] fixed breathe and brethren typos --- Items/Placeables/Furniture/EffigyOfDecay.cs | 2 +- ModSupport/WeakReferenceSupport.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Placeables/Furniture/EffigyOfDecay.cs b/Items/Placeables/Furniture/EffigyOfDecay.cs index 5f3a3c6292..2104794598 100644 --- a/Items/Placeables/Furniture/EffigyOfDecay.cs +++ b/Items/Placeables/Furniture/EffigyOfDecay.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { DisplayName.SetDefault("Effigy of Decay"); - Tooltip.SetDefault("When placed down, nearby players can breath underwater\n" + + Tooltip.SetDefault("When placed down, nearby players can breathe underwater\n" + "This effect does not work in the abyss\n" + "Nearby players are also immune to the sulphuric poisoning"); } diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index ee867273d1..42a01ddd1c 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -274,7 +274,7 @@ namespace CalamityMod List loot = new List() { ItemType(), ItemID.Gel, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemID.HealingPotion }; List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = $"Use an [i:{summon}]"; - string despawn = CalamityUtils.ColorMessage("The gelatinous monstrosity achieved vengeance for its breathren.", new Color(0xBA, 0x55, 0x33)); + string despawn = CalamityUtils.ColorMessage("The gelatinous monstrosity achieved vengeance for its brethren.", new Color(0xBA, 0x55, 0x33)); AddBoss(bossChecklist, calamity, "Slime God", order, bosses, DownedSlimeGod, summon, loot, collection, instructions, despawn); } From 790fb28d0722f34d2c5ba1e6fc9988be8e29b420 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 16:00:17 -0400 Subject: [PATCH 022/128] buffed sand shark aggression range but increased attack cooldown --- Projectiles/Summon/SandnadoMinion.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Projectiles/Summon/SandnadoMinion.cs b/Projectiles/Summon/SandnadoMinion.cs index 059388b415..0e6118b2db 100644 --- a/Projectiles/Summon/SandnadoMinion.cs +++ b/Projectiles/Summon/SandnadoMinion.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Summon } projectile.MinionAntiClump(0.1f); Vector2 vector = projectile.position; - float num10 = 1200f; + float num10 = 1800f; bool flag = false; if (Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { @@ -133,10 +133,10 @@ namespace CalamityMod.Projectiles.Summon } } } - float num16 = 1000f; + float num16 = 1200f; if (flag) { - num16 = 2500f; + num16 = 3000f; } if (Vector2.Distance(player.Center, projectile.Center) > num16) { @@ -191,8 +191,9 @@ namespace CalamityMod.Projectiles.Summon } if (num23 > 2000f) { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.width / 2); + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.width / 2); + projectile.netUpdate = true; } if (Math.Abs(vector6.X) > 40f || Math.Abs(vector6.Y) > 10f) { @@ -242,7 +243,7 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[1] += 1f; } } - if (projectile.ai[1] > 60f) + if (projectile.ai[1] > 75f) { projectile.ai[1] = 0f; projectile.netUpdate = true; From fdfebb08b227b08aa0902e3722ba11f69b1c53ec Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 16:17:52 -0400 Subject: [PATCH 023/128] added netAlways to super dummies --- Items/SuperDummy.cs | 140 +++++++++++++++---------------- NPCs/NormalNPCs/SuperDummyNPC.cs | 73 ++++++++-------- 2 files changed, 107 insertions(+), 106 deletions(-) diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index b8b41984d0..bbb6e4b678 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -5,80 +5,80 @@ using Terraria.ModLoader; namespace CalamityMod.Items { - public class SuperDummy : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Super Dummy"); - Tooltip.SetDefault("Creates a super dummy\n" + - "Regenerates 1 million life per second\n" + - "Will not die when taking damage over time from debuffs\n" + - "Right click to kill all super dummies"); - } + public class SuperDummy : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Super Dummy"); + Tooltip.SetDefault("Creates a super dummy\n" + + "Regenerates 1 million life per second\n" + + "Will not die when taking damage over time from debuffs\n" + + "Right click to kill all super dummies"); + } - public override void SetDefaults() - { - item.damage = 0; - item.width = 20; - item.height = 30; - item.useTime = 15; - item.useAnimation = 15; - item.useStyle = ItemUseStyleID.SwingThrow; - item.useTurn = true; - item.value = 0; - item.rare = 1; - item.autoReuse = true; - } + public override void SetDefaults() + { + item.damage = 0; + item.width = 20; + item.height = 30; + item.useTime = 15; + item.useAnimation = 15; + item.useStyle = ItemUseStyleID.SwingThrow; + item.useTurn = true; + item.value = 0; + item.rare = 1; + item.autoReuse = true; + } - public override bool AltFunctionUse(Player player) - { - return true; - } + public override bool AltFunctionUse(Player player) + { + return true; + } - public override bool UseItem(Player player) - { - if (player.altFunctionUse == 2) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].type == ModContent.NPCType()) - { - Main.npc[i].life = 0; - Main.npc[i].lifeRegen = 0; - Main.npc[i].checkDead(); - Main.npc[i].netUpdate = true; - } - } - } - else if (player.whoAmI == Main.myPlayer) - { - int x = (int)Main.MouseWorld.X - 9; - int y = (int)Main.MouseWorld.Y - 20; + public override bool UseItem(Player player) + { + if (player.altFunctionUse == 2) + { + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].type == ModContent.NPCType()) + { + Main.npc[i].life = 0; + Main.npc[i].lifeRegen = 0; + Main.npc[i].checkDead(); + Main.npc[i].netUpdate = true; + } + } + } + else if (player.whoAmI == Main.myPlayer) + { + int x = (int)Main.MouseWorld.X - 9; + int y = (int)Main.MouseWorld.Y - 20; - // In single player, just spawn the dummy. - if (Main.netMode == NetmodeID.SinglePlayer) - NPC.NewNPC(x, y, ModContent.NPCType()); + // In single player, just spawn the dummy. + if (Main.netMode == NetmodeID.SinglePlayer) + NPC.NewNPC(x, y, ModContent.NPCType()); - // Otherwise, send a message to the server indicating that a Super Dummy should be spawned at this position. - else - { - var netMessage = mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.SpawnSuperDummy); - netMessage.Write(x); - netMessage.Write(y); - netMessage.Send(); - } - } - return true; - } + // Otherwise, send a message to the server indicating that a Super Dummy should be spawned at this position. + else + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.SpawnSuperDummy); + netMessage.Write(x); + netMessage.Write(y); + netMessage.Send(); + } + } + return true; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.TargetDummy); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.TargetDummy); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } } diff --git a/NPCs/NormalNPCs/SuperDummyNPC.cs b/NPCs/NormalNPCs/SuperDummyNPC.cs index 7cff1f8b9b..9cae353ab2 100644 --- a/NPCs/NormalNPCs/SuperDummyNPC.cs +++ b/NPCs/NormalNPCs/SuperDummyNPC.cs @@ -3,45 +3,46 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class SuperDummyNPC : ModNPC - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Super Dummy"); - } + public class SuperDummyNPC : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Super Dummy"); + } - public override void SetDefaults() - { - npc.width = 18; - npc.height = 48; - npc.damage = 0; - npc.defense = 0; - npc.lifeMax = 9999999; - npc.HitSound = SoundID.NPCHit15; - npc.DeathSound = SoundID.NPCDeath2; - npc.value = 0f; - npc.knockBackResist = 0f; + public override void SetDefaults() + { + npc.width = 18; + npc.height = 48; + npc.damage = 0; + npc.defense = 0; + npc.lifeMax = 9999999; + npc.HitSound = SoundID.NPCHit15; + npc.DeathSound = SoundID.NPCDeath2; + npc.value = 0f; + npc.knockBackResist = 0f; npc.buffImmune[BuffID.Confused] = false; - } + npc.netAlways = true; + } - public override void UpdateLifeRegen(ref int damage) - { - npc.lifeRegen += 2000000; - } + public override void UpdateLifeRegen(ref int damage) + { + npc.lifeRegen += 2000000; + } - public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) - { - return false; - } + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + return false; + } - public override bool CheckDead() - { - if (npc.lifeRegen < 0) - { - npc.life = npc.lifeMax; - return false; - } - return true; - } - } + public override bool CheckDead() + { + if (npc.lifeRegen < 0) + { + npc.life = npc.lifeMax; + return false; + } + return true; + } + } } From 3176930f968234f5a59016f945a52aa37f3be5b0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 16:19:17 -0400 Subject: [PATCH 024/128] nerfed ele shiv --- Items/Weapons/Melee/ElementalShortsword.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/ElementalShortsword.cs b/Items/Weapons/Melee/ElementalShortsword.cs index 98bc836fdb..3f07cfcb07 100644 --- a/Items/Weapons/Melee/ElementalShortsword.cs +++ b/Items/Weapons/Melee/ElementalShortsword.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee 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); + Projectile.NewProjectile(position.X, position.Y, item.shootSpeed * player.direction, 0f, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f); return false; } From 8299c1cc80d31a20df1a48817a3a05d860f2c6bc Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 16:58:38 -0400 Subject: [PATCH 025/128] buffed entropy's vigil and attempted to reduce plaguenade lag --- Items/Weapons/Summon/BlightedEyeStaff.cs | 2 +- Projectiles/Rogue/PlaguenadeBee.cs | 295 +++++++++++------------ Projectiles/Rogue/PlaguenadeProj.cs | 12 +- Projectiles/Summon/Calamitamini.cs | 19 +- Projectiles/Summon/Cataclymini.cs | 18 +- Projectiles/Summon/Catastromini.cs | 2 +- Projectiles/Summon/PlagueBeeSmall.cs | 226 +++++++++-------- 7 files changed, 285 insertions(+), 289 deletions(-) diff --git a/Items/Weapons/Summon/BlightedEyeStaff.cs b/Items/Weapons/Summon/BlightedEyeStaff.cs index 85b17abb35..45094ef7de 100644 --- a/Items/Weapons/Summon/BlightedEyeStaff.cs +++ b/Items/Weapons/Summon/BlightedEyeStaff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 35; + item.damage = 40; item.mana = 10; item.width = 62; item.height = 62; diff --git a/Projectiles/Rogue/PlaguenadeBee.cs b/Projectiles/Rogue/PlaguenadeBee.cs index f08bcae8a1..d66813624a 100644 --- a/Projectiles/Rogue/PlaguenadeBee.cs +++ b/Projectiles/Rogue/PlaguenadeBee.cs @@ -7,161 +7,156 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { - public class PlaguenadeBee : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Plague Bee"); - Main.projFrames[projectile.type] = 4; - } + public class PlaguenadeBee : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Plague Bee"); + Main.projFrames[projectile.type] = 4; + } - public override void SetDefaults() - { - projectile.width = 10; - projectile.height = 10; - projectile.friendly = true; - projectile.penetrate = 2; - projectile.timeLeft = 420; - projectile.ignoreWater = true; - projectile.Calamity().rogue = true; - } + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.penetrate = 2; + projectile.timeLeft = 420; + projectile.ignoreWater = true; + projectile.Calamity().rogue = true; + } - public override void AI() - { - if (projectile.velocity.X > 0f) - { - projectile.spriteDirection = projectile.direction = 1; - } - else if (projectile.velocity.X < 0f) - { - projectile.spriteDirection = projectile.direction = -1; - } - projectile.rotation = projectile.velocity.X * 0.05f; - projectile.frameCounter++; - if (projectile.frameCounter >= 3) - { - projectile.frame++; - projectile.frameCounter = 0; - } - if (projectile.frame >= 3) - { - projectile.frame = 0; - } - float num373 = projectile.position.X; - float num374 = projectile.position.Y; - float num375 = 100000f; - bool flag10 = false; - projectile.ai[0] += 1f; - if (projectile.ai[0] > 30f) - { - projectile.ai[0] = 30f; - for (int num376 = 0; num376 < Main.maxNPCs; num376++) - { - if (Main.npc[num376].CanBeChasedBy(projectile, false) && (!Main.npc[num376].wet || projectile.type == 307)) - { - float num377 = Main.npc[num376].position.X + (float)(Main.npc[num376].width / 2); - float num378 = Main.npc[num376].position.Y + (float)(Main.npc[num376].height / 2); - float num379 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num377) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num378); - if (num379 < 800f && num379 < num375 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num376].position, Main.npc[num376].width, Main.npc[num376].height)) - { - num375 = num379; - num373 = num377; - num374 = num378; - flag10 = true; - } - } - } - } - if (!flag10) - { - num373 = projectile.position.X + (float)(projectile.width / 2) + projectile.velocity.X * 100f; - num374 = projectile.position.Y + (float)(projectile.height / 2) + projectile.velocity.Y * 100f; - } - float num380 = 10f; - float num381 = 0.14f; - Vector2 vector30 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num382 = num373 - vector30.X; - float num383 = num374 - vector30.Y; - float num384 = (float)Math.Sqrt((double)(num382 * num382 + num383 * num383)); - num384 = num380 / num384; - num382 *= num384; - num383 *= num384; - if (projectile.velocity.X < num382) - { - projectile.velocity.X = projectile.velocity.X + num381; - if (projectile.velocity.X < 0f && num382 > 0f) - { - projectile.velocity.X = projectile.velocity.X + num381 * 2f; - } - } - else if (projectile.velocity.X > num382) - { - projectile.velocity.X = projectile.velocity.X - num381; - if (projectile.velocity.X > 0f && num382 < 0f) - { - projectile.velocity.X = projectile.velocity.X - num381 * 2f; - } - } - if (projectile.velocity.Y < num383) - { - projectile.velocity.Y = projectile.velocity.Y + num381; - if (projectile.velocity.Y < 0f && num383 > 0f) - { - projectile.velocity.Y = projectile.velocity.Y + num381 * 2f; - } - } - else if (projectile.velocity.Y > num383) - { - projectile.velocity.Y = projectile.velocity.Y - num381; - if (projectile.velocity.Y > 0f && num383 < 0f) - { - projectile.velocity.Y = projectile.velocity.Y - num381 * 2f; - } - } - } + public override void AI() + { + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (projectile.velocity.X != oldVelocity.X) - { - projectile.velocity.X = -oldVelocity.X; - } - if (projectile.velocity.Y != oldVelocity.Y) - { - projectile.velocity.Y = -oldVelocity.Y; - } - return false; - } + projectile.frameCounter++; + if (projectile.frameCounter >= 3) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); - return false; - } + Vector2 center = projectile.Center; + float maxDistance = 800f; + bool homeIn = false; + float num373 = projectile.position.X; + float num374 = projectile.position.Y; + projectile.ai[0] += 1f; + if (projectile.ai[0] > 30f) + { + projectile.ai[0] = 20f; + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) + { + NPC npc = Main.npc[npcIndex]; + if (npc.CanBeChasedBy(projectile, false) && !npc.wet) + { + float extraDistance = (npc.width / 2) + (npc.height / 2); - public override void Kill(int timeLeft) - { - int num3; - for (int num418 = 0; num418 < 3; num418 = num3 + 1) - { - int num419 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 89, projectile.velocity.X, projectile.velocity.Y, 50, default, 1f); - Main.dust[num419].noGravity = true; - Main.dust[num419].scale = 1f; - num3 = num418; - } - } + bool canHit = true; + if (extraDistance < maxDistance) + canHit = Collision.CanHit(projectile.Center, 1, 1, npc.Center, 1, 1); - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 300); - } + if (Vector2.Distance(npc.Center, projectile.Center) < (maxDistance + extraDistance) && canHit) + { + center = npc.Center; + homeIn = true; + break; + } + } + } + } + if (!homeIn) + { + center = projectile.Center + projectile.velocity; + center *= 100f; + } + float speed = 10f; + float velocityTweak = 0.14f; + Vector2 projPos = projectile.Center; + Vector2 velocity = center - projPos; + float targetDist = velocity.Length(); + targetDist = speed / targetDist; + velocity.X *= targetDist; + velocity.Y *= targetDist; + if (projectile.velocity.X < velocity.X) + { + projectile.velocity.X += velocityTweak; + if (projectile.velocity.X < 0f && velocity.X > 0f) + { + projectile.velocity.X += velocityTweak * 2f; + } + } + else if (projectile.velocity.X > velocity.X) + { + projectile.velocity.X -= velocityTweak; + if (projectile.velocity.X > 0f && velocity.X < 0f) + { + projectile.velocity.X -= velocityTweak * 2f; + } + } + if (projectile.velocity.Y < velocity.Y) + { + projectile.velocity.Y += velocityTweak; + if (projectile.velocity.Y < 0f && velocity.Y > 0f) + { + projectile.velocity.Y += velocityTweak * 2f; + } + } + else if (projectile.velocity.Y > velocity.Y) + { + projectile.velocity.Y -= velocityTweak; + if (projectile.velocity.Y > 0f && velocity.Y < 0f) + { + projectile.velocity.Y -= velocityTweak * 2f; + } + } + } - public override void OnHitPvp(Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 300); - } - } + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int drawStart = frameHeight * projectile.frame; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i < 2; i++) + { + int plague = Dust.NewDust(projectile.position, projectile.width, projectile.height, 89, projectile.velocity.X, projectile.velocity.Y, 50, default, 1f); + Main.dust[plague].noGravity = true; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + } + } } diff --git a/Projectiles/Rogue/PlaguenadeProj.cs b/Projectiles/Rogue/PlaguenadeProj.cs index f287844bcb..b0f5a64546 100644 --- a/Projectiles/Rogue/PlaguenadeProj.cs +++ b/Projectiles/Rogue/PlaguenadeProj.cs @@ -32,14 +32,14 @@ namespace CalamityMod.Projectiles.Rogue projectile.ai[0] = 5f; if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f) { - projectile.velocity.X = projectile.velocity.X * 0.97f; - if ((double)projectile.velocity.X > -0.01 && (double)projectile.velocity.X < 0.01) + projectile.velocity.X *= 0.97f; + if (projectile.velocity.X > -0.01f && projectile.velocity.X < 0.01f) { projectile.velocity.X = 0f; projectile.netUpdate = true; } } - projectile.velocity.Y = projectile.velocity.Y + 0.2f; + projectile.velocity.Y += 0.2f; } projectile.rotation += projectile.velocity.X * 0.1f; if (projectile.velocity.Y > 16f) @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; projectile.Damage(); - for (int num621 = 0; num621 < 20; num621++) + for (int num621 = 0; num621 < 10; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default, 2f); Main.dust[num622].velocity *= 3f; @@ -102,12 +102,12 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 30; num623++) + for (int num623 = 0; num623 < 15; num623++) { int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 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, 6, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } projectile.ExplosionGores(3); diff --git a/Projectiles/Summon/Calamitamini.cs b/Projectiles/Summon/Calamitamini.cs index 7ac5313243..e4b66fa0da 100644 --- a/Projectiles/Summon/Calamitamini.cs +++ b/Projectiles/Summon/Calamitamini.cs @@ -11,6 +11,11 @@ namespace CalamityMod.Projectiles.Summon { public class Calamitamini : ModProjectile { + public const float Range = 1300f; + public const float SeparationAnxietyMin = 1500f; + public const float SeparationAnxietyMax = 3200f; + public const float SafeDist = 200f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Calamitamini"); @@ -61,10 +66,10 @@ namespace CalamityMod.Projectiles.Summon player.MinionDamage()); projectile.damage = damage2; } - float num633 = 700f; - float num634 = 1100f; - float num635 = 2400f; - float num636 = 150f; + float num633 = Range; + float num634 = SeparationAnxietyMin; + float num635 = SeparationAnxietyMax; + float num636 = SafeDist; bool flag64 = projectile.type == ModContent.ProjectileType(); player.AddBuff(ModContent.BuffType(), 3600); if (flag64) @@ -166,14 +171,14 @@ namespace CalamityMod.Projectiles.Summon float num650 = 6f; if (flag26) { - num650 = 15f; + num650 = 18f; } Vector2 center2 = projectile.Center; Vector2 vector48 = player.Center - center2 + new Vector2(0f, -60f); float num651 = vector48.Length(); - if (num651 > 200f && num650 < 8f) + if (num651 > 200f && num650 < 10f) { - num650 = 8f; + num650 = 10f; } if (num651 < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { diff --git a/Projectiles/Summon/Cataclymini.cs b/Projectiles/Summon/Cataclymini.cs index c3dfac0236..d2a9fcd293 100644 --- a/Projectiles/Summon/Cataclymini.cs +++ b/Projectiles/Summon/Cataclymini.cs @@ -61,10 +61,10 @@ namespace CalamityMod.Projectiles.Summon player.MinionDamage()); projectile.damage = damage2; } - float num633 = 700f; - float num634 = 1100f; - float num635 = 2400f; - float num636 = 150f; + float num633 = Calamitamini.Range; + float num634 = Calamitamini.SeparationAnxietyMin; + float num635 = Calamitamini.SeparationAnxietyMax; + float num636 = Calamitamini.SafeDist; bool flag64 = projectile.type == ModContent.ProjectileType(); if (flag64) { @@ -165,14 +165,14 @@ namespace CalamityMod.Projectiles.Summon float num650 = 6f; if (flag26) { - num650 = 15f; + num650 = 18f; } Vector2 center2 = projectile.Center; Vector2 vector48 = player.Center - center2 + new Vector2(0f, -60f); float num651 = vector48.Length(); - if (num651 > 200f && num650 < 8f) + if (num651 > 200f && num650 < 10f) { - num650 = 8f; + num650 = 10f; } if (num651 < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { @@ -181,8 +181,8 @@ namespace CalamityMod.Projectiles.Summon } if (num651 > 2000f) { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); projectile.netUpdate = true; } if (num651 > 70f) diff --git a/Projectiles/Summon/Catastromini.cs b/Projectiles/Summon/Catastromini.cs index 3232dff49a..c3c17ef818 100644 --- a/Projectiles/Summon/Catastromini.cs +++ b/Projectiles/Summon/Catastromini.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon projectile.frame = 0; } - projectile.ChargingMinionAI(700f, 1100f, 2400f, 150f, 0, 40f, 8f, -4f, 40f, 8f, false, true); + projectile.ChargingMinionAI(Calamitamini.Range, Calamitamini.SeparationAnxietyMin, Calamitamini.SeparationAnxietyMax, Calamitamini.SafeDist, 0, 40f, 8f, -4f, 40f, 8f, false, true); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Summon/PlagueBeeSmall.cs b/Projectiles/Summon/PlagueBeeSmall.cs index 8ae6a5c1c7..d0ee21d940 100644 --- a/Projectiles/Summon/PlagueBeeSmall.cs +++ b/Projectiles/Summon/PlagueBeeSmall.cs @@ -26,120 +26,119 @@ namespace CalamityMod.Projectiles.Summon projectile.minion = true; } - public override void AI() - { - if (projectile.velocity.X > 0f) - { - projectile.spriteDirection = projectile.direction = 1; - } - else if (projectile.velocity.X < 0f) - { - projectile.spriteDirection = projectile.direction = -1; - } - projectile.rotation = projectile.velocity.X * 0.05f; - projectile.frameCounter++; - if (projectile.frameCounter >= 3) - { - projectile.frame++; - projectile.frameCounter = 0; - } - if (projectile.frame >= 3) - { - projectile.frame = 0; - } - float num373 = projectile.position.X; - float num374 = projectile.position.Y; - float num375 = 1000f; - bool flag10 = false; - projectile.ai[0] += 1f; - if (projectile.ai[0] > 30f) - { - projectile.ai[0] = 30f; + public override void AI() + { + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + + projectile.frameCounter++; + if (projectile.frameCounter >= 3) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + + Vector2 center = projectile.Center; + float maxDistance = 800f; + bool homeIn = false; + float num373 = projectile.position.X; + float num374 = projectile.position.Y; + projectile.ai[0] += 1f; + if (projectile.ai[0] > 30f) + { + projectile.ai[0] = 20f; Player player = Main.player[projectile.owner]; if (player.HasMinionAttackTargetNPC) { NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(projectile, false) && (!npc.wet || projectile.type == 307)) + if (npc.CanBeChasedBy(projectile, false) && !npc.wet) { - float num377 = npc.position.X + (float)(npc.width / 2); - float num378 = npc.position.Y + (float)(npc.height / 2); - float num379 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num377) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num378); - if (num379 < 800f && num379 < num375 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + float extraDistance = (npc.width / 2) + (npc.height / 2); + + bool canHit = true; + if (extraDistance < maxDistance) + canHit = Collision.CanHit(projectile.Center, 1, 1, npc.Center, 1, 1); + + if (Vector2.Distance(npc.Center, projectile.Center) < (maxDistance + extraDistance) && canHit) { - num375 = num379; - num373 = num377; - num374 = num378; - flag10 = true; + center = npc.Center; + homeIn = true; } } } else { - for (int num376 = 0; num376 < Main.maxNPCs; num376++) + for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) { - if (Main.npc[num376].CanBeChasedBy(projectile, false) && (!Main.npc[num376].wet || projectile.type == 307)) + NPC npc = Main.npc[npcIndex]; + if (npc.CanBeChasedBy(projectile, false) && !npc.wet) { - float num377 = Main.npc[num376].position.X + (float)(Main.npc[num376].width / 2); - float num378 = Main.npc[num376].position.Y + (float)(Main.npc[num376].height / 2); - float num379 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num377) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num378); - if (num379 < 800f && num379 < num375 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num376].position, Main.npc[num376].width, Main.npc[num376].height)) + float extraDistance = (npc.width / 2) + (npc.height / 2); + + bool canHit = true; + if (extraDistance < maxDistance) + canHit = Collision.CanHit(projectile.Center, 1, 1, npc.Center, 1, 1); + + if (Vector2.Distance(npc.Center, projectile.Center) < (maxDistance + extraDistance) && canHit) { - num375 = num379; - num373 = num377; - num374 = num378; - flag10 = true; + center = npc.Center; + homeIn = true; + break; } } } } - } - if (!flag10) - { - num373 = projectile.position.X + (float)(projectile.width / 2) + projectile.velocity.X * 100f; - num374 = projectile.position.Y + (float)(projectile.height / 2) + projectile.velocity.Y * 100f; - } - float num380 = 10f; - float num381 = 0.14f; - Vector2 vector30 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num382 = num373 - vector30.X; - float num383 = num374 - vector30.Y; - float num384 = (float)Math.Sqrt((double)(num382 * num382 + num383 * num383)); - num384 = num380 / num384; - num382 *= num384; - num383 *= num384; - if (projectile.velocity.X < num382) - { - projectile.velocity.X = projectile.velocity.X + num381; - if (projectile.velocity.X < 0f && num382 > 0f) - { - projectile.velocity.X = projectile.velocity.X + num381 * 2f; - } - } - else if (projectile.velocity.X > num382) - { - projectile.velocity.X = projectile.velocity.X - num381; - if (projectile.velocity.X > 0f && num382 < 0f) - { - projectile.velocity.X = projectile.velocity.X - num381 * 2f; - } - } - if (projectile.velocity.Y < num383) - { - projectile.velocity.Y = projectile.velocity.Y + num381; - if (projectile.velocity.Y < 0f && num383 > 0f) - { - projectile.velocity.Y = projectile.velocity.Y + num381 * 2f; - } - } - else if (projectile.velocity.Y > num383) - { - projectile.velocity.Y = projectile.velocity.Y - num381; - if (projectile.velocity.Y > 0f && num383 < 0f) - { - projectile.velocity.Y = projectile.velocity.Y - num381 * 2f; - } - } - } + } + if (!homeIn) + { + center = projectile.Center + projectile.velocity; + center *= 100f; + } + float speed = 10f; + float velocityTweak = 0.14f; + Vector2 projPos = projectile.Center; + Vector2 velocity = center - projPos; + float targetDist = velocity.Length(); + targetDist = speed / targetDist; + velocity.X *= targetDist; + velocity.Y *= targetDist; + if (projectile.velocity.X < velocity.X) + { + projectile.velocity.X += velocityTweak; + if (projectile.velocity.X < 0f && velocity.X > 0f) + { + projectile.velocity.X += velocityTweak * 2f; + } + } + else if (projectile.velocity.X > velocity.X) + { + projectile.velocity.X -= velocityTweak; + if (projectile.velocity.X > 0f && velocity.X < 0f) + { + projectile.velocity.X -= velocityTweak * 2f; + } + } + if (projectile.velocity.Y < velocity.Y) + { + projectile.velocity.Y += velocityTweak; + if (projectile.velocity.Y < 0f && velocity.Y > 0f) + { + projectile.velocity.Y += velocityTweak * 2f; + } + } + else if (projectile.velocity.Y > velocity.Y) + { + projectile.velocity.Y -= velocityTweak; + if (projectile.velocity.Y > 0f && velocity.Y < 0f) + { + projectile.velocity.Y -= velocityTweak * 2f; + } + } + } public override bool OnTileCollide(Vector2 oldVelocity) { @@ -154,26 +153,23 @@ namespace CalamityMod.Projectiles.Summon return false; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); - return false; - } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int drawStart = frameHeight * projectile.frame; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, SpriteEffects.None, 0f); + return false; + } - public override void Kill(int timeLeft) - { - int num3; - for (int num418 = 0; num418 < 3; num418 = num3 + 1) - { - int num419 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 89, projectile.velocity.X, projectile.velocity.Y, 50, default, 1f); - Main.dust[num419].noGravity = true; - Main.dust[num419].scale = 1f; - num3 = num418; - } - } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 2; i++) + { + int plague = Dust.NewDust(projectile.position, projectile.width, projectile.height, 89, projectile.velocity.X, projectile.velocity.Y, 50, default, 1f); + Main.dust[plague].noGravity = true; + } + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { From 58c666ef2354883eddfe45158ca0c5830967dca3 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 17:35:07 -0400 Subject: [PATCH 026/128] journeyman's and master bait sold later in progression also bee tweaks --- NPCs/CalamityGlobalNPC.cs | 4 +- Projectiles/Rogue/PlaguenadeBee.cs | 11 +++-- Projectiles/Rogue/PlaguenadeProj.cs | 70 ++++++++++++++-------------- Projectiles/Summon/PlagueBeeSmall.cs | 11 +++-- 4 files changed, 50 insertions(+), 46 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5a3de6ae68..ae42d4350a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5579,10 +5579,10 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ItemID.Flare, (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); SetShopItem(ref shop, ref nextSlot, ItemID.BlueFlare, (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); SetShopItem(ref shop, ref nextSlot, ItemID.ApprenticeBait, NPC.downedBoss1); - SetShopItem(ref shop, ref nextSlot, ItemID.JourneymanBait, NPC.downedBoss2); + SetShopItem(ref shop, ref nextSlot, ItemID.JourneymanBait, NPC.downedBoss3); SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Vilethorn : ItemID.CrimsonRod, WorldGen.shadowOrbSmashed || NPC.downedBoss2); SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.BallOHurt : ItemID.TheRottedFork, WorldGen.shadowOrbSmashed || NPC.downedBoss2); - SetShopItem(ref shop, ref nextSlot, ItemID.MasterBait, NPC.downedBoss3); + SetShopItem(ref shop, ref nextSlot, ItemID.MasterBait, NPC.downedPlantBoss); SetShopItem(ref shop, ref nextSlot, ItemID.AngelStatue, NPC.FindFirstNPC(NPCType()) != -1, Item.buyPrice(0, 5)); SetShopItem(ref shop, ref nextSlot, ItemID.UltrabrightTorch, CalamityWorld.death); } diff --git a/Projectiles/Rogue/PlaguenadeBee.cs b/Projectiles/Rogue/PlaguenadeBee.cs index d66813624a..f8bb2c9086 100644 --- a/Projectiles/Rogue/PlaguenadeBee.cs +++ b/Projectiles/Rogue/PlaguenadeBee.cs @@ -28,8 +28,12 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { + if (projectile.owner != Main.myPlayer) + projectile.Kill(); + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + projectile.rotation += projectile.spriteDirection * MathHelper.ToRadians(45f); projectile.frameCounter++; if (projectile.frameCounter >= 3) @@ -45,12 +49,9 @@ namespace CalamityMod.Projectiles.Rogue Vector2 center = projectile.Center; float maxDistance = 800f; bool homeIn = false; - float num373 = projectile.position.X; - float num374 = projectile.position.Y; projectile.ai[0] += 1f; if (projectile.ai[0] > 30f) { - projectile.ai[0] = 20f; for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++) { NPC npc = Main.npc[npcIndex]; @@ -73,8 +74,8 @@ namespace CalamityMod.Projectiles.Rogue } if (!homeIn) { - center = projectile.Center + projectile.velocity; - center *= 100f; + center.X = projectile.Center.X + projectile.velocity.X * 100f; + center.Y = projectile.Center.Y + projectile.velocity.Y * 100f; } float speed = 10f; float velocityTweak = 0.14f; diff --git a/Projectiles/Rogue/PlaguenadeProj.cs b/Projectiles/Rogue/PlaguenadeProj.cs index b0f5a64546..99e82b2e9e 100644 --- a/Projectiles/Rogue/PlaguenadeProj.cs +++ b/Projectiles/Rogue/PlaguenadeProj.cs @@ -72,45 +72,47 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.owner == Main.myPlayer) { - for (int num639 = 0; num639 < (projectile.Calamity().stealthStrike ? 28 : 20); num639++) + Player player = Main.player[projectile.owner]; + int projAmt = projectile.Calamity().stealthStrike ? 28 : 20; + for (int projIndex = 0; projIndex < projAmt; projIndex++) { float speedX = (float)Main.rand.Next(-35, 36) * 0.02f; float speedY = (float)Main.rand.Next(-35, 36) * 0.02f; - Projectile.NewProjectile(projectile.position.X, projectile.position.Y, speedX, speedY, ModContent.ProjectileType(), Main.player[projectile.owner].beeDamage(projectile.damage), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(projectile.position.X, projectile.position.Y, speedX, speedY, ModContent.ProjectileType(), player.beeDamage(projectile.damage), player.beeKB(0f), projectile.owner, 0f, 0f); } + Main.PlaySound(SoundID.Item14, projectile.position); + if (projectile.Calamity().stealthStrike) + { + projectile.position = projectile.Center; + projectile.width = projectile.height = 75; + } + 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(); + for (int i = 0; i < 10; i++) + { + int smoke = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default, 2f); + Main.dust[smoke].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[smoke].scale = 0.5f; + Main.dust[smoke].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int j = 0; j < 15; j++) + { + int plague = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 3f); + Main.dust[plague].noGravity = true; + Main.dust[plague].velocity *= 5f; + int fire = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + Main.dust[fire].velocity *= 2f; + } + projectile.ExplosionGores(3); } - Main.PlaySound(SoundID.Item14, projectile.position); - if (projectile.Calamity().stealthStrike) - { - projectile.position = projectile.Center; - projectile.width = projectile.height = 75; - } - 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(); - for (int num621 = 0; num621 < 10; num621++) - { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 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, 89, 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, DustID.Fire, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; - } - projectile.ExplosionGores(3); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Summon/PlagueBeeSmall.cs b/Projectiles/Summon/PlagueBeeSmall.cs index d0ee21d940..cdb67f0ac5 100644 --- a/Projectiles/Summon/PlagueBeeSmall.cs +++ b/Projectiles/Summon/PlagueBeeSmall.cs @@ -28,8 +28,12 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { + if (projectile.owner != Main.myPlayer) + projectile.Kill(); + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + projectile.rotation += projectile.spriteDirection * MathHelper.ToRadians(45f); projectile.frameCounter++; if (projectile.frameCounter >= 3) @@ -45,12 +49,9 @@ namespace CalamityMod.Projectiles.Summon Vector2 center = projectile.Center; float maxDistance = 800f; bool homeIn = false; - float num373 = projectile.position.X; - float num374 = projectile.position.Y; projectile.ai[0] += 1f; if (projectile.ai[0] > 30f) { - projectile.ai[0] = 20f; Player player = Main.player[projectile.owner]; if (player.HasMinionAttackTargetNPC) { @@ -95,8 +96,8 @@ namespace CalamityMod.Projectiles.Summon } if (!homeIn) { - center = projectile.Center + projectile.velocity; - center *= 100f; + center.X = projectile.Center.X + projectile.velocity.X * 100f; + center.Y = projectile.Center.Y + projectile.velocity.Y * 100f; } float speed = 10f; float velocityTweak = 0.14f; From 4387665c6bac0cd9a4d53217555f014172fafca2 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 17:46:23 -0400 Subject: [PATCH 027/128] tried to fix plaguenade bee orientation (also timeleft nerf) --- Projectiles/Rogue/PlaguenadeBee.cs | 7 +++++-- Projectiles/Summon/PlagueBeeSmall.cs | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Projectiles/Rogue/PlaguenadeBee.cs b/Projectiles/Rogue/PlaguenadeBee.cs index f8bb2c9086..49d5978846 100644 --- a/Projectiles/Rogue/PlaguenadeBee.cs +++ b/Projectiles/Rogue/PlaguenadeBee.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.height = 10; projectile.friendly = true; projectile.penetrate = 2; - projectile.timeLeft = 420; + projectile.timeLeft = 240; projectile.ignoreWater = true; projectile.Calamity().rogue = true; } @@ -137,7 +137,10 @@ namespace CalamityMod.Projectiles.Rogue Texture2D texture = Main.projectileTexture[projectile.type]; int frameHeight = texture.Height / Main.projFrames[projectile.type]; int drawStart = frameHeight * projectile.frame; - Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, SpriteEffects.None, 0f); + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, spriteEffects, 0f); return false; } diff --git a/Projectiles/Summon/PlagueBeeSmall.cs b/Projectiles/Summon/PlagueBeeSmall.cs index cdb67f0ac5..498bfc334a 100644 --- a/Projectiles/Summon/PlagueBeeSmall.cs +++ b/Projectiles/Summon/PlagueBeeSmall.cs @@ -159,7 +159,10 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = Main.projectileTexture[projectile.type]; int frameHeight = texture.Height / Main.projFrames[projectile.type]; int drawStart = frameHeight * projectile.frame; - Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, SpriteEffects.None, 0f); + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), projectile.scale, spriteEffects, 0f); return false; } From a295ec2bd25104675d1d972c45df8e508a1a028b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 19:42:11 -0400 Subject: [PATCH 028/128] fixed dragon scale tooltip issues --- Items/Accessories/DragonScales.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Accessories/DragonScales.cs b/Items/Accessories/DragonScales.cs index 234dc0c6ca..7fa2875f7d 100644 --- a/Items/Accessories/DragonScales.cs +++ b/Items/Accessories/DragonScales.cs @@ -9,10 +9,10 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Dragon Scales"); - Tooltip.SetDefault("Causes all rogue projectiles to emit a slow fireball as it travels\n" + + Tooltip.SetDefault("Only a living dragon holds true treasure\n" + + "Rogue projectiles create slow fireballs as they travel\n" + "Stealth strikes create infernados on death\n" + - "After Yharon is dead, you are granted 10% movement speed and acceleration\n" + - "'Only a living dragon holds true treasure'"); + "After Yharon is dead, you gain 10% movement speed and acceleration"); } public override void SetDefaults() From f93489c5b711ff011705af2bea2450f77f10e209 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 26 Jun 2020 20:55:18 -0400 Subject: [PATCH 029/128] final dawn typo fix --- Items/Weapons/Rogue/FinalDawn.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/FinalDawn.cs b/Items/Weapons/Rogue/FinalDawn.cs index 1b05b1c4e2..15c1c17a54 100644 --- a/Items/Weapons/Rogue/FinalDawn.cs +++ b/Items/Weapons/Rogue/FinalDawn.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue Tooltip.SetDefault("We shall ride into the sunrise once more\n" + "Attack enemies with a giant scythe swing to replenish stealth\n" + "Press up and attack to throw the scythe \n" + - "Stealth strikes perform a vertical swing that leaves a lingering fire aura\n" + + "Stealth strikes perform a horizontal swing that leaves a lingering fire aura\n" + "Stealth strikes performed while pressing up fling yourself at the enemy and slice through them, causing homing fireballs to emerge"); } public override void SafeSetDefaults() From 7ddbcdf4e3cb438378fd9139dd638d0b0886967e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 10:29:48 -0400 Subject: [PATCH 030/128] Jelly changes reverted grand gelatin changes nerfed vital jelly jump boost buffed vital jelly movement speed Adjusted some jelly drop chances green jellyfish now overrides loot in PHM to prevent crossmod shenanigans --- Items/Accessories/GrandGelatin.cs | 10 ++++------ Items/Accessories/VitalJelly.cs | 12 ++++++------ NPCs/Abyss/MirageJelly.cs | 2 +- NPCs/CalamityGlobalNPCLoot.cs | 13 ++++++++++++- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Items/Accessories/GrandGelatin.cs b/Items/Accessories/GrandGelatin.cs index 77f06d49c9..9fcc958425 100644 --- a/Items/Accessories/GrandGelatin.cs +++ b/Items/Accessories/GrandGelatin.cs @@ -1,4 +1,3 @@ -using CalamityMod.Items.Materials; using System; using Terraria; using Terraria.ID; @@ -13,7 +12,7 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Grand Gelatin"); Tooltip.SetDefault("10% increased movement speed\n" + "200% increased jump speed\n" + - "+40 max life and mana\n" + + "+20 max life and mana\n" + "Standing still boosts life and mana regen"); } @@ -29,9 +28,9 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed += 0.1f; - player.jumpSpeedBoost += player.autoJump ? 0.5f : 2.0f; - player.statLifeMax2 += 40; - player.statManaMax2 += 40; + player.jumpSpeedBoost += player.autoJump ? 0.5f : 2f; + player.statLifeMax2 += 20; + player.statManaMax2 += 20; if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0) { player.lifeRegen += 2; @@ -45,7 +44,6 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Accessories/VitalJelly.cs b/Items/Accessories/VitalJelly.cs index 5b3b9986f8..e08c36085e 100644 --- a/Items/Accessories/VitalJelly.cs +++ b/Items/Accessories/VitalJelly.cs @@ -8,23 +8,23 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Vital Jelly"); - Tooltip.SetDefault("10% increased movement speed\n" + - "200% increased jump speed"); + Tooltip.SetDefault("20% increased movement speed\n" + + "120% increased jump speed"); } public override void SetDefaults() { item.width = 20; item.height = 24; - item.value = CalamityGlobalItem.Rarity4BuyPrice; - item.rare = 4; + item.value = CalamityGlobalItem.Rarity3BuyPrice; + item.rare = 3; item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) { - player.moveSpeed += 0.1f; - player.jumpSpeedBoost += player.autoJump ? 0.5f : 2.0f; + player.moveSpeed += 0.2f; + player.jumpSpeedBoost += player.autoJump ? 0.3f : 1.2f; } } } diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index 7e7c93dab3..656cd69964 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -213,7 +213,7 @@ namespace CalamityMod.NPCs.Abyss DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 2, 5, 7); DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 5 : 7); DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 5 : 7); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, Main.expertMode ? 5 : 7, 1, 1); + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 5 : 7); float necklaceDropRate = CalamityWorld.defiled ? DropHelper.DefiledDropRateFloat : 0.01f; DropHelper.DropItemChance(npc, ItemID.JellyfishNecklace, necklaceDropRate); } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 741b64d5c7..591692c241 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -380,6 +380,17 @@ namespace CalamityMod.NPCs } } } + //Since Calamity makes it spawn in pre-hardmode, don't want to cause other mods to freak out if they use it as a tier gate (like a new weapon or something) + else if (npc.type == NPCID.GreenJellyfish && !Main.hardMode) + { + DropHelper.DropItem(npc, ItemID.Glowstick, 1, 4); + DropHelper.DropItemChance(npc, ItemID.JellyfishNecklace, 0.1f); + DropHelper.DropItemChance(npc, ItemID.Megaphone, Main.expertMode ? 0.2f : 0.1f); + DropHelper.DropItemCondition(npc, ItemID.JellyfishNecklace, CalamityWorld.defiled, DropHelper.DefiledDropRateFloat); + DropHelper.DropItemCondition(npc, ItemID.Megaphone, CalamityWorld.defiled, DropHelper.DefiledDropRateFloat); + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 5 : 7); + return false; + } return true; } @@ -1428,7 +1439,7 @@ namespace CalamityMod.NPCs break; case NPCID.PinkJellyfish: - DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 5 : 7); + DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 20 : 25); break; case NPCID.BlueJellyfish: From ac7e539313e8ee66c1252f4be83b0c5c4628b2bc Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 12:16:44 -0400 Subject: [PATCH 031/128] rusty beacon ufo tooltip fix --- Items/Weapons/Summon/RustyBeaconPrototype.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs index 95760c4e02..86a81dc44f 100644 --- a/Items/Weapons/Summon/RustyBeaconPrototype.cs +++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Summon DisplayName.SetDefault("Rusty Beacon Prototype"); Tooltip.SetDefault("Summons a long-abandoned drone to support you\n" + "Clicking on an enemy gives them a tiny prick, causing them to become aggravated\n" + - "The drone hovers above nearby enemies and gives them various debuffs"); + "The drone hovers above nearby enemies and inflicts irradiated"); } public override void SetDefaults() From 3f4edbe006e0c00a3a161ed1d640c0980843101a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 13:49:37 -0400 Subject: [PATCH 032/128] gamma slimes now affected by royal gel --- CalPlayer/CalamityPlayerMiscEffects.cs | 1 + NPCs/AcidRain/GammaSlime.cs | 4 ++-- NPCs/NormalNPCs/PlaguedJungleSlime.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 781f146852..bbcbc9cfcc 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3349,6 +3349,7 @@ namespace CalamityMod.CalPlayer player.npcTypeNoAggro[ModContent.NPCType()] = true; player.npcTypeNoAggro[ModContent.NPCType()] = true; player.npcTypeNoAggro[ModContent.NPCType()] = true; + player.npcTypeNoAggro[ModContent.NPCType()] = true; // LATER -- When Wulfrum Slimes start being definitely robots, remove this immunity. player.npcTypeNoAggro[ModContent.NPCType()] = true; } diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index b54bf77436..f5c6b234e3 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.AcidRain Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.6f, 0.8f, 0.6f); npc.TargetClosest(false); Player player = Main.player[npc.target]; - if (npc.velocity.Y == 0f && npc.ai[3] <= 0f) + if (npc.velocity.Y == 0f && npc.ai[3] <= 0f && !player.npcTypeNoAggro[npc.type]) { npc.velocity.X *= 0.8f; if (npc.ai[0]++ >= 30f) @@ -164,7 +164,7 @@ namespace CalamityMod.NPCs.AcidRain if (Math.Abs(player.Center.X - npc.Center.X) < 250f && player.Center.X - npc.Center.X < 0f && npc.ai[3] == 0f && - Main.rand.NextBool(110)) + Main.rand.NextBool(110) && !player.npcTypeNoAggro[npc.type]) { npc.ai[3] = 600f; npc.netUpdate = true; diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index 916954369d..22513e92ce 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.NormalNPCs { spikeTimer -= 1f; } - if (!npc.wet && !Main.player[npc.target].Calamity().royalGel) + if (!npc.wet && !Main.player[npc.target].npcTypeNoAggro[npc.type]) { Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num14 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector3.X; From 7b28ba5bed5f058d541865f4f8b35c7dc0936bef Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 18:23:18 -0400 Subject: [PATCH 033/128] strengthened summoner nerf multiclass my ass --- CalPlayer/CalamityPlayer.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 143ace8cee..22ec8860bc 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5471,8 +5471,11 @@ namespace CalamityMod.CalPlayer // Forbidden armor makes you immune when holding the respective helmet's preferred weapon type // Profaned Soul Crystal encourages use of other weapons, nerfing the damage would not make sense. bool forbidden = player.head == ArmorIDs.Head.AncientBattleArmor && player.body == ArmorIDs.Body.AncientBattleArmor && player.legs == ArmorIDs.Legs.AncientBattleArmor; - if (isSummon && !fearmongerSet && !profanedCrystalBuffs && - (!forbidden || !heldItem.magic) && (!forbiddenCirclet || !heldItem.Calamity().rogue)) + bool reducedNerf = fearmongerSet || (forbidden && heldItem.magic) || (forbiddenCirclet && heldItem.Calamity().rogue); + double summonNerfMult = 0.5; + if (reducedNerf) + summonNerfMult = 0.75; + if (isSummon && !profanedCrystalBuffs) { if (heldItem.type > ItemID.None) { @@ -5480,7 +5483,7 @@ namespace CalamityMod.CalPlayer (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0) { - damage = (int)(damage * 0.75); + damage = (int)(damage * summonNerfMult); } } } From 38ee5673b4fc9a6b8de8858c68aa11f88e7f9d02 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 18:33:25 -0400 Subject: [PATCH 034/128] minor thing --- CalPlayer/CalamityPlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 22ec8860bc..03a5ea749a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5142,7 +5142,7 @@ namespace CalamityMod.CalPlayer num13 *= num16; num14 *= num16; int num17 = Projectile.NewProjectile(x, y, num13, num14, projectileType, 120, 5f, player.whoAmI, 0f, 0f); - Main.projectile[num17].ranged = false; + Main.projectile[num17].Calamity().forceTypeless = true; } } if (bloodflareMelee && item.melee) @@ -5580,7 +5580,7 @@ namespace CalamityMod.CalPlayer } else { - projectileType = ProjectileID.FallingStar; + projectileType = ModContent.ProjectileType(); } float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14)); num16 = num15 / num16; From a30c05d15b0d524b2c3ae7f359c14a6b296b412b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 18:35:34 -0400 Subject: [PATCH 035/128] astral armor now uses Utils.SelectRandom --- CalPlayer/CalamityPlayer.cs | 46 +++++++++++++------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 03a5ea749a..57ccd6fbdd 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5123,22 +5123,15 @@ namespace CalamityMod.CalPlayer float num13 = target.position.X + (float)(target.width / 2) - vector.X; float num14 = target.position.Y + (float)(target.height / 2) - vector.Y; num13 += (float)Main.rand.Next(-100, 101); - float num15 = 25f; - int projectileType = Main.rand.Next(3); - if (projectileType == 0) - { - projectileType = ModContent.ProjectileType(); - } - else if (projectileType == 1) - { - projectileType = ProjectileID.HallowStar; - } - else - { - projectileType = ModContent.ProjectileType(); - } + float speed = 25f; + int projectileType = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.ProjectileType(), + ProjectileID.HallowStar, + ModContent.ProjectileType() + }); float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14)); - num16 = num15 / num16; + num16 = speed / num16; num13 *= num16; num14 *= num16; int num17 = Projectile.NewProjectile(x, y, num13, num14, projectileType, 120, 5f, player.whoAmI, 0f, 0f); @@ -5568,22 +5561,15 @@ namespace CalamityMod.CalPlayer float num13 = target.position.X + (float)(target.width / 2) - vector.X; float num14 = target.position.Y + (float)(target.height / 2) - vector.Y; num13 += (float)Main.rand.Next(-100, 101); - float num15 = 25f; - int projectileType = Main.rand.Next(3); - if (projectileType == 0) - { - projectileType = ModContent.ProjectileType(); - } - else if (projectileType == 1) - { - projectileType = ProjectileID.HallowStar; - } - else - { - projectileType = ModContent.ProjectileType(); - } + float speed = 25f; + int projectileType = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.ProjectileType(), + ProjectileID.HallowStar, + ModContent.ProjectileType() + }); float num16 = (float)Math.Sqrt((double)(num13 * num13 + num14 * num14)); - num16 = num15 / num16; + num16 = speed / num16; num13 *= num16; num14 *= num16; int num17 = Projectile.NewProjectile(x, y, num13, num14, projectileType, 120, 5f, player.whoAmI, 0f, 0f); From fa58d0756ba05a8e08f9dbb4da15cf39aaceb84f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 18:40:07 -0400 Subject: [PATCH 036/128] truffle spore id --- CalPlayer/CalamityPlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 57ccd6fbdd..249124b31e 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7651,8 +7651,8 @@ namespace CalamityMod.CalPlayer float xPos = Main.rand.NextBool(2) ? player.Center.X + 100 : player.Center.X - 100; Vector2 vector2 = new Vector2(xPos, player.Center.Y + Main.rand.Next(-100, 101)); offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - int spore1 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), 590, fDamage, 1.25f, player.whoAmI, 0f, 0f); - int spore2 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), 590, fDamage, 1.25f, player.whoAmI, 0f, 0f); + int spore1 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ProjectileID.TruffleSpore, fDamage, 1.25f, player.whoAmI, 0f, 0f); + int spore2 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ProjectileID.TruffleSpore, fDamage, 1.25f, player.whoAmI, 0f, 0f); Main.projectile[spore1].timeLeft = 120; Main.projectile[spore2].timeLeft = 120; } From 84a142b7ef3e60a554d160ddc65ce9255268f4c4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 27 Jun 2020 21:54:25 -0400 Subject: [PATCH 037/128] iban robot disables grand design --- Items/CalamityGlobalItem.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 1305a422e1..c4217cec30 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -880,6 +880,8 @@ namespace CalamityMod.Items if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) { + if (item.type == ItemID.WireKite) + return false; if (item.pick > 0 && item.axe > 0 && item.hammer > 0) return false; if (item.Calamity().rogue || item.magic || item.ranged || item.melee) From ecd8980c95fa605cc86f31ae90a2116a1cfa6df9 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 27 Jun 2020 23:01:19 -0500 Subject: [PATCH 038/128] Invisibility/Cal Dye fix --- CalPlayer/CalamityPlayer.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 249124b31e..ea234d03a9 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -9479,6 +9479,22 @@ namespace CalamityMod.CalPlayer } } }); + public static readonly PlayerLayer DyeInvisibilityFix = new PlayerLayer("CalamityMod", "DyeInvisibilityFix", PlayerLayer.Arms, (PlayerDrawInfo drawInfo) => + { + Player drawPlayer = drawInfo.drawPlayer; + CalamityPlayer modPlayer = drawPlayer.Calamity(); + if (!drawPlayer.invis || + drawPlayer.itemAnimation > 0) + { + return; + } + for (int i = 0; i < Main.playerDrawData.Count; i++) + { + var copy = Main.playerDrawData[i]; + copy.shader = 0; // There's no other easy solution here to my knowledge since DrawData is a value type. + Main.playerDrawData[i] = copy; + } + }); public override void ModifyDrawInfo(ref PlayerDrawInfo drawInfo) { if (drawInfo.shadow != 0f) @@ -9848,6 +9864,7 @@ namespace CalamityMod.CalPlayer list.Add(ColdDivinityOverlay); list.Add(StratusSphereDrawing); list.Add(IbanDevRobot); + list.Add(DyeInvisibilityFix); } public PlayerLayer clAfterAll = new PlayerLayer("Calamity", "clAfterAll", PlayerLayer.MiscEffectsFront, delegate (PlayerDrawInfo drawInfo) From 869a1040e1ae304b4f42686ba29430491f23717b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 09:51:37 -0400 Subject: [PATCH 039/128] removed cryogen shadowflame immunity --- NPCs/Cryogen/Cryogen.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index f717acd207..6ce5843b65 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -68,6 +68,7 @@ namespace CalamityMod.NPCs.Cryogen npc.buffImmune[BuffID.DryadsWardDebuff] = false; npc.buffImmune[BuffID.Oiled] = false; npc.buffImmune[BuffID.BoneJavelin] = false; + npc.buffImmune[BuffID.ShadowFlame] = false; npc.buffImmune[ModContent.BuffType()] = false; npc.buffImmune[ModContent.BuffType()] = false; npc.buffImmune[ModContent.BuffType()] = false; From 4c11c79b60e80b50e351e175ef6ce9efbb60c05a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 13:05:23 -0400 Subject: [PATCH 040/128] pwnagehammer rework --- Items/Weapons/Melee/PwnagehammerMelee.cs | 26 +- Items/Weapons/Rogue/Pwnagehammer.cs | 23 +- NPCs/SupremeCalamitas/SCalWormHeart.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 4 + Projectiles/Hybrid/PwnagehammerProj.cs | 232 +++++++++++++++--- .../Hybrid/PwnagehammerProjStealthStrike.cs | 143 +++++++++++ .../Hybrid/PwnagehammerProjStealthStrike.png | Bin 0 -> 748 bytes Sounds/Item/PwnagehammerHoming.cs | 18 ++ Sounds/Item/PwnagehammerHoming.ogg | Bin 0 -> 36573 bytes Sounds/Item/PwnagehammerSound.cs | 18 ++ Sounds/Item/PwnagehammerSound.ogg | Bin 0 -> 23896 bytes 11 files changed, 422 insertions(+), 44 deletions(-) create mode 100644 Projectiles/Hybrid/PwnagehammerProjStealthStrike.cs create mode 100644 Projectiles/Hybrid/PwnagehammerProjStealthStrike.png create mode 100644 Sounds/Item/PwnagehammerHoming.cs create mode 100644 Sounds/Item/PwnagehammerHoming.ogg create mode 100644 Sounds/Item/PwnagehammerSound.cs create mode 100644 Sounds/Item/PwnagehammerSound.ogg diff --git a/Items/Weapons/Melee/PwnagehammerMelee.cs b/Items/Weapons/Melee/PwnagehammerMelee.cs index 357ec3a8dc..5029aa0aab 100644 --- a/Items/Weapons/Melee/PwnagehammerMelee.cs +++ b/Items/Weapons/Melee/PwnagehammerMelee.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Hybrid; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,19 +11,22 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Pwnagehammer"); - Tooltip.SetDefault("Throws an extremely fast hammer"); + Tooltip.SetDefault("Throws a heavy, gravity-affected hammer that creates a loud blast of hallowed energy when it hits something\n" + + "There is a 20 percent chance for the hammer to home in on a target\n" + + "Homing hammers summon an additional spectral hammer on hit and are guaranteed to land a critical hit"); } public override void SetDefaults() { item.width = 68; - item.damage = 90; + item.damage = 210; + item.crit = 10; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; - item.useAnimation = 15; + item.useAnimation = item.useTime = 31; + item.reuseDelay = 17; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = 15; item.knockBack = 10f; item.UseSound = SoundID.Item1; item.melee = true; @@ -30,7 +34,19 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(0, 48, 0, 0); item.rare = 6; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 12f; + item.shootSpeed = 24.4f; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Vector2 speed = new Vector2(speedX, speedY); + Vector2 yeetOffset = Vector2.Normalize(speed) * 40f; + if (Collision.CanHit(position, 0, 0, position + yeetOffset, 0, 0)) + { + position += yeetOffset; + } + Projectile.NewProjectile(position, speed, type, damage, knockBack, player.whoAmI, Main.rand.NextBool(5) ? 1f : 0f); + return false; } public override void AddRecipes() diff --git a/Items/Weapons/Rogue/Pwnagehammer.cs b/Items/Weapons/Rogue/Pwnagehammer.cs index c3a55d46f6..835be23e6f 100644 --- a/Items/Weapons/Rogue/Pwnagehammer.cs +++ b/Items/Weapons/Rogue/Pwnagehammer.cs @@ -11,32 +11,41 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Pwnagehammer"); - Tooltip.SetDefault("Throws an extremely fast hammer"); + Tooltip.SetDefault("Throws a heavy, gravity-affected hammer that creates a loud blast of hallowed energy when it hits something\n" + + "There is a 20 percent chance for the hammer to home in on a target\n" + + "Homing hammers summon an additional spectral hammer on hit and are guaranteed to land a critical hit"); } public override void SafeSetDefaults() { item.width = 68; - item.damage = 90; + item.damage = 210; + item.crit = 10; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; - item.useAnimation = 15; + item.useAnimation = item.useTime = 31; + item.reuseDelay = 17; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = 15; item.knockBack = 10f; item.UseSound = SoundID.Item1; + item.Calamity().rogue = true; item.height = 68; item.value = Item.buyPrice(0, 48, 0, 0); item.rare = 6; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 12f; - item.Calamity().rogue = true; + item.shootSpeed = 24.4f; } 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 proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); + Vector2 speed = new Vector2(speedX, speedY); + Vector2 yeetOffset = Vector2.Normalize(speed) * 40f; + if (Collision.CanHit(position, 0, 0, position + yeetOffset, 0, 0)) + { + position += yeetOffset; + } + int proj = Projectile.NewProjectile(position, speed, type, damage, knockBack, player.whoAmI, Main.rand.NextBool(5) ? 1f : 0f); Main.projectile[proj].Calamity().forceRogue = true; Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; diff --git a/NPCs/SupremeCalamitas/SCalWormHeart.cs b/NPCs/SupremeCalamitas/SCalWormHeart.cs index f75e9ef0b0..f9f859796a 100644 --- a/NPCs/SupremeCalamitas/SCalWormHeart.cs +++ b/NPCs/SupremeCalamitas/SCalWormHeart.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { if (projectile.type == ModContent.ProjectileType()) { - damage = (int)((double)damage * 0.66); + damage = (int)(damage * 0.66); } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 05c12f1227..5cf2057341 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1067,6 +1067,10 @@ namespace CalamityMod.Projectiles crit = Main.rand.NextBool(6); } + //Needs to be done in here. If done in the projectile file, it's overridden by the thing above + if (projectile.type == ProjectileType() && projectile.ai[0] == 1f) + crit = true; + if (rogue && stealthStrike && modPlayer.stealthStrikeAlwaysCrits) crit = true; } diff --git a/Projectiles/Hybrid/PwnagehammerProj.cs b/Projectiles/Hybrid/PwnagehammerProj.cs index 4f9bf797e2..ffe1be0e76 100644 --- a/Projectiles/Hybrid/PwnagehammerProj.cs +++ b/Projectiles/Hybrid/PwnagehammerProj.cs @@ -1,41 +1,211 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Hybrid { - public class PwnagehammerProj : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Hammer"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } + public class PwnagehammerProj : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hammer"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } - public override void SetDefaults() - { - projectile.width = 30; - projectile.height = 30; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.aiStyle = 3; - projectile.timeLeft = 120; - projectile.extraUpdates = 3; - aiType = ProjectileID.PaladinsHammerFriendly; - projectile.melee = true; - } + public override void SetDefaults() + { + projectile.width = projectile.height = 40; + projectile.friendly = true; + projectile.timeLeft = 3600; + projectile.melee = true; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + } - public override void AI() - { - projectile.velocity.X *= 1.06f; - projectile.velocity.Y *= 1.06f; - } + public override void AI() + { + projectile.direction = projectile.spriteDirection = (projectile.velocity.X > 0f) ? 1 : -1; + projectile.rotation += MathHelper.ToRadians(22.5f) * projectile.direction; - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); - return false; - } - } + if (projectile.ai[0] == 1f) + { + float distance = 400f; + if (projectile.ai[1] == -1) + { + // used for finding a target + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC npc = Main.npc[i]; + if (npc.CanBeChasedBy(projectile, false)) + { + Vector2 vec = npc.Center - projectile.Center; + float distanceTo = vec.Length(); + distanceTo -= (float)Math.Sqrt(npc.width * npc.width + npc.height * npc.height) * 0.75f; + if (distanceTo < distance && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + { + projectile.ai[1] = i; + } + } + } + } + else + { + int index = (int)projectile.ai[1]; + float speed = 34f; + float inertia = 15f; + + if (!Main.npc[index].CanBeChasedBy(projectile, false)) + projectile.ai[1] = -1; + + Vector2 direction = Main.npc[index].Center - projectile.Center; + direction.Normalize(); + direction *= speed; + projectile.velocity = (projectile.velocity * (inertia - 1) + direction) / inertia; + } + } + else + { + projectile.velocity.X *= 0.9711f; + projectile.velocity.Y += 0.426f; + } + + if (Main.rand.NextBool(2)) + { + Vector2 offset = new Vector2(12, 0).RotatedByRandom(MathHelper.ToRadians(360f)); + Vector2 velOffset = new Vector2(4, 0).RotatedBy(offset.ToRotation()); + Dust dust = Dust.NewDustPerfect(new Vector2(projectile.Center.X, projectile.Center.Y) + offset, DustID.GoldFlame, new Vector2((projectile.velocity.X * 0.2f) + velOffset.X, (projectile.velocity.Y * 0.2f) + velOffset.Y), 100, new Color(255, 245, 198), 2f); + dust.noGravity = true; + } + + if (Main.rand.NextBool(6)) + { + Vector2 offset = new Vector2(12, 0).RotatedByRandom(MathHelper.ToRadians(360f)); + Vector2 velOffset = new Vector2(4, 0).RotatedBy(offset.ToRotation()); + Dust dust = Dust.NewDustPerfect(new Vector2(projectile.Center.X, projectile.Center.Y) + offset, DustID.GoldFlame, new Vector2((projectile.velocity.X * 0.2f) + velOffset.X, (projectile.velocity.Y * 0.2f) + velOffset.Y), 100, new Color(255, 245, 198), 2f); + dust.noGravity = true; + } + } + + public override void Kill(int timeLeft) + { + Player player = Main.player[projectile.owner]; + if (projectile.ai[0] == 1f) + { + float numberOfDusts = 40f; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(15f, 0).RotatedBy(rot); + Vector2 velOffset = new Vector2(10f, 0).RotatedBy(rot); + Dust dust = Dust.NewDustPerfect(projectile.position + offset, 269, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset; + dust.scale = 2.5f; + if ((i % 2) == 0) + { + dust = Dust.NewDustPerfect(projectile.position + offset, 269, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset * 2f; + dust.scale = 2.5f; + } + if ((i % 4) == 0) + { + dust = Dust.NewDustPerfect(projectile.position + offset, 269, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset / 2f; + dust.scale = 2.5f; + } + } + + float distance = 240f; + + for (int k = 0; k < Main.maxNPCs; k++) + { + NPC npc = Main.npc[k]; + Vector2 vec = npc.Center - projectile.Center; + float distanceTo = (float)Math.Sqrt(vec.X * vec.X + vec.Y * vec.Y); + distanceTo -= (float)Math.Sqrt(npc.width * npc.width + npc.height * npc.height) * 0.75f; + if (distanceTo < distance && npc.CanBeChasedBy(projectile, false) && k != projectile.localAI[0]) + { + float alldamage = projectile.damage * 1.25f; + double damage = npc.StrikeNPC((int)alldamage, projectile.knockBack, (projectile.velocity.X > 0f) ? 1 : -1); + player.addDPS((int)damage); + } + } + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PwnagehammerHoming").WithVolume(1f), projectile.Center); + Main.PlaySound(SoundID.Item14.WithVolume(.75f), projectile.position); + } + else + { + float numberOfDusts = 32f; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(15f, 0).RotatedBy(rot); + Vector2 velOffset = new Vector2(12.5f, 0).RotatedBy(rot); + Dust dust = Dust.NewDustPerfect(projectile.position + offset, 269, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset; + dust.scale = 2.5f; + } + + float distance = 168f; + + for (int k = 0; k < Main.maxNPCs; k++) + { + NPC npc = Main.npc[k]; + Vector2 vec = npc.Center - projectile.Center; + float distanceTo = (float)Math.Sqrt(vec.X * vec.X + vec.Y * vec.Y); + distanceTo -= (float)Math.Sqrt(npc.width * npc.width + npc.height * npc.height) * 0.75f; + if (distanceTo < distance && npc.CanBeChasedBy(projectile, false) && k != projectile.localAI[0]) + { + float alldamage = projectile.damage * 0.75f; + double damage = npc.StrikeNPC((int)alldamage, projectile.knockBack, (projectile.velocity.X > 0f) ? 1 : -1); + player.addDPS((int)damage); + } + } + + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PwnagehammerSound").WithVolume(1f).WithPitchVariance(.08f), projectile.Center); + Main.PlaySound(SoundID.Item14.WithVolume(.60f), projectile.position); + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (projectile.ai[0] == 1f && Main.myPlayer == projectile.owner) + { + int hammer = Projectile.NewProjectile(projectile.Center, new Vector2(0, -15f), ModContent.ProjectileType(), projectile.damage * 2, projectile.knockBack, projectile.owner, 0f, projectile.ai[1]); + Main.projectile[hammer].localAI[0] = Math.Sign(projectile.velocity.X); + Main.projectile[hammer].melee = projectile.melee; + Main.projectile[hammer].Calamity().rogue = projectile.Calamity().rogue; + } + } + + public override void ModifyHitPvp(Player target, ref int damage, ref bool crit) + { + if (projectile.ai[0] == 1f && Main.myPlayer == projectile.owner) + { + int hammer = Projectile.NewProjectile(projectile.Center, new Vector2(0, -15f), ModContent.ProjectileType(), projectile.damage * 2, projectile.knockBack, projectile.owner, 0f, projectile.ai[1]); + Main.projectile[hammer].localAI[0] = Math.Sign(projectile.velocity.X); + Main.projectile[hammer].melee = projectile.melee; + Main.projectile[hammer].Calamity().rogue = projectile.Calamity().rogue; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.localAI[0] = target.whoAmI; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } } diff --git a/Projectiles/Hybrid/PwnagehammerProjStealthStrike.cs b/Projectiles/Hybrid/PwnagehammerProjStealthStrike.cs new file mode 100644 index 0000000000..c717c1ccd6 --- /dev/null +++ b/Projectiles/Hybrid/PwnagehammerProjStealthStrike.cs @@ -0,0 +1,143 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Hybrid +{ + public class PwnagehammerProjStealthStrike : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spectral Hammer"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 7; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = 40; + projectile.height = 40; + projectile.aiStyle = 0; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.usesLocalNPCImmunity = true; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 248, 124, 255); + } + + public override void AI() + { + projectile.ai[0] += 1f; + if (projectile.ai[0] < 42f) + { + projectile.velocity.Y *= 0.9575f; + projectile.rotation += MathHelper.ToRadians(projectile.ai[0] * 0.5f) * projectile.localAI[0]; + } + else if (projectile.ai[0] < 44f) + { + NPC target = Main.npc[(int)projectile.ai[1]]; + float velConst = 3f; + projectile.velocity = new Vector2((target.Center.X - projectile.Center.X) / velConst, (target.Center.Y - projectile.Center.Y) / velConst); + projectile.rotation += MathHelper.ToRadians(48f) * projectile.localAI[0]; + } + + if (Main.rand.NextBool(2)) + { + Vector2 offset = new Vector2(7, 0).RotatedByRandom(MathHelper.ToRadians(360f)); + Vector2 velOffset = new Vector2(3, 0).RotatedBy(offset.ToRotation()); + Dust dust = Dust.NewDustPerfect(new Vector2(projectile.position.X, projectile.position.Y) + offset, DustID.GoldFlame, new Vector2((projectile.velocity.X * 0.2f) + velOffset.X, (projectile.velocity.Y * 0.2f) + velOffset.Y), 100, new Color(255, 245, 198), 2f); + dust.noGravity = true; + } + + if (Main.rand.NextBool(6)) + { + Vector2 offset = new Vector2(7, 0).RotatedByRandom(MathHelper.ToRadians(360f)); + Vector2 velOffset = new Vector2(3, 0).RotatedBy(offset.ToRotation()); + Dust dust = Dust.NewDustPerfect(new Vector2(projectile.position.X, projectile.position.Y) + offset, DustID.GoldFlame, new Vector2((projectile.velocity.X * 0.2f) + velOffset.X, (projectile.velocity.Y * 0.2f) + velOffset.Y), 100, new Color(255, 245, 198), 2f); + dust.noGravity = true; + } + } + + public override bool? CanHitNPC(NPC target) + { + if (projectile.ai[0] <= 42f) + { + return false; + } + return null; + } + + public override bool CanHitPvp(Player target) + { + return projectile.ai[0] > 42f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.localAI[0] = target.whoAmI; + } + + public override bool PreKill(int timeLeft) + { + Player player = Main.player[projectile.owner]; + + float numberOfDusts = 32f; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(15f, 0).RotatedBy(rot); + Vector2 velOffset = new Vector2(12.5f, 0).RotatedBy(rot); + int dust = Dust.NewDust(projectile.position + offset, projectile.width, projectile.height, 269, velOffset.X, velOffset.Y); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity = velOffset; + Main.dust[dust].scale = 2.5f; + } + + float distance = 168f; + + for (int k = 0; k < Main.maxNPCs; k++) + { + NPC npc = Main.npc[k]; + Vector2 vec = npc.Center - projectile.Center; + float distanceTo = (float)Math.Sqrt(vec.X * vec.X + vec.Y * vec.Y); + if (distanceTo < distance && npc.CanBeChasedBy(projectile, false) && k != projectile.localAI[0]) + { + float alldamage = projectile.damage * 0.5f; + double damage = npc.StrikeNPC((int)alldamage, projectile.knockBack, projectile.velocity.X > 0f ? 1 : -1, true); + player.addDPS((int)damage); + } + } + return false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Texture2D texture = Main.projectileTexture[projectile.type]; + Rectangle sourceRectangle = new Rectangle(0, 0, texture.Width, texture.Height); + Vector2 origin = sourceRectangle.Size() / 2f; + + for (int i = 0; i < projectile.oldPos.Length; i++) + { + float rot = MathHelper.ToRadians(22.5f) * Math.Sign(projectile.velocity.X); + Vector2 drawPos = projectile.oldPos[i] - Main.screenPosition + origin + new Vector2(0f, projectile.gfxOffY); + Color color = projectile.GetAlpha(lightColor) * ((float)(projectile.oldPos.Length - i) / (float)projectile.oldPos.Length); + spriteBatch.Draw(texture, drawPos, new Rectangle?(), color, projectile.rotation - (i * rot), origin, projectile.scale, spriteEffects, 0f); + } + return false; + } + } +} \ No newline at end of file diff --git a/Projectiles/Hybrid/PwnagehammerProjStealthStrike.png b/Projectiles/Hybrid/PwnagehammerProjStealthStrike.png new file mode 100644 index 0000000000000000000000000000000000000000..705864283e157d88aad9b6d2173f37504d40aa08 GIT binary patch literal 748 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0)a_HK~!i%?VB-f z)Ib!5oz&3N<^oVrB7|ttpG7&msff0Wj>7e#!P?vk@sQq?q%6}m@wX$?#4aSw-@JSYfJA;D`C7fweGEG zH&_>{|tZGmld-o6jHeh6ync zvw_a{`hH#y;}x14*Gzg@2hBY5yH!Rp&hw)lAr%tFD|9ywX8!C`9!F*?m14{^4PksP z+SM_s^RAb9?fz7Tt@OmSx6+G@S7>G&Fbitj1JhvHK6$?#Z@z9vpaNjW%!l#bXvSgG zwF{Wj6`IZl9$uyKd>CJfsae;q52Nny%noXt<9R)dFNGSgjF${^l|{DIq-Nfz%!McyHWn7c`q3r`gsn zZ=Zur$-1uj4?g3I8~3`kqQ--Jc#g*vlE8|G#Z~o?F^Y&35t*blVNQCi~ac7+W84;r%(bZRq8CTYB ew8nuNABKMv8X*KsAi)5Z5LyVqNoY3I1QVoc0t5r76M`Vsf_-d)p53UGKkl*2&2}d+&4h{`9i< znYUy~B*1{b4;xI#*AFGdU47!_yB_c`cC(N+0h6f!fyO9W;fbfECYZ7fWq0` zYDZGAdrj#9_WJVDAXBNEmtS6*-_1xU=si3h^E)8-D}G;;j6xa#RMn>6U^C83vQ-eY94pxy7RnuT&a!kb#HNG zRJaTts~65+lX!E@>YHme#gym99p4mlJU4DAcj523@r=B`&rh4~{%$%)L1!XB>om3O zfqNCpzUuzeDr`<(0|qQMp@e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vb5iTP|EzI6Tl>`ih>8~EL z_3g^Ic}t-)B>jqV@`r5!SF@4_jaw2?UJ5>{JUTqE21n&&zfeCVM`D#A#k1qBv!d=BbS99x)oZBxgWENiz#|v zeD)ba4*qH%k2rvKUJYX_9aRH zv!N-ZdqT4}LSNEp-u4mJRwLANy>)B)8$tDzhfnW*dAXjqEjXxBaB`pn&1)1jpO;k$`r2WM{J`ZZ30Rd)FGJQq*nS(gydGjft_@ZvmRtz z#stHoe2fK4i|RFHd^Og!tVEoZ-5a{Rbf?cK r_)~3m!lIJzTaSlp>Ji4f{`v4iYXUWu^I-4&_ix)@0a)?*|6KnEzt))P literal 0 HcmV?d00001 diff --git a/Sounds/Item/PwnagehammerSound.cs b/Sounds/Item/PwnagehammerSound.cs new file mode 100644 index 0000000000..7bc2da6813 --- /dev/null +++ b/Sounds/Item/PwnagehammerSound.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Item +{ + public class PwnagehammerSound : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Item/PwnagehammerSound.ogg b/Sounds/Item/PwnagehammerSound.ogg new file mode 100644 index 0000000000000000000000000000000000000000..d27268a0731e9bed14333520de4be939b0d2f7b7 GIT binary patch literal 23896 zcmeFZcUTkIzdwE^BoIPNAi+@7&_e)Cq$r9SkX|%_zy{Pcgd$Bv>?`UJilGXKh^QE< z0nr5otm}p83NdzMyX_f#g|ZQltzVL`wbI1jZPj* zATXp75n(|mE!lU$%Zh_57r&I2=PZ6jZ@A&2X47!f+n04KDD2E{%4-w1^f^91_V<_S z3>`H1E-uP?;Y1g_;_+h3s-gt=s2^m}01C+j9(iQ1dU8*_;q?L2RUfRmI`#v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y=MA8wuG27Q&-Xo5 zHwoqbm9O6t7M7GA7ZGLVUgU>QdK~!T(ylqFtPh(`H5ygu(BmrH|mpVx$567z*`6 zY7dDAD9!r7*KKf@0wmpQybw@7e)U^kSLk#UN<<(|^u7R9Vd& zV^vU2<1Nn51)XoTsX3_QmTSyV{d;|8Be>`1#rln9ofV7AdYerfHup}BYc@rM%&Z0e ze0f#=`MW@q^pkly|3=8-r}}+3`n^|UG2RAp#Ac&bjxw$V4kd7zHv4U{cX||W^{Vwt zkF&Vm-}-?M>x_ghEUatxgBodB1b7w7lSR+CxihPS@#428^S8mn@dSzyAEzf8c<;!< z&;j92We&0saAO1hh(zHE;jX0H-Q}<5NBBS<2ne8!Nj}wk?x@J7$ZYI5=v6n?GNu!( zEkJ#v8%9b3`BwfOF|sbCx(tkI4bseaxueI^3;xKc%9T zK`as>Wg-DJN;U-27^Rh7m_pdRV2lVEATDO~DDrX_An7pc;t;u(0Lov8!a|>A!I&In zXH-g5{P^s9ym)>?$GmdEBIjG3 z@dI3aZeqO48_!=pJ(+U-#WSWY7v8yj|MXPVoSpJh#li5+ddeQ-0WUv|X}TH7J>hR2 zc?3!Wx~=}8ZFGG`fN88LEAy+7y}-D2=WcNY1lLRKn6<8~2N#h@q*Ax&90h2Vi=UiG z`vXS-8%u<+Fp*h(E-J~+ypHNvJIMLjPK^&uW?Q?d)*mT%F|y?ac0R`CrSYMP;)HW2 z5kU3Gpf{P#c>eG-@0FXDFV^Z-(b#hliiCHn9OklLj>oL7y?Sx-2H)rK)L*_2RakcQ z$%5z4(yse0tuM`#BWIh^m&05Xs?uj|4Vn*Ov;DF8YTX-8+=a#-ZT?){7aqKV%=T&4 NW35?)sHS4U{{Zm$KXd>9 literal 0 HcmV?d00001 From aef26e51189c3733ff0da08c66a6de99d6076e32 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 13:07:47 -0400 Subject: [PATCH 041/128] ele shiv now uses both sides --- Projectiles/Melee/ElementBallShiv.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Projectiles/Melee/ElementBallShiv.cs b/Projectiles/Melee/ElementBallShiv.cs index a3ebd7e5db..865bba2938 100644 --- a/Projectiles/Melee/ElementBallShiv.cs +++ b/Projectiles/Melee/ElementBallShiv.cs @@ -55,22 +55,22 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - float xPos = projectile.ai[0] > 0 ? projectile.position.X + 800 : projectile.position.X - 800; - Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); - - float num80 = xPos; - float speedX = (float)target.position.X - vector2.X; - float speedY = (float)target.position.Y - vector2.Y; - float dir = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); - dir = 10 / num80; - float random = (float)Main.rand.Next(1, 150); if (projectile.owner == Main.myPlayer) { for (int i = 0; i < 4; i++) { - speedX *= dir * random; - speedY *= dir * random; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner); + float xPos = i < 2 ? projectile.position.X + 800 : projectile.position.X - 800; + Vector2 source = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); + + float xStart = xPos; + Vector2 speed = target.position - source; + float dir = speed.Length(); + dir = 10 / xStart; + float random = (float)Main.rand.Next(1, 150); + + speed.X *= dir * random; + speed.Y *= dir * random; + Projectile.NewProjectile(source, speed, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner); } } target.AddBuff(ModContent.BuffType(), 120); From c3280878f1c63502c19c895db00939284f51234b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 18:19:47 -0400 Subject: [PATCH 042/128] prevented horny acc swap spam --- Projectiles/Summon/BrimstoneElementalMinion.cs | 7 ++++++- Projectiles/Summon/SandElementalMinion.cs | 7 ++++++- Projectiles/Summon/WaterElementalMinion.cs | 10 +++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Projectiles/Summon/BrimstoneElementalMinion.cs b/Projectiles/Summon/BrimstoneElementalMinion.cs index a80580b3e7..72b6832176 100644 --- a/Projectiles/Summon/BrimstoneElementalMinion.cs +++ b/Projectiles/Summon/BrimstoneElementalMinion.cs @@ -197,11 +197,16 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[1] = 0f; projectile.netUpdate = true; } + + // Prevent firing immediately + if (projectile.localAI[0] < 120f) + projectile.localAI[0] += 1f; + if (projectile.ai[0] == 0f) { float scaleFactor3 = 14f; int num658 = ModContent.ProjectileType(); - if (flag25 && projectile.ai[1] == 0f) + if (flag25 && projectile.ai[1] == 0f && projectile.localAI[0] >= 120f) { projectile.ai[1] += 1f; if (Main.myPlayer == projectile.owner && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, vector46, 0, 0)) diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index 2f60590d2d..44918f71d7 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -241,11 +241,16 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[1] = 0f; projectile.netUpdate = true; } + + // Prevent firing immediately + if (projectile.localAI[0] < 120f) + projectile.localAI[0] += 1f; + if (projectile.ai[0] == 0f) { float scaleFactor3 = 11f; int num658 = ModContent.ProjectileType(); - if (flag25 && projectile.ai[1] == 0f) + if (flag25 && projectile.ai[1] == 0f && projectile.localAI[0] >= 120f) { projectile.ai[1] += 1f; if (Main.myPlayer == projectile.owner && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, vector46, 0, 0)) diff --git a/Projectiles/Summon/WaterElementalMinion.cs b/Projectiles/Summon/WaterElementalMinion.cs index e306f656ce..76041204bb 100644 --- a/Projectiles/Summon/WaterElementalMinion.cs +++ b/Projectiles/Summon/WaterElementalMinion.cs @@ -90,8 +90,8 @@ namespace CalamityMod.Projectiles.Summon projectile.position.Y = player.Center.Y - (float)(projectile.height / 2) + player.gfxOffY - 180f; if (player.gravDir == -1f) { - projectile.position.Y = projectile.position.Y + 360f; - projectile.rotation = 3.14f; + projectile.position.Y += 360f; + projectile.rotation = MathHelper.Pi; } else { @@ -101,6 +101,10 @@ namespace CalamityMod.Projectiles.Summon projectile.position.Y = (float)(int)projectile.position.Y; if (projectile.owner == Main.myPlayer) { + // Prevent firing immediately + if (projectile.localAI[0] < 120f) + projectile.localAI[0] += 1f; + if (projectile.ai[0] != 0f) { projectile.ai[0] -= 1f; @@ -145,7 +149,7 @@ namespace CalamityMod.Projectiles.Summon } } } - if (flag18) + if (flag18 && projectile.localAI[0] >= 120f) { float num516 = num506; float num517 = num507; From d8a8de28b8e5ebd5786349005edb72c0af43dfd8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 18:22:41 -0400 Subject: [PATCH 043/128] you can now craft brimstone slag walls --- Items/Placeables/BrimstoneSlag.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Items/Placeables/BrimstoneSlag.cs b/Items/Placeables/BrimstoneSlag.cs index 772a990283..fbaaaba216 100644 --- a/Items/Placeables/BrimstoneSlag.cs +++ b/Items/Placeables/BrimstoneSlag.cs @@ -1,5 +1,6 @@ -using Terraria.ModLoader; +using CalamityMod.Items.Placeables.Walls; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Placeables { @@ -25,5 +26,14 @@ namespace CalamityMod.Items.Placeables item.value = 1000; item.rare = 3; } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.AddTile(TileID.WorkBenches); + recipe.SetResult(this); + recipe.AddRecipe(); + } } } From 6f3394a4dc22e62aedba1454f91c524d938f7e12 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 18:37:41 -0400 Subject: [PATCH 044/128] reworded minion damage being reduced in the affected armors --- Items/Armor/FearmongerGreathelm.cs | 2 +- Items/Armor/ForbiddenCirclet.cs | 2 +- Items/CalamityGlobalItem.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Armor/FearmongerGreathelm.cs b/Items/Armor/FearmongerGreathelm.cs index 78cdc5f32f..6d7d929d53 100644 --- a/Items/Armor/FearmongerGreathelm.cs +++ b/Items/Armor/FearmongerGreathelm.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = @"30% increased minion damage -Minions deal full damage while wielding weaponry +The minion damage nerf while wielding weaponry is reduced Immunity to all forms of frost and flame All minion attacks grant colossal life regeneration 15% increased damage reduction during the Pumpkin and Frost Moons diff --git a/Items/Armor/ForbiddenCirclet.cs b/Items/Armor/ForbiddenCirclet.cs index f26db05c40..42a07d15bd 100644 --- a/Items/Armor/ForbiddenCirclet.cs +++ b/Items/Armor/ForbiddenCirclet.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Press " + hotkey + " to call an ancient storm to the cursor location\n" + "The ancient storm costs " + stormMana + " mana and benefits from both summon and rogue bonuses\n" + "Rogue stealth strikes spawn homing eaters on enemy hits\n" + - "Minions deal full damage while wielding rogue weapons\n" + + "The minion damage nerf is reduced while wielding rogue weapons\n" + "Rogue and summon attacks will scale off of the stat with a higher boost\n" + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index c4217cec30..4e1fa81839 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1722,7 +1722,7 @@ namespace CalamityMod.Items { if (line2.mod == "Terraria" && line2.Name == "SetBonus") { - line2.text += "\nMinions deal full damage while wielding magic weapons"; + line2.text += "\nThe minion damage nerf is reduced while wielding magic weapons"; } } } From bd66340d63ee5a1f4f192c1ed4a9ab9a67328136 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 28 Jun 2020 22:27:04 -0400 Subject: [PATCH 045/128] improved accuracy of several weapons --- Projectiles/Magic/InfernalBlade.cs | 37 ++++++++-------------------- Projectiles/Magic/LiquidBlade.cs | 36 ++++++++------------------- Projectiles/Melee/ElementBallShiv.cs | 6 ++--- Projectiles/Melee/HellionSpike.cs | 6 ++--- Projectiles/Ranged/AMRShot.cs | 19 +++++++------- 5 files changed, 35 insertions(+), 69 deletions(-) diff --git a/Projectiles/Magic/InfernalBlade.cs b/Projectiles/Magic/InfernalBlade.cs index a7fd668903..ae4b69cf78 100644 --- a/Projectiles/Magic/InfernalBlade.cs +++ b/Projectiles/Magic/InfernalBlade.cs @@ -119,35 +119,18 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - float xPos = projectile.ai[0] > 0 ? projectile.position.X + 800 : projectile.position.X - 800; - Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); - - float num80 = xPos; - float speedX = (float)target.position.X - vector2.X; - float speedY = (float)target.position.Y - vector2.Y; - float dir = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); - dir = 10 / num80; - speedX *= dir * 150; - speedY *= dir * 150; - if (speedX > 15f) - { - speedX = 15f; - } - if (speedX < -15f) - { - speedX = -15f; - } - if (speedY > 15f) - { - speedY = 15f; - } - if (speedY < -15f) - { - speedY = -15f; - } + float xPos = projectile.Center.X + 800 * Main.rand.NextBool(2).ToDirectionInt(); + float yPos = projectile.Center.Y + Main.rand.Next(-800, 801); + Vector2 spawnPosition = new Vector2(xPos, yPos); + Vector2 velocity = target.Center - spawnPosition; + float dir = 10 / spawnPosition.X; + velocity.X *= dir * 150; + velocity.Y *= dir * 150; + velocity.X = MathHelper.Clamp(velocity.X, -15f, 15f); + velocity.Y = MathHelper.Clamp(velocity.Y, -15f, 15f); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.75), 1f, projectile.owner); + Projectile.NewProjectile(spawnPosition, velocity, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.75), 1f, projectile.owner); } target.AddBuff(ModContent.BuffType(), 240); } diff --git a/Projectiles/Magic/LiquidBlade.cs b/Projectiles/Magic/LiquidBlade.cs index 46aeaeea72..7ff3f82483 100644 --- a/Projectiles/Magic/LiquidBlade.cs +++ b/Projectiles/Magic/LiquidBlade.cs @@ -120,34 +120,18 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - float xPos = projectile.ai[0] > 0 ? projectile.position.X + 800 : projectile.position.X - 800; - Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); - float num80 = xPos; - float speedX = (float)target.position.X - vector2.X; - float speedY = (float)target.position.Y - vector2.Y; - float dir = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); - dir = 10 / num80; - speedX *= dir * 150; - speedY *= dir * 150; - if (speedX > 15f) - { - speedX = 15f; - } - if (speedX < -15f) - { - speedX = -15f; - } - if (speedY > 15f) - { - speedY = 15f; - } - if (speedY < -15f) - { - speedY = -15f; - } + float xPos = projectile.Center.X + 800 * Main.rand.NextBool(2).ToDirectionInt(); + float yPos = projectile.Center.Y + Main.rand.Next(-800, 801); + Vector2 spawnPosition = new Vector2(xPos, yPos); + Vector2 velocity = target.Center - spawnPosition; + float dir = 10 / spawnPosition.X; + velocity.X *= dir * 150; + velocity.Y *= dir * 150; + velocity.X = MathHelper.Clamp(velocity.X, -15f, 15f); + velocity.Y = MathHelper.Clamp(velocity.Y, -15f, 15f); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.75), 1f, projectile.owner); + Projectile.NewProjectile(spawnPosition, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.75), 1f, projectile.owner); } target.AddBuff(BuffID.Ichor, 240); target.AddBuff(BuffID.Frostburn, 240); diff --git a/Projectiles/Melee/ElementBallShiv.cs b/Projectiles/Melee/ElementBallShiv.cs index 865bba2938..687772a7b8 100644 --- a/Projectiles/Melee/ElementBallShiv.cs +++ b/Projectiles/Melee/ElementBallShiv.cs @@ -59,11 +59,11 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 4; i++) { - float xPos = i < 2 ? projectile.position.X + 800 : projectile.position.X - 800; - Vector2 source = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); + float xPos = i < 2 ? projectile.Center.X + 800 : projectile.Center.X - 800; + Vector2 source = new Vector2(xPos, projectile.Center.Y + Main.rand.Next(-800, 801)); float xStart = xPos; - Vector2 speed = target.position - source; + Vector2 speed = target.Center - source; float dir = speed.Length(); dir = 10 / xStart; float random = (float)Main.rand.Next(1, 150); diff --git a/Projectiles/Melee/HellionSpike.cs b/Projectiles/Melee/HellionSpike.cs index a682079272..1c1d6986d4 100644 --- a/Projectiles/Melee/HellionSpike.cs +++ b/Projectiles/Melee/HellionSpike.cs @@ -59,10 +59,10 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffID.Venom, 300); if (crit) { - float xPos = projectile.position.X + 800 * Main.rand.NextBool(2).ToDirectionInt(); - float yPos = projectile.position.Y + Main.rand.Next(-800, 801); + float xPos = projectile.Center.X + 800 * Main.rand.NextBool(2).ToDirectionInt(); + float yPos = projectile.Center.Y + Main.rand.Next(-800, 801); Vector2 spawnPosition = new Vector2(xPos, yPos); - Vector2 velocity = target.position - spawnPosition; + Vector2 velocity = target.Center - spawnPosition; float dir = 10 / spawnPosition.X; velocity.X *= dir * 150; velocity.Y *= dir * 150; diff --git a/Projectiles/Ranged/AMRShot.cs b/Projectiles/Ranged/AMRShot.cs index 08b817254f..c7d8403d73 100644 --- a/Projectiles/Ranged/AMRShot.cs +++ b/Projectiles/Ranged/AMRShot.cs @@ -44,18 +44,17 @@ namespace CalamityMod.Projectiles.Ranged { for (int x = 0; x < 8; x++) { - float xPos = x > 4 ? projectile.position.X + 500 : projectile.position.X - 500; - Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-500, 501)); - float num80 = xPos; - float speedX = (float)target.position.X - vector2.X; - float speedY = (float)target.position.Y - vector2.Y; - float dir = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); - dir = 10 / num80; - speedX *= dir * 150; - speedY *= dir * 150; + float xPos = x > 4 ? projectile.Center.X + 500 : projectile.Center.X - 500; + float yPos = projectile.Center.Y + Main.rand.Next(-500, 501); + Vector2 spawnPosition = new Vector2(xPos, yPos); + Vector2 velocity = target.Center - spawnPosition; + float dir = velocity.Length(); + dir = 10 / spawnPosition.X; + velocity.X *= dir * 150; + velocity.Y *= dir * 150; if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.1), 1f, projectile.owner); + Projectile.NewProjectile(spawnPosition, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.1), 1f, projectile.owner); } } } From f24dbb05a5ffd1ed4c6994115ee60522fd058bdf Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 11:11:45 -0400 Subject: [PATCH 046/128] gravistar sabatons now boosted by average damage --- Projectiles/Typeless/SabatonSlam.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Typeless/SabatonSlam.cs b/Projectiles/Typeless/SabatonSlam.cs index d3706be6c3..b2b9ddf91d 100644 --- a/Projectiles/Typeless/SabatonSlam.cs +++ b/Projectiles/Typeless/SabatonSlam.cs @@ -31,10 +31,10 @@ namespace CalamityMod.Projectiles.Typeless public override bool OnTileCollide(Vector2 oldVelocity) { - //Spawns the shockwave - Projectile.NewProjectile(projectile.position.X + 25, projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), 300, 12, projectile.owner); - Main.PlaySound(SoundID.Item14, projectile.position); Player player = Main.player[projectile.owner]; + //Spawns the shockwave + Projectile.NewProjectile(projectile.position.X + 25, projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), (int)(300 * player.AverageDamage()), 12, projectile.owner); + Main.PlaySound(SoundID.Item14, projectile.position); player.Calamity().gSabatonFall = 0; projectile.Kill(); //Pretty things From 464cd8ec17d7236bddf00aa83050897d989d1c29 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:15:10 -0400 Subject: [PATCH 047/128] applied hitbox fix and ignoretiles parameter to ClosestNPCAt --- Projectiles/Magic/EnormousConsumingVortex.cs | 4 ++-- Projectiles/Magic/EternityBook.cs | 2 +- Projectiles/Magic/EternityHex.cs | 2 +- Projectiles/Magic/SubsumingTentacle.cs | 2 +- Projectiles/Magic/Vortex.cs | 2 +- Projectiles/Ranged/ExoLightBurst.cs | 2 +- .../Rogue/CelestialReaperProjectile.cs | 4 ++-- Utilities/CalamityUtils.cs | 24 +++++++++++++++---- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/Projectiles/Magic/EnormousConsumingVortex.cs b/Projectiles/Magic/EnormousConsumingVortex.cs index 9daf7066d8..6abcb381e3 100644 --- a/Projectiles/Magic/EnormousConsumingVortex.cs +++ b/Projectiles/Magic/EnormousConsumingVortex.cs @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Magic public void TargetingMovement() { - NPC potentialTarget = projectile.Center.ClosestNPCAt(1500f, true); + NPC potentialTarget = projectile.Center.ClosestNPCAt(1500f, true, true); if (potentialTarget != null) { projectile.velocity = (projectile.velocity * 5f + projectile.DirectionTo(potentialTarget.Center) * 7f) / 6f; @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Magic } if (Main.myPlayer == projectile.owner) { - NPC closestTarget = projectile.Center.ClosestNPCAt(1600f, true); + NPC closestTarget = projectile.Center.ClosestNPCAt(1600f, true, true); for (int i = 0; i < 12; i++) { float rotation = Main.rand.NextFloat(MathHelper.TwoPi); diff --git a/Projectiles/Magic/EternityBook.cs b/Projectiles/Magic/EternityBook.cs index d1ded915c0..66419f62ed 100644 --- a/Projectiles/Magic/EternityBook.cs +++ b/Projectiles/Magic/EternityBook.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Magic projectile.ai[0]++; if (projectile.ai[0] == 1f) { - NPC target = projectile.Center.ClosestNPCAt(4400f, true); + NPC target = projectile.Center.ClosestNPCAt(4400f, true, true); if (target != null) { diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index 63e7f91b3d..fc60339ed0 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Magic if (!target.active) { - NPC potentialNPC = projectile.Center.ClosestNPCAt(4400f, true); + NPC potentialNPC = projectile.Center.ClosestNPCAt(4400f, true, true); if (potentialNPC != null) { projectile.ai[0] = potentialNPC.whoAmI; diff --git a/Projectiles/Magic/SubsumingTentacle.cs b/Projectiles/Magic/SubsumingTentacle.cs index bf66907557..e6ab77c645 100644 --- a/Projectiles/Magic/SubsumingTentacle.cs +++ b/Projectiles/Magic/SubsumingTentacle.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Magic projectile.tileCollide = false; } - NPC closestTarget = projectile.Center.ClosestNPCAt(MaxEnemyDistance, true); + NPC closestTarget = projectile.Center.ClosestNPCAt(MaxEnemyDistance, true, true); if (closestTarget != null) { HomingMovement(closestTarget); diff --git a/Projectiles/Magic/Vortex.cs b/Projectiles/Magic/Vortex.cs index 8c8831843c..390bd05184 100644 --- a/Projectiles/Magic/Vortex.cs +++ b/Projectiles/Magic/Vortex.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic // Attempt to find a target if the projectile has none. if (TargetIndex == -1 && TargetCheckCooldown <= 0f) { - NPC potentialTarget = projectile.Center.ClosestNPCAt(targetCheckDistance, true); + NPC potentialTarget = projectile.Center.ClosestNPCAt(targetCheckDistance, true, true); if (potentialTarget != null) TargetIndex = potentialTarget.whoAmI; projectile.netUpdate = true; diff --git a/Projectiles/Ranged/ExoLightBurst.cs b/Projectiles/Ranged/ExoLightBurst.cs index f6545889c5..dc68a71e89 100644 --- a/Projectiles/Ranged/ExoLightBurst.cs +++ b/Projectiles/Ranged/ExoLightBurst.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged } if (projectile.ai[0] == 0f) { - NPC potentialTarget = projectile.Center.ClosestNPCAt(MaxDistanceFromTarget, true); + NPC potentialTarget = projectile.Center.ClosestNPCAt(MaxDistanceFromTarget, true, true); if (potentialTarget != null) { if (projectile.Distance(potentialTarget.Center) > MinDistanceFromTarget) diff --git a/Projectiles/Rogue/CelestialReaperProjectile.cs b/Projectiles/Rogue/CelestialReaperProjectile.cs index a005b94e1b..df056ca2c8 100644 --- a/Projectiles/Rogue/CelestialReaperProjectile.cs +++ b/Projectiles/Rogue/CelestialReaperProjectile.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool? CanHitNPC(NPC target) { - if (HomingCooldown != 0) + if (HomingCooldown > 0) { return false; } @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool CanHitPvp(Player target) { - return HomingCooldown == 0; + return HomingCooldown <= 0; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 203d628e24..ecbf80b629 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -371,8 +371,9 @@ namespace CalamityMod /// /// The position where we wish to check for nearby NPCs /// Maximum amount of pixels to check around the origin + /// Whether to ignore tiles when finding a target or not /// Whether bosses should be prioritized in targetting or not - public static NPC ClosestNPCAt(this Vector2 origin, float maxDistanceToCheck, bool bossPriority = false) + public static NPC ClosestNPCAt(this Vector2 origin, float maxDistanceToCheck, bool ignoreTiles = true, bool bossPriority = false) { NPC closestTarget = null; float distance = maxDistanceToCheck; @@ -386,7 +387,13 @@ namespace CalamityMod continue; if (Main.npc[index].CanBeChasedBy(null, false)) { - if (Vector2.Distance(origin, Main.npc[index].Center) < distance) + float extraDistance = (Main.npc[index].width / 2) + (Main.npc[index].height / 2); + + bool canHit = true; + if (extraDistance < maxDistance && !ignoreTiles) + canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[index].Center, 1, 1); + + if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) { if (Main.npc[index].boss) bossFound = true; @@ -402,7 +409,13 @@ namespace CalamityMod { if (Main.npc[index].CanBeChasedBy(null, false)) { - if (Vector2.Distance(origin, Main.npc[index].Center) < distance) + float extraDistance = (Main.npc[index].width / 2) + (Main.npc[index].height / 2); + + bool canHit = true; + if (extraDistance < maxDistance && !ignoreTiles) + canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[index].Center, 1, 1); + + if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) { distance = Vector2.Distance(origin, Main.npc[index].Center); closestTarget = Main.npc[index]; @@ -418,13 +431,14 @@ namespace CalamityMod /// The position where we wish to check for nearby NPCs /// Maximum amount of pixels to check around the origin /// Owner of the minion - public static NPC MinionHoming(this Vector2 origin, float maxDistanceToCheck, Player owner) + /// Whether to ignore tiles when finding a target or not + public static NPC MinionHoming(this Vector2 origin, float maxDistanceToCheck, Player owner, bool ignoreTiles = true) { if (owner.HasMinionAttackTargetNPC) { return Main.npc[owner.MinionAttackTargetNPC]; } - return ClosestNPCAt(origin, maxDistanceToCheck); + return ClosestNPCAt(origin, maxDistanceToCheck, ignoreTiles); } ///

From 537f26ba32f8aee202d36fbc217c655e5682c04a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 18:14:53 -0400 Subject: [PATCH 048/128] compile fix --- Utilities/CalamityUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index ecbf80b629..8b6321153e 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -390,8 +390,8 @@ namespace CalamityMod float extraDistance = (Main.npc[index].width / 2) + (Main.npc[index].height / 2); bool canHit = true; - if (extraDistance < maxDistance && !ignoreTiles) - canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[index].Center, 1, 1); + if (extraDistance < distance && !ignoreTiles) + canHit = Collision.CanHit(origin, 1, 1, Main.npc[index].Center, 1, 1); if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) { @@ -412,8 +412,8 @@ namespace CalamityMod float extraDistance = (Main.npc[index].width / 2) + (Main.npc[index].height / 2); bool canHit = true; - if (extraDistance < maxDistance && !ignoreTiles) - canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[index].Center, 1, 1); + if (extraDistance < distance && !ignoreTiles) + canHit = Collision.CanHit(origin, 1, 1, Main.npc[index].Center, 1, 1); if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) { From e11d962ef7e1fdb5ae73113f4ae94128a56ab15e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 19:04:42 -0400 Subject: [PATCH 049/128] fixed spritesheet issues with ectoheart, red lightning container, and scoria bars added red lightning container glowmask --- Items/Materials/CruptixBar.cs | 97 ++++++++++------ Items/Materials/CruptixBar.png | Bin 910 -> 636 bytes Items/Materials/CruptixBar_Animated.png | Bin 0 -> 910 bytes Items/PermanentBoosters/Ectoheart.cs | 108 ++++++++++------- Items/PermanentBoosters/Ectoheart.png | Bin 1561 -> 3650 bytes .../PermanentBoosters/Ectoheart_Animated.png | Bin 0 -> 1561 bytes .../RedLightningContainer.cs | 109 +++++++++++------- .../RedLightningContainer.png | Bin 2381 -> 847 bytes .../RedLightningContainerGlow.png | Bin 0 -> 903 bytes .../RedLightningContainer_Animated.png | Bin 0 -> 2381 bytes NPCs/CalamityAI.cs | 2 +- 11 files changed, 195 insertions(+), 121 deletions(-) create mode 100644 Items/Materials/CruptixBar_Animated.png create mode 100644 Items/PermanentBoosters/Ectoheart_Animated.png create mode 100644 Items/PermanentBoosters/RedLightningContainerGlow.png create mode 100644 Items/PermanentBoosters/RedLightningContainer_Animated.png diff --git a/Items/Materials/CruptixBar.cs b/Items/Materials/CruptixBar.cs index 5ab4c43ff1..a9d7be51db 100644 --- a/Items/Materials/CruptixBar.cs +++ b/Items/Materials/CruptixBar.cs @@ -1,46 +1,73 @@ using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Tiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Tiles; namespace CalamityMod.Items.Materials { - public class CruptixBar : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Scoria Bar"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6)); - Tooltip.SetDefault("The smoke feels warm\n" + - "Looks funky when placed"); //explaining the texture shown when placed. same bug as red lightning container and ectoheart tbh - } + public class CruptixBar : ModItem + { + private int frameCounter = 0; + private int frame = 0; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Scoria Bar"); + Tooltip.SetDefault("The smoke feels warm"); + } - public override void SetDefaults() - { - item.createTile = ModContent.TileType(); - item.noUseGraphic = true; //no use graphic because animated things swing their entire sheet - item.useStyle = ItemUseStyleID.SwingThrow; - item.useTurn = true; - item.useAnimation = 15; - item.useTime = 10; - item.autoReuse = true; - item.consumable = true; - item.width = 30; - item.height = 24; - item.maxStack = 999; - item.value = Item.sellPrice(gold: 1, silver: 20); - item.rare = 8; - } + public override void SetDefaults() + { + item.createTile = ModContent.TileType(); + item.useStyle = ItemUseStyleID.SwingThrow; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.width = 40; + item.height = 52; + item.maxStack = 999; + item.value = Item.sellPrice(gold: 1, silver: 20); + item.rare = 8; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddTile(TileID.AdamantiteForge); - recipe.SetResult(this); - recipe.AddRecipe(); - } - } + internal Rectangle GetCurrentFrame() + { + int frameAmt = 6; + if (frameCounter >= 6) + { + frameCounter = -1; + frame = frame == frameAmt - 1 ? 0 : frame + 1; + } + frameCounter++; + return new Rectangle(0, item.height * frame, item.width, item.height); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/CruptixBar_Animated"); + spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/CruptixBar_Animated"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(TileID.AdamantiteForge); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } } diff --git a/Items/Materials/CruptixBar.png b/Items/Materials/CruptixBar.png index 670ec3fa3ad3f039d570893c7d1b173c65c995e4..f1adabf4a3ffb07f34b029d8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%{+Xg@&G*TOue6 zf+iL`1Y1I=SxCbdjbRe1U1~u;gvG0)pdTZ2`AEXBiBJ~G;eHg?gvmYAa7*hzcWeA$ z7g~h~!=m*e*(n6L{rK1G6z(ZfrHD>JK~Q`Iu$b5>NZ2~X=Y^PEZvhFG0qce+A0*t5_F6FOVLStp zJu34gr4|g!M;ibIu}~n%!A?WZP!+TmMmr6a8V04J^FISRq%|IzmHK1;XTba82ZTDO zh`@GE(atH#VCxk3sXt-geP-8Bo!%2Ff-vT?p?Ii~1&N}N0mEP?P64u^*Z>6Rmf04C za_A9pSU^L!po8MO6dIx`-~qo3`i*R>!g08*3YUvpR_qiB7^(soB6bQ94uc!(C~mHN zM5_V~G1fuda8Gs$0&c6qG?AS`gwN;{_;^vBf`Xt95}ksCpWi9|$2T9Io$}rj#&Gyk zISeD180<8R{P+Oezak+9I}NFxBEaoUt_Qa$`4t2jKBocTxBx>c`rk-GzZE|)#nvN0 zhx{WsUTH+$eo%0K{NNtPiF1l5+#WxWokE1|oT8mml);wA)b1(e9pK=?3Air{!Zp1J z`avu*8tw;s@}&j|>wRD0aj-{z-(e^m@6#|;g=7PuV7M*kHPp901?Wb*ADF`TDMa`= koua+_Xq_S-zImtk0YRW>p(B;HCIA2c07*qoM6N<$f>4x}XaE2J diff --git a/Items/Materials/CruptixBar_Animated.png b/Items/Materials/CruptixBar_Animated.png new file mode 100644 index 0000000000000000000000000000000000000000..670ec3fa3ad3f039d570893c7d1b173c65c995e4 GIT binary patch literal 910 zcmV;919AL`P)Px#Gf+%aMF0Q*M_O!EgSASd-{5Q=eL6ZNJyT3gR`|AAV+SN25g8&QEC2q+a(aRz z9w0O^F#rGn3Nr$S0000HbW%=J0RR90|NsC0|NsC0|NsC0{}2^Gp#T5^>`6pHRA_Xh?sx6hW4b>^NBPp20}srQHFQMc5GBBf#N zt5mAHhPc9PC@e0*uz~J3B@m>0NKF{sFAW3zTGRJkr*%2>tPb=G55u@dUsD3rCet*} z$=@fy;TEm238nfq<2bKbmLu?dc9)H9%=6_kP2+ElLM)2E2ApTW?={9O%W-HeE`J>R zTa+@_9D~aOXzjG7@9|HJ!A&oNT3g$7_8QzOYnSD2D;W^f-Ed>DA%{+Xg@&G*TOue6 zf+iL`1Y1I=SxCbdjbRe1U1~u;gvG0)pdTZ2`AEXBiBJ~G;eHg?gvmYAa7*hzcWeA$ z7g~h~!=m*e*(n6L{rK1G6z(ZfrHD>JK~Q`Iu$b5>NZ2~X=Y^PEZvhFG0qce+A0*t5_F6FOVLStp zJu34gr4|g!M;ibIu}~n%!A?WZP!+TmMmr6a8V04J^FISRq%|IzmHK1;XTba82ZTDO zh`@GE(atH#VCxk3sXt-geP-8Bo!%2Ff-vT?p?Ii~1&N}N0mEP?P64u^*Z>6Rmf04C za_A9pSU^L!po8MO6dIx`-~qo3`i*R>!g08*3YUvpR_qiB7^(soB6bQ94uc!(C~mHN zM5_V~G1fuda8Gs$0&c6qG?AS`gwN;{_;^vBf`Xt95}ksCpWi9|$2T9Io$}rj#&Gyk zISeD180<8R{P+Oezak+9I}NFxBEaoUt_Qa$`4t2jKBocTxBx>c`rk-GzZE|)#nvN0 zhx{WsUTH+$eo%0K{NNtPiF1l5+#WxWokE1|oT8mml);wA)b1(e9pK=?3Air{!Zp1J z`avu*8tw;s@}&j|>wRD0aj-{z-(e^m@6#|;g=7PuV7M*kHPp901?Wb*ADF`TDMa`= koua+_Xq_S-zImtk0YRW>p(B;HCIA2c07*qoM6N<$f>4x}XaE2J literal 0 HcmV?d00001 diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index e187a6d4b0..51b81f9da6 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -9,52 +9,72 @@ using Terraria.ModLoader; namespace CalamityMod.Items.PermanentBoosters { public class Ectoheart : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ectoheart"); - Tooltip.SetDefault("Permanently makes Adrenaline Mode take 5 less seconds to charge\n" + - "Revengeance drop"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 3)); - } + { + private int frameCounter = 0; + private int frame = 0; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ectoheart"); + Tooltip.SetDefault("Permanently makes Adrenaline Mode take 5 less seconds to charge\n" + + "Revengeance drop"); + } - public override void SetDefaults() - { - item.width = 42; - item.height = 44; - item.useAnimation = 30; - item.useTime = 30; - item.useStyle = ItemUseStyleID.HoldingUp; - item.UseSound = SoundID.Item122; - item.consumable = true; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.PureGreen; - } + public override void SetDefaults() + { + item.width = 42; + item.height = 44; + item.useAnimation = 30; + item.useTime = 30; + item.useStyle = ItemUseStyleID.HoldingUp; + item.UseSound = SoundID.Item122; + item.consumable = true; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.PureGreen; + } - public override bool CanUseItem(Player player) - { - CalamityPlayer modPlayer = player.Calamity(); - if (modPlayer.adrenalineBoostThree) - { - return false; - } - return true; - } + public override bool CanUseItem(Player player) => !player.Calamity().adrenalineBoostThree; - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) - { - CalamityUtils.DrawItemGlowmask(item, spriteBatch, 3, rotation, ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/EctoheartGlow")); - } + internal Rectangle GetCurrentFrame() + { + int frameAmt = 3; + if (frameCounter >= 8) + { + frameCounter = -1; + frame = frame == frameAmt - 1 ? 0 : frame + 1; + } + frameCounter++; + return new Rectangle(0, item.height * frame, item.width, item.height); + } - public override bool UseItem(Player player) - { - if (player.itemAnimation > 0 && player.itemTime == 0) - { - player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.adrenalineBoostThree = true; - } - return true; - } - } + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/Ectoheart_Animated"); + spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/Ectoheart_Animated"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + return false; + } + + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/EctoheartGlow"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + + public override bool UseItem(Player player) + { + if (player.itemAnimation > 0 && player.itemTime == 0) + { + player.itemTime = item.useTime; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.adrenalineBoostThree = true; + } + return true; + } + } } diff --git a/Items/PermanentBoosters/Ectoheart.png b/Items/PermanentBoosters/Ectoheart.png index 26d587ff6e3e8761a33b9dca0fda3338bcd9335e..e03dbaa21e1a64728f2f6f0944a096059445c49a 100644 GIT binary patch literal 3650 zcmV-I4!!Y-P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGO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m^_VT}1^^_W8|s0Wk6RxHj*~yjWSSqO%V#{0J1Tq)_^b z3Tb;sIrr`h-McagjH0)^KU&>%I{>rOGY-J~>`ef!jZNHY(;ACO(KYfhr|WTWmw(EM z^7Ted7LTGHcs~92IMJNW-M>-#ipu=i=u`j@ttfW@mZ~j#s;)0FmCeh!TfAPVWT{n= zasb9><~0vg$d<1cO6e;q$&UH`WXF8|#JojrBtP#(JTCW4%znv0kX(STEFX{PdX| zfbfb+0K)Mq0G3A8d}^J$d@;vf+WVrOyMo0M7)6WzmGZPpCLj#B*8muHXMX{hA))Qv z_n%N%sQFLWH*K>yca2UMfC2YqIje^1&g4H)`aY9i zr0vSNkhTMonqTajwmA{!Zg|@&Z6%Vt-s2tSq6nU%g?gc))U`S_Z%!KJ&D<#))(aKh z?mi8`f#lO&lbH4Fpx?RS0DqhsRC`Zd7k|d9Jxaw34M~3f-nZwod7%JQEng0#ywG>L zdjUAGW4qR%>4mOym$?8f$4_eI#0#AWDXl8!)DB9T7wUrbLbGGNQ0s*jiSxKG_^+Nr|dZCv8JO2Qd>&h<1r4Gh)00000NkvXX Hu0mjfyuS*u diff --git a/Items/PermanentBoosters/Ectoheart_Animated.png b/Items/PermanentBoosters/Ectoheart_Animated.png new file mode 100644 index 0000000000000000000000000000000000000000..26d587ff6e3e8761a33b9dca0fda3338bcd9335e GIT binary patch literal 1561 zcmV+!2Il#RP)Px)(@8`@RCt{2n_FxYRT#&A(=O1x(6YT*0%9vS6^N+BqK!gG4T<5AD8|GGQ;mrl zo`^mfqdt)6OCv_3jSoZ;H9R&XhK5j0ks6{9Fj^>5ucfuxdx6sK_;B{??m0WV?k|a64x|(|m7N;B0AwGli$~FQ(Xazh=PXed zX4IJ7(ij2Y{J@M96{VeG`YC-yUwP^Q04A;{8#;G2+t~Dl(pOZdtWaZbVBc2l`q05s zX3?U?rVukD}srRSv*I;TQmw za|suqz3mCDd@LGuAV`YF;+tK7b!*oG(DU>jAhkxf9{xzHu%me!0Ev~g`t?{WXGh&r zQ`-4Aoksz2gupKYj!xB$JMsj(@)u7;uB1@+TI3*Eai35=q*ygypqbUOgE(=!gh{OnBtu8mFHYSS8vNzpa( zF{kTsaF@!7^7Ted7LTGHcs~92IMJNW-M>-#ipu=i=u`j@ttfW@mZ~j#s;)0FmCeh! zTfAPVWT{n=asb9><~0vg$d<1cO6e;q-}SR zwTJaWlUOg*zxKG_^+Nr|dZB(}y->fgUZ~$# zFVt`R^qCxh@QO+R!tp8qmPXZlYMr}$F~?ro`=Xw^g2fUTMT`EG^0Z4PAPl(I02p>> z0hl47?cMjEP+6$?PuMqYvpIK-P8fgz_j*C?+4n*P)47v)^x=qF9=hO~LniuMV^+K~_y-@3g7K!yj z{l$&UH`WXF8|#JojrBtP#(JTa|2zKxmg~wc#-+w|00000 LNkvXXu0mjfTmA)% literal 0 HcmV?d00001 diff --git a/Items/PermanentBoosters/RedLightningContainer.cs b/Items/PermanentBoosters/RedLightningContainer.cs index eaf3a9e1a9..ef6809340d 100644 --- a/Items/PermanentBoosters/RedLightningContainer.cs +++ b/Items/PermanentBoosters/RedLightningContainer.cs @@ -1,4 +1,6 @@ using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -6,48 +8,73 @@ using Terraria.ModLoader; namespace CalamityMod.Items.PermanentBoosters { - public class RedLightningContainer : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Red Lightning Container"); - Tooltip.SetDefault("Permanently makes Rage Mode do 15% more damage\n" + - "Revengeance drop"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 6)); - } + public class RedLightningContainer : ModItem + { + private int frameCounter = 0; + private int frame = 0; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Red Lightning Container"); + Tooltip.SetDefault("Permanently makes Rage Mode do 15% more damage\n" + + "Revengeance drop"); + } - public override void SetDefaults() - { - item.width = 20; - item.height = 20; - item.useAnimation = 30; - item.useTime = 30; - item.useStyle = ItemUseStyleID.HoldingUp; - item.UseSound = SoundID.Item122; - item.consumable = true; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; - } + public override void SetDefaults() + { + item.width = 30; + item.height = 40; + item.useAnimation = 30; + item.useTime = 30; + item.useStyle = ItemUseStyleID.HoldingUp; + item.UseSound = SoundID.Item122; + item.consumable = true; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Turquoise; + } - public override bool CanUseItem(Player player) - { - CalamityPlayer modPlayer = player.Calamity(); - if (modPlayer.rageBoostThree) - { - return false; - } - return true; - } + public override bool CanUseItem(Player player) => !player.Calamity().rageBoostThree; - public override bool UseItem(Player player) - { - if (player.itemAnimation > 0 && player.itemTime == 0) - { - player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.rageBoostThree = true; - } - return true; - } - } + internal Rectangle GetCurrentFrame() + { + int frameAmt = 6; + if (frameCounter >= 5) + { + frameCounter = -1; + frame = frame == frameAmt - 1 ? 0 : frame + 1; + } + frameCounter++; + return new Rectangle(0, item.height * frame, item.width, item.height); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainer_Animated"); + spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainer_Animated"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + return false; + } + + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainerGlow"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + + public override bool UseItem(Player player) + { + if (player.itemAnimation > 0 && player.itemTime == 0) + { + player.itemTime = item.useTime; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.rageBoostThree = true; + } + return true; + } + } } diff --git a/Items/PermanentBoosters/RedLightningContainer.png b/Items/PermanentBoosters/RedLightningContainer.png index c859aca4700e4cddb25952b6eb00df0b960d5213..e47f72a8480acb07aeeaa8723d0837460ab7546e 100644 GIT binary patch delta 837 zcmV-L1G@ap63+&Z7k?%Q1^@s6(-|vb00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0^~_VK~z{r<(N%q6G0e;C+Vh<*qWN8Mommj zv}%ggfK(x%B0=;Jw0Ni@BGf}E2!-M;2eF6+PxW9fRq&!7dw-CE2Ps8G54BLKRq>}y z6Wd7JG(RS(&0k~Yot{6l6 z__trk4;wYeXIIk{#Ij{G7+FiBT@Vy#|B+ZjuB~Us$I=-J^4&KDD)CtbDatv$(`!V2 z?cO{%bh-uXe}CZz9mYmDS&C)R|A<9TK}NqWfQNKia5@|VrOvD8xUcIh3R5507;>kv zk4TFSxnnL~@7`wyxwvCq9|*-ksq?CiF|6Ic+lGq3XbAL-t$^(|9oXv@Kz=1GZUgwp zy9Byg>Ok*A5_~_;oL@S&7nC}ekK-%-pF!?4ys{2*d4IYaK&_SC#nLOpWop!b+_`fP zyLaU4xRM?Z*}*ec-++}QAIH*pY|yf`I1<=Eo=|0ww>PmdZ8fmF_j&Lq+HWU!AmvKl?LrGWdeCzl|e3xc`O#0nv(3Ujc3^!e8Sd-GaPVtQV=pZgZh^fuaWwcDYRQR z*jhi5OMijWdG>TtE7{X(Ru!fws(Ow^7S&_A02&mVaK<|8cJ#T?(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ptZZMv%F}pS zhUH-OR77Q{sq;pnb)i7`_Uko-+=A8~%n{S0r%cE7rT;UqRL*aPE^{Gr6MhrA^shno zOp6pF48DwsHX3`C&^0alNkU|~@J|UQ^NfVim;$;H;dQkQRpXK-S$Q$-oxRamda0Ap zoOrWK-~bS->OCzzwp^;$^io5%K^jtY5y_L*Gji$QE0k)o`_{0C1+4yR+fI9=usPgw~6u(E%FPZC2HX6&+ypF|0` z)wk90j4YEOx$~}ouvU%ms%RA=HEz5*Rv^77$hv*m`3`wtO1086U`k0(KiiWLrmcS? zOz-8T@ku}7bI#f5Bc%#~PkmIn)2v;dsQgs^p06}+Q~uX6&4yEYIi_`ty5Ll4e(;Y7 zxuUF={Rj$Hjpm6QUQKCCMvaXaXa>!<^gqc;@kYwyqRZqYY>mc_kpqe}qNl_&BM>>V z3yy<#Lz6{gG5!ul%E7FQ&@f5X9V`lh`2|5rNat!%pbE}RM+W-%j(fk70)?+stz-Oq-IRE|+-i=2 z_^Fuv>%9MrFlsuv3l{)n)OXsEp>twYK35lgutv2oy!R&#y>(Rh$Ed3}@D9c7NxQFI zP6que4edg~ZsVQ~ef^JMg{eY117T`oOvf9WMR6UAxp_Xwq5|t-sVBIK$;cCwa64 zH28OG{}3EQ=}&MXy3?T}8{hj#k&o)G<=jcmxV{=Yh?(#+)}1%XZ$3J5&{haocXOi3 zF3^)zO&-QwcaG8Uf^OeQjyB3RTXu4dCQQ6^UHx?M#6e`hQ@p;R`L+J)n}V-o{ln~E h%BsxhJzA_kgp8*I7olvP>+|;`U}Is2qL_Q#`x^^#s5Afo diff --git a/Items/PermanentBoosters/RedLightningContainerGlow.png b/Items/PermanentBoosters/RedLightningContainerGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..523b6d4572eb3f175a541e180c0a8c7e77cba7f9 GIT binary patch literal 903 zcmV;219<$2P)S=3AH8ZR_{SBRTR}o%}d{77V!3bn?(P(c@uhx&9E`EK3C_+Y0UCm;` z>vx|v8Qy-s+guNt;rQa|j29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Yh?(#+)}1%XZ$3J5&{haocXOi3 zF3^)zO&-QwcaG8Uf^OeQjyB3RTXu4dCQQ6^UHx?M#6e`hQ@p;R`L+J)n}V-o{ln~E h%BsxhJzA_kgp8*I7olvP>+|;`U}Is2qL_Q#`x^^#s5Afo literal 0 HcmV?d00001 diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index c4e2fbc8cc..e9075451e0 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -5827,7 +5827,7 @@ namespace CalamityMod.NPCs Vector2 targetVector = player.Center - vectorCenter; float offsetAngle = 0f; int totalProjectiles = 0; - int chains = 0; + //int chains = 0; // Parabolic Arcs if (npc.localAI[0] % 60f == 0f) From a8eb0435c1a291c870ed41665fdf642dbe908d77 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:09:22 -0400 Subject: [PATCH 050/128] nerfed galileo gladius and cleaned up some code --- Items/Weapons/Melee/GalileoGladius.cs | 184 ++++++++++++-------------- NPCs/CalamityGlobalNPC.cs | 2 +- 2 files changed, 87 insertions(+), 99 deletions(-) diff --git a/Items/Weapons/Melee/GalileoGladius.cs b/Items/Weapons/Melee/GalileoGladius.cs index ac9aac6711..6e67d16e8f 100644 --- a/Items/Weapons/Melee/GalileoGladius.cs +++ b/Items/Weapons/Melee/GalileoGladius.cs @@ -10,112 +10,100 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { - public class GalileoGladius : ModItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Galileo Gladius"); - Tooltip.SetDefault("Don't underestimate the power of small space swords\n" + - "Shoots a homing crescent moon\n" + + public class GalileoGladius : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Galileo Gladius"); + Tooltip.SetDefault("Don't underestimate the power of small space swords\n" + + "Shoots a homing crescent moon\n" + "Spawns planetoids on enemy hits"); - } + } - public override void SetDefaults() - { - item.useStyle = ItemUseStyleID.Stabbing; - item.useTurn = false; - item.useAnimation = 10; - item.useTime = 10; - item.width = 44; - item.height = 44; - item.damage = 200; - item.melee = true; - item.knockBack = 10f; - item.UseSound = SoundID.Item1; - item.useTurn = true; - item.autoReuse = true; - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 14f; - item.value = Item.buyPrice(1, 40, 0, 0); - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.PureGreen; - } + public override void SetDefaults() + { + item.useStyle = ItemUseStyleID.Stabbing; + item.useTurn = false; + item.useAnimation = 10; + item.useTime = 10; + item.width = 44; + item.height = 44; + item.damage = 200; + item.melee = true; + item.knockBack = 10f; + item.UseSound = SoundID.Item1; + item.useTurn = true; + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 14f; + item.value = Item.buyPrice(1, 40, 0, 0); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.PureGreen; + } - 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 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, (int)(damage * 0.5), knockBack, player.whoAmI, 0f, 0f); + return false; + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 8); - recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddTile(TileID.LunarCraftingStation); - recipe.SetResult(this); - recipe.AddRecipe(); - } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } - public override void MeleeEffects(Player player, Rectangle hitbox) - { - if (Main.rand.NextBool(5)) - { - int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, (Main.rand.NextBool(2) ? 20 : 176), (float)(player.direction * 2), 0f, 150, default, 1.3f); - Main.dust[num250].velocity *= 0.2f; - Main.dust[num250].noGravity = true; - } - } + public override void MeleeEffects(Player player, Rectangle hitbox) + { + if (Main.rand.NextBool(5)) + { + int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, (Main.rand.NextBool(2) ? 20 : 176), (float)(player.direction * 2), 0f, 150, default, 1.3f); + Main.dust[num250].velocity *= 0.2f; + Main.dust[num250].noGravity = true; + } + } - public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(ModContent.BuffType(), 300); - float x = player.position.X + (float)Main.rand.Next(-400, 400); - float y = player.position.Y - (float)Main.rand.Next(500, 800); - Vector2 vector = new Vector2(x, y); - float num15 = player.position.X + (float)(player.width / 2) - vector.X; - float num16 = player.position.Y + (float)(player.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) - { + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + SpawnMeteor(player); + } + + public override void OnHitPvp(Player player, Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 300); + SpawnMeteor(player); + } + + private void SpawnMeteor(Player player) + { + float x = player.Center.X + (float)Main.rand.Next(-400, 400); + float y = player.Center.Y - (float)Main.rand.Next(500, 800); + Vector2 startPos = new Vector2(x, y); + Vector2 velocity = player.Center - startPos; + float num15 = player.Center.X - vector.X; + float num16 = player.Center.Y - vector.Y; + velocity.X += (float)Main.rand.Next(-100, 101); + float speed = 25f; + float targetDist = velocity.Length(); + targetDist = speed / targetDist; + velocity.X *= targetDist; + velocity.Y *= targetDist; + if (player.whoAmI == Main.myPlayer) + { if (player.Calamity().galileoCooldown <= 0) { - int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 2f), 15f, player.whoAmI, 0f, 0f); - Main.projectile[num19].ai[1] = player.position.Y; + int damage = player.GetWeaponDamage(player.ActiveItem()) * 2f; + int meteor = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType(), damage, 15f, player.whoAmI); + Main.projectile[meteor].ai[1] = player.position.Y; player.Calamity().galileoCooldown = 15; } - } - } - - public override void OnHitPvp(Player player, Player target, int damage, bool crit) - { - target.AddBuff(ModContent.BuffType(), 300); - float x = player.position.X + (float)Main.rand.Next(-400, 400); - float y = player.position.Y - (float)Main.rand.Next(500, 800); - Vector2 vector = new Vector2(x, y); - float num15 = player.position.X + (float)(player.width / 2) - vector.X; - float num16 = player.position.Y + (float)(player.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) - { - if (player.Calamity().galileoCooldown <= 0) - { - int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 2f), 15f, player.whoAmI, 0f, 0f); - Main.projectile[num19].ai[1] = player.position.Y; - player.Calamity().galileoCooldown = 15; - } - } - } - } + } + } + } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 70b32e0926..dfbf228412 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3657,7 +3657,7 @@ namespace CalamityMod.NPCs { damage = (int)(damage * 0.2); } - else if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) + else if (projectile.type == ProjectileType()) { damage = (int)(damage * 0.5); } From 188ffc03269708d8d97d88b6ccd4feb4aea78a48 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:12:23 -0400 Subject: [PATCH 051/128] increased black hawk firing cooldown but they fire through tiles now --- Projectiles/Summon/BlackHawkBullet.cs | 3 +++ Projectiles/Summon/BlackHawkSummon.cs | 2 +- Projectiles/Summon/SiriusMinion.cs | 10 ++-------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Projectiles/Summon/BlackHawkBullet.cs b/Projectiles/Summon/BlackHawkBullet.cs index 74930940bf..71969f4126 100644 --- a/Projectiles/Summon/BlackHawkBullet.cs +++ b/Projectiles/Summon/BlackHawkBullet.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Summon aiType = ProjectileID.BulletHighVelocity; projectile.penetrate = 1; projectile.timeLeft = 600; + projectile.tileCollide = false; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -35,5 +36,7 @@ namespace CalamityMod.Projectiles.Summon CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2); return false; } + + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200); } } diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index c0974c50fd..40336956f6 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[1] += Main.rand.Next(1, 4); } //Set the minion to be ready for attack - if (projectile.ai[1] > 90f) + if (projectile.ai[1] > 130f) { projectile.ai[1] = 0f; projectile.netUpdate = true; diff --git a/Projectiles/Summon/SiriusMinion.cs b/Projectiles/Summon/SiriusMinion.cs index 3631108e70..44c0368aaf 100644 --- a/Projectiles/Summon/SiriusMinion.cs +++ b/Projectiles/Summon/SiriusMinion.cs @@ -150,14 +150,8 @@ namespace CalamityMod.Projectiles.Summon } } - public override Color? GetAlpha(Color lightColor) - { - return new Color(200, 200, 200, 200); - } + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200); - public override bool CanDamage() - { - return false; - } + public override bool CanDamage() => false; } } From f1f1591e963398cbdb932cccd53e1367540c597c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:13:48 -0400 Subject: [PATCH 052/128] nerfed tfo --- Items/Weapons/Melee/TrueForbiddenOathblade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/TrueForbiddenOathblade.cs b/Items/Weapons/Melee/TrueForbiddenOathblade.cs index 97fcab0849..2834b74c65 100644 --- a/Items/Weapons/Melee/TrueForbiddenOathblade.cs +++ b/Items/Weapons/Melee/TrueForbiddenOathblade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 88; item.height = 88; - item.damage = 200; + item.damage = 150; item.melee = true; item.useAnimation = 23; item.useTime = 23; From 7c0aa295236a47fddbe829c2a8281ff80f312224 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:14:17 -0400 Subject: [PATCH 053/128] slightly nerfed abyss blade --- Items/Weapons/Melee/AbyssBlade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/AbyssBlade.cs b/Items/Weapons/Melee/AbyssBlade.cs index 81e597cecb..5c04b792b4 100644 --- a/Items/Weapons/Melee/AbyssBlade.cs +++ b/Items/Weapons/Melee/AbyssBlade.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 74; item.height = 74; - item.damage = 110; + item.damage = 105; item.melee = true; item.useAnimation = 26; item.useTime = 26; From 301aa021ec80f14deb11dadbf679e9f969d1a648 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:15:15 -0400 Subject: [PATCH 054/128] made subduction slicer use times the same --- Items/Weapons/Melee/FlameScytheMelee.cs | 4 ++-- Items/Weapons/Rogue/FlameScythe.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/FlameScytheMelee.cs b/Items/Weapons/Melee/FlameScytheMelee.cs index e5abf72199..7d8d78e68c 100644 --- a/Items/Weapons/Melee/FlameScytheMelee.cs +++ b/Items/Weapons/Melee/FlameScytheMelee.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; - item.useAnimation = 19; + item.useAnimation = 20; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = 19; + item.useTime = 20; item.knockBack = 8.5f; item.UseSound = SoundID.Item1; item.melee = true; diff --git a/Items/Weapons/Rogue/FlameScythe.cs b/Items/Weapons/Rogue/FlameScythe.cs index d56eeac022..d301f2742d 100644 --- a/Items/Weapons/Rogue/FlameScythe.cs +++ b/Items/Weapons/Rogue/FlameScythe.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Weapons.Rogue item.noUseGraphic = true; item.autoReuse = true; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = 21; - item.useAnimation = 21; + item.useTime = 20; + item.useAnimation = 20; item.knockBack = 8.5f; item.UseSound = SoundID.Item1; item.value = Item.buyPrice(gold: 80); From 440b3303962de7cde02fb59b154eacd171c2307e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:17:03 -0400 Subject: [PATCH 055/128] nerfed triploon --- Items/Weapons/Ranged/Triploon.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Ranged/Triploon.cs b/Items/Weapons/Ranged/Triploon.cs index 8b931de2b6..ccab6173d2 100644 --- a/Items/Weapons/Ranged/Triploon.cs +++ b/Items/Weapons/Ranged/Triploon.cs @@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 80; + item.damage = 75; item.ranged = true; item.width = 46; item.height = 24; - item.useTime = 12; - item.useAnimation = 12; + item.useTime = 16; + item.useAnimation = 16; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 7.5f; From 13710352bf0a56bcf42c93f2beff1179cf448c93 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:17:24 -0400 Subject: [PATCH 056/128] buffed megalodon --- Items/Weapons/Ranged/Megalodon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/Megalodon.cs b/Items/Weapons/Ranged/Megalodon.cs index c97ada1a85..7d2f4d9b5e 100644 --- a/Items/Weapons/Ranged/Megalodon.cs +++ b/Items/Weapons/Ranged/Megalodon.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 28; + item.damage = 34; item.ranged = true; item.width = 72; item.height = 32; From 4223cd91cfaabc7afe465c3ab218a9c3dcb17641 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:26:45 -0400 Subject: [PATCH 057/128] nerfed ballistic poison bomb and typhon's greed --- CalamityMod.cs | 1 + Items/Weapons/Rogue/BallisticPoisonBomb.cs | 6 ++-- Projectiles/Melee/TyphonsGreedBubble.cs | 36 +++++++++----------- Projectiles/Rogue/BallisticPoisonBombProj.cs | 2 +- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 11567185cd..d8feabc4df 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -698,6 +698,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType() }; diff --git a/Items/Weapons/Rogue/BallisticPoisonBomb.cs b/Items/Weapons/Rogue/BallisticPoisonBomb.cs index 8753a50292..45d20c00b4 100644 --- a/Items/Weapons/Rogue/BallisticPoisonBomb.cs +++ b/Items/Weapons/Rogue/BallisticPoisonBomb.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 30; - item.damage = 55; + item.damage = 50; item.noMelee = true; item.noUseGraphic = true; - item.useAnimation = 22; + item.useAnimation = 26; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTime = 22; + item.useTime = 26; item.knockBack = 6.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; diff --git a/Projectiles/Melee/TyphonsGreedBubble.cs b/Projectiles/Melee/TyphonsGreedBubble.cs index 77220055cf..45f8798056 100644 --- a/Projectiles/Melee/TyphonsGreedBubble.cs +++ b/Projectiles/Melee/TyphonsGreedBubble.cs @@ -39,32 +39,27 @@ namespace CalamityMod.Projectiles.Melee { projectile.frame = 0; } - float num953 = 50f * projectile.ai[1]; //100 - float scaleFactor12 = 10f * projectile.ai[1]; //5 + float inertia = 50f * projectile.ai[1]; //100 + float speed = 10f * projectile.ai[1]; //5 float num954 = 40f; - if ((double)Math.Abs(projectile.velocity.X) > 0.2) + if (Math.Abs(projectile.velocity.X) > 0.2f) { projectile.spriteDirection = -projectile.direction; } - if (projectile.velocity.X < 0f) - { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); - } - else - { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); - } + projectile.rotation = projectile.velocity.ToRotation(); Lighting.AddLight(projectile.Center, 0f, 0.1f, 0.7f); - if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) + + Player player = Main.player[projectile.owner]; + if (player.active && !player.dead) { - if (projectile.Distance(Main.player[projectile.owner].Center) > num954) + if (projectile.Distance(player.Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); + Vector2 vector102 = projectile.DirectionTo(player.Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; } - projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953; + projectile.velocity = (projectile.velocity * (inertia - 1f) + vector102 * speed) / inertia; } } else @@ -98,18 +93,18 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.Item21, projectile.position); 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.position.X -= (float)(projectile.width / 2); + 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, 33, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } for (int num194 = 0; num194 < 6; num194++) { - int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 186, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + int num195 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 186, 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, 186, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + num195 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 186, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); Main.dust[num195].velocity *= 2f; Main.dust[num195].noGravity = true; } @@ -117,6 +112,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; + projectile.damage /= 2; projectile.Damage(); } } diff --git a/Projectiles/Rogue/BallisticPoisonBombProj.cs b/Projectiles/Rogue/BallisticPoisonBombProj.cs index 7b76aa05f5..2cd7f8ad45 100644 --- a/Projectiles/Rogue/BallisticPoisonBombProj.cs +++ b/Projectiles/Rogue/BallisticPoisonBombProj.cs @@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 vector15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); vector15.Normalize(); vector15 *= (float)Main.rand.Next(10, 201) * 0.01f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 1f, projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector15.X, vector15.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.25), 1f, projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); num3 = num321; } } From 2772b431e8d2e9a2f6f1a2e15fe3671d3785d6b3 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:45:47 -0400 Subject: [PATCH 058/128] post prov ranger balancing --- Items/Weapons/Ranged/AngelicShotgun.cs | 6 ++--- Items/Weapons/Ranged/ArterialAssault.cs | 4 +-- Items/Weapons/Ranged/BlissfulBombardier.cs | 2 +- Items/Weapons/Ranged/BloodBoiler.cs | 2 +- Items/Weapons/Ranged/HandheldTank.cs | 2 +- Items/Weapons/Ranged/MolecularManipulator.cs | 2 +- Items/Weapons/Ranged/NettlelineGreatbow.cs | 6 ++--- Items/Weapons/Ranged/Spyker.cs | 4 +-- Items/Weapons/Ranged/StormDragoon.cs | 2 +- Items/Weapons/Ranged/TheStorm.cs | 13 +++++----- Projectiles/Ranged/BloodfireArrowProj.cs | 8 +++--- Projectiles/Ranged/Bolt.cs | 27 +++++++++++++++++--- 12 files changed, 49 insertions(+), 29 deletions(-) diff --git a/Items/Weapons/Ranged/AngelicShotgun.cs b/Items/Weapons/Ranged/AngelicShotgun.cs index 91cfeca001..eac6e4b69b 100644 --- a/Items/Weapons/Ranged/AngelicShotgun.cs +++ b/Items/Weapons/Ranged/AngelicShotgun.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public class AngelicShotgun : ModItem { - private static int BaseDamage = 90; + private static int BaseDamage = 100; private static float BulletSpeed = 12f; public override void SetStaticDefaults() @@ -31,8 +31,8 @@ Fighting 'til the war's won"); item.width = 44; item.height = 7; - item.useTime = 26; - item.useAnimation = 26; + item.useTime = 24; + item.useAnimation = 24; item.UseSound = SoundID.Item38; item.useStyle = ItemUseStyleID.HoldingOut; diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 5e2db0fb4b..4d954653d1 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged { DisplayName.SetDefault("Arterial Assault"); Tooltip.SetDefault("Fires a chain of arrows from the sky\n" + - "Wooden arrows are converted to bloodfire arrows"); + "Wooden arrows are converted to homing bloodfire arrows"); } public override void SetDefaults() @@ -91,7 +91,7 @@ namespace CalamityMod.Items.Weapons.Ranged float speedY5 = num79; if (type == ProjectileID.WoodenArrowFriendly) { - int bloodfire = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15)); + int bloodfire = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 80f); Main.projectile[bloodfire].tileCollide = false; } else diff --git a/Items/Weapons/Ranged/BlissfulBombardier.cs b/Items/Weapons/Ranged/BlissfulBombardier.cs index 6924c37d28..88d05dc3a7 100644 --- a/Items/Weapons/Ranged/BlissfulBombardier.cs +++ b/Items/Weapons/Ranged/BlissfulBombardier.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 62; + item.damage = 75; item.ranged = true; item.width = 76; item.height = 30; diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 73d60211db..429d3b1ba1 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 400; + item.damage = 415; item.ranged = true; item.width = 60; item.height = 30; diff --git a/Items/Weapons/Ranged/HandheldTank.cs b/Items/Weapons/Ranged/HandheldTank.cs index a06e8e1fab..4d0ebd6e89 100644 --- a/Items/Weapons/Ranged/HandheldTank.cs +++ b/Items/Weapons/Ranged/HandheldTank.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.width = 110; item.height = 46; item.ranged = true; - item.damage = 1850; + item.damage = 1000; item.crit += 15; item.knockBack = 16f; item.useTime = 71; diff --git a/Items/Weapons/Ranged/MolecularManipulator.cs b/Items/Weapons/Ranged/MolecularManipulator.cs index c1ca27efe4..2257236e07 100644 --- a/Items/Weapons/Ranged/MolecularManipulator.cs +++ b/Items/Weapons/Ranged/MolecularManipulator.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 700; + item.damage = 890; item.ranged = true; item.width = 60; item.height = 30; diff --git a/Items/Weapons/Ranged/NettlelineGreatbow.cs b/Items/Weapons/Ranged/NettlelineGreatbow.cs index 10efe736e6..b7fc40d441 100644 --- a/Items/Weapons/Ranged/NettlelineGreatbow.cs +++ b/Items/Weapons/Ranged/NettlelineGreatbow.cs @@ -17,12 +17,12 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 120; + item.damage = 115; item.ranged = true; item.width = 36; item.height = 64; - item.useTime = 17; - item.useAnimation = 17; + item.useTime = 18; + item.useAnimation = 18; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 3f; diff --git a/Items/Weapons/Ranged/Spyker.cs b/Items/Weapons/Ranged/Spyker.cs index 63674d439d..834abf780c 100644 --- a/Items/Weapons/Ranged/Spyker.cs +++ b/Items/Weapons/Ranged/Spyker.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 250; + item.damage = 240; item.ranged = true; item.width = 44; item.height = 26; @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.autoReuse = true; item.shootSpeed = 9f; item.shoot = ModContent.ProjectileType(); - item.useAmmo = 97; + item.useAmmo = AmmoID.Bullet; item.Calamity().customRarity = CalamityRarity.Turquoise; } diff --git a/Items/Weapons/Ranged/StormDragoon.cs b/Items/Weapons/Ranged/StormDragoon.cs index 9bca0f55a4..0b80a58e10 100644 --- a/Items/Weapons/Ranged/StormDragoon.cs +++ b/Items/Weapons/Ranged/StormDragoon.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 90; + item.damage = 94; item.ranged = true; item.width = 74; item.height = 34; diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index edda608153..105bce9557 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -41,7 +41,6 @@ namespace CalamityMod.Items.Weapons.Ranged { int i = Main.myPlayer; float num72 = Main.rand.Next(25, 30); - int num73 = damage; float num74 = knockBack; num74 = player.GetWeaponKnockback(item, num74); player.itemTime = item.useTime; @@ -88,17 +87,17 @@ namespace CalamityMod.Items.Weapons.Ranged float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f; if (type == ProjectileID.WoodenArrowFriendly) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType(), num73, num74, i, 0f, 0f); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType(), num73, num74, i, 0f, 0f); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, ModContent.ProjectileType(), num73, num74, i, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType(), damage, num74, i, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType(), damage, num74, i, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, ModContent.ProjectileType(), damage, num74, i, 0f, 0f); } else { - int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, num73, num74, i, 0f, 0f); + int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, damage, num74, i, 0f, 0f); Main.projectile[num121].noDropItem = true; - int num122 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, num73, num74, i, 0f, 0f); + int num122 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, damage, num74, i, 0f, 0f); Main.projectile[num122].noDropItem = true; - int num123 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, type, num73, num74, i, 0f, 0f); + int num123 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, type, damage, num74, i, 0f, 0f); Main.projectile[num123].noDropItem = true; } } diff --git a/Projectiles/Ranged/BloodfireArrowProj.cs b/Projectiles/Ranged/BloodfireArrowProj.cs index c8b41d9cfa..f9f7acbcee 100644 --- a/Projectiles/Ranged/BloodfireArrowProj.cs +++ b/Projectiles/Ranged/BloodfireArrowProj.cs @@ -39,10 +39,8 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - MathHelper.ToRadians(90); - projectile.localAI[0] += 1f; - if (projectile.localAI[0] == 15f) + if (projectile.timeLeft % 15 == 0) { - projectile.localAI[0] = 0f; for (int l = 0; l < 12; l++) { Vector2 vector3 = Vector2.UnitX * (float)-(float)projectile.width / 2f; @@ -56,6 +54,10 @@ namespace CalamityMod.Projectiles.Ranged Main.dust[num9].velocity = Vector2.Normalize(projectile.Center - projectile.velocity * 3f - Main.dust[num9].position) * 1.25f; } } + if (projectile.ai[1] == 80f) //means it's from Arterial Assault's wooden arrow conversion + { + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 20f, 20f); + } } public override void Kill(int timeLeft) diff --git a/Projectiles/Ranged/Bolt.cs b/Projectiles/Ranged/Bolt.cs index 15d4aba20f..cbe59afe1f 100644 --- a/Projectiles/Ranged/Bolt.cs +++ b/Projectiles/Ranged/Bolt.cs @@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Ranged projectile.ranged = true; projectile.alpha = 255; projectile.penetrate = 1; + projectile.timeLeft = 600; } public override void AI() @@ -33,11 +34,9 @@ namespace CalamityMod.Projectiles.Ranged Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.65f); projectile.velocity.X *= 1.015f; projectile.velocity.Y *= 1.015f; - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; - projectile.localAI[0] += 1f; - if (projectile.localAI[0] == 30f) + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + if (projectile.timeLeft % 30 == 0) { - projectile.localAI[0] = 0f; for (int l = 0; l < 12; l++) { Vector2 vector3 = Vector2.UnitX * (float)-(float)projectile.width / 2f; @@ -69,5 +68,25 @@ namespace CalamityMod.Projectiles.Ranged 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 = 32; + 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(); + int num212 = Main.rand.Next(4, 8); + for (int num213 = 0; num213 < num212; num213++) + { + int num214 = Dust.NewDust(projectile.Center - projectile.velocity / 2f, 0, 0, 135, 0f, 0f, 100, default, 2f); + Main.dust[num214].velocity *= 2f; + Main.dust[num214].noGravity = true; + } + } } } From 507f8c735bb37f36743ca5b3f5c877c483024250 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:51:49 -0400 Subject: [PATCH 059/128] pristine fury buff and weaver resist --- Items/Weapons/Ranged/PristineFury.cs | 12 +++--------- NPCs/CalamityGlobalNPC.cs | 4 ++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index 4976c299d0..66ce9525f9 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public class PristineFury : ModItem { - public static int BaseDamage = 100; + public static int BaseDamage = 140; public override void SetStaticDefaults() { @@ -40,15 +40,9 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = 23; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-25, -10); - } + public override Vector2? HoldoutOffset() => new Vector2(-25, -10); - public override bool AltFunctionUse(Player player) - { - return true; - } + public override bool AltFunctionUse(Player player) => true; public override bool CanUseItem(Player player) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index dfbf228412..dc6b24699c 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3575,6 +3575,10 @@ namespace CalamityMod.NPCs projectile.penetrate = projectile.Calamity().stealthStrike ? 6 : 9; damage = (int)(damage * 0.75); } + else if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) + { + damage = (int)(damage * 0.5); + } else if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) { damage = (int)(damage * 0.5); From 07dd547fc6b7d5aded5c7249f70435cd9272e13c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:54:19 -0400 Subject: [PATCH 060/128] bloodfire arrows now give the storm the middle finger --- Projectiles/Ranged/BloodfireArrowProj.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Projectiles/Ranged/BloodfireArrowProj.cs b/Projectiles/Ranged/BloodfireArrowProj.cs index f9f7acbcee..12ac42b282 100644 --- a/Projectiles/Ranged/BloodfireArrowProj.cs +++ b/Projectiles/Ranged/BloodfireArrowProj.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Ranged; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -88,7 +89,12 @@ namespace CalamityMod.Projectiles.Ranged return; } Player player = Main.player[projectile.owner]; - if (Main.rand.NextBool(3)) + int chance = 3; + if (player.ActiveItem().type == ModContent.ItemType()) + { + chance = 6; + } + if (Main.rand.NextBool(chance)) { player.statLife += 1; player.HealEffect(1); From da1a99efd0356cff1f333bda9e582eccbac46195 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 21:59:55 -0400 Subject: [PATCH 061/128] fixed compile issues --- Items/Weapons/Melee/GalileoGladius.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/GalileoGladius.cs b/Items/Weapons/Melee/GalileoGladius.cs index 6e67d16e8f..fbdac3cadb 100644 --- a/Items/Weapons/Melee/GalileoGladius.cs +++ b/Items/Weapons/Melee/GalileoGladius.cs @@ -86,8 +86,6 @@ namespace CalamityMod.Items.Weapons.Melee float y = player.Center.Y - (float)Main.rand.Next(500, 800); Vector2 startPos = new Vector2(x, y); Vector2 velocity = player.Center - startPos; - float num15 = player.Center.X - vector.X; - float num16 = player.Center.Y - vector.Y; velocity.X += (float)Main.rand.Next(-100, 101); float speed = 25f; float targetDist = velocity.Length(); @@ -98,7 +96,7 @@ namespace CalamityMod.Items.Weapons.Melee { if (player.Calamity().galileoCooldown <= 0) { - int damage = player.GetWeaponDamage(player.ActiveItem()) * 2f; + int damage = player.GetWeaponDamage(player.ActiveItem()) * 2; int meteor = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType(), damage, 15f, player.whoAmI); Main.projectile[meteor].ai[1] = player.position.Y; player.Calamity().galileoCooldown = 15; From 91ba51125d0eecaf652e6aeb7c617fa5ff7376af Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 23:06:09 -0400 Subject: [PATCH 062/128] fixed brimstone crate oversight --- Items/Fishing/BrimstoneCragCatches/BrimstoneCrate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Fishing/BrimstoneCragCatches/BrimstoneCrate.cs b/Items/Fishing/BrimstoneCragCatches/BrimstoneCrate.cs index 0d0297c164..bb644037cb 100644 --- a/Items/Fishing/BrimstoneCragCatches/BrimstoneCrate.cs +++ b/Items/Fishing/BrimstoneCragCatches/BrimstoneCrate.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches DropHelper.DropItem(player, ModContent.ItemType(), 3, 5); DropHelper.DropItemCondition(player, ModContent.ItemType(), Main.hardMode, 0.5f, 5, 15); DropHelper.DropItemCondition(player, ModContent.ItemType(), Main.hardMode, 0.15f, 2, 6); - DropHelper.DropItemCondition(player, ModContent.ItemType(), NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3, 0.5f, 5, 15); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.downedBrimstoneElemental, 0.5f, 5, 15); DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.downedProvidence, 0.25f, 8, 10); // Weapons (none) From dccb73c91ed17bfcb613537a4ef8e25474ca8be7 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Mon, 29 Jun 2020 22:22:22 -0500 Subject: [PATCH 063/128] Eternity can now properly target WoF eyes --- Projectiles/Magic/EternityBook.cs | 2 +- Utilities/CalamityUtils.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projectiles/Magic/EternityBook.cs b/Projectiles/Magic/EternityBook.cs index 66419f62ed..571189b2b5 100644 --- a/Projectiles/Magic/EternityBook.cs +++ b/Projectiles/Magic/EternityBook.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Magic projectile.ai[0]++; if (projectile.ai[0] == 1f) { - NPC target = projectile.Center.ClosestNPCAt(4400f, true, true); + NPC target = Main.MouseWorld.ClosestNPCAt(4400f, true, true); if (target != null) { diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 8b6321153e..a8088464e4 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -382,8 +382,8 @@ namespace CalamityMod bool bossFound = false; for (int index = 0; index < Main.npc.Length; index++) { - //if we've found a valid boss target, ignore ALL targets which aren't bosses. - if (bossFound && !Main.npc[index].boss) + // If we've found a valid boss target, ignore ALL targets which aren't bosses. + if (bossFound && !(Main.npc[index].boss || Main.npc[index].type == NPCID.WallofFleshEye)) continue; if (Main.npc[index].CanBeChasedBy(null, false)) { @@ -395,7 +395,7 @@ namespace CalamityMod if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit) { - if (Main.npc[index].boss) + if (Main.npc[index].boss || Main.npc[index].type == NPCID.WallofFleshEye) bossFound = true; distance = Vector2.Distance(origin, Main.npc[index].Center); closestTarget = Main.npc[index]; From 2f41ebaec94ef73ccaa1d4647ce92450aac54df3 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 29 Jun 2020 23:48:13 -0400 Subject: [PATCH 064/128] increased hyperius bullet accuracy --- Projectiles/Ranged/HyperiusBulletProj.cs | 35 +++++++----------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/Projectiles/Ranged/HyperiusBulletProj.cs b/Projectiles/Ranged/HyperiusBulletProj.cs index 14f578fa0d..f580d96470 100644 --- a/Projectiles/Ranged/HyperiusBulletProj.cs +++ b/Projectiles/Ranged/HyperiusBulletProj.cs @@ -75,35 +75,20 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - float xPos = Main.rand.NextBool(2) ? projectile.position.X + 800 : projectile.position.X - 800; - Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); - float num80 = xPos; - float speedX = (float)target.position.X - vector2.X; - float speedY = (float)target.position.Y - vector2.Y; - float dir = 10 / num80; - speedX *= dir * 150; - speedY *= dir * 150; - if (speedX > 15f) - { - speedX = 15f; - } - if (speedX < -15f) - { - speedX = -15f; - } - if (speedY > 15f) - { - speedY = 15f; - } - if (speedY < -15f) - { - speedY = -15f; - } + float xPos = projectile.Center.X + 800 * Main.rand.NextBool(2).ToDirectionInt(); + float yPos = projectile.Center.Y + Main.rand.Next(-800, 801); + Vector2 spawnPosition = new Vector2(xPos, yPos); + Vector2 velocity = target.Center - spawnPosition; + float dir = 10 / spawnPosition.X; + velocity.X *= dir * 150; + velocity.Y *= dir * 150; + velocity.X = MathHelper.Clamp(velocity.X, -15f, 15f); + velocity.Y = MathHelper.Clamp(velocity.Y, -15f, 15f); if (projectile.owner == Main.myPlayer) { int splitDamage = (int)(projectile.damage * 0.6f); float splitKB = 1f; - Projectile.NewProjectile(vector2, new Vector2(speedX, speedY), ModContent.ProjectileType(), splitDamage, splitKB, projectile.owner); + Projectile.NewProjectile(spawnPosition, velocity, ModContent.ProjectileType(), splitDamage, splitKB, projectile.owner); } } From bfd112c9c2b1d3687a8b5b32e7cf6ae6986b4f40 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 11:53:34 -0400 Subject: [PATCH 065/128] pwnagehammer fix --- Items/Weapons/Melee/PwnagehammerMelee.cs | 3 +-- Items/Weapons/Rogue/Pwnagehammer.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/PwnagehammerMelee.cs b/Items/Weapons/Melee/PwnagehammerMelee.cs index 5029aa0aab..d0bbda9e53 100644 --- a/Items/Weapons/Melee/PwnagehammerMelee.cs +++ b/Items/Weapons/Melee/PwnagehammerMelee.cs @@ -24,8 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; - item.useAnimation = item.useTime = 31; - item.reuseDelay = 17; + item.useAnimation = item.useTime = 48; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 10f; item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Rogue/Pwnagehammer.cs b/Items/Weapons/Rogue/Pwnagehammer.cs index 835be23e6f..c28f22cfaf 100644 --- a/Items/Weapons/Rogue/Pwnagehammer.cs +++ b/Items/Weapons/Rogue/Pwnagehammer.cs @@ -24,8 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; - item.useAnimation = item.useTime = 31; - item.reuseDelay = 17; + item.useAnimation = item.useTime = 48; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 10f; item.UseSound = SoundID.Item1; From 6f653df007969097e4ec3e7c01102bd39722a5f7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 11:58:29 -0400 Subject: [PATCH 066/128] nerfed abyss blade and tfo true melee --- Items/Weapons/Melee/AbyssBlade.cs | 6 ++++++ Items/Weapons/Melee/TrueForbiddenOathblade.cs | 16 ++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Items/Weapons/Melee/AbyssBlade.cs b/Items/Weapons/Melee/AbyssBlade.cs index 5c04b792b4..7ca1319a97 100644 --- a/Items/Weapons/Melee/AbyssBlade.cs +++ b/Items/Weapons/Melee/AbyssBlade.cs @@ -38,6 +38,12 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 9f; } + 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, new Vector2(speedX, speedY), type, (int)(damage * 0.8), knockBack, player.whoAmI); + return false; + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/Melee/TrueForbiddenOathblade.cs b/Items/Weapons/Melee/TrueForbiddenOathblade.cs index 2834b74c65..104639c965 100644 --- a/Items/Weapons/Melee/TrueForbiddenOathblade.cs +++ b/Items/Weapons/Melee/TrueForbiddenOathblade.cs @@ -74,25 +74,25 @@ namespace CalamityMod.Items.Weapons.Melee { target.AddBuff(BuffID.ShadowFlame, 900); target.AddBuff(BuffID.OnFire, 900); - player.ApplyDamageToNPC(target, (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)) * 3, 0f, 0, false); + player.ApplyDamageToNPC(target, player.GetWeaponDamage(player.ActiveItem()) * 2, 0f, 0, false); float num50 = 1.7f; float num51 = 0.8f; float num52 = 2f; - Vector2 value3 = (target.rotation - 1.57079637f).ToRotationVector2(); + Vector2 value3 = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); Vector2 value4 = value3 * target.velocity.Length(); Main.PlaySound(SoundID.Item14, target.position); int num3; for (int num53 = 0; num53 < 40; num53 = num3 + 1) { - int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 200, default, num50); + int num54 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 200, default, num50); Dust dust = Main.dust[num54]; - dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; + dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 4.5f; dust.velocity *= 3f; dust.velocity += value4 * Main.rand.NextFloat(); - num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 100, default, num51); - dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; + num54 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 100, default, num51); + dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.velocity.Y -= 3f; dust.velocity *= 2f; dust.noGravity = true; @@ -103,9 +103,9 @@ namespace CalamityMod.Items.Weapons.Melee } for (int num55 = 0; num55 < 20; num55 = num3 + 1) { - int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 0, default, num52); + int num56 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 0, default, num52); Dust dust = Main.dust[num56]; - dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; + dust.position = target.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 1.5f; dust.velocity *= 0.5f; From 2e759bac980b9acda26241b063a9c8c9ff06e1e8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 11:59:21 -0400 Subject: [PATCH 067/128] nerfed ele shiv --- Items/Weapons/Melee/ElementalShortsword.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/ElementalShortsword.cs b/Items/Weapons/Melee/ElementalShortsword.cs index 3f07cfcb07..61cbb32cc9 100644 --- a/Items/Weapons/Melee/ElementalShortsword.cs +++ b/Items/Weapons/Melee/ElementalShortsword.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee 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, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, item.shootSpeed * player.direction, 0f, type, (int)(damage * 0.65), knockBack, player.whoAmI, 0f, 0f); return false; } From 10dc62fa98d4ffb321cbbc61785fe22f417f65d2 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 12:36:36 -0400 Subject: [PATCH 068/128] compile fix --- Items/Weapons/Melee/TrueForbiddenOathblade.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Weapons/Melee/TrueForbiddenOathblade.cs b/Items/Weapons/Melee/TrueForbiddenOathblade.cs index 104639c965..47a0e58a32 100644 --- a/Items/Weapons/Melee/TrueForbiddenOathblade.cs +++ b/Items/Weapons/Melee/TrueForbiddenOathblade.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; From 86f3ea3e02ae4b290adb895324d677ef4993bf0c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 13:02:22 -0400 Subject: [PATCH 069/128] improved lag on verium bullets, astral rounds, amidias' trident, and regulus riot --- Projectiles/CalamityGlobalProjectile.cs | 5 ++ Projectiles/Melee/AmidiasWhirlpool.cs | 1 + Projectiles/Ranged/AstralRound.cs | 102 ++++-------------------- Projectiles/Ranged/VeriumBulletProj.cs | 88 +++----------------- Projectiles/Rogue/RegulusRiotProj.cs | 1 + 5 files changed, 30 insertions(+), 167 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 5cf2057341..7af6ab5a0d 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2043,6 +2043,11 @@ namespace CalamityMod.Projectiles } } + if (!projectile.friendly) + { + homeIn = false; + } + if (homeIn) { Vector2 homeInVector = projectile.DirectionTo(center); diff --git a/Projectiles/Melee/AmidiasWhirlpool.cs b/Projectiles/Melee/AmidiasWhirlpool.cs index 87f4500b25..6dc23c828d 100644 --- a/Projectiles/Melee/AmidiasWhirlpool.cs +++ b/Projectiles/Melee/AmidiasWhirlpool.cs @@ -86,6 +86,7 @@ namespace CalamityMod.Projectiles.Melee vector145 = center13; flag59 = true; num1016 = num1017; + break; } } num3 = num1017; diff --git a/Projectiles/Ranged/AstralRound.cs b/Projectiles/Ranged/AstralRound.cs index 919fdbb32d..a43f9b7e03 100644 --- a/Projectiles/Ranged/AstralRound.cs +++ b/Projectiles/Ranged/AstralRound.cs @@ -10,6 +10,7 @@ namespace CalamityMod.Projectiles.Ranged { public class AstralRound : ModProjectile { + private float speed = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Astral Round"); @@ -50,95 +51,20 @@ namespace CalamityMod.Projectiles.Ranged projectile.spriteDirection = projectile.direction; if (Main.rand.NextBool(2)) { - int randomDust = Main.rand.Next(2); - if (randomDust == 0) - { - randomDust = ModContent.DustType(); - } - else - { - randomDust = ModContent.DustType(); - } - int num137 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), 1, 1, randomDust, 0f, 0f, 0, default, 0.5f); - Main.dust[num137].alpha = projectile.alpha; - Main.dust[num137].velocity *= 0f; - Main.dust[num137].noGravity = true; - } - float num138 = (float)Math.Sqrt((double)(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y)); - float num139 = projectile.localAI[0]; - if (num139 == 0f) - { - projectile.localAI[0] = num138; - num139 = num138; - } - float num140 = projectile.position.X; - float num141 = projectile.position.Y; - float num142 = 200f; - bool flag4 = false; - int num143 = 0; - if (projectile.ai[1] == 0f) - { - for (int num144 = 0; num144 < 200; num144++) - { - if (Main.npc[num144].CanBeChasedBy(projectile, false) && (projectile.ai[1] == 0f || projectile.ai[1] == (float)(num144 + 1))) - { - float num145 = Main.npc[num144].position.X + (float)(Main.npc[num144].width / 2); - float num146 = Main.npc[num144].position.Y + (float)(Main.npc[num144].height / 2); - float num147 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num145) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num146); - if (num147 < num142 && Collision.CanHit(new Vector2(projectile.position.X + (float)(projectile.width / 2), projectile.position.Y + (float)(projectile.height / 2)), 1, 1, Main.npc[num144].position, Main.npc[num144].width, Main.npc[num144].height)) - { - num142 = num147; - num140 = num145; - num141 = num146; - flag4 = true; - num143 = num144; - } - } - } - if (flag4) - { - projectile.ai[1] = (float)(num143 + 1); - } - flag4 = false; - } - if (projectile.ai[1] > 0f) - { - int num148 = (int)(projectile.ai[1] - 1f); - if (Main.npc[num148].active && Main.npc[num148].CanBeChasedBy(projectile, true) && !Main.npc[num148].dontTakeDamage) - { - float num149 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); - float num150 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); - float num151 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num149) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num150); - if (num151 < 1000f) - { - flag4 = true; - num140 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); - num141 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); - } - } - else - { - projectile.ai[1] = 0f; - } - } - if (!projectile.friendly) - { - flag4 = false; - } - if (flag4) - { - float num152 = num139; - Vector2 vector13 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num153 = num140 - vector13.X; - float num154 = num141 - vector13.Y; - float num155 = (float)Math.Sqrt((double)(num153 * num153 + num154 * num154)); - num155 = num152 / num155; - num153 *= num155; - num154 *= num155; - int num156 = 12; - projectile.velocity.X = (projectile.velocity.X * (float)(num156 - 1) + num153) / (float)num156; - projectile.velocity.Y = (projectile.velocity.Y * (float)(num156 - 1) + num154) / (float)num156; + int randomDust = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.DustType(), + ModContent.DustType() + }); + int astral = Dust.NewDust(projectile.position, 1, 1, randomDust, 0f, 0f, 0, default, 0.5f); + Main.dust[astral].alpha = projectile.alpha; + Main.dust[astral].velocity *= 0f; + Main.dust[astral].noGravity = true; } + + if (speed == 0f) + speed = projectile.velocity.Length(); + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 200f, speed, 12f); return false; } diff --git a/Projectiles/Ranged/VeriumBulletProj.cs b/Projectiles/Ranged/VeriumBulletProj.cs index 25615a3b50..ff0ccb8541 100644 --- a/Projectiles/Ranged/VeriumBulletProj.cs +++ b/Projectiles/Ranged/VeriumBulletProj.cs @@ -9,6 +9,7 @@ namespace CalamityMod.Projectiles.Ranged { public class VeriumBulletProj : ModProjectile { + private float speed = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Bullet"); @@ -41,86 +42,15 @@ namespace CalamityMod.Projectiles.Ranged projectile.spriteDirection = projectile.direction; if (Main.rand.NextBool(2)) { - int num137 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), 1, 1, 70, 0f, 0f, 0, default, 0.5f); - Main.dust[num137].alpha = projectile.alpha; - Main.dust[num137].velocity *= 0f; - Main.dust[num137].noGravity = true; - } - float num138 = (float)Math.Sqrt((double)(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y)); - float num139 = projectile.localAI[0]; - if (num139 == 0f) - { - projectile.localAI[0] = num138; - num139 = num138; - } - float num140 = projectile.position.X; - float num141 = projectile.position.Y; - float num142 = 300f; - bool flag4 = false; - int num143 = 0; - if (projectile.ai[1] == 0f) - { - for (int num144 = 0; num144 < 200; num144++) - { - if (Main.npc[num144].CanBeChasedBy(projectile, false) && (projectile.ai[1] == 0f || projectile.ai[1] == (float)(num144 + 1))) - { - float num145 = Main.npc[num144].position.X + (float)(Main.npc[num144].width / 2); - float num146 = Main.npc[num144].position.Y + (float)(Main.npc[num144].height / 2); - float num147 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num145) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num146); - if (num147 < num142 && Collision.CanHit(new Vector2(projectile.position.X + (float)(projectile.width / 2), projectile.position.Y + (float)(projectile.height / 2)), 1, 1, Main.npc[num144].position, Main.npc[num144].width, Main.npc[num144].height)) - { - num142 = num147; - num140 = num145; - num141 = num146; - flag4 = true; - num143 = num144; - } - } - } - if (flag4) - { - projectile.ai[1] = (float)(num143 + 1); - } - flag4 = false; - } - if (projectile.ai[1] > 0f) - { - int num148 = (int)(projectile.ai[1] - 1f); - if (Main.npc[num148].active && Main.npc[num148].CanBeChasedBy(projectile, true) && !Main.npc[num148].dontTakeDamage) - { - float num149 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); - float num150 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); - float num151 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num149) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num150); - if (num151 < 1000f) - { - flag4 = true; - num140 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); - num141 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); - } - } - else - { - projectile.ai[1] = 0f; - } - } - if (!projectile.friendly) - { - flag4 = false; - } - if (flag4) - { - float num152 = num139; - Vector2 vector13 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num153 = num140 - vector13.X; - float num154 = num141 - vector13.Y; - float num155 = (float)Math.Sqrt((double)(num153 * num153 + num154 * num154)); - num155 = num152 / num155; - num153 *= num155; - num154 *= num155; - int num156 = 12; - projectile.velocity.X = (projectile.velocity.X * (float)(num156 - 1) + num153) / (float)num156; - projectile.velocity.Y = (projectile.velocity.Y * (float)(num156 - 1) + num154) / (float)num156; + int purple = Dust.NewDust(projectile.position, 1, 1, 70, 0f, 0f, 0, default, 0.5f); + Main.dust[purple].alpha = projectile.alpha; + Main.dust[purple].velocity *= 0f; + Main.dust[purple].noGravity = true; } + + if (speed == 0f) + speed = projectile.velocity.Length(); + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 300f, speed, 12f); return false; } } diff --git a/Projectiles/Rogue/RegulusRiotProj.cs b/Projectiles/Rogue/RegulusRiotProj.cs index 2ba65c9912..862e1f579d 100644 --- a/Projectiles/Rogue/RegulusRiotProj.cs +++ b/Projectiles/Rogue/RegulusRiotProj.cs @@ -96,6 +96,7 @@ namespace CalamityMod.Projectiles.Rogue targetCenter = npcCenter; homeIn = true; targetIndex = npcIndex; + break; } } } From 81fc40351b2af497624fa86ea480ed4857d7d6ac Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 16:22:34 -0400 Subject: [PATCH 070/128] verium bullet rework --- CalPlayer/CalamityPlayer.cs | 4 +- Items/Ammo/VeriumBullet.cs | 5 +- Projectiles/Ranged/VeriumBulletProj.cs | 96 +++++++++++++++++++++++++- 3 files changed, 97 insertions(+), 8 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 689a46e05b..6a754e729c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5494,9 +5494,7 @@ namespace CalamityMod.CalPlayer damage = (int)(damage * 0.7); break; } - if (proj.type == ModContent.ProjectileType()) - damage = (int)(damage * 0.8); - else if (proj.type == ModContent.ProjectileType() && heldItem.type == ModContent.ItemType()) + if (proj.type == ModContent.ProjectileType() && heldItem.type == ModContent.ItemType()) damage = (int)(damage * 0.75); } if (proj.type == ProjectileID.SpectreWrath && player.ghostHurt) diff --git a/Items/Ammo/VeriumBullet.cs b/Items/Ammo/VeriumBullet.cs index 55ed586105..a3d7e56632 100644 --- a/Items/Ammo/VeriumBullet.cs +++ b/Items/Ammo/VeriumBullet.cs @@ -9,7 +9,8 @@ namespace CalamityMod.Items.Ammo public override void SetStaticDefaults() { DisplayName.SetDefault("Verium Bullet"); - Tooltip.SetDefault("There is no escape!"); + Tooltip.SetDefault("There is no escape!\n" + + "Homes in after striking an enemy"); } public override void SetDefaults() @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Ammo item.rare = 3; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.ammo = 97; + item.ammo = AmmoID.Bullet; } public override void AddRecipes() diff --git a/Projectiles/Ranged/VeriumBulletProj.cs b/Projectiles/Ranged/VeriumBulletProj.cs index ff0ccb8541..855bdf7477 100644 --- a/Projectiles/Ranged/VeriumBulletProj.cs +++ b/Projectiles/Ranged/VeriumBulletProj.cs @@ -24,10 +24,12 @@ namespace CalamityMod.Projectiles.Ranged projectile.aiStyle = 1; projectile.friendly = true; projectile.ranged = true; - projectile.penetrate = 1; + projectile.penetrate = 2; projectile.timeLeft = 600; projectile.extraUpdates = 1; aiType = ProjectileID.Bullet; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -48,10 +50,98 @@ namespace CalamityMod.Projectiles.Ranged Main.dust[purple].noGravity = true; } + if (projectile.ai[0] > 0f) + projectile.ai[0]--; if (speed == 0f) speed = projectile.velocity.Length(); - CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 300f, speed, 12f); - return false; + if (projectile.penetrate == 1 && projectile.ai[0] <= 0f) + { + float inertia = 15f; + Vector2 center = projectile.Center; + float maxDistance = 300f; + bool homeIn = false; + + int targetIndex = (int)projectile.ai[1]; + NPC target = Main.npc[targetIndex]; + if (target.CanBeChasedBy(projectile, false)) + { + float extraDistance = (target.width / 2) + (target.height / 2); + + bool canHit = true; + if (extraDistance < maxDistance) + canHit = Collision.CanHit(projectile.Center, 1, 1, target.Center, 1, 1); + + if (Vector2.Distance(target.Center, projectile.Center) < (maxDistance + extraDistance) && canHit) + { + center = target.Center; + homeIn = true; + } + } + + if (!homeIn) + { + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC npc = Main.npc[i]; + if (npc.CanBeChasedBy(projectile, false)) + { + float extraDistance = (npc.width / 2) + (npc.height / 2); + + bool canHit = true; + if (extraDistance < maxDistance) + canHit = Collision.CanHit(projectile.Center, 1, 1, npc.Center, 1, 1); + + if (Vector2.Distance(npc.Center, projectile.Center) < (maxDistance + extraDistance) && canHit) + { + center = npc.Center; + homeIn = true; + break; + } + } + } + } + + if (!projectile.friendly) + { + homeIn = false; + } + + if (homeIn) + { + Vector2 homeInVector = projectile.DirectionTo(center); + if (homeInVector.HasNaNs()) + homeInVector = Vector2.UnitY; + + projectile.velocity = (projectile.velocity * inertia + homeInVector * speed) / (inertia + 1f); + } + return false; + } + return true; + } + + public override bool? CanHitNPC(NPC target) + { + if (projectile.ai[0] > 0f) + { + return false; + } + return null; + } + + public override bool CanHitPvp(Player target) => projectile.ai[0] <= 0f; + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + projectile.ai[0] = 10f; + projectile.damage /= 2; + if (target.life > 0) + projectile.ai[1] = target.whoAmI; + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + projectile.ai[0] = 10f; + projectile.damage /= 2; } } } From 3b1e2a0db356a9dbaa76e9da61ee4232ae3fbc3c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 16:26:37 -0400 Subject: [PATCH 071/128] reduced terra bullet lag --- Projectiles/Ranged/TerraArrowMain.cs | 2 +- Projectiles/Ranged/TerraArrowSplit.cs | 3 +- Projectiles/Ranged/TerraBulletMain.cs | 2 +- Projectiles/Ranged/TerraBulletSplit.cs | 82 ++------------------------ 4 files changed, 10 insertions(+), 79 deletions(-) diff --git a/Projectiles/Ranged/TerraArrowMain.cs b/Projectiles/Ranged/TerraArrowMain.cs index af9e439e3f..1e93a8e051 100644 --- a/Projectiles/Ranged/TerraArrowMain.cs +++ b/Projectiles/Ranged/TerraArrowMain.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Ranged } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.25), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.25), 0f, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Ranged/TerraArrowSplit.cs b/Projectiles/Ranged/TerraArrowSplit.cs index 6b821fb134..5a75dadf2a 100644 --- a/Projectiles/Ranged/TerraArrowSplit.cs +++ b/Projectiles/Ranged/TerraArrowSplit.cs @@ -7,6 +7,7 @@ namespace CalamityMod.Projectiles.Ranged { public class TerraArrowSplit : ModProjectile { + private float speed = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Arrow"); @@ -28,7 +29,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { projectile.alpha -= 5; - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 300f, 20f, 20f); } diff --git a/Projectiles/Ranged/TerraBulletMain.cs b/Projectiles/Ranged/TerraBulletMain.cs index bd0366cb1a..28bb65c8e0 100644 --- a/Projectiles/Ranged/TerraBulletMain.cs +++ b/Projectiles/Ranged/TerraBulletMain.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Ranged } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.3), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 0f, projectile.owner, 0f, 0f); } } Main.PlaySound(SoundID.Item118, projectile.position); diff --git a/Projectiles/Ranged/TerraBulletSplit.cs b/Projectiles/Ranged/TerraBulletSplit.cs index 3f021bf8f2..b2f59896bc 100644 --- a/Projectiles/Ranged/TerraBulletSplit.cs +++ b/Projectiles/Ranged/TerraBulletSplit.cs @@ -9,6 +9,7 @@ namespace CalamityMod.Projectiles.Ranged { public class TerraBulletSplit : ModProjectile { + private float speed = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Bullet"); @@ -57,81 +58,10 @@ namespace CalamityMod.Projectiles.Ranged Main.dust[num137].position.Y = y2; Main.dust[num137].velocity *= 0f; Main.dust[num137].noGravity = true; - float num138 = (float)Math.Sqrt((double)(projectile.velocity.X * projectile.velocity.X + projectile.velocity.Y * projectile.velocity.Y)); - float num139 = projectile.localAI[0]; - if (num139 == 0f) - { - projectile.localAI[0] = num138; - num139 = num138; - } - float num140 = projectile.position.X; - float num141 = projectile.position.Y; - float num142 = 400f; - bool flag4 = false; - int num143 = 0; - if (projectile.ai[1] == 0f) - { - for (int num144 = 0; num144 < 200; num144++) - { - if (Main.npc[num144].CanBeChasedBy(projectile, false) && (projectile.ai[1] == 0f || projectile.ai[1] == (float)(num144 + 1))) - { - float num145 = Main.npc[num144].position.X + (float)(Main.npc[num144].width / 2); - float num146 = Main.npc[num144].position.Y + (float)(Main.npc[num144].height / 2); - float num147 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num145) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num146); - if (num147 < num142 && Collision.CanHit(new Vector2(projectile.position.X + (float)(projectile.width / 2), projectile.position.Y + (float)(projectile.height / 2)), 1, 1, Main.npc[num144].position, Main.npc[num144].width, Main.npc[num144].height)) - { - num142 = num147; - num140 = num145; - num141 = num146; - flag4 = true; - num143 = num144; - } - } - } - if (flag4) - { - projectile.ai[1] = (float)(num143 + 1); - } - flag4 = false; - } - if (projectile.ai[1] > 0f) - { - int num148 = (int)(projectile.ai[1] - 1f); - if (Main.npc[num148].active && Main.npc[num148].CanBeChasedBy(projectile, true) && !Main.npc[num148].dontTakeDamage) - { - float num149 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); - float num150 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); - float num151 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num149) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num150); - if (num151 < 1000f) - { - flag4 = true; - num140 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); - num141 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); - } - } - else - { - projectile.ai[1] = 0f; - } - } - if (!projectile.friendly) - { - flag4 = false; - } - if (flag4) - { - float num152 = num139; - Vector2 vector13 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num153 = num140 - vector13.X; - float num154 = num141 - vector13.Y; - float num155 = (float)Math.Sqrt((double)(num153 * num153 + num154 * num154)); - num155 = num152 / num155; - num153 *= num155; - num154 *= num155; - int num156 = 12; - projectile.velocity.X = (projectile.velocity.X * (float)(num156 - 1) + num153) / (float)num156; - projectile.velocity.Y = (projectile.velocity.Y * (float)(num156 - 1) + num154) / (float)num156; - } - } + + if (speed == 0f) + speed = projectile.velocity.Length(); + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, speed, 12f); + } } } From 5177cc3211f620f502e0f7f51f7894f3b2a5637b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 17:07:00 -0400 Subject: [PATCH 072/128] fixed baguette --- Items/Potions/Baguette.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Items/Potions/Baguette.cs b/Items/Potions/Baguette.cs index 6c20b1b2b9..8236baf7bf 100644 --- a/Items/Potions/Baguette.cs +++ b/Items/Potions/Baguette.cs @@ -29,10 +29,17 @@ namespace CalamityMod.Items.Potions item.consumable = true; item.value = Item.buyPrice(0, 0, 50, 0); item.buffType = ModContent.BuffType(); - item.buffTime = 72000; + item.buffTime = CalamityUtils.SecondsToFrames(300f); item.Calamity().customRarity = CalamityRarity.Dedicated; } + public override void OnConsumeItem(Player player) + { + //5 minutes for both + player.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(300f)); + player.AddBuff(BuffID.WellFed, CalamityUtils.SecondsToFrames(300f)); + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); From c54452bb7219f728cc6704d02a8182526d15949b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 30 Jun 2020 18:24:05 -0400 Subject: [PATCH 073/128] adjusted napalm arrows and seadragon rocket --- Projectiles/Magic/Vehemence.cs | 6 +- Projectiles/Magic/VenusianFlame.cs | 60 +++++++++++++------ Projectiles/Ranged/NapalmArrowProj.cs | 47 ++++++++------- Projectiles/Ranged/SeaDragonRocket.cs | 79 +++++++++++++------------- Projectiles/Rogue/TotalityFire.cs | 51 ++++++++++------- Projectiles/Rogue/TotalityFire.png | Bin 280 -> 618 bytes 6 files changed, 144 insertions(+), 99 deletions(-) diff --git a/Projectiles/Magic/Vehemence.cs b/Projectiles/Magic/Vehemence.cs index 228160bdac..0f9f39ab4b 100644 --- a/Projectiles/Magic/Vehemence.cs +++ b/Projectiles/Magic/Vehemence.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; Lighting.AddLight(projectile.Center, 0.45f, 0f, 0.45f); for (int num457 = 0; num457 < 2; num457++) { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 65, 0f, 0f, 100, default, 2f); + int num458 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 65, 0f, 0f, 100, default, 2f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.15f; Main.dust[num458].velocity += projectile.velocity * 0.1f; @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Magic Main.PlaySound(SoundID.Item74, projectile.position); for (int j = 0; j <= 25; j++) { - int num459 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 65, 0f, 0f, 100, default, 1f); + int num459 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 65, 0f, 0f, 100, default, 1f); Main.dust[num459].noGravity = true; Main.dust[num459].velocity *= 0.1f; } diff --git a/Projectiles/Magic/VenusianFlame.cs b/Projectiles/Magic/VenusianFlame.cs index 66ea6493c3..e7b70c8a49 100644 --- a/Projectiles/Magic/VenusianFlame.cs +++ b/Projectiles/Magic/VenusianFlame.cs @@ -9,6 +9,8 @@ namespace CalamityMod.Projectiles.Magic { public class VenusianFlame : ModProjectile { + private bool initialized = false; + public override void SetStaticDefaults() { DisplayName.SetDefault("Venusian Cinder"); @@ -31,6 +33,23 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { + //Rotation + if (projectile.ai[1] > 0f) + { + projectile.rotation = -projectile.velocity.X * 0.05f + MathHelper.PiOver2; + } + else + { + projectile.rotation = projectile.velocity.ToRotation(); + } + projectile.ai[1]--; + + //frames + if (!initialized) + { + initialized = true; + projectile.frame = Main.rand.Next(Main.projFrames[projectile.type]); + } projectile.frameCounter++; if (projectile.frameCounter > 4) { @@ -41,6 +60,8 @@ namespace CalamityMod.Projectiles.Magic { projectile.frame = 0; } + + //movement if (projectile.velocity.X != projectile.velocity.X) { projectile.velocity.X *= -0.1f; @@ -68,13 +89,25 @@ namespace CalamityMod.Projectiles.Magic } projectile.velocity.Y += 0.2f; } - projectile.rotation += projectile.velocity.X * 0.1f; - if (projectile.ai[1] == 0f && projectile.type >= 326 && projectile.type <= 328) + if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f) { - projectile.ai[1] = 1f; - Main.PlaySound(SoundID.Item13, projectile.position); + projectile.velocity.X *= 0.8f; } - if (Main.rand.NextBool(2)) + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f) + { + projectile.velocity.X *= 0.8f; + } + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } + + //Dust + if (Main.rand.NextBool(4)) { int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 55, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[num199]; @@ -84,7 +117,7 @@ namespace CalamityMod.Projectiles.Magic dust.noGravity = true; dust.velocity.Y -= 2f; } - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool(10)) { int num200 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 55, 0f, 0f, 100, default, 1f); Dust dust2 = Main.dust[num200]; @@ -94,15 +127,6 @@ namespace CalamityMod.Projectiles.Magic dust2.noGravity = true; dust2.velocity *= 0.1f; } - if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f) - { - projectile.velocity.X *= 0.8f; - } - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); - if (projectile.velocity.Y > 16f) - { - projectile.velocity.Y = 16f; - } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -110,7 +134,11 @@ namespace CalamityMod.Projectiles.Magic target.AddBuff(BuffID.OnFire, 300); } - public override bool OnTileCollide(Vector2 oldVelocity) => false; + public override bool OnTileCollide(Vector2 oldVelocity) + { + projectile.ai[1] = 10f; + return false; + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { diff --git a/Projectiles/Ranged/NapalmArrowProj.cs b/Projectiles/Ranged/NapalmArrowProj.cs index dedd67315a..defa4b9154 100644 --- a/Projectiles/Ranged/NapalmArrowProj.cs +++ b/Projectiles/Ranged/NapalmArrowProj.cs @@ -1,3 +1,4 @@ +using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using System; using Terraria; @@ -26,10 +27,10 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Main.rand.NextBool(5)) { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 6, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, DustID.Fire, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } } @@ -37,40 +38,42 @@ namespace CalamityMod.Projectiles.Ranged { projectile.position = projectile.Center; projectile.width = projectile.height = 32; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.position.X -= (float)(projectile.width / 2); + projectile.position.Y -= (float)(projectile.height / 2); Main.PlaySound(SoundID.Item14, projectile.position); - for (int num621 = 0; num621 < 5; num621++) + for (int j = 0; j < 5; j++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + Main.dust[fire].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; + Main.dust[fire].scale = 0.5f; + Main.dust[fire].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 10; num623++) + for (int k = 0; k < 10; k++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 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, 6, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + Main.dust[fire].noGravity = true; + Main.dust[fire].velocity *= 5f; + fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + Main.dust[fire].velocity *= 2f; } projectile.ExplosionGores(3); if (projectile.owner == Main.myPlayer) { - for (int num252 = 0; num252 < 3; num252++) + for (int i = 0; i < 3; i++) { - Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - while (value15.X == 0f && value15.Y == 0f) + Vector2 velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + while (velocity.X == 0f && velocity.Y == 0f) { - value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); } - value15.Normalize(); - value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ProjectileID.MolotovFire + Main.rand.Next(3), (int)((double)projectile.damage * 0.3), 0f, projectile.owner, 0f, 0f); + velocity.Normalize(); + velocity *= (float)Main.rand.Next(70, 101) * 0.1f; + int flames = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 0f, projectile.owner, 0f, 0f); + Main.projectile[flames].Calamity().forceRanged = true; + Main.projectile[flames].penetrate = 3; } } } diff --git a/Projectiles/Ranged/SeaDragonRocket.cs b/Projectiles/Ranged/SeaDragonRocket.cs index e3fc2e1452..757e5a6ad8 100644 --- a/Projectiles/Ranged/SeaDragonRocket.cs +++ b/Projectiles/Ranged/SeaDragonRocket.cs @@ -1,3 +1,4 @@ +using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using System; using Terraria; @@ -26,53 +27,53 @@ namespace CalamityMod.Projectiles.Ranged { if (projectile.ai[1] == 0f) { - for (int num621 = 0; num621 < 5; num621++) + for (int i = 0; i < 5; i++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + Main.dust[fire].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; + Main.dust[fire].scale = 0.5f; + Main.dust[fire].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } projectile.ai[1] = 1f; Main.PlaySound(SoundID.Item109, projectile.position); } - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; if (projectile.owner == Main.myPlayer && projectile.timeLeft <= 3) { projectile.tileCollide = false; projectile.ai[1] = 0f; projectile.alpha = 255; - projectile.position.X = projectile.position.X + (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.position.X = projectile.Center.X; + projectile.position.Y = projectile.Center.Y; projectile.width = 200; projectile.height = 200; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.position.X -= (float)(projectile.width / 2); + projectile.position.Y -= (float)(projectile.height / 2); projectile.knockBack = 10f; } else { if (Math.Abs(projectile.velocity.X) >= 8f || Math.Abs(projectile.velocity.Y) >= 8f) { - for (int num246 = 0; num246 < 2; num246++) + for (int j = 0; j < 2; j++) { float num247 = 0f; float num248 = 0f; - if (num246 == 1) + if (j == 1) { num247 = projectile.velocity.X * 0.5f; num248 = projectile.velocity.Y * 0.5f; } - int num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 6, 0f, 0f, 100, default, 1f); - Main.dust[num249].scale *= 2f + (float)Main.rand.Next(10) * 0.1f; - Main.dust[num249].velocity *= 0.2f; - Main.dust[num249].noGravity = true; - num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 33, 0f, 0f, 100, default, 0.5f); - Main.dust[num249].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f; - Main.dust[num249].velocity *= 0.05f; + int explosion = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, DustID.Fire, 0f, 0f, 100, default, 1f); + Main.dust[explosion].scale *= 2f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[explosion].velocity *= 0.2f; + Main.dust[explosion].noGravity = true; + explosion = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 33, 0f, 0f, 100, default, 0.5f); + Main.dust[explosion].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f; + Main.dust[explosion].velocity *= 0.05f; } } } @@ -91,37 +92,39 @@ namespace CalamityMod.Projectiles.Ranged projectile.localNPCHitCooldown = 10; projectile.Damage(); Main.PlaySound(SoundID.Item110, projectile.position); - for (int num621 = 0; num621 < 15; num621++) + for (int i = 0; i < 15; i++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int smoke = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 2f); + Main.dust[smoke].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; + Main.dust[smoke].scale = 0.5f; + Main.dust[smoke].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 25; num623++) + for (int j = 0; j < 25; j++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 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, 6, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + Main.dust[fire].noGravity = true; + Main.dust[fire].velocity *= 5f; + fire = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + Main.dust[fire].velocity *= 2f; } - int num251 = Main.rand.Next(2, 4); + int projAmt = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) { - for (int num252 = 0; num252 < num251; num252++) + for (int k = 0; k < projAmt; k++) { - Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - while (value15.X == 0f && value15.Y == 0f) + Vector2 velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + while (velocity.X == 0f && velocity.Y == 0f) { - value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + velocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); } - value15.Normalize(); - value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ProjectileID.MolotovFire + Main.rand.Next(3), (int)((double)projectile.damage * 0.33), 0f, projectile.owner, 0f, 0f); + velocity.Normalize(); + velocity *= (float)Main.rand.Next(70, 101) * 0.1f; + int flames = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.33), 0f, projectile.owner, 0f, 0f); + Main.projectile[flames].Calamity().forceRanged = true; + Main.projectile[flames].penetrate = 3; } } } diff --git a/Projectiles/Rogue/TotalityFire.cs b/Projectiles/Rogue/TotalityFire.cs index b68e18a1bc..627421cb0f 100644 --- a/Projectiles/Rogue/TotalityFire.cs +++ b/Projectiles/Rogue/TotalityFire.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -8,10 +9,14 @@ namespace CalamityMod.Projectiles.Rogue { public class TotalityFire : ModProjectile { + private bool initialized = false; + public override void SetStaticDefaults() { DisplayName.SetDefault("Fire"); - Main.projFrames[projectile.type] = 4; + Main.projFrames[projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; } public override void SetDefaults() @@ -24,30 +29,34 @@ namespace CalamityMod.Projectiles.Rogue projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = -1; projectile.Calamity().rogue = true; - projectile.alpha = 100; } public override void AI() { //make it face the way it's going - if (projectile.ai[1] == 1f) + if (projectile.ai[1] > 0f) { - projectile.rotation = -projectile.velocity.X * 0.05f; + projectile.rotation = -projectile.velocity.X * 0.05f + MathHelper.PiOver2; } else { - projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; - projectile.spriteDirection = ((projectile.velocity.X > 0f) ? -1 : 1); + projectile.rotation = projectile.velocity.ToRotation(); } + projectile.ai[1]--; //frames + if (!initialized) + { + initialized = true; + projectile.frame = Main.rand.Next(Main.projFrames[projectile.type]); + } projectile.frameCounter++; if (projectile.frameCounter > 6) { projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame > 3) + if (projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } @@ -80,6 +89,14 @@ namespace CalamityMod.Projectiles.Rogue } projectile.velocity.Y += 0.2f; } + if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f) + { + projectile.velocity.X *= 0.8f; + } + if (projectile.velocity.Y > 16f) + { + projectile.velocity.Y = 16f; + } //dust if (Main.rand.NextBool(4)) @@ -102,23 +119,11 @@ namespace CalamityMod.Projectiles.Rogue dust.noGravity = true; dust.velocity *= 0.1f; } - if (projectile.velocity.Y < 0.25f && projectile.velocity.Y > 0.15f) - { - projectile.velocity.X *= 0.8f; - } - if (projectile.velocity.Y > 16f) - { - projectile.velocity.Y = 16f; - } } public override bool OnTileCollide(Vector2 oldVelocity) { - projectile.ai[1] = 1f; - if (projectile.penetrate == 0) - { - projectile.Kill(); - } + projectile.ai[1] = 10f; return false; } @@ -131,5 +136,11 @@ namespace CalamityMod.Projectiles.Rogue { target.AddBuff(BuffID.OnFire, 120); } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } } } diff --git a/Projectiles/Rogue/TotalityFire.png b/Projectiles/Rogue/TotalityFire.png index 2313a2e7986d3532d1d830c3a47936f29da6d38a..2d6cfab7f234346d367dc99993d5cfb91d033d02 100644 GIT binary patch literal 618 zcmV-w0+s!VP)Px%BuPX;R9J=Gmp@A!K^Vq= z@(I%C3s@Oa*$A2@a5kn8R16Um|J|2F(r&GYQa?LI6CT+yF3I8<(2Z;JE0v?{U&< z06rMHVudl&vu|e-AgWK>txNB$%uGLCV`!aWOQu;C)fct#k6~O*6*#-xMt^s{IPBy=*`OX2W@5w{u$3vH(7hkqnMHJ;Rr3aZj{7-srW?_OePUHjzrQ25!6QgK;DvGBP>8zppBCHW-xB?3nYu`{Gi@E4~0R^$6>iajeQjCqr?O+ z%_on=4RQls**C`xzA3Kr90rRWzzwpzOd&UeY>QbTcLQSs0?Z+~K@CgL#X_zIxk0s% z{|<1g_?_pR59X|+KgdEZwnsO}Lar8YHOLK$foAXx@udF_E-03j8_a!Dn+K~Kw1&b$ e?hiir?Ee5*vnA!Fsn_HH0000 Date: Tue, 30 Jun 2020 21:29:35 -0400 Subject: [PATCH 074/128] ice elementals can now drop essence of eleum --- NPCs/CalamityGlobalNPCLoot.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index df480845f2..5632aa22f9 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1676,6 +1676,7 @@ namespace CalamityMod.NPCs case NPCID.IcyMerman: case NPCID.IceTortoise: + case NPCID.IceElemental: DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 2 : 3); break; From e321ef7bffaacae96bd61c95539d1640ca61dca4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 12:09:57 -0400 Subject: [PATCH 075/128] buffed corvid and endo, nerfed saros and ufos --- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 2 +- Items/Weapons/Summon/EndoHydraStaff.cs | 2 +- Items/Weapons/Summon/MidnightSunBeacon.cs | 2 +- Items/Weapons/Summon/SarosPossession.cs | 2 +- Projectiles/Summon/EndoHydraBody.cs | 2 +- Projectiles/Summon/EndoHydraHead.cs | 2 +- Projectiles/Summon/RadiantResolutionAura.cs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index 90c65ff242..62e00f7e15 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack; item.summon = true; item.mana = 11; - item.damage = 250; + item.damage = 300; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 10; diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index 4363b83103..a5a5e746ea 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.Item60; item.summon = true; item.mana = 25; - item.damage = 400; + item.damage = 450; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 10; diff --git a/Items/Weapons/Summon/MidnightSunBeacon.cs b/Items/Weapons/Summon/MidnightSunBeacon.cs index c917b687e9..18e914fde0 100644 --- a/Items/Weapons/Summon/MidnightSunBeacon.cs +++ b/Items/Weapons/Summon/MidnightSunBeacon.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 230; + item.damage = 200; item.mana = 12; item.width = item.height = 32; item.useTime = item.useAnimation = 10; diff --git a/Items/Weapons/Summon/SarosPossession.cs b/Items/Weapons/Summon/SarosPossession.cs index bd973983f8..e1e49715f2 100644 --- a/Items/Weapons/Summon/SarosPossession.cs +++ b/Items/Weapons/Summon/SarosPossession.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon item.summon = true; item.mana = 100; - item.damage = 681; + item.damage = 640; item.knockBack = 4f; item.useTime = item.useAnimation = 10; item.shoot = ModContent.ProjectileType(); diff --git a/Projectiles/Summon/EndoHydraBody.cs b/Projectiles/Summon/EndoHydraBody.cs index 2330afe3e8..46aebd9e56 100644 --- a/Projectiles/Summon/EndoHydraBody.cs +++ b/Projectiles/Summon/EndoHydraBody.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Summon { public class EndoHydraBody : ModProjectile { - public const float DistanceToCheck = 1350f; + public const float DistanceToCheck = 1600f; public override void SetStaticDefaults() { DisplayName.SetDefault("Hydra Body"); diff --git a/Projectiles/Summon/EndoHydraHead.cs b/Projectiles/Summon/EndoHydraHead.cs index 3c5837deba..38707d10be 100644 --- a/Projectiles/Summon/EndoHydraHead.cs +++ b/Projectiles/Summon/EndoHydraHead.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.NewProjectile(projectile.Center, 6f * projectile.DirectionTo(Main.npc[(int)body.ai[0]].Center), - ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner); + ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); } if (projectile.ai[1] % 40f >= 33f) diff --git a/Projectiles/Summon/RadiantResolutionAura.cs b/Projectiles/Summon/RadiantResolutionAura.cs index cd6bd7719b..4c7a35c685 100644 --- a/Projectiles/Summon/RadiantResolutionAura.cs +++ b/Projectiles/Summon/RadiantResolutionAura.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon float allocatedSlots = projectile.ai[0]; projectile.rotation += MathHelper.ToRadians(3f) + MathHelper.ToRadians(allocatedSlots * 0.85f); - int radiantOrbDamage = (int)(projectile.damage * Math.Log(allocatedSlots + 1f, 1.414214)); + int radiantOrbDamage = (int)(projectile.damage * Math.Log(allocatedSlots + 1f, 1.75)); int radiantOrbAppearRate = (int)(124 * Math.Pow(0.9, allocatedSlots)); if (radiantOrbAppearRate < 7) From 9bdfb65710b60ea2aed0e359dd8c2e41b2dd9a05 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 14:09:36 -0400 Subject: [PATCH 076/128] fixed anarchy blade not using allDamage boosts --- Items/Weapons/Melee/AnarchyBlade.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/AnarchyBlade.cs b/Items/Weapons/Melee/AnarchyBlade.cs index 3e5cd7ccca..c6dbbd8650 100644 --- a/Items/Weapons/Melee/AnarchyBlade.cs +++ b/Items/Weapons/Melee/AnarchyBlade.cs @@ -63,12 +63,12 @@ namespace CalamityMod.Items.Weapons.Melee public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { int lifeAmount = player.statLifeMax2 - player.statLife; - flat += lifeAmount * 0.1f * player.meleeDamage; + flat += lifeAmount * 0.1f * player.MeleeDamage(); } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage()), knockback, Main.myPlayer); target.AddBuff(ModContent.BuffType(), 300); if (player.statLife < (player.statLifeMax2 * 0.5f) && Main.rand.NextBool(5)) @@ -85,7 +85,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitPvp(Player player, Player target, int damage, bool crit) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), item.knockBack, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage()), item.knockBack, Main.myPlayer); target.AddBuff(ModContent.BuffType(), 300); } } From d9cc0ccbc9145fa24fa0be5ad21a407ed37ecd9f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 15:52:37 -0400 Subject: [PATCH 077/128] fixed prefix corruption on several weapons --- CalPlayer/CalamityPlayer.cs | 2 ++ CalPlayer/CalamityPlayerMiscEffects.cs | 7 ++++++ Items/Weapons/Magic/AlphaRay.cs | 2 +- Items/Weapons/Magic/PlasmaRifle.cs | 22 +++++++++++------- Items/Weapons/Magic/SHPC.cs | 26 +++++++++++++-------- Items/Weapons/Magic/Vesuvius.cs | 28 +++++++++++------------ Items/Weapons/Melee/AegisBlade.cs | 14 +++++++----- Items/Weapons/Melee/BrimlashBuster.cs | 28 +++++++++-------------- Items/Weapons/Melee/BrinyBaron.cs | 18 ++++++++------- Items/Weapons/Melee/GaelsGreatsword.cs | 25 ++++++++------------ Items/Weapons/Ranged/HalibutCannon.cs | 29 +++++++++++++----------- Items/Weapons/Ranged/Scorpion.cs | 22 ++++++++---------- Items/Weapons/Rogue/LeonidProgenitor.cs | 9 ++++++-- Items/Weapons/Rogue/Malachite.cs | 13 +++++++---- Items/Weapons/Typeless/AethersWhisper.cs | 8 +++++-- 15 files changed, 138 insertions(+), 115 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 6a754e729c..42ed78e13c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -112,6 +112,7 @@ namespace CalamityMod.CalPlayer public double trueMeleeDamage = 0D; public double contactDamageReduction = 0D; public double projectileDamageReduction = 0D; + public bool brimlashBusterBoost = false; #endregion #region External variables -- Only set by Mod.Call @@ -2257,6 +2258,7 @@ namespace CalamityMod.CalPlayer #endregion lastProjectileHit = null; + brimlashBusterBoost = false; if (CalamityWorld.bossRushActive) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index bbcbc9cfcc..e5cbfa9b34 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -8,6 +8,7 @@ using CalamityMod.Dusts; using CalamityMod.Items.Armor; using CalamityMod.Items.Fishing.AstralCatches; using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.NPCs; using CalamityMod.NPCs.AcidRain; @@ -2658,6 +2659,12 @@ namespace CalamityMod.CalPlayer modPlayer.planarSpeedBoost = 0; } + if (modPlayer.brimlashBusterBoost) + { + if (player.ActiveItem().type != ModContent.ItemType()) + modPlayer.brimlashBusterBoost = false; + } + if (modPlayer.etherealExtorter) { bool ZoneForest = !modPlayer.ZoneAbyss && !modPlayer.ZoneSulphur && !modPlayer.ZoneAstral && !modPlayer.ZoneCalamity && diff --git a/Items/Weapons/Magic/AlphaRay.cs b/Items/Weapons/Magic/AlphaRay.cs index ff2716da9e..10c235f734 100644 --- a/Items/Weapons/Magic/AlphaRay.cs +++ b/Items/Weapons/Magic/AlphaRay.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Items.Weapons.Magic value9 -= vector7; } Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0.0f, 0.0f); - int laser = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 2f, speedY * 2f, ProjectileID.LaserMachinegunLaser, (int)(damage * 0.4), knockBack, player.whoAmI, 0.0f, 0.0f); + int laser = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 2f, speedY * 2f, ProjectileID.LaserMachinegunLaser, (int)(damage * 0.4), knockBack, player.whoAmI, 0f, 0f); Main.projectile[laser].timeLeft = 120; Main.projectile[laser].tileCollide = false; } diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index 29142fe633..8d356262df 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -23,8 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic item.magic = true; item.width = 48; item.height = 22; - item.useTime = 40; - item.useAnimation = 40; + item.useTime = item.useAnimation = 8; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4f; @@ -51,21 +50,28 @@ namespace CalamityMod.Items.Weapons.Magic { if (player.altFunctionUse == 2) { - item.mana = 5; - item.useTime = 8; - item.useAnimation = 8; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBolt"); } else { - item.mana = 40; - item.useTime = 40; - item.useAnimation = 40; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBlast"); } return base.CanUseItem(player); } + public override void ModifyManaCost(Player player, ref float reduce, ref float mult) + { + if (player.altFunctionUse == 2) + mult *= 0.125f; + } + + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse == 2) + return 1f; + return 0.2f; + } + 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.altFunctionUse == 2) diff --git a/Items/Weapons/Magic/SHPC.cs b/Items/Weapons/Magic/SHPC.cs index 8a3b91912c..6a6cdd625e 100644 --- a/Items/Weapons/Magic/SHPC.cs +++ b/Items/Weapons/Magic/SHPC.cs @@ -24,8 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic item.mana = 20; item.width = 96; item.height = 34; - item.useTime = 50; - item.useAnimation = 50; + item.useTime = item.useAnimation = 7; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 3.25f; @@ -52,21 +51,28 @@ namespace CalamityMod.Items.Weapons.Magic { if (player.altFunctionUse == 2) { - item.useTime = 7; - item.useAnimation = 7; - item.mana = 6; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"); } else { - item.useTime = 50; - item.useAnimation = 50; - item.mana = 20; item.UseSound = SoundID.Item92; } return base.CanUseItem(player); } + public override void ModifyManaCost(Player player, ref float reduce, ref float mult) + { + if (player.altFunctionUse == 2) + mult *= 0.3f; + } + + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse == 2) + return 1f; + return 0.14f; + } + 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.altFunctionUse == 2) @@ -75,7 +81,7 @@ namespace CalamityMod.Items.Weapons.Magic { float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack * 0.5f, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack * 0.5f, player.whoAmI, 0f, 0f); } return false; } @@ -85,7 +91,7 @@ namespace CalamityMod.Items.Weapons.Magic { float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)((double)damage * 1.1), knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(damage * 1.1), knockBack, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Magic/Vesuvius.cs b/Items/Weapons/Magic/Vesuvius.cs index 8f22d466d8..e277392e5b 100644 --- a/Items/Weapons/Magic/Vesuvius.cs +++ b/Items/Weapons/Magic/Vesuvius.cs @@ -26,8 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic item.damage = 75; item.mana = 6; item.magic = true; - item.useAnimation = 20; - item.useTime = 20; + item.useAnimation = item.useTime = 15; item.noMelee = true; item.useStyle = ItemUseStyleID.HoldingOut; item.knockBack = 3f; @@ -53,21 +52,22 @@ namespace CalamityMod.Items.Weapons.Magic public override bool CanUseItem(Player player) { - if (player.altFunctionUse == 2) - { - item.mana = 9; - item.useTime = 20; - item.useAnimation = 20; - } - else - { - item.mana = 6; - item.useTime = 15; - item.useAnimation = 15; - } return base.CanUseItem(player); } + public override void ModifyManaCost(Player player, ref float reduce, ref float mult) + { + if (player.altFunctionUse == 2) + mult *= 1.5f; + } + + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse != 2) + return 1f; + return 0.75f; + } + 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.altFunctionUse == 2) diff --git a/Items/Weapons/Melee/AegisBlade.cs b/Items/Weapons/Melee/AegisBlade.cs index 67d9db46ac..5419d91703 100644 --- a/Items/Weapons/Melee/AegisBlade.cs +++ b/Items/Weapons/Melee/AegisBlade.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 58; item.damage = 68; item.melee = true; - item.useAnimation = 20; - item.useTime = 20; + item.useAnimation = item.useTime = 15; item.useTurn = true; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 4.25f; @@ -46,22 +45,25 @@ namespace CalamityMod.Items.Weapons.Melee if (player.altFunctionUse == 2) { item.noMelee = true; - item.useTime = 20; - item.useAnimation = 20; item.UseSound = SoundID.Item73; item.shoot = ModContent.ProjectileType(); } else { item.noMelee = false; - item.useTime = 15; - item.useAnimation = 15; item.UseSound = SoundID.Item1; item.shoot = ProjectileID.None; } return base.CanUseItem(player); } + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse != 2) + return 1f; + return 0.75f; + } + 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, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 0.85), knockBack, player.whoAmI, 0f, 0f); diff --git a/Items/Weapons/Melee/BrimlashBuster.cs b/Items/Weapons/Melee/BrimlashBuster.cs index f576976d36..47700fed3d 100644 --- a/Items/Weapons/Melee/BrimlashBuster.cs +++ b/Items/Weapons/Melee/BrimlashBuster.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 68; - item.damage = 100; + item.damage = 126; item.melee = true; item.useAnimation = 25; item.useTime = 25; @@ -56,30 +56,24 @@ namespace CalamityMod.Items.Weapons.Melee } } + public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + { + float damageMult = 0f; + if (player.Calamity().brimlashBusterBoost) + damageMult = 2f; + mult += damageMult; + } + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 300); - if (Main.rand.NextBool(3)) - { - item.damage = 378; - } - else - { - item.damage = 126; - } + player.Calamity().brimlashBusterBoost = Main.rand.NextBool(3); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { target.AddBuff(ModContent.BuffType(), 300); - if (Main.rand.NextBool(3)) - { - item.damage = 378; - } - else - { - item.damage = 126; - } + player.Calamity().brimlashBusterBoost = Main.rand.NextBool(3); } } } diff --git a/Items/Weapons/Melee/BrinyBaron.cs b/Items/Weapons/Melee/BrinyBaron.cs index a273951ccf..2660df2619 100644 --- a/Items/Weapons/Melee/BrinyBaron.cs +++ b/Items/Weapons/Melee/BrinyBaron.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 62; item.damage = 75; item.melee = true; - item.useAnimation = 20; - item.useTime = 20; + item.useAnimation = item.useTime = 15; item.useTurn = true; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 4f; @@ -47,8 +46,6 @@ namespace CalamityMod.Items.Weapons.Melee { item.noMelee = true; item.noUseGraphic = true; - item.useTime = 15; - item.useAnimation = 15; item.UseSound = SoundID.Item84; item.shoot = ModContent.ProjectileType(); } @@ -56,14 +53,19 @@ namespace CalamityMod.Items.Weapons.Melee { item.noMelee = false; item.noUseGraphic = false; - item.useTime = 20; - item.useAnimation = 20; item.UseSound = SoundID.Item1; item.shoot = ProjectileID.None; } return base.CanUseItem(player); } + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse == 2) + return 1f; + return 0.75f; + } + 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, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); @@ -80,12 +82,12 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.5f), knockback, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.5f), knockback, player.whoAmI); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.5f), item.knockBack, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.5f), item.knockBack, player.whoAmI); } } } diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index b1e3f5aa89..245e107d74 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -51,8 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 84; item.damage = BaseDamage; item.melee = true; - item.useAnimation = 17; - item.useTime = 17; + item.useAnimation = item.useTime = 12; item.useTurn = true; item.knockBack = 9; item.UseSound = SoundID.Item1; @@ -70,20 +69,14 @@ namespace CalamityMod.Items.Weapons.Melee } public override bool AltFunctionUse(Player player) => true; public override Vector2? HoldoutOffset() => new Vector2(12, 12); - public override bool CanUseItem(Player player) - { - if (player.altFunctionUse == 2) - { - item.useAnimation = 46; - item.useTime = 46; - } - else - { - item.useAnimation = 12; - item.useTime = 12; - } - return true; - } + + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse == 2) + return (12f/46f); + return 1f; + } + public override void MeleeEffects(Player player, Rectangle hitbox) { if (CalamityUtils.CountProjectiles(ModContent.ProjectileType()) < 3 && diff --git a/Items/Weapons/Ranged/HalibutCannon.cs b/Items/Weapons/Ranged/HalibutCannon.cs index 464f2bcce8..6743f3464a 100644 --- a/Items/Weapons/Ranged/HalibutCannon.cs +++ b/Items/Weapons/Ranged/HalibutCannon.cs @@ -29,28 +29,31 @@ namespace CalamityMod.Items.Weapons.Ranged item.value = Item.buyPrice(1, 0, 0, 0); item.UseSound = SoundID.Item38; item.autoReuse = true; - item.shoot = ProjectileID.PurificationPowder; + item.shoot = ProjectileID.Bullet; item.shootSpeed = 12f; - item.useAmmo = 97; + item.useAmmo = AmmoID.Bullet; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-15, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-15, 0); + + public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + { + float damageMult = 0f; + if (Main.hardMode) + damageMult = 1f; + if (NPC.downedMoonlord) + damageMult = 3f; + mult += damageMult; + } 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 (Main.hardMode) - { item.damage = 12; } - if (NPC.downedMoonlord) - { item.damage = 24; } - int num6 = Main.rand.Next(25, 36); - for (int index = 0; index < num6; ++index) + int bulletAmt = Main.rand.Next(25, 36); + for (int index = 0; index < bulletAmt; ++index) { float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f; - int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); + int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[shot].timeLeft = 180; } return false; diff --git a/Items/Weapons/Ranged/Scorpion.cs b/Items/Weapons/Ranged/Scorpion.cs index 7febcd2dcb..ba3eb73002 100644 --- a/Items/Weapons/Ranged/Scorpion.cs +++ b/Items/Weapons/Ranged/Scorpion.cs @@ -21,8 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.ranged = true; item.width = 58; item.height = 26; - item.useTime = 14; - item.useAnimation = 14; + item.useTime = item.useAnimation = 13; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 6.5f; @@ -47,24 +46,21 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool CanUseItem(Player player) { - if (player.altFunctionUse == 2) - { - item.useTime = 42; - item.useAnimation = 42; - } - else - { - item.useTime = 13; - item.useAnimation = 13; - } return base.CanUseItem(player); } + public override float UseTimeMultiplier (Player player) + { + if (player.altFunctionUse == 2) + return (13f/42f); + return 1f; + } + 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.altFunctionUse == 2) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)((double)damage * 2.2999), knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 2.2999), knockBack, player.whoAmI, 0f, 0f); return false; } else diff --git a/Items/Weapons/Rogue/LeonidProgenitor.cs b/Items/Weapons/Rogue/LeonidProgenitor.cs index 3155da29e8..fa62e10005 100644 --- a/Items/Weapons/Rogue/LeonidProgenitor.cs +++ b/Items/Weapons/Rogue/LeonidProgenitor.cs @@ -48,19 +48,24 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2) { - item.useTime = item.useAnimation = 15; item.UseSound = SoundID.Item61; item.shoot = ModContent.ProjectileType(); } else { - item.useTime = item.useAnimation = 20; item.UseSound = SoundID.Item88; item.shoot = ModContent.ProjectileType(); } return base.CanUseItem(player); } + public override float UseTimeMultiplier (Player player) + { + if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse != 2) + return 1f; + return 0.75f; + } + 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() || player.altFunctionUse != 2) diff --git a/Items/Weapons/Rogue/Malachite.cs b/Items/Weapons/Rogue/Malachite.cs index f4094c5815..9cf65f1c0e 100644 --- a/Items/Weapons/Rogue/Malachite.cs +++ b/Items/Weapons/Rogue/Malachite.cs @@ -24,8 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.damage = 62; item.noMelee = true; item.noUseGraphic = true; - item.useTime = 10; - item.useAnimation = 10; + item.useTime = item.useAnimation = 10; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 1.25f; item.UseSound = SoundID.Item1; @@ -45,25 +44,29 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - item.useTime = item.useAnimation = 10; item.UseSound = SoundID.Item109; item.shoot = ModContent.ProjectileType(); } else if (player.altFunctionUse == 2) { - item.useTime = item.useAnimation = 10; item.UseSound = SoundID.Item109; item.shoot = ModContent.ProjectileType(); } else { - item.useTime = item.useAnimation = 5; item.UseSound = SoundID.Item1; item.shoot = ModContent.ProjectileType(); } return base.CanUseItem(player); } + public override float UseTimeMultiplier (Player player) + { + if (player.Calamity().StealthStrikeAvailable() || player.altFunctionUse == 2) + return 1f; + return 2f; + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { float dmgMult = 1f; diff --git a/Items/Weapons/Typeless/AethersWhisper.cs b/Items/Weapons/Typeless/AethersWhisper.cs index b4dfa58729..1872f216d8 100644 --- a/Items/Weapons/Typeless/AethersWhisper.cs +++ b/Items/Weapons/Typeless/AethersWhisper.cs @@ -50,17 +50,21 @@ namespace CalamityMod.Items.Weapons.Typeless { item.ranged = true; item.magic = false; - item.mana = 0; } else { item.ranged = false; item.magic = true; - item.mana = 30; } return base.CanUseItem(player); } + public override void ModifyManaCost(Player player, ref float reduce, ref float mult) + { + if (player.altFunctionUse == 2) + mult *= 0f; + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { float ai0 = player.altFunctionUse == 2 ? 1f : 0f; From 8374ed280ba19d6eb0247cea8890a9f3545ec060 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 16:42:14 -0400 Subject: [PATCH 078/128] animated pristine fury & fixed bug w/ red lightning container and ectoheart --- Items/PermanentBoosters/Ectoheart.cs | 7 +-- .../RedLightningContainer.cs | 7 +-- Items/Weapons/Ranged/PristineFury.cs | 40 +++++++++++++++++- Items/Weapons/Ranged/PristineFuryGlow.png | Bin 0 -> 1851 bytes .../Weapons/Ranged/PristineFury_Animated.png | Bin 0 -> 3620 bytes 5 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 Items/Weapons/Ranged/PristineFuryGlow.png create mode 100644 Items/Weapons/Ranged/PristineFury_Animated.png diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index 51b81f9da6..20f868f541 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) => !player.Calamity().adrenalineBoostThree; - internal Rectangle GetCurrentFrame() + internal Rectangle GetCurrentFrame(bool frameCounterUp = true) { int frameAmt = 3; if (frameCounter >= 8) @@ -42,7 +42,8 @@ namespace CalamityMod.Items.PermanentBoosters frameCounter = -1; frame = frame == frameAmt - 1 ? 0 : frame + 1; } - frameCounter++; + if (frameCounterUp) + frameCounter++; return new Rectangle(0, item.height * frame, item.width, item.height); } @@ -63,7 +64,7 @@ namespace CalamityMod.Items.PermanentBoosters public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/EctoheartGlow"); - spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); } public override bool UseItem(Player player) diff --git a/Items/PermanentBoosters/RedLightningContainer.cs b/Items/PermanentBoosters/RedLightningContainer.cs index ef6809340d..99a9c38cd4 100644 --- a/Items/PermanentBoosters/RedLightningContainer.cs +++ b/Items/PermanentBoosters/RedLightningContainer.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) => !player.Calamity().rageBoostThree; - internal Rectangle GetCurrentFrame() + internal Rectangle GetCurrentFrame(bool frameCounterUp = true) { int frameAmt = 6; if (frameCounter >= 5) @@ -42,7 +42,8 @@ namespace CalamityMod.Items.PermanentBoosters frameCounter = -1; frame = frame == frameAmt - 1 ? 0 : frame + 1; } - frameCounter++; + if (frameCounterUp) + frameCounter++; return new Rectangle(0, item.height * frame, item.width, item.height); } @@ -63,7 +64,7 @@ namespace CalamityMod.Items.PermanentBoosters public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { Texture2D texture = ModContent.GetTexture("CalamityMod/Items/PermanentBoosters/RedLightningContainerGlow"); - spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); } public override bool UseItem(Player player) diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index 66ce9525f9..d15fb38d28 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -1,5 +1,6 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,6 +9,8 @@ namespace CalamityMod.Items.Weapons.Ranged { public class PristineFury : ModItem { + private int frameCounter = 0; + private int frame = 0; public static int BaseDamage = 140; public override void SetStaticDefaults() @@ -23,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Ranged { item.damage = BaseDamage; item.ranged = true; - item.width = 88; - item.height = 44; + item.width = 100; + item.height = 46; item.useTime = 3; item.useAnimation = 15; item.useStyle = ItemUseStyleID.HoldingOut; @@ -77,5 +80,38 @@ namespace CalamityMod.Items.Weapons.Ranged } return false; } + + internal Rectangle GetCurrentFrame(bool frameCounterUp = true) + { + int frameAmt = 4; + if (frameCounter >= 5) + { + frameCounter = -1; + frame = frame == frameAmt - 1 ? 0 : frame + 1; + } + if (frameCounterUp) + frameCounter++; + return new Rectangle(0, item.height * frame, item.width, item.height); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/PristineFury_Animated"); + spriteBatch.Draw(texture, position, GetCurrentFrame(), Color.White, 0f, origin, scale, SpriteEffects.None, 0); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/PristineFury_Animated"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + return false; + } + + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Ranged/PristineFuryGlow"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } } } diff --git a/Items/Weapons/Ranged/PristineFuryGlow.png b/Items/Weapons/Ranged/PristineFuryGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..d7e2dd7ea111b330f2b011e8ed6faa05f7cd617d GIT binary patch literal 1851 zcmV-B2gLY^P) zp4sE$l`6^h&v<=a-u6Cc&w2TRe_AQZgZoVvfwOZ3agm z5xfa?{`~gKM`wKa%@5m5o*5b150XG;@J`gVmZVdbDv_>@LkQ#vNqZm@rrWYAfi%Nb z4&=0Z!YFS78C5K~Jb@$&JlZ^gj4GB~z8pyMc!rz*>*tRjp9H-B*>5ehXc5G)iVG_o z1Ekw-O5zcgU7s4KIfOuBHckT~;dFgCs2!u_vmBH?(Fnwt$OIB|cv>xS!Y7}8bkoPL zzx;9Y@74FBV;zD>ZVSY_rh3aEp=PgJ+g$JVSMG@t#|N)}fBfs{ImX)cO*_OZw71-> z;HW-X?f0sGrB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*IyRTLKc-v{~5bpqH%Mr+| zf=%nMS^|%E$SS@BvP#Lxb~Fgd`)f6ec8zohflMl}S@qFP109kKm_U*R_BKBXLfWN6 pyb2GNBalJCx)!HHnvwYz7=`On7~jaZ00000NkvXXu0mjf006GRY@7f9 literal 0 HcmV?d00001 diff --git a/Items/Weapons/Ranged/PristineFury_Animated.png b/Items/Weapons/Ranged/PristineFury_Animated.png new file mode 100644 index 0000000000000000000000000000000000000000..f1e9271516da59bec0075f5544a61e231d9774f8 GIT binary patch literal 3620 zcmZ`+c{r5o|9%EJh!m+~E!m>7OG4&YvLwUU4#~(KC2L|Va}r6mvP6mO%U~=iV?WvV zgeI~Z24jf9G}iCybp3vRe81QE<9+Vydf)fCp6CAD_j7;V_nEPgE(aSQ8vuYqUr!qe zp(AuvvoJ#=kB~kz0+2`oY{P3UX?VfHAE^7hs}n_-@a1BW==-}n@+cJVwW z(U))rH6{ao^OBcEr!KLW>jg)GKaMPEp^7v!xwu%&>*3f2vjA6<=Ww1Psmv&()MGcZ zCz^k~Ouo@1oXB)y*+wr-UsJsEO5esEN~rVJ>&pI~>ahAtxYgEF1(&{&+2w=fs;?6} z{*SG)G?c%M(ce-4rgO$ul3drlQ^O4&(OT}V)?owZeoDCb0Lh03s*mRH zdpmE(oW-kD=MxfC6SkOu_kHhb+2B$pkkEP;G$~tLWClUxsB569n|r@ih@W2u)}+3o zwoc5k$-m%#8Ro|0<%Qw|Q_bA@?->%D8;vi>g=@DJZ$=aeSu> zK(&XfB$#^o(S`+7lL)l{Fm`VvaR*)6LZGZDe_VC{BV#)ZjNivI0iz66a@A~XmG@qI zTN@0xOaGY&;K;;;4`=8P98hICDVpc9o!IUwMlI>(a2h5Nc@a9hc46l=<4&OXG?&)? zn)U!qw;lvDfa>+GqW~Zp0|8t|@_}JGqp^v-%dM9HzGhR%1T?m{b0_@h^vpXZT?>6$ zz*%NVK3w~Hj3!@9|7JivWj(a}e4)^V(|)4h$69A07f`FQN}mf2Au(aP{w$}2IT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f0ed523e472096b0537e58e43623858 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 16:58:42 -0400 Subject: [PATCH 079/128] murasama handle no longer glows --- Items/Weapons/Melee/Murasama.cs | 13 ++++++++++--- Items/Weapons/Melee/MurasamaGlow.png | Bin 0 -> 10794 bytes 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 Items/Weapons/Melee/MurasamaGlow.png diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index 96056ec929..0f73f79295 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 14)); } - internal Rectangle GetCurrentFrame() + internal Rectangle GetCurrentFrame(bool frameCounterUp = true) { //0 = 6 frames, 8 = 3 frames] int applicableCounter = frame == 0 ? 36 : frame == 8 ? 24 : 6; @@ -54,7 +54,8 @@ namespace CalamityMod.Items.Weapons.Melee frameCounter = -1; frame = frame == 13 ? 0 : frame + 1; } - frameCounter++; + if (frameCounterUp) + frameCounter++; return new Rectangle(0, item.height * frame, item.width, item.height); } @@ -68,10 +69,16 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { Texture2D texture = ModContent.GetTexture(Texture); - spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); return false; } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/MurasamaGlow"); + spriteBatch.Draw(texture, item.position - Main.screenPosition, GetCurrentFrame(false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); + } + public override bool CanUseItem(Player player) { if (player.ownedProjectileCounts[item.shoot] > 0) diff --git a/Items/Weapons/Melee/MurasamaGlow.png b/Items/Weapons/Melee/MurasamaGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..33b3f5b00eb53c2d3913d7d7a180247e0e02312b GIT binary patch literal 10794 zcmd6NXIK;a)^9>2K?y}s2q49+f^HEA7?chw2!eoufYeBrrt}h!Xb{xU6s0#&>Ae@J zQbelKrHTj$p-Blv;Qj|Z=j?Otx%YYZxA#+cn9L+IS!?~;dZM9rh2a3l0T>L%psaNH z26(*ygP~w_NbuJqI-&*)#tT!vEU)EmG;3&_qTTy)C*b^n;)wm4EI5;ti^`8%#^v8s zFnV)59RFHbKudDpf05;qmG|e6HGC>MC}rt$*yzaz!fX9Gq0OyrJ9A{Cm?}Q9eU_7MlRCe% zCbTqi^rwn(MTPBYIu-8m#}ynzA^V{TiqCk3=v-&x8(m~N+8M@$R~IEWgfla&|dBQzWFIGBS6YrKLttyYPV*bgi|5Z(YI6m^$3+h$)rP%nx_&q;UF)N!HD^}gy4 zl_pKY)PB9MDk}^>KfjgtjP6phLgf)Uv0DWaL>>E`)@ONNCExRx+L;C$qD_$9@Z}?G zS^c40By0FXo9&62V2&ruCPL1$kL*}8k-S}1OcQe#M2hVD2G0=kp2){Ycf)quRSMlY2W(?UzMwpdNn6-p7>1 zL0mAJOp0bB1zw60|GK}1RQJe`K~9S6p@b!jrOYr|B~{?c+HQ^H3rJhp|5`vMV_X2khMoUT0Z88 z$12@=yy;*XB6+E6tqw~U`~!w5RI`DdX8YiM6cgiqKfZjWKRmcxohQ_UJp(zKT(wbZ z+CeQ)f$r!c<3fF+J2D+{0W0}USSUK?-gv5M2W&!c&~DzJUOGtLG$&KRDLy-{W+}a= z+-+QJo5IF0aFOfqe4;gc!$9-eb1d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w5+$z>~8gd0F=)eTtKEjn?y`>9T3ny-hRc7_LLa%fjlmH{Zh+U>G^KNzR@vSoEI7- z!z`n&?=t6n*95EuKep1QE=G{AvO$^@m6gtl2l5;eu;a(B#wn?C)%81pWfsO1_?v0Q z@NdAvPQB9&RIaAz>$?M_hci#lvS?ABK!7(N>tMF7UD98E%Hkenq4E`VYlCU-(y!XP zE--odGg|%^W5{WU6yO_Xn|<@ZPx0;88ooFbaiH5+g!p!X^kO>;@<}z)kU*#>p7h*R z!>K>zaJ`sQ`oI%ZI>A;Xy3t3YX$!?!2z>!DNcJT-iVTR{-XMKu4>08J>w?_*E_wlQ z06*W9r3$QVgi1PXicy?8$UzR>-ZM&QG()^hW*K5)_g2kvEx^*=M;s8J_nxKd3SGrw z&e(8N2gQwU=|P&;1#(nOg!H-gat+q<$(C*3Vo%~X(ayFhXbAI_nXx4U|F?r*v%qw9 zD)IIo04?ERHx{38lU_X6o-PZ|=uaYkPa`06WjlNg!J1$*Ot37OIP)l_G|ANd#gu5xv;AkR&nnd{jn9>{FaA-U6mx;htoae9UK7W zrK;JwZn#}5Fe4g7yx+`(pcTv1bDJ^MCP~50rl!KrkC6=;M1& literal 0 HcmV?d00001 From 117cb5f5468510686cdc33eb8f4261bc85a1c707 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 17:52:53 -0400 Subject: [PATCH 080/128] fixed doggo head/tail message spam --- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerMiscEffects.cs | 2 + NPCs/DevourerofGods/DevourerofGodsHead.cs | 50 +++++++--------------- NPCs/DevourerofGods/DevourerofGodsHeadS.cs | 50 +++++++--------------- NPCs/DevourerofGods/DevourerofGodsTail.cs | 35 ++++++--------- NPCs/DevourerofGods/DevourerofGodsTailS.cs | 35 ++++++--------- 6 files changed, 58 insertions(+), 116 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 42ed78e13c..bdb527badc 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -207,6 +207,7 @@ namespace CalamityMod.CalPlayer public int hurtSoundTimer = 0; public int danceOfLightCharge = 0; public int shadowPotCooldown = 0; + public int dogTextCooldown = 0; #endregion #region Sound @@ -1938,6 +1939,7 @@ namespace CalamityMod.CalPlayer galileoCooldown = 0; soundCooldown = 0; shadowPotCooldown = 0; + dogTextCooldown = 0; rage = 0; adrenaline = 0; raiderStack = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index e5cbfa9b34..9ea5aea137 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -982,6 +982,8 @@ namespace CalamityMod.CalPlayer modPlayer.titanBoost--; if (modPlayer.prismaticLasers > 0) modPlayer.prismaticLasers--; + if (modPlayer.dogTextCooldown > 0) + modPlayer.dogTextCooldown--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 12dd1004d6..8bbcdf93de 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -846,41 +846,21 @@ namespace CalamityMod.NPCs.DevourerofGods player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false); } - // TODO: don't talk if the player has iframes - if (player.immuneTime > 0 || player.immune) - return; - - int num = Main.rand.Next(5); - string key = "Mods.CalamityMod.EdgyBossText3"; - if (num == 0) - { - key = "Mods.CalamityMod.EdgyBossText3"; - } - else if (num == 1) - { - key = "Mods.CalamityMod.EdgyBossText4"; - } - else if (num == 2) - { - key = "Mods.CalamityMod.EdgyBossText5"; - } - else if (num == 3) - { - key = "Mods.CalamityMod.EdgyBossText6"; - } - else if (num == 4) - { - key = "Mods.CalamityMod.EdgyBossText7"; - } - Color messageColor = Color.Cyan; - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } + if (player.Calamity().dogTextCooldown <= 0) + { + string text = Utils.SelectRandom(Main.rand, new string[] + { + "Mods.CalamityMod.EdgyBossText3", + "Mods.CalamityMod.EdgyBossText4", + "Mods.CalamityMod.EdgyBossText5", + "Mods.CalamityMod.EdgyBossText6", + "Mods.CalamityMod.EdgyBossText7" + }); + Color messageColor = Color.Cyan; + Rectangle location = new Microsoft.Xna.Framework.Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); + CombatText.NewText(location, messageColor, Language.GetTextValue(text), true); + player.Calamity().dogTextCooldown = 60; + } } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 8a07055c26..516c5afe93 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -1163,41 +1163,21 @@ namespace CalamityMod.NPCs.DevourerofGods player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false); } - // TODO: don't talk if the player has iframes - if (player.immuneTime > 0 || player.immune) - return; - - int num = Main.rand.Next(5); - string key = "Mods.CalamityMod.EdgyBossText3"; - if (num == 0) - { - key = "Mods.CalamityMod.EdgyBossText3"; - } - else if (num == 1) - { - key = "Mods.CalamityMod.EdgyBossText4"; - } - else if (num == 2) - { - key = "Mods.CalamityMod.EdgyBossText5"; - } - else if (num == 3) - { - key = "Mods.CalamityMod.EdgyBossText6"; - } - else if (num == 4) - { - key = "Mods.CalamityMod.EdgyBossText7"; - } - Color messageColor = Color.Cyan; - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } + if (player.Calamity().dogTextCooldown <= 0) + { + string text = Utils.SelectRandom(Main.rand, new string[] + { + "Mods.CalamityMod.EdgyBossText3", + "Mods.CalamityMod.EdgyBossText4", + "Mods.CalamityMod.EdgyBossText5", + "Mods.CalamityMod.EdgyBossText6", + "Mods.CalamityMod.EdgyBossText7" + }); + Color messageColor = Color.Cyan; + Rectangle location = new Microsoft.Xna.Framework.Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); + CombatText.NewText(location, messageColor, Language.GetTextValue(text), true); + player.Calamity().dogTextCooldown = 60; + } } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index ddd575f3af..ec3715cd16 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -253,29 +253,18 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 240, true); player.AddBuff(BuffID.Frostburn, 180, true); - // TODO: don't talk if the player has iframes - if (player.immuneTime > 0 || player.immune) - return; - - int num = Main.rand.Next(2); - string key = "Mods.CalamityMod.EdgyBossText8"; - if (num == 0) - { - key = "Mods.CalamityMod.EdgyBossText8"; - } - else if (num == 1) - { - key = "Mods.CalamityMod.EdgyBossText9"; - } - Color messageColor = Color.Cyan; - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } + if (player.Calamity().dogTextCooldown <= 0) + { + string text = Utils.SelectRandom(Main.rand, new string[] + { + "Mods.CalamityMod.EdgyBossText8", + "Mods.CalamityMod.EdgyBossText9" + }); + Color messageColor = Color.Cyan; + Rectangle location = new Microsoft.Xna.Framework.Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); + CombatText.NewText(location, messageColor, Language.GetTextValue(text), true); + player.Calamity().dogTextCooldown = 60; + } } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index 7d16ef4faf..7bbc4a6bd5 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -333,29 +333,18 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 240, true); player.AddBuff(BuffID.Frostburn, 180, true); - // TODO: don't talk if the player has iframes - if (player.immune || player.immuneTime > 0) - return; - - int num = Main.rand.Next(2); - string key = "Mods.CalamityMod.EdgyBossText8"; - if (num == 0) - { - key = "Mods.CalamityMod.EdgyBossText8"; - } - else if (num == 1) - { - key = "Mods.CalamityMod.EdgyBossText9"; - } - Color messageColor = Color.Cyan; - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } + if (player.Calamity().dogTextCooldown <= 0) + { + string text = Utils.SelectRandom(Main.rand, new string[] + { + "Mods.CalamityMod.EdgyBossText8", + "Mods.CalamityMod.EdgyBossText9" + }); + Color messageColor = Color.Cyan; + Rectangle location = new Microsoft.Xna.Framework.Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); + CombatText.NewText(location, messageColor, Language.GetTextValue(text), true); + player.Calamity().dogTextCooldown = 60; + } } } } From fff1045dd746134fb2d1ff9a0327953409b1ab9e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 18:33:26 -0400 Subject: [PATCH 081/128] underworld lore stops voodoo demons from dropping dolls cuz blocking spawns didn't work --- Items/LoreItems/KnowledgeUnderworld.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 3 --- NPCs/CalamityGlobalNPCLoot.cs | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Items/LoreItems/KnowledgeUnderworld.cs b/Items/LoreItems/KnowledgeUnderworld.cs index 4d86b79d3d..c07159d8be 100644 --- a/Items/LoreItems/KnowledgeUnderworld.cs +++ b/Items/LoreItems/KnowledgeUnderworld.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Underworld"); Tooltip.SetDefault("These obsidian and hellstone towers were once home to thousands of...'people'.\n" + "Unfortunately for them, they were twisted by their inner demons until they were beyond saving.\n" + - "Place in your inventory to prevent voodoo demons from spawning."); + "Place in your inventory to prevent voodoo demons from dropping voodoo dolls."); } public override void SetDefaults() diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 1276b22036..2178479d94 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4104,9 +4104,6 @@ namespace CalamityMod.NPCs pool[NPCID.BlueJellyfish] = SpawnCondition.CaveJellyfish.Chance; } - if (spawnInfo.player.Calamity().underworldLore) - pool[NPCID.VoodooDemon] = 0f; - if (spawnInfo.player.Calamity().ZoneSulphur && !spawnInfo.player.Calamity().ZoneAbyss && CalamityWorld.rainingAcid) { pool.Clear(); diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 5632aa22f9..371993f2d3 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -391,6 +391,10 @@ namespace CalamityMod.NPCs DropHelper.DropItemChance(npc, ModContent.ItemType(), Main.expertMode ? 5 : 7); return false; } + else if (npc.type == NPCID.VoodooDemon && Main.player[npc.target].Calamity().underworldLore) + { + NPCLoader.blockLoot.Add(ItemID.GuideVoodooDoll); + } return true; } From a486650bb9fa8342fee21c06f734cf6a446306b6 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 18:38:04 -0400 Subject: [PATCH 082/128] boss zen is now a config (can be annoying in mp) --- CalamityConfig.cs | 6 ++++++ NPCs/CalamityGlobalNPC.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CalamityConfig.cs b/CalamityConfig.cs index a4686a4d84..cd453418ff 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -116,6 +116,12 @@ namespace CalamityMod [Tooltip("Increases the player's mining speed by 75%.\nThis does not affect drills.")] public bool MiningSpeedBoost { get; set; } + [Label("Boss Zen")] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + [Tooltip("While a boss is alive, all players receive the Boss Zen buff which drastically reduces enemy spawn rates.")] + public bool BossZen { get; set; } + [Label("Never Weaken Reactive Boss DR")] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(false)] diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 2178479d94..66dd72ea09 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4064,7 +4064,7 @@ namespace CalamityMod.NPCs spawnRate = (int)(spawnRate * 2.5); maxSpawns = (int)(maxSpawns * 0.3f); } - if (player.Calamity().bossZen || CalamityWorld.DoGSecondStageCountdown > 0) + if ((player.Calamity().bossZen || CalamityWorld.DoGSecondStageCountdown > 0) && CalamityConfig.Instance.BossZen) { spawnRate *= 5; maxSpawns = (int)(maxSpawns * 0.001f); From 35c945eac869b2fcaf2a263031188bda496f74a0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 18:41:41 -0400 Subject: [PATCH 083/128] fixed minions not being able to hurt prism-backs --- NPCs/SunkenSea/PrismTurtle.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/NPCs/SunkenSea/PrismTurtle.cs b/NPCs/SunkenSea/PrismTurtle.cs index 0f1d7f69f8..cdd167d1e0 100644 --- a/NPCs/SunkenSea/PrismTurtle.cs +++ b/NPCs/SunkenSea/PrismTurtle.cs @@ -11,8 +11,6 @@ namespace CalamityMod.NPCs.SunkenSea { public class PrismTurtle : ModNPC { - public bool hasBeenHit = false; - public override void SetStaticDefaults() { DisplayName.SetDefault("Prism-Back"); @@ -41,13 +39,11 @@ namespace CalamityMod.NPCs.SunkenSea public override void SendExtraAI(BinaryWriter writer) { writer.Write(npc.chaseable); - writer.Write(hasBeenHit); } public override void ReceiveExtraAI(BinaryReader reader) { npc.chaseable = reader.ReadBoolean(); - hasBeenHit = reader.ReadBoolean(); } public override void AI() @@ -123,7 +119,7 @@ namespace CalamityMod.NPCs.SunkenSea { if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { - return hasBeenHit; + return npc.chaseable; } return null; } From b37928e0ab7f82c3a3b781fa7e687198a77eac44 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 18:45:32 -0400 Subject: [PATCH 084/128] accessories and ammo no longer proc summoner damage nerf --- CalPlayer/CalamityPlayer.cs | 7 ++++--- Items/Ammo/AccelerationBullet.cs | 2 +- Items/Weapons/Ranged/Alluvion.cs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index bdb527badc..32673e2af1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5464,8 +5464,8 @@ namespace CalamityMod.CalPlayer #endregion #region MultiplicativeReductions - // Fearmonger armor makes you immune to the summoner cross-class nerf - // Forbidden armor makes you immune when holding the respective helmet's preferred weapon type + // Fearmonger armor reduces the summoner cross-class nerf + // Forbidden armor reduces said nerf when holding the respective helmet's preferred weapon type // Profaned Soul Crystal encourages use of other weapons, nerfing the damage would not make sense. bool forbidden = player.head == ArmorIDs.Head.AncientBattleArmor && player.body == ArmorIDs.Body.AncientBattleArmor && player.legs == ArmorIDs.Legs.AncientBattleArmor; bool reducedNerf = fearmongerSet || (forbidden && heldItem.magic) || (forbiddenCirclet && heldItem.Calamity().rogue); @@ -5478,7 +5478,8 @@ namespace CalamityMod.CalPlayer { if (!heldItem.summon && (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && - heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0) + heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0 && + !item.accessory && item.ammo == AmmoID.None) { damage = (int)(damage * summonNerfMult); } diff --git a/Items/Ammo/AccelerationBullet.cs b/Items/Ammo/AccelerationBullet.cs index c67e963118..5d096e116e 100644 --- a/Items/Ammo/AccelerationBullet.cs +++ b/Items/Ammo/AccelerationBullet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Ammo item.rare = 1; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; - item.ammo = 97; + item.ammo = AmmoID.Bullet; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/Alluvion.cs b/Items/Weapons/Ranged/Alluvion.cs index f35b97d54f..e817cc39e9 100644 --- a/Items/Weapons/Ranged/Alluvion.cs +++ b/Items/Weapons/Ranged/Alluvion.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.autoReuse = true; item.shoot = ProjectileID.WoodenArrowFriendly; item.shootSpeed = 17f; - item.useAmmo = 40; + item.useAmmo = AmmoID.Arrow; item.Calamity().customRarity = CalamityRarity.DarkBlue; } From b9bb43070e9f22bd0ca93ae6c7c5bd764292c0c0 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 18:51:37 -0400 Subject: [PATCH 085/128] fixed roxcalibur hook bug --- NPCs/SunkenSea/PrismTurtle.cs | 1 + Projectiles/Melee/RoxSlam.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NPCs/SunkenSea/PrismTurtle.cs b/NPCs/SunkenSea/PrismTurtle.cs index cdd167d1e0..eb1217ba61 100644 --- a/NPCs/SunkenSea/PrismTurtle.cs +++ b/NPCs/SunkenSea/PrismTurtle.cs @@ -34,6 +34,7 @@ namespace CalamityMod.NPCs.SunkenSea npc.knockBackResist = 0.15f; banner = npc.type; bannerItem = ModContent.ItemType(); + npc.chaseable = false; } public override void SendExtraAI(BinaryWriter writer) diff --git a/Projectiles/Melee/RoxSlam.cs b/Projectiles/Melee/RoxSlam.cs index f2aeb687ed..59b104bcf8 100644 --- a/Projectiles/Melee/RoxSlam.cs +++ b/Projectiles/Melee/RoxSlam.cs @@ -1,7 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Melee { public override void SetDefaults() { - projectile.width = 50; + projectile.width = 10; projectile.height = 50; projectile.friendly = true; projectile.melee = true; @@ -33,15 +33,15 @@ namespace CalamityMod.Projectiles.Melee public override bool OnTileCollide(Vector2 oldVelocity) { //This will only happen if the cooldown was full - if (projectile.ai[0] == 1) + if (projectile.ai[0] == 1 && Main.myPlayer == projectile.owner) { - Player player = Main.player[Main.myPlayer]; + Player player = Main.player[projectile.owner]; //Bounce player.velocity.Y = -18f; //reset player fall damage player.fallStart = (int)(player.position.Y / 16f); //Spawns the shockwave - Projectile.NewProjectile(projectile.position.X + 25, projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), 300, 12, projectile.owner); + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 300, 12, projectile.owner); Main.PlaySound(SoundID.Item14, projectile.position); projectile.Kill(); //Pretty things @@ -55,9 +55,9 @@ namespace CalamityMod.Projectiles.Melee return false; } //If the cooldown wasnt full, just bounce - else + else if (Main.myPlayer == projectile.owner) { - Player player = Main.player[Main.myPlayer]; + Player player = Main.player[projectile.owner]; player.velocity.Y = -14f; //reset player fall damage player.fallStart = (int)(player.position.Y / 16f); From 1fdf623a07172e4f9460c2bab53f7de0b841b5d4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 18:59:41 -0400 Subject: [PATCH 086/128] I think I fixed astral spray mp desync --- Projectiles/CalamityGlobalProjectile.cs | 53 ++++++++++--------- Projectiles/Typeless/AstralSpray.cs | 2 +- Projectiles/Typeless/StarStruckWaterBottle.cs | 4 +- Projectiles/Typeless/WaterConvertor.cs | 2 +- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 7af6ab5a0d..630e434339 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1019,31 +1019,34 @@ namespace CalamityMod.Projectiles defCrit = 4; } - int x = (int)(projectile.Center.X / 16f); - int y = (int)(projectile.Center.Y / 16f); - for (int i = x - 1; i <= x + 1; i++) - { - for (int j = y - 1; j <= y + 1; j++) - { - if (projectile.type == ProjectileID.PureSpray || projectile.type == ProjectileID.PurificationPowder) - { - WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Pure); - } - //commented out for Terraria 1.4 when vile/vicious powder spread corruption/crimson - if (projectile.type == ProjectileID.CorruptSpray)// || projectile.type == ProjectileID.VilePowder) - { - WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Corrupt); - } - if (projectile.type == ProjectileID.CrimsonSpray)// || projectile.type == ProjectileID.ViciousPowder) - { - WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Crimson); - } - if (projectile.type == ProjectileID.HallowSpray) - { - WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Hallow); - } - } - } + if (projectile.owner == Main.myPlayer && Main.netMode != NetmodeID.MultiplayerClient) + { + int x = (int)(projectile.Center.X / 16f); + int y = (int)(projectile.Center.Y / 16f); + for (int i = x - 1; i <= x + 1; i++) + { + for (int j = y - 1; j <= y + 1; j++) + { + if (projectile.type == ProjectileID.PureSpray || projectile.type == ProjectileID.PurificationPowder) + { + WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Pure); + } + //commented out for Terraria 1.4 when vile/vicious powder spread corruption/crimson + if (projectile.type == ProjectileID.CorruptSpray)// || projectile.type == ProjectileID.VilePowder) + { + WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Corrupt); + } + if (projectile.type == ProjectileID.CrimsonSpray)// || projectile.type == ProjectileID.ViciousPowder) + { + WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Crimson); + } + if (projectile.type == ProjectileID.HallowSpray) + { + WorldGenerationMethods.ConvertFromAstral(i, j, ConvertType.Hallow); + } + } + } + } } #endregion diff --git a/Projectiles/Typeless/AstralSpray.cs b/Projectiles/Typeless/AstralSpray.cs index cde6a93d77..b4faa58222 100644 --- a/Projectiles/Typeless/AstralSpray.cs +++ b/Projectiles/Typeless/AstralSpray.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreAI() { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && Main.netMode != NetmodeID.MultiplayerClient) { int x = (int)(projectile.Center.X / 16f); int y = (int)(projectile.Center.Y / 16f); diff --git a/Projectiles/Typeless/StarStruckWaterBottle.cs b/Projectiles/Typeless/StarStruckWaterBottle.cs index c68aca2b40..2f45c6cbb8 100644 --- a/Projectiles/Typeless/StarStruckWaterBottle.cs +++ b/Projectiles/Typeless/StarStruckWaterBottle.cs @@ -38,10 +38,10 @@ namespace CalamityMod.Projectiles.Typeless { Main.PlaySound(SoundID.Shatter, (int) projectile.position.X, (int) projectile.position.Y, 1, 1f, 0.0f); for (int index = 0; index < 5; ++index) - Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 13, 0f, 0f, 0, new Color(), 1f); + Dust.NewDust(projectile.position, projectile.width, projectile.height, 13, 0f, 0f, 0, new Color(), 1f); for (int index1 = 0; index1 < 30; ++index1) { - int index2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, ModContent.DustType(), 0f, -2f, 0, new Color(), 1.1f); + int index2 = Dust.NewDust(projectile.position, projectile.width, projectile.height, ModContent.DustType(), 0f, -2f, 0, new Color(), 1.1f); Dust dust = Main.dust[index2]; dust.alpha = 100; dust.velocity.X *= 1.5f; diff --git a/Projectiles/Typeless/WaterConvertor.cs b/Projectiles/Typeless/WaterConvertor.cs index c0d20765af..6581920b9c 100644 --- a/Projectiles/Typeless/WaterConvertor.cs +++ b/Projectiles/Typeless/WaterConvertor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Typeless public void ConvertShit(Projectile projectile) { - if (projectile.owner == Main.myPlayer) + if (projectile.owner == Main.myPlayer && Main.netMode != NetmodeID.MultiplayerClient) { int x = (int)(projectile.Center.X / 16f); int y = (int)(projectile.Center.Y / 16f); From 59acd9b4aea9d12827b16a3e951fd574b488f261 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 19:05:56 -0400 Subject: [PATCH 087/128] compile fixes --- CalPlayer/CalamityPlayer.cs | 2 +- Projectiles/Melee/RoxSlam.cs | 1 + Projectiles/Ranged/TerraArrowSplit.cs | 1 - Projectiles/Typeless/AstralSpray.cs | 2 +- Projectiles/Typeless/WaterConvertor.cs | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 32673e2af1..ff9dfe33bd 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5479,7 +5479,7 @@ namespace CalamityMod.CalPlayer if (!heldItem.summon && (heldItem.melee || heldItem.ranged || heldItem.magic || heldItem.Calamity().rogue) && heldItem.hammer == 0 && heldItem.pick == 0 && heldItem.axe == 0 && heldItem.useStyle != 0 && - !item.accessory && item.ammo == AmmoID.None) + !heldItem.accessory && heldItem.ammo == AmmoID.None) { damage = (int)(damage * summonNerfMult); } diff --git a/Projectiles/Melee/RoxSlam.cs b/Projectiles/Melee/RoxSlam.cs index 59b104bcf8..95ee1acb07 100644 --- a/Projectiles/Melee/RoxSlam.cs +++ b/Projectiles/Melee/RoxSlam.cs @@ -66,6 +66,7 @@ namespace CalamityMod.Projectiles.Melee return false; } + return false; } } } diff --git a/Projectiles/Ranged/TerraArrowSplit.cs b/Projectiles/Ranged/TerraArrowSplit.cs index 5a75dadf2a..7b26b855de 100644 --- a/Projectiles/Ranged/TerraArrowSplit.cs +++ b/Projectiles/Ranged/TerraArrowSplit.cs @@ -7,7 +7,6 @@ namespace CalamityMod.Projectiles.Ranged { public class TerraArrowSplit : ModProjectile { - private float speed = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Arrow"); diff --git a/Projectiles/Typeless/AstralSpray.cs b/Projectiles/Typeless/AstralSpray.cs index b4faa58222..35239658ec 100644 --- a/Projectiles/Typeless/AstralSpray.cs +++ b/Projectiles/Typeless/AstralSpray.cs @@ -1,7 +1,7 @@ - using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { diff --git a/Projectiles/Typeless/WaterConvertor.cs b/Projectiles/Typeless/WaterConvertor.cs index 6581920b9c..875a3cc0f2 100644 --- a/Projectiles/Typeless/WaterConvertor.cs +++ b/Projectiles/Typeless/WaterConvertor.cs @@ -1,5 +1,6 @@ using CalamityMod.World; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { From d9c25e2ffc81d268ef12af806a9a3555a465d2b1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 19:16:20 -0400 Subject: [PATCH 088/128] scarf tooltip changes for clarification --- Items/Accessories/CounterScarf.cs | 2 ++ Items/Accessories/EvasionScarf.cs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index cf54dca9f1..cc2a7e8674 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -14,6 +14,8 @@ namespace CalamityMod.Items.Accessories "Grants the ability to dash; dashing into an attack will cause you to dodge it\n" + "After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" + "After a successful dodge you must wait 15 seconds before you can dodge again\n" + + "This cooldown will be twice as long if you have Chaos State\n" + + "While on cooldown, Chaos State will last twice as long\n" + "Revengeance drop"); } diff --git a/Items/Accessories/EvasionScarf.cs b/Items/Accessories/EvasionScarf.cs index da59176343..7c7b45012c 100644 --- a/Items/Accessories/EvasionScarf.cs +++ b/Items/Accessories/EvasionScarf.cs @@ -14,7 +14,9 @@ namespace CalamityMod.Items.Accessories Tooltip.SetDefault("True melee strikes deal 30% more damage\n" + "Grants the ability to dash; dashing into an attack will cause you to dodge it\n" + "After a dodge you will be granted a buff to all damage, melee speed, and all crit chance for a short time\n" + - "After a successful dodge you must wait 13 seconds before you can dodge again"); + "After a successful dodge you must wait 13 seconds before you can dodge again\n" + + "This cooldown will be 50 percent longer if you have Chaos State\n" + + "While on cooldown, Chaos State will be 50 percent longer"); } public override void SetDefaults() From 3879f3e9960d690ad395a315bb6054f42d58d6d8 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 19:16:40 -0400 Subject: [PATCH 089/128] omniscience no longer overrides odd mushroom --- Projectiles/CalamityGlobalProjectile.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 630e434339..4482fd3b9e 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1744,12 +1744,12 @@ namespace CalamityMod.Projectiles #region Drawing public override Color? GetAlpha(Projectile projectile, Color lightColor) { - if (Main.player[Main.myPlayer].Calamity().omniscience && projectile.hostile) - return Color.Coral; - if (Main.player[Main.myPlayer].Calamity().trippy) return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, projectile.alpha); + if (Main.player[Main.myPlayer].Calamity().omniscience && projectile.hostile) + return Color.Coral; + if (projectile.type == ProjectileID.PinkLaser) { if (projectile.alpha < 200) From fb678608c823b3e608b9d8ba71699850862d3cd7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 20:44:45 -0400 Subject: [PATCH 090/128] fixed rox for real and sabaton ceiling slam --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Weapons/Melee/Roxcalibur.cs | 5 +++-- Projectiles/Melee/RoxSlam.cs | 2 +- Projectiles/Typeless/SabatonSlam.cs | 17 ++++++++++------- Utilities/CalamityUtils.cs | 2 ++ 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 9ea5aea137..24f864faa5 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1806,7 +1806,7 @@ namespace CalamityMod.CalPlayer modPlayer.gSabatonFall = 300; modPlayer.gSabatonCooldown = 480; //8 second cooldown player.gravity *= 2f; - Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, ModContent.ProjectileType(), 0, 0, player.whoAmI); + Projectile.NewProjectile(player.Center.X, player.Center.Y + (player.height / 5f), player.velocity.X, player.velocity.Y, ModContent.ProjectileType(), 0, 0, player.whoAmI); } } if (modPlayer.gSabatonCooldown == 1) //dust when ready to use again diff --git a/Items/Weapons/Melee/Roxcalibur.cs b/Items/Weapons/Melee/Roxcalibur.cs index 1956ae9588..c238771905 100644 --- a/Items/Weapons/Melee/Roxcalibur.cs +++ b/Items/Weapons/Melee/Roxcalibur.cs @@ -192,7 +192,8 @@ namespace CalamityMod.Items.Weapons.Melee } } // Makes the player forcefully dive down - player.velocity.Y = player.maxFallSpeed; + if (CalamityUtils.CountHookProj() <= 0) + player.velocity.Y = player.maxFallSpeed; //Rotates the sprite of the item on alt fire to have it point downwards player.itemRotation = player.direction * MathHelper.ToRadians(135f); //Dust trail @@ -228,7 +229,7 @@ namespace CalamityMod.Items.Weapons.Melee { positionx = position.X - 8; } - Projectile.NewProjectile(positionx, positiony, player.velocity.X, player.velocity.Y, ModContent.ProjectileType(), 0, 0, player.whoAmI, cooldown); + Projectile.NewProjectile(positionx, positiony - (player.height / 10f), player.velocity.X, player.velocity.Y, ModContent.ProjectileType(), 0, 0, player.whoAmI, cooldown); //Resets the cooldown after shooting if (Roxcooldown >= 600) { diff --git a/Projectiles/Melee/RoxSlam.cs b/Projectiles/Melee/RoxSlam.cs index 95ee1acb07..feecfb4671 100644 --- a/Projectiles/Melee/RoxSlam.cs +++ b/Projectiles/Melee/RoxSlam.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { projectile.width = 10; - projectile.height = 50; + projectile.height = 35; projectile.friendly = true; projectile.melee = true; projectile.timeLeft = 400; diff --git a/Projectiles/Typeless/SabatonSlam.cs b/Projectiles/Typeless/SabatonSlam.cs index b2b9ddf91d..83fefd68d1 100644 --- a/Projectiles/Typeless/SabatonSlam.cs +++ b/Projectiles/Typeless/SabatonSlam.cs @@ -1,8 +1,8 @@ +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ModLoader; -using CalamityMod.Dusts; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetDefaults() { projectile.width = 10; - projectile.height = 50; + projectile.height = 35; projectile.friendly = true; projectile.timeLeft = 300; projectile.tileCollide = true; @@ -33,10 +33,13 @@ namespace CalamityMod.Projectiles.Typeless { Player player = Main.player[projectile.owner]; //Spawns the shockwave - Projectile.NewProjectile(projectile.position.X + 25, projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), (int)(300 * player.AverageDamage()), 12, projectile.owner); - Main.PlaySound(SoundID.Item14, projectile.position); - player.Calamity().gSabatonFall = 0; - projectile.Kill(); + if (Main.myPlayer == projectile.owner) + { + Projectile.NewProjectile(projectile.position.X + 25, projectile.position.Y + 25, 0f, 0f, ModContent.ProjectileType(), (int)(300 * player.AverageDamage()), 12, projectile.owner); + Main.PlaySound(SoundID.Item14, projectile.position); + player.Calamity().gSabatonFall = 0; + projectile.Kill(); + } //Pretty things for (int dustexplode = 0; dustexplode < 360; dustexplode++) { diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index a8088464e4..721a9e40b5 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -757,6 +757,8 @@ namespace CalamityMod #region Projectile Utilities public static int CountProjectiles(int Type) => Main.projectile.Count(proj => proj.type == Type && proj.active); + public static int CountHookProj() => Main.projectile.Count(proj => Main.projHook[proj.type] && proj.ai[0] == 2f && proj.active && proj.owner == Main.myPlayer); + public static void KillAllHostileProjectiles() { for (int x = 0; x < Main.maxProjectiles; x++) From 9b1477a424ced9923a5816080c785c4190c872b6 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 1 Jul 2020 21:10:28 -0400 Subject: [PATCH 091/128] will defining this fix super dummies? --- NPCs/NormalNPCs/SuperDummyNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/NormalNPCs/SuperDummyNPC.cs b/NPCs/NormalNPCs/SuperDummyNPC.cs index 9cae353ab2..034a8ac109 100644 --- a/NPCs/NormalNPCs/SuperDummyNPC.cs +++ b/NPCs/NormalNPCs/SuperDummyNPC.cs @@ -23,6 +23,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.knockBackResist = 0f; npc.buffImmune[BuffID.Confused] = false; npc.netAlways = true; + npc.aiStyle = 0; } public override void UpdateLifeRegen(ref int damage) From f3dd3e536e6d69f95442499332840c574bd62ee2 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:11:47 -0400 Subject: [PATCH 092/128] nerfed abyss blade and typhon's greed --- Items/Weapons/Melee/AbyssBlade.cs | 2 +- Items/Weapons/Melee/TyphonsGreed.cs | 2 +- Projectiles/Melee/DepthOrb.cs | 7 +++-- Projectiles/Melee/DepthOrb2.cs | 4 +-- Projectiles/Melee/HellionSpike.cs | 2 +- Projectiles/Melee/TyphonsGreedBubble.cs | 3 +- Projectiles/Melee/TyphonsGreedStaff.cs | 39 +++++++------------------ 7 files changed, 22 insertions(+), 37 deletions(-) diff --git a/Items/Weapons/Melee/AbyssBlade.cs b/Items/Weapons/Melee/AbyssBlade.cs index 7ca1319a97..6ca2dd8606 100644 --- a/Items/Weapons/Melee/AbyssBlade.cs +++ b/Items/Weapons/Melee/AbyssBlade.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 74; item.height = 74; - item.damage = 105; + item.damage = 100; item.melee = true; item.useAnimation = 26; item.useTime = 26; diff --git a/Items/Weapons/Melee/TyphonsGreed.cs b/Items/Weapons/Melee/TyphonsGreed.cs index 402c10ed16..dc3b122407 100644 --- a/Items/Weapons/Melee/TyphonsGreed.cs +++ b/Items/Weapons/Melee/TyphonsGreed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.damage = 75; + item.damage = 65; item.melee = true; item.width = 16; item.height = 16; diff --git a/Projectiles/Melee/DepthOrb.cs b/Projectiles/Melee/DepthOrb.cs index 55372a55a9..820ef425cf 100644 --- a/Projectiles/Melee/DepthOrb.cs +++ b/Projectiles/Melee/DepthOrb.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { Lighting.AddLight(projectile.Center, 0f, 0f, 0.5f); - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 0.6f); + int num458 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 0.6f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.5f; Main.dust[num458].velocity += projectile.velocity * 0.1f; @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee num466 = num465 / num466; num463 *= num466; num464 *= num466; - int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 1.2f); + int num467 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 1.2f); Dust dust = Main.dust[num467]; dust.noGravity = true; dust.position.X = projectile.Center.X; @@ -85,7 +85,8 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(ModContent.BuffType(), 300); + if (Main.rand.NextBool(2)) + target.AddBuff(ModContent.BuffType(), 180); } } } diff --git a/Projectiles/Melee/DepthOrb2.cs b/Projectiles/Melee/DepthOrb2.cs index 330c767bd4..856ff6d7e7 100644 --- a/Projectiles/Melee/DepthOrb2.cs +++ b/Projectiles/Melee/DepthOrb2.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee { Lighting.AddLight(projectile.Center, 0f, 0f, 0.5f); - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 0.4f); + int num458 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 0.4f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.5f; Main.dust[num458].velocity += projectile.velocity * 0.1f; @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee num466 = num465 / num466; num463 *= num466; num464 *= num466; - int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 1.2f); + int num467 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 1.2f); Dust dust = Main.dust[num467]; dust.noGravity = true; dust.position.X = projectile.Center.X; diff --git a/Projectiles/Melee/HellionSpike.cs b/Projectiles/Melee/HellionSpike.cs index 1c1d6986d4..2e7c6bc864 100644 --- a/Projectiles/Melee/HellionSpike.cs +++ b/Projectiles/Melee/HellionSpike.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee velocity.Y = MathHelper.Clamp(velocity.Y, -15f, 15f); if (projectile.owner == Main.myPlayer) { - int petal = Projectile.NewProjectile(spawnPosition, velocity, ProjectileID.FlowerPetal, (int)(projectile.damage * 0.5), 2f, projectile.owner); + int petal = Projectile.NewProjectile(spawnPosition, velocity, ProjectileID.FlowerPetal, (int)(projectile.damage * 0.5), projectile.knockBack * 0.5f, projectile.owner); Main.projectile[petal].Calamity().forceMelee = true; Main.projectile[petal].localNPCHitCooldown = -1; } diff --git a/Projectiles/Melee/TyphonsGreedBubble.cs b/Projectiles/Melee/TyphonsGreedBubble.cs index 45f8798056..b15fa59403 100644 --- a/Projectiles/Melee/TyphonsGreedBubble.cs +++ b/Projectiles/Melee/TyphonsGreedBubble.cs @@ -85,7 +85,8 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(ModContent.BuffType(), 180); + if (Main.rand.NextBool(3)) + target.AddBuff(ModContent.BuffType(), 180); } public override void Kill(int timeLeft) diff --git a/Projectiles/Melee/TyphonsGreedStaff.cs b/Projectiles/Melee/TyphonsGreedStaff.cs index 7c659b2b56..1ff3b8b1a3 100644 --- a/Projectiles/Melee/TyphonsGreedStaff.cs +++ b/Projectiles/Melee/TyphonsGreedStaff.cs @@ -140,38 +140,21 @@ namespace CalamityMod.Projectiles.Melee player.itemAnimation = 2; player.itemRotation = MathHelper.WrapAngle(projectile.rotation); projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 12f) + if (projectile.localAI[0] % 12f == 0f) { - projectile.localAI[0] = 0f; - float xPos = Main.rand.NextBool(2) ? projectile.position.X + 800f : projectile.position.X - 800f; - Vector2 vector20 = new Vector2(xPos, projectile.position.Y + (float)Main.rand.Next(-800, 801)); - float num80 = xPos; - float speedX = (float)player.position.X - vector20.X; - float speedY = (float)player.position.Y - vector20.Y; - float dir = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); - dir = 10 / num80; - speedX *= dir * 150; - speedY *= dir * 150; - if (speedX > 15f) - { - speedX = 15f; - } - if (speedX < -15f) - { - speedX = -15f; - } - if (speedY > 15f) - { - speedY = 15f; - } - if (speedY < -15f) - { - speedY = -15f; - } + float xPos = projectile.Center.X + 800 * Main.rand.NextBool(2).ToDirectionInt(); + float yPos = projectile.Center.Y + Main.rand.Next(-800, 801); + Vector2 spawnPosition = new Vector2(xPos, yPos); + Vector2 velocity = player.Center - spawnPosition; + float dir = 10 / spawnPosition.X; + velocity.X *= dir * 150; + velocity.Y *= dir * 150; + velocity.X = MathHelper.Clamp(velocity.X, -15f, 15f); + velocity.Y = MathHelper.Clamp(velocity.Y, -15f, 15f); if (projectile.owner == Main.myPlayer) { float ai1 = Main.rand.NextFloat() + 0.5f; - Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, ModContent.ProjectileType(), projectile.damage, 2f, projectile.owner, 0.0f, ai1); + Projectile.NewProjectile(spawnPosition, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack * 0.5f, projectile.owner, 0f, ai1); } } } From 5e6db28f2db171ca7df582973dcac24e8addbcd4 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:16:17 -0400 Subject: [PATCH 093/128] nerfed event horizon --- Projectiles/Magic/EventHorizonBlackhole.cs | 4 ++-- Projectiles/Magic/EventHorizonStar.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projectiles/Magic/EventHorizonBlackhole.cs b/Projectiles/Magic/EventHorizonBlackhole.cs index 1aa100d4de..75c6ed0500 100644 --- a/Projectiles/Magic/EventHorizonBlackhole.cs +++ b/Projectiles/Magic/EventHorizonBlackhole.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 5; + projectile.localNPCHitCooldown = 8; } public override void AI() @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic } else { - if (projectile.frame == 0 || projectile.frame == 1 || projectile.frame == 2 || projectile.frame == 3) + if (projectile.frame < 4) projectile.frame = 4; if (projectile.frame >= 8) projectile.frame = 4; diff --git a/Projectiles/Magic/EventHorizonStar.cs b/Projectiles/Magic/EventHorizonStar.cs index 45a8c88f6d..1b6fa190c2 100644 --- a/Projectiles/Magic/EventHorizonStar.cs +++ b/Projectiles/Magic/EventHorizonStar.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic projectile.penetrate = 1; projectile.magic = true; projectile.tileCollide = false; - projectile.timeLeft = 600; + projectile.timeLeft = 300; projectile.alpha = 180; } @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Daybreak, 300); - Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.5f), projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) From face7957d0f075d6f8f9bcb041b7ca07bcf83d60 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:26:53 -0400 Subject: [PATCH 094/128] buffed helium flash and rebalanced voltaic climax --- Items/Weapons/Magic/Climax.cs | 7 +++---- Items/Weapons/Magic/HeliumFlash.cs | 2 +- Items/Weapons/Magic/MagneticMeltdown.cs | 2 +- Projectiles/Magic/ClimaxProj.cs | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Items/Weapons/Magic/Climax.cs b/Items/Weapons/Magic/Climax.cs index b4be338026..83b316841c 100644 --- a/Items/Weapons/Magic/Climax.cs +++ b/Items/Weapons/Magic/Climax.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 75; + item.damage = 131; item.magic = true; item.mana = 30; item.width = 78; @@ -69,11 +69,10 @@ namespace CalamityMod.Items.Weapons.Magic double startAngle = Math.Atan2(speedX, speedY) - spread / 2; double deltaAngle = spread / 8f; double offsetAngle; - int i; - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), type, damage, knockBack, player.whoAmI, 1f, 0f); Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), type, damage, knockBack, player.whoAmI, 0f, 0f); } return false; diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 93d52b70f6..44dd27a183 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic item.width = 76; item.height = 76; item.magic = true; - item.damage = 1110; + item.damage = 1297; item.knockBack = 9.5f; item.mana = 26; item.useAnimation = 37; diff --git a/Items/Weapons/Magic/MagneticMeltdown.cs b/Items/Weapons/Magic/MagneticMeltdown.cs index 8cebeba233..86e69eadd3 100644 --- a/Items/Weapons/Magic/MagneticMeltdown.cs +++ b/Items/Weapons/Magic/MagneticMeltdown.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic { float SpeedX = speedX + (float)Main.rand.Next(-50, 51) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-50, 51) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 1.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 1f, 0f); } return false; } diff --git a/Projectiles/Magic/ClimaxProj.cs b/Projectiles/Magic/ClimaxProj.cs index 24c196528a..a4ea83c615 100644 --- a/Projectiles/Magic/ClimaxProj.cs +++ b/Projectiles/Magic/ClimaxProj.cs @@ -49,7 +49,8 @@ namespace CalamityMod.Projectiles.Magic } } - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 400f, 8f, 4f, 5, ModContent.ProjectileType()); + if (projectile.timeLeft % 2 == projectile.ai[0]) + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 400f, 8f, 4f, 5, ModContent.ProjectileType()); } public override Color? GetAlpha(Color lightColor) From d760d2b62bcbbd31635c18acdeab4b3e29c84741 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 09:36:45 -0400 Subject: [PATCH 095/128] nerfed ele shiv --- Items/Weapons/Melee/ElementalShortsword.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/ElementalShortsword.cs b/Items/Weapons/Melee/ElementalShortsword.cs index 61cbb32cc9..229c8de2e5 100644 --- a/Items/Weapons/Melee/ElementalShortsword.cs +++ b/Items/Weapons/Melee/ElementalShortsword.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee { DisplayName.SetDefault("Elemental Shiv"); Tooltip.SetDefault("Don't underestimate the power of shivs\n" + - "Shoots a rainbow orb that spawns shivs at multiple locations"); + "Shoots a rainbow shiv that spawns additional shivs on hit"); } public override void SetDefaults() @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 10; item.width = 44; item.height = 44; - item.damage = 180; + item.damage = 160; item.melee = true; item.knockBack = 8.5f; item.UseSound = SoundID.Item1; @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee 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, (int)(damage * 0.65), knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, item.shootSpeed * player.direction, 0f, type, (int)(damage * 0.5), knockBack, player.whoAmI, 0f, 0f); return false; } From 286b97004eff34586c8ad839c2c702b8fa314b45 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 11:20:06 -0400 Subject: [PATCH 096/128] fixed old duke minions spamming projectiles in emode --- NPCs/OldDuke/OldDukeSharkron.cs | 6 +++++- NPCs/OldDuke/OldDukeToothBall.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NPCs/OldDuke/OldDukeSharkron.cs b/NPCs/OldDuke/OldDukeSharkron.cs index 5ce832eb15..4e26e973e4 100644 --- a/NPCs/OldDuke/OldDukeSharkron.cs +++ b/NPCs/OldDuke/OldDukeSharkron.cs @@ -13,6 +13,7 @@ namespace CalamityMod.NPCs.OldDuke { public class OldDukeSharkron : ModNPC { + bool spawnedProjectiles = false; public override void SetStaticDefaults() { DisplayName.SetDefault("Sulphurous Sharkron"); @@ -45,12 +46,14 @@ namespace CalamityMod.NPCs.OldDuke { writer.Write(npc.dontTakeDamage); writer.Write(npc.noGravity); + writer.Write(spawnedProjectiles); } public override void ReceiveExtraAI(BinaryReader reader) { npc.dontTakeDamage = reader.ReadBoolean(); npc.noGravity = reader.ReadBoolean(); + spawnedProjectiles = reader.ReadBoolean(); } public override void AI() @@ -231,8 +234,9 @@ namespace CalamityMod.NPCs.OldDuke Main.dust[num624].velocity.X *= 2f; } - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !spawnedProjectiles) { + spawnedProjectiles = true; int spawnX = npc.width / 2; int damage = Main.expertMode ? 55 : 70; for (int i = 0; i < 2; i++) diff --git a/NPCs/OldDuke/OldDukeToothBall.cs b/NPCs/OldDuke/OldDukeToothBall.cs index 5cff54dff9..b5cb511a8f 100644 --- a/NPCs/OldDuke/OldDukeToothBall.cs +++ b/NPCs/OldDuke/OldDukeToothBall.cs @@ -12,6 +12,7 @@ namespace CalamityMod.NPCs.OldDuke { public class OldDukeToothBall : ModNPC { + bool spawnedProjectiles = false; public override void SetStaticDefaults() { DisplayName.SetDefault("Tooth Ball"); @@ -42,11 +43,13 @@ namespace CalamityMod.NPCs.OldDuke public override void SendExtraAI(BinaryWriter writer) { writer.Write(npc.dontTakeDamage); + writer.Write(spawnedProjectiles); } public override void ReceiveExtraAI(BinaryReader reader) { npc.dontTakeDamage = reader.ReadBoolean(); + spawnedProjectiles = reader.ReadBoolean(); } public override void AI() @@ -201,8 +204,9 @@ namespace CalamityMod.NPCs.OldDuke Main.dust[num624].noGravity = true; } - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !spawnedProjectiles) { + spawnedProjectiles = true; int totalProjectiles = 4; float radians = MathHelper.TwoPi / totalProjectiles; int damage = Main.expertMode ? 55 : 70; From 330a8c2f0605efe5478081fce1c9481d6d1babff Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:24:56 -0400 Subject: [PATCH 097/128] rev+ dungeon guardian no longer spawn camps the player --- NPCs/CalamityGlobalAI.cs | 75 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index be56f8bd1d..8a9641e590 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -15796,43 +15796,44 @@ namespace CalamityMod.NPCs #region Revengeance Dungeon Guardian AI public static void RevengeanceDungeonGuardianAI(NPC npc, bool configBossRushBoost, bool enraged) { - Vector2 vector21 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); - float num177 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2) - vector21.X; - float num178 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2) - vector21.Y; - float num179 = (float)Math.Sqrt(num177 * num177 + num178 * num178); - num179 = 12f / num179; - npc.velocity.X = num177 * num179; - npc.velocity.Y = num178 * num179; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 1f; - if (npc.localAI[1] >= 60f) - { - npc.localAI[1] = 0f; - Vector2 vector16 = npc.Center; - if (Collision.CanHit(vector16, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - float num159 = 5f; - float num160 = Main.player[npc.target].position.X + Main.player[npc.target].width * 0.5f - vector16.X + Main.rand.Next(-20, 21); - float num161 = Main.player[npc.target].position.Y + Main.player[npc.target].height * 0.5f - vector16.Y + Main.rand.Next(-20, 21); - float num162 = (float)Math.Sqrt(num160 * num160 + num161 * num161); - num162 = num159 / num162; - num160 *= num162; - num161 *= num162; - Vector2 value = new Vector2(num160 * 1f + Main.rand.Next(-50, 51) * 0.01f, num161 * 1f + Main.rand.Next(-50, 51) * 0.01f); - value.Normalize(); - value *= num159; - value += npc.velocity; - num160 = value.X; - num161 = value.Y; - int num163 = 2500; - int num164 = ProjectileID.Skull; - vector16 += value * 5f; - int num165 = Projectile.NewProjectile(vector16.X, vector16.Y, num160, num161, num164, num163, 0f, Main.myPlayer, -1f, 0f); - Main.projectile[num165].timeLeft = 300; - } - } - } + Player target = Main.player[npc.target]; + if (npc.ai[1] != 3f) + { + Vector2 targetVector = target.Center - npc.Center; + float targetDist = targetVector.Length(); + targetDist = 12f / targetDist; + npc.velocity.X = targetVector.X * targetDist; + npc.velocity.Y = targetVector.Y * targetDist; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (npc.localAI[1]++ % 60f == 59f) + { + Vector2 source = npc.Center; + if (Collision.CanHit(source, 1, 1, target.Center, target.width, target.height)) + { + float speed = 5f; + float xDist = target.Center.X - source.X + Main.rand.Next(-20, 21); + float yDist = target.Center.Y - source.Y + Main.rand.Next(-20, 21); + Vector2 velocity = new Vector2(xDist, yDist); + float distTarget = velocity.Length(); + distTarget = speed / distTarget; + velocity.X *= distTarget; + velocity.Y *= distTarget; + Vector2 offset = new Vector2(velocity.X * 1f + Main.rand.Next(-50, 51) * 0.01f, velocity.Y * 1f + Main.rand.Next(-50, 51) * 0.01f); + offset.Normalize(); + offset *= speed; + offset += npc.velocity; + velocity.X = offset.X; + velocity.Y = offset.Y; + int damage = 2500; + int projType = ProjectileID.Skull; + source += offset * 5f; + int skull = Projectile.NewProjectile(source, velocity, projType, damage, 0f, Main.myPlayer, -1f, 0f); + Main.projectile[skull].timeLeft = 300; + } + } + } + } } #endregion From ce621b601cca0a26fcd0cdaf7bd7fa4e90eee8ef Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:29:57 -0400 Subject: [PATCH 098/128] reverted most of the helium flash buff due to further testing --- Items/Weapons/Magic/HeliumFlash.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 44dd27a183..2deb75603c 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic item.width = 76; item.height = 76; item.magic = true; - item.damage = 1297; + item.damage = 1111; item.knockBack = 9.5f; item.mana = 26; item.useAnimation = 37; From 1f328f188a32896e16aa327187e5c11801b3387b Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:34:29 -0400 Subject: [PATCH 099/128] fixed mantis getting reduced dmg after aureus --- NPCs/Astral/Mantis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index 8f9f7da46d..8bcfa76057 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -115,7 +115,7 @@ namespace CalamityMod.NPCs.Astral Main.PlaySound(SoundID.Item71, npc.position); Vector2 vector = Main.player[npc.target].Center - npc.Center; vector.Normalize(); - int damage = CalamityWorld.downedAstrageldon ? 45 : 55; + int damage = CalamityWorld.downedAstrageldon ? 55 : 45; Projectile.NewProjectile(npc.Center + (npc.Center.X < target.Center.X ? -14f : 14f) * Vector2.UnitX, vector * 7f, ModContent.ProjectileType(), damage, 0f); } } From 6fb28f6ef710a2337d1e77426ca89221908eb22f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:43:25 -0400 Subject: [PATCH 100/128] fixed mantis scythe spam and added a netmode check --- NPCs/Astral/Mantis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index 8bcfa76057..d0d14feedf 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.Astral { npc.ai[2] += 1f; npc.velocity.X *= 0.95f; - if (npc.ai[2] >= 20f) + if (npc.ai[2] == 20f && Main.netMode != NetmodeID.MultiplayerClient) //Don't do >= 20f or it'll cause a wave of scythes { Main.PlaySound(SoundID.Item71, npc.position); Vector2 vector = Main.player[npc.target].Center - npc.Center; From 2ed47e2ecb408ca057b7f6cadbd29daae82f9991 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 13:09:04 -0400 Subject: [PATCH 101/128] tried a super dummy fix for the other bug --- Items/SuperDummy.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index bbb6e4b678..2003dc491d 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -41,12 +41,12 @@ namespace CalamityMod.Items { for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].type == ModContent.NPCType()) + NPC npc = Main.npc[i]; + if (npc.type == ModContent.NPCType()) { - Main.npc[i].life = 0; - Main.npc[i].lifeRegen = 0; - Main.npc[i].checkDead(); - Main.npc[i].netUpdate = true; + npc.active = false; + npc.netUpdate = true; + Main.PlaySound(SoundID.NPCDeath2, npc.position); } } } From b58a79f19d1938ecfc0f2f67e832eedccf1b2837 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 13:12:49 -0400 Subject: [PATCH 102/128] removed netmode checks because it just broke astral even more --- Items/SuperDummy.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 2 +- Projectiles/Typeless/AstralSpray.cs | 2 +- Projectiles/Typeless/WaterConvertor.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index 2003dc491d..69561c4f68 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items { npc.active = false; npc.netUpdate = true; - Main.PlaySound(SoundID.NPCDeath2, npc.position); + Main.PlaySound(SoundID.NPCDeath2, npc.Center); } } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 6b5d487cb1..c25bf254d1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1019,7 +1019,7 @@ namespace CalamityMod.Projectiles defCrit = 4; } - if (projectile.owner == Main.myPlayer && Main.netMode != NetmodeID.MultiplayerClient) + if (projectile.owner == Main.myPlayer/* && Main.netMode != NetmodeID.MultiplayerClient*/) { int x = (int)(projectile.Center.X / 16f); int y = (int)(projectile.Center.Y / 16f); diff --git a/Projectiles/Typeless/AstralSpray.cs b/Projectiles/Typeless/AstralSpray.cs index 35239658ec..e698101cd7 100644 --- a/Projectiles/Typeless/AstralSpray.cs +++ b/Projectiles/Typeless/AstralSpray.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreAI() { - if (projectile.owner == Main.myPlayer && Main.netMode != NetmodeID.MultiplayerClient) + if (projectile.owner == Main.myPlayer/* && Main.netMode != NetmodeID.MultiplayerClient*/) { int x = (int)(projectile.Center.X / 16f); int y = (int)(projectile.Center.Y / 16f); diff --git a/Projectiles/Typeless/WaterConvertor.cs b/Projectiles/Typeless/WaterConvertor.cs index 875a3cc0f2..63ec125038 100644 --- a/Projectiles/Typeless/WaterConvertor.cs +++ b/Projectiles/Typeless/WaterConvertor.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Typeless public void ConvertShit(Projectile projectile) { - if (projectile.owner == Main.myPlayer && Main.netMode != NetmodeID.MultiplayerClient) + if (projectile.owner == Main.myPlayer/* && Main.netMode != NetmodeID.MultiplayerClient*/) { int x = (int)(projectile.Center.X / 16f); int y = (int)(projectile.Center.Y / 16f); From b4606eb09474a5e81d5216214ea21eb5318cae7f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 13:47:56 -0400 Subject: [PATCH 103/128] removed i frame fucking on wrath of the ancients, magnetic meltdown, climax, and void vortex --- Projectiles/Magic/Climax2.cs | 2 ++ Projectiles/Magic/ClimaxProj.cs | 2 ++ Projectiles/Magic/GranitePulse.cs | 2 ++ Projectiles/Magic/MagneticOrb.cs | 2 ++ Projectiles/Summon/AstralProbeSummon.cs | 5 +---- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Projectiles/Magic/Climax2.cs b/Projectiles/Magic/Climax2.cs index 721d7ddd32..52e15ca516 100644 --- a/Projectiles/Magic/Climax2.cs +++ b/Projectiles/Magic/Climax2.cs @@ -77,5 +77,7 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } + + public override bool CanDamage() => false; } } diff --git a/Projectiles/Magic/ClimaxProj.cs b/Projectiles/Magic/ClimaxProj.cs index a4ea83c615..4260c256a8 100644 --- a/Projectiles/Magic/ClimaxProj.cs +++ b/Projectiles/Magic/ClimaxProj.cs @@ -71,5 +71,7 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } + + public override bool CanDamage() => false; } } diff --git a/Projectiles/Magic/GranitePulse.cs b/Projectiles/Magic/GranitePulse.cs index 7aaecbf6db..c085cb6789 100644 --- a/Projectiles/Magic/GranitePulse.cs +++ b/Projectiles/Magic/GranitePulse.cs @@ -168,5 +168,7 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, spriteEffects, 0f); return false; } + + public override bool CanDamage() => false; } } diff --git a/Projectiles/Magic/MagneticOrb.cs b/Projectiles/Magic/MagneticOrb.cs index 799b640ce6..6d34c01a26 100644 --- a/Projectiles/Magic/MagneticOrb.cs +++ b/Projectiles/Magic/MagneticOrb.cs @@ -70,5 +70,7 @@ namespace CalamityMod.Projectiles.Magic Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); return false; } + + public override bool CanDamage() => false; } } diff --git a/Projectiles/Summon/AstralProbeSummon.cs b/Projectiles/Summon/AstralProbeSummon.cs index 2f36a3d958..dcc163d511 100644 --- a/Projectiles/Summon/AstralProbeSummon.cs +++ b/Projectiles/Summon/AstralProbeSummon.cs @@ -153,9 +153,6 @@ namespace CalamityMod.Projectiles.Summon } } - public override bool CanDamage() - { - return false; - } + public override bool CanDamage() => false; } } From 5923317b0d62c9fbc2f3b94265806ac92d4894b5 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 14:02:25 -0400 Subject: [PATCH 104/128] super dummy active check --- Items/SuperDummy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index 69561c4f68..529903f6f9 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.type == ModContent.NPCType()) + if (npc.type == ModContent.NPCType() && npc.active) { npc.active = false; npc.netUpdate = true; From d5a5f818910e223140d8cc42f857864fb9a24362 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 15:35:41 -0400 Subject: [PATCH 105/128] camper no longer stacks with photosynthesis & friends. Camper is less effective while a boss is alive. --- CalPlayer/CalamityPlayerLifeRegen.cs | 318 ++++++++++++--------------- 1 file changed, 141 insertions(+), 177 deletions(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index f98769fada..67c34c3a6a 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -713,188 +713,152 @@ namespace CalamityMod.CalPlayer player.lifeRegen += 1; // Standing still healing bonuses (all exclusive with vanilla Shiny Stone) - if (!player.shinyStone) - { - int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800; - int lifeRegenMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 1 : 4; - float lifeRegenLifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 8f : 30f; + if (!player.shinyStone) + { + int lifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 450 : 1800; + int lifeRegenMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 1 : 4; + float lifeRegenLifeRegenTimeMaxBoost = CalamityPlayer.areThereAnyDamnBosses ? 8f : 30f; - if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0) - { - if (modPlayer.shadeRegen) - { - if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost) - player.lifeRegenTime = lifeRegenTimeMaxBoost; + if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0) + { + bool boostedRegen = false; + bool noSunlight = false; + if (modPlayer.shadeRegen) + { + boostedRegen = true; + if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) + { + if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30)) + { + int num5 = Dust.NewDust(player.position, player.width, player.height, 173, 0f, 0f, 200, default, 1f); + Main.dust[num5].noGravity = true; + Main.dust[num5].velocity *= 0.75f; + Main.dust[num5].fadeIn = 1.3f; + Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + vector.Normalize(); + vector *= (float)Main.rand.Next(50, 100) * 0.04f; + Main.dust[num5].velocity = vector; + vector.Normalize(); + vector *= 34f; + Main.dust[num5].position = player.Center - vector; + } + } + } + else if (modPlayer.cFreeze) + { + boostedRegen = true; + if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) + { + if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30)) + { + int num5 = Dust.NewDust(player.position, player.width, player.height, 67, 0f, 0f, 200, new Color(150, Main.DiscoG, 255), 0.75f); + Main.dust[num5].noGravity = true; + Main.dust[num5].velocity *= 0.75f; + Main.dust[num5].fadeIn = 1.3f; + Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + vector.Normalize(); + vector *= (float)Main.rand.Next(50, 100) * 0.04f; + Main.dust[num5].velocity = vector; + vector.Normalize(); + vector *= 34f; + Main.dust[num5].position = player.Center - vector; + } + } + } + else if (modPlayer.draedonsHeart) + { + boostedRegen = true; + if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) + { + if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) + { + int num5 = Dust.NewDust(player.position, player.width, player.height, 107, 0f, 0f, 200, default, 1f); + Main.dust[num5].noGravity = true; + Main.dust[num5].velocity *= 0.75f; + Main.dust[num5].fadeIn = 1.3f; + Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + vector.Normalize(); + vector *= (float)Main.rand.Next(50, 100) * 0.04f; + Main.dust[num5].velocity = vector; + vector.Normalize(); + vector *= 34f; + Main.dust[num5].position = player.Center - vector; + } + } + } + else if (modPlayer.photosynthesis) + { + boostedRegen = true; + if (!Main.dayTime) + noSunlight = true; + if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) + { + if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) + { + int num5 = Dust.NewDust(player.position, player.width, player.height, 244, 0f, 0f, 200, default, 1f); + Main.dust[num5].noGravity = true; + Main.dust[num5].velocity *= 0.75f; + Main.dust[num5].fadeIn = 1.3f; + Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + vector.Normalize(); + vector *= (float)Main.rand.Next(50, 100) * 0.04f; + Main.dust[num5].velocity = vector; + vector.Normalize(); + vector *= 34f; + Main.dust[num5].position = player.Center - vector; + } + } + } + if (boostedRegen) + { + int lifeRegenTimeMaxBoost2 = !noSunlight ? lifeRegenTimeMaxBoost : (lifeRegenTimeMaxBoost / 5); + int lifeRegenMaxBoost2 = !noSunlight ? lifeRegenMaxBoost : (lifeRegenMaxBoost / 5); + float lifeRegenLifeRegenTimeMaxBoost2 = !noSunlight ? lifeRegenLifeRegenTimeMaxBoost : (lifeRegenLifeRegenTimeMaxBoost / 5); - player.lifeRegenTime += lifeRegenMaxBoost; - player.lifeRegen += lifeRegenMaxBoost; + if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost2) + player.lifeRegenTime = lifeRegenTimeMaxBoost2; - float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600 - num3 /= 300f; - if (num3 > 0f) - { - if (num3 > lifeRegenLifeRegenTimeMaxBoost) - num3 = lifeRegenLifeRegenTimeMaxBoost; + player.lifeRegenTime += lifeRegenMaxBoost2; + player.lifeRegen += lifeRegenMaxBoost2; - player.lifeRegen += (int)num3; - } + float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600 + num3 /= 300f; + if (num3 > 0f) + { + if (num3 > lifeRegenLifeRegenTimeMaxBoost2) + num3 = lifeRegenLifeRegenTimeMaxBoost2; - if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) - { - player.lifeRegenCount++; - if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30)) - { - int num5 = Dust.NewDust(player.position, player.width, player.height, 173, 0f, 0f, 200, default, 1f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; - Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector.Normalize(); - vector *= (float)Main.rand.Next(50, 100) * 0.04f; - Main.dust[num5].velocity = vector; - vector.Normalize(); - vector *= 34f; - Main.dust[num5].position = player.Center - vector; - } - } - } - else if (modPlayer.cFreeze) - { - if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost) - player.lifeRegenTime = lifeRegenTimeMaxBoost; - - player.lifeRegenTime += lifeRegenMaxBoost; - player.lifeRegen += lifeRegenMaxBoost; - - float num3 = (player.lifeRegenTime * 2.5f); // lifeRegenTime max is 3600 - num3 /= 300f; - if (num3 > 0f) - { - if (num3 > lifeRegenLifeRegenTimeMaxBoost) - num3 = lifeRegenLifeRegenTimeMaxBoost; - - player.lifeRegen += (int)num3; - } - - if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) - { - player.lifeRegenCount++; - if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(30)) - { - int num5 = Dust.NewDust(player.position, player.width, player.height, 67, 0f, 0f, 200, new Color(150, Main.DiscoG, 255), 0.75f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; - Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector.Normalize(); - vector *= (float)Main.rand.Next(50, 100) * 0.04f; - Main.dust[num5].velocity = vector; - vector.Normalize(); - vector *= 34f; - Main.dust[num5].position = player.Center - vector; - } - } - } - else if (modPlayer.draedonsHeart) - { - if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost) - player.lifeRegenTime = lifeRegenTimeMaxBoost; - - player.lifeRegenTime += lifeRegenMaxBoost; - player.lifeRegen += lifeRegenMaxBoost; - - float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600 - num3 /= 300f; - if (num3 > 0f) - { - if (num3 > lifeRegenLifeRegenTimeMaxBoost) - num3 = lifeRegenLifeRegenTimeMaxBoost; - - player.lifeRegen += (int)num3; - } - - if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) - { - player.lifeRegenCount++; - if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) - { - int num5 = Dust.NewDust(player.position, player.width, player.height, 107, 0f, 0f, 200, default, 1f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; - Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector.Normalize(); - vector *= (float)Main.rand.Next(50, 100) * 0.04f; - Main.dust[num5].velocity = vector; - vector.Normalize(); - vector *= 34f; - Main.dust[num5].position = player.Center - vector; - } - } - } - else if (modPlayer.photosynthesis) - { - int lifeRegenTimeMaxBoost2 = Main.dayTime ? lifeRegenTimeMaxBoost : (lifeRegenTimeMaxBoost / 5); - int lifeRegenMaxBoost2 = Main.dayTime ? lifeRegenMaxBoost : (lifeRegenMaxBoost / 5); - float lifeRegenLifeRegenTimeMaxBoost2 = Main.dayTime ? lifeRegenLifeRegenTimeMaxBoost : (lifeRegenLifeRegenTimeMaxBoost / 5); - - if (player.lifeRegenTime > 90 && player.lifeRegenTime < lifeRegenTimeMaxBoost2) - player.lifeRegenTime = lifeRegenTimeMaxBoost2; - - player.lifeRegenTime += lifeRegenMaxBoost2; - player.lifeRegen += lifeRegenMaxBoost2; - - float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600 - num3 /= 300f; - if (num3 > 0f) - { - if (num3 > lifeRegenLifeRegenTimeMaxBoost2) - num3 = lifeRegenLifeRegenTimeMaxBoost2; - - player.lifeRegen += (int)num3; - } - - if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) - { - player.lifeRegenCount++; - if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) - { - int num5 = Dust.NewDust(player.position, player.width, player.height, 244, 0f, 0f, 200, default, 1f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; - Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector.Normalize(); - vector *= (float)Main.rand.Next(50, 100) * 0.04f; - Main.dust[num5].velocity = vector; - vector.Normalize(); - vector *= 34f; - Main.dust[num5].position = player.Center - vector; - } - } - } - } - else if (modPlayer.camper && player.statLife < modPlayer.actualMaxLife) - { - player.lifeRegen = (int)((player.lifeRegen * 2) * 1.75f); - player.lifeRegenCount = player.lifeRegenCount > 30 ? player.lifeRegenCount : 30; - player.lifeRegenCount++; - if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) - { - int num5 = Dust.NewDust(player.position, player.width, player.height, 12, 0f, 0f, 200, Color.OrangeRed, 1f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; - Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - vector.Normalize(); - vector *= (float)Main.rand.Next(50, 100) * 0.04f; - Main.dust[num5].velocity = vector; - vector.Normalize(); - vector *= 34f; - Main.dust[num5].position = player.Center - vector; - } - } - } + player.lifeRegen += (int)num3; + } + if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) + { + player.lifeRegenCount++; + } + } + else if (modPlayer.camper && player.statLife < modPlayer.actualMaxLife) + { + int camperRegenMult = CalamityPlayer.areThereAnyDamnBosses ? 1.3f : 1.75f; + int camperCap = CalamityPlayer.areThereAnyDamnBosses ? 20 : 30; + player.lifeRegen = (int)((player.lifeRegen * 2) * camperRegenMult); + player.lifeRegenCount = player.lifeRegenCount > camperCap ? player.lifeRegenCount : camperCap; + player.lifeRegenCount++; + if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) + { + int num5 = Dust.NewDust(player.position, player.width, player.height, 12, 0f, 0f, 200, Color.OrangeRed, 1f); + Main.dust[num5].noGravity = true; + Main.dust[num5].velocity *= 0.75f; + Main.dust[num5].fadeIn = 1.3f; + Vector2 vector = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + vector.Normalize(); + vector *= (float)Main.rand.Next(50, 100) * 0.04f; + Main.dust[num5].velocity = vector; + vector.Normalize(); + vector *= 34f; + Main.dust[num5].position = player.Center - vector; + } + } + } + } if (CalamityWorld.revenge) { From dad8ecb95a070e26e5f938e5c2300966ccba9204 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 15:38:16 -0400 Subject: [PATCH 106/128] oops --- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 67c34c3a6a..5899ddd699 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -837,7 +837,7 @@ namespace CalamityMod.CalPlayer } else if (modPlayer.camper && player.statLife < modPlayer.actualMaxLife) { - int camperRegenMult = CalamityPlayer.areThereAnyDamnBosses ? 1.3f : 1.75f; + float camperRegenMult = CalamityPlayer.areThereAnyDamnBosses ? 1.3f : 1.75f; int camperCap = CalamityPlayer.areThereAnyDamnBosses ? 20 : 30; player.lifeRegen = (int)((player.lifeRegen * 2) * camperRegenMult); player.lifeRegenCount = player.lifeRegenCount > camperCap ? player.lifeRegenCount : camperCap; From 552d1e7d3eb65d741dcae4c22286b4c2483c67ff Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 16:19:14 -0400 Subject: [PATCH 107/128] this apparently made them not shoot in mp, I love it --- NPCs/Astral/Mantis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index d0d14feedf..ade6f8e031 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.Astral { npc.ai[2] += 1f; npc.velocity.X *= 0.95f; - if (npc.ai[2] == 20f && Main.netMode != NetmodeID.MultiplayerClient) //Don't do >= 20f or it'll cause a wave of scythes + if (npc.ai[2] == 20f) //Don't do >= 20f or it'll cause a wave of scythes { Main.PlaySound(SoundID.Item71, npc.position); Vector2 vector = Main.player[npc.target].Center - npc.Center; From 3ebc87a20536c22167f360b200f72b9c16d2ae64 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 16:23:50 -0400 Subject: [PATCH 108/128] buffed sun bat health --- NPCs/NormalNPCs/SunBat.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/NormalNPCs/SunBat.cs b/NPCs/NormalNPCs/SunBat.cs index 7506a805c1..47fee87ff6 100644 --- a/NPCs/NormalNPCs/SunBat.cs +++ b/NPCs/NormalNPCs/SunBat.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 26; npc.height = 20; npc.defense = 10; - npc.lifeMax = 120; + npc.lifeMax = 200; npc.knockBackResist = 0.65f; npc.value = Item.buyPrice(0, 0, 5, 0); npc.HitSound = SoundID.NPCHit1; From 394976dbbe1f04f6d27bfe7cb3775f6ae9da5d71 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 16:47:42 -0400 Subject: [PATCH 109/128] commented out cal message on wof death --- NPCs/CalamityGlobalNPCLoot.cs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 371993f2d3..03ed95d646 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -174,22 +174,22 @@ namespace CalamityMod.NPCs // First kill text (this is not a loot function) if (!Main.hardMode) - { - string key2 = "Mods.CalamityMod.UglyBossText"; //Sunken Sea buff - string key = "Mods.CalamityMod.SteelSkullBossText"; //clone can now be fought - Color messageColor2 = Color.Aquamarine; - Color messageColor = Color.Crimson; - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key2), messageColor2); - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key2), messageColor2); - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } - } + { + string key2 = "Mods.CalamityMod.UglyBossText"; //Sunken Sea buff + //string key = "Mods.CalamityMod.SteelSkullBossText"; //clone can now be fought + Color messageColor2 = Color.Aquamarine; + //Color messageColor = Color.Crimson; + if (Main.netMode == NetmodeID.SinglePlayer) + { + Main.NewText(Language.GetTextValue(key2), messageColor2); + // Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == NetmodeID.Server) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key2), messageColor2); + //NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } } else if (lastTwinStanding) { From 9fcaf10a5f237a016fb8c825ff9762dc92a5b6a1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 17:48:05 -0400 Subject: [PATCH 110/128] energy staff dust is now centered --- Items/Weapons/Summon/EnergyStaff.cs | 10 ++--- Projectiles/Summon/ProfanedEnergy.cs | 56 ++++++++++++++-------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Items/Weapons/Summon/EnergyStaff.cs b/Items/Weapons/Summon/EnergyStaff.cs index 14e62b75f1..d297a1659f 100644 --- a/Items/Weapons/Summon/EnergyStaff.cs +++ b/Items/Weapons/Summon/EnergyStaff.cs @@ -36,11 +36,11 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, ref 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(); + if (player.altFunctionUse != 2) + { + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 8f); + player.UpdateMaxTurrets(); + } return false; } } diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index 7896ddc29c..503059565f 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -1,3 +1,4 @@ +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using System; using Terraria; @@ -45,24 +46,27 @@ namespace CalamityMod.Projectiles.Summon { projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; - Main.PlaySound(SoundID.Item20, projectile.position); - for (int num621 = 0; num621 < 5; num621++) + Main.PlaySound(SoundID.Item20, projectile.Center); + for (int i = 0; i < 5; i++) { - int num622 = Dust.NewDust(new Vector2(projectile.Center.X, projectile.Center.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int holy = Dust.NewDust(projectile.Center, projectile.width, projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f); + Main.dust[holy].velocity *= 3f; + Main.dust[holy].position = projectile.Center; if (Main.rand.NextBool(2)) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[holy].scale = 0.5f; + Main.dust[holy].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 10; num623++) + for (int j = 0; j < 10; j++) { - int num624 = Dust.NewDust(new Vector2(projectile.Center.X, projectile.Center.Y), projectile.width, projectile.height, 246, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.Center.X, projectile.Center.Y), projectile.width, projectile.height, 246, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int fire = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 246, 0f, 0f, 100, default, 3f); + Main.dust[fire].noGravity = true; + Main.dust[fire].velocity *= 5f; + Main.dust[fire].position = projectile.Center; + fire = Dust.NewDust(projectile.Center, projectile.width, projectile.height, 246, 0f, 0f, 100, default, 2f); + Main.dust[fire].velocity *= 2f; + Main.dust[fire].position = projectile.Center; } count += 1f; } @@ -87,13 +91,13 @@ namespace CalamityMod.Projectiles.Summon int target = 0; if (player.HasMinionAttackTargetNPC) { - NPC npc = Main.npc[Main.player[projectile.owner].MinionAttackTargetNPC]; + NPC npc = Main.npc[player.MinionAttackTargetNPC]; if (npc.CanBeChasedBy(projectile, false)) { - float num539 = npc.position.X + (float)(npc.width / 2); - float num540 = npc.position.Y + (float)(npc.height / 2); - float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); - if (num541 < num508 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + float num539 = npc.Center.X; + float num540 = npc.Center.Y; + float num541 = Math.Abs(projectile.Center.X - num539) + Math.Abs(projectile.Center.Y - num540); + if (num541 < num508 && Collision.CanHit(projectile.Center, projectile.width, projectile.height, npc.Center, npc.width, npc.height)) { num506 = num539; num507 = num540; @@ -136,21 +140,17 @@ namespace CalamityMod.Projectiles.Summon { projectile.spriteDirection = -1; } - int projectileType = Main.rand.Next(2); - if (projectileType == 0) - { - projectileType = ModContent.ProjectileType(); - } - else - { - projectileType = ModContent.ProjectileType(); - } - float num403 = Main.rand.Next(20, 30); //modify the speed the projectile are shot. Lower number = slower projectile. + int projectileType = Utils.SelectRandom(Main.rand, new int[] + { + ModContent.ProjectileType(), + ModContent.ProjectileType() + }); + float speed = Main.rand.Next(20, 30); //modify the speed the projectile are shot. Lower number = slower projectile. Vector2 vector29 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); float num404 = num516 - vector29.X; float num405 = num517 - vector29.Y; float num406 = (float)Math.Sqrt((double)(num404 * num404 + num405 * num405)); - num406 = num403 / num406; + num406 = speed / num406; num404 *= num406; num405 *= num406; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num404, num405, projectileType, projectile.damage, projectile.knockBack, projectile.owner, (float)target, 0f); From 84520f41003ce54efafcb06b2fee9866d5e2541e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 18:25:12 -0400 Subject: [PATCH 111/128] made an IsSummon() shortcut --- CalPlayer/CalamityPlayer.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 6 +++--- Projectiles/CalamityGlobalProjectile.cs | 6 +++--- Utilities/CalamityUtils.cs | 2 ++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index ff9dfe33bd..31bc082555 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5211,7 +5211,7 @@ namespace CalamityMod.CalPlayer return; bool isTrueMelee = proj.Calamity().trueMelee; - bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type) || ProjectileID.Sets.MinionShot[proj.type] || ProjectileID.Sets.SentryShot[proj.type]; + bool isSummon = proj.IsSummon(); bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue; Item heldItem = player.ActiveItem(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 66dd72ea09..144add2bb2 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3509,7 +3509,7 @@ namespace CalamityMod.NPCs if (modPlayer.nucleogenesis) { - if (projectile.minion || projectile.sentry || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type] || CalamityMod.projectileMinionList.Contains(projectile.type)) + if (projectile.IsSummon()) { damage = npc.lifeMax * 3; } @@ -3716,7 +3716,7 @@ namespace CalamityMod.NPCs private void PierceResistGlobal(Projectile projectile, ref int damage) { - if (projectile.minion) + if (projectile.IsSummon()) return; if (projectile.penetrate == -1) @@ -3753,7 +3753,7 @@ namespace CalamityMod.NPCs Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - bool isSummon = projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type]; + bool isSummon = projectile.IsSummon(); if (modPlayer.sGenerator) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index c25bf254d1..8036272d2e 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1015,7 +1015,7 @@ namespace CalamityMod.Projectiles defCrit = modPlayer.critStats[2]; else if (rogue) defCrit = modPlayer.critStats[3]; - else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type]) + else if (projectile.IsSummon()) defCrit = 4; } @@ -1302,7 +1302,7 @@ namespace CalamityMod.Projectiles OTHEREFFECTS: if (modPlayer.alchFlask && - (projectile.magic || rogue || projectile.melee || projectile.minion || projectile.ranged || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type]) && + (projectile.magic || rogue || projectile.melee || projectile.IsSummon() || projectile.ranged) && player.ownedProjectileCounts[ProjectileType()] < 6) { int plague = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ProjectileType(), CalamityUtils.DamageSoftCap(projectile.damage * 0.25, 30), 0f, projectile.owner, 0f, 0f); @@ -1601,7 +1601,7 @@ namespace CalamityMod.Projectiles } } } - if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type) || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type]) + if (projectile.IsSummon()) { if (modPlayer.profanedCrystalBuffs || (modPlayer.pArtifact && !modPlayer.profanedCrystal)) { diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 721a9e40b5..6613fc7ac6 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -759,6 +759,8 @@ namespace CalamityMod public static int CountHookProj() => Main.projectile.Count(proj => Main.projHook[proj.type] && proj.ai[0] == 2f && proj.active && proj.owner == Main.myPlayer); + public static bool IsSummon(this Projectile proj) => proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type) || ProjectileID.Sets.MinionShot[proj.type] || ProjectileID.Sets.SentryShot[proj.type]; + public static void KillAllHostileProjectiles() { for (int x = 0; x < Main.maxProjectiles; x++) From ca81ca4bbe951eb458a93f1674aefe6bff720346 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 21:16:51 -0400 Subject: [PATCH 112/128] tried to reduce Fabstaff lag --- Items/Weapons/Magic/Fabstaff.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 2 +- Projectiles/Magic/FabOrb.cs | 3 +- Projectiles/Magic/FabRay.cs | 38 ++++++++++++++----------- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Items/Weapons/Magic/Fabstaff.cs b/Items/Weapons/Magic/Fabstaff.cs index 1542e17e2d..c05347edfd 100644 --- a/Items/Weapons/Magic/Fabstaff.cs +++ b/Items/Weapons/Magic/Fabstaff.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 800; + item.damage = 1600; item.magic = true; item.mana = 50; item.width = 84; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 8036272d2e..1de23377af 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2133,7 +2133,7 @@ namespace CalamityMod.Projectiles projectile.type == ProjectileType() || projectile.type == ProjectileType() || (projectile.type == ProjectileType() && projectile.melee)) Main.projectile[projectile2].Calamity().forceMelee = true; - if (projectile.type == ProjectileType() && projectile.Calamity().rogue) + else if (projectile.type == ProjectileType() && projectile.Calamity().rogue) Main.projectile[projectile2].Calamity().forceRogue = true; } } diff --git a/Projectiles/Magic/FabOrb.cs b/Projectiles/Magic/FabOrb.cs index 7ffb1f294b..636433db03 100644 --- a/Projectiles/Magic/FabOrb.cs +++ b/Projectiles/Magic/FabOrb.cs @@ -23,7 +23,8 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 24f, 5, ModContent.ProjectileType()); + if (projectile.timeLeft % 2f == projectile.ai[0]) + CalamityGlobalProjectile.MagnetSphereHitscan(projectile, 300f, 6f, 24f, 5, ModContent.ProjectileType()); } } } diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index 55c9ed27ad..aeb81ceb28 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -26,27 +26,32 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { Lighting.AddLight(projectile.Center, 0.2f, 0.01f, 0.1f); - projectile.localAI[1] += 1f; - if (projectile.localAI[1] >= 9f && projectile.owner == Main.myPlayer) + projectile.ai[0] += 1f; + if (projectile.ai[0] % 9f == 0f && projectile.owner == Main.myPlayer) { - projectile.localAI[1] = 0f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, Main.rand.Next(2), 0f); } - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 16f) + if (projectile.ai[0] > 16f && projectile.ai[0] % 2f == 0f) { - for (int num447 = 0; num447 < 2; num447++) + Vector2 source = projectile.position; + int pink = Dust.NewDust(source, 1, 1, 234, 0f, 0f, 0, default, 1.25f); + Main.dust[pink].noGravity = true; + Main.dust[pink].noLight = true; + Main.dust[pink].position = source; + Main.dust[pink].scale = (float)Main.rand.Next(70, 110) * 0.013f; + Main.dust[pink].velocity *= 0.1f; + /*for (int i = 0; i < 2; i++) { - Vector2 vector33 = projectile.position; - vector33 -= projectile.velocity * ((float)num447 * 0.25f); - int num448 = Dust.NewDust(vector33, 1, 1, 234, 0f, 0f, 0, default, 1.25f); - Main.dust[num448].noGravity = true; - Main.dust[num448].noLight = true; - Main.dust[num448].position = vector33; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[num448].velocity *= 0.1f; - } + Vector2 source = projectile.position; + source -= projectile.velocity * ((float)i * 0.25f); + int pink = Dust.NewDust(source, 1, 1, 234, 0f, 0f, 0, default, 1.25f); + Main.dust[pink].noGravity = true; + Main.dust[pink].noLight = true; + Main.dust[pink].position = source; + Main.dust[pink].scale = (float)Main.rand.Next(70, 110) * 0.013f; + Main.dust[pink].velocity *= 0.1f; + }*/ } } @@ -59,7 +64,6 @@ namespace CalamityMod.Projectiles.Magic } else { - projectile.ai[0] += 0.1f; if (projectile.velocity.X != oldVelocity.X) { projectile.velocity.X = -oldVelocity.X; From e24a67d5404469d2a4a6b4d52501ce30a4fca7a1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 21:18:43 -0400 Subject: [PATCH 113/128] fixed cold divinity sell price --- Items/Weapons/Summon/ColdDivinity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/ColdDivinity.cs b/Items/Weapons/Summon/ColdDivinity.cs index 792e9fa1b0..9252d4b813 100644 --- a/Items/Weapons/Summon/ColdDivinity.cs +++ b/Items/Weapons/Summon/ColdDivinity.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 4.5f; - item.value = Item.buyPrice(0, 48, 0, 0); + item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.UseSound = SoundID.Item30; From 852bf77cab65b6f1b3f96cd6828370869399f62e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 23:34:00 -0400 Subject: [PATCH 114/128] listed jump speed bonuses are now more accurate. Added jump speed boost to the stat meter. Wing flight time is now displayed in seconds. --- CalPlayer/CalamityPlayer.cs | 3 ++- CalPlayer/CalamityPlayerMiscEffects.cs | 6 +++++- Items/Accessories/AeroStone.cs | 16 +++++++++++++++- Items/Accessories/GrandGelatin.cs | 16 +++++++++++++++- Items/Accessories/HeartoftheElements.cs | 2 +- Items/Accessories/Sponge.cs | 2 +- Items/Accessories/StatMeter.cs | 12 +++++++----- Items/Accessories/StatisBeltOfCurses.cs | 3 ++- Items/Accessories/StatisNinjaBelt.cs | 3 ++- Items/Accessories/TheAbsorber.cs | 2 +- Items/Accessories/VitalJelly.cs | 16 +++++++++++++++- Items/Accessories/Wings/HadarianWings.cs | 2 +- Items/Accessories/Wings/MOAB.cs | 2 +- Items/Accessories/Wings/SkylineWings.cs | 2 +- Items/Armor/PrismaticGreaves.cs | 2 +- Items/Armor/StatigelCap.cs | 3 ++- Items/Armor/StatigelHeadgear.cs | 3 ++- Items/Armor/StatigelHelm.cs | 3 ++- Items/Armor/StatigelHood.cs | 3 ++- Items/Armor/StatigelMask.cs | 1 + Items/LoreItems/KnowledgeAstrumAureus.cs | 2 +- Items/LoreItems/KnowledgeKingSlime.cs | 19 +++++++++++++++++-- Items/Potions/BoundingPotion.cs | 2 +- Items/Weapons/Summon/AbandonedSlimeStaff.cs | 17 ++++++++++++++++- 24 files changed, 114 insertions(+), 28 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 31bc082555..bd373dc77c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -162,7 +162,8 @@ namespace CalamityMod.CalPlayer public int ammoReductionRanged = 0; public int ammoReductionRogue = 0; public int armorPenetrationStat = 0; - public int wingFlightTimeStat = 0; + public float wingFlightTimeStat = 0f; + public float jumpSpeedStat = 0f; public int adrenalineChargeStat = 0; public int rageDamageStat = 0; public int moveSpeedStat = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 24f864faa5..e3ac3a4b21 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3837,7 +3837,11 @@ namespace CalamityMod.CalPlayer modPlayer.manaRegenStat = player.manaRegen; modPlayer.armorPenetrationStat = player.armorPenetration; modPlayer.moveSpeedStat = (int)((player.moveSpeed - 1f) * 100f); - modPlayer.wingFlightTimeStat = player.wingTimeMax; + modPlayer.wingFlightTimeStat = player.wingTimeMax / 60f; + float trueJumpSpeedBoost = player.jumpSpeedBoost + + (player.wereWolf ? 0.2f : 0f) + + (player.jumpBoost ? 1.5f : 0f); + modPlayer.jumpSpeedStat = trueJumpSpeedBoost * 20f; modPlayer.adrenalineChargeStat = 45 - (modPlayer.adrenalineBoostOne ? 10 : 0) - (modPlayer.adrenalineBoostTwo ? 10 : 0) - diff --git a/Items/Accessories/AeroStone.cs b/Items/Accessories/AeroStone.cs index 6028a09bcf..67c5d1d5ca 100644 --- a/Items/Accessories/AeroStone.cs +++ b/Items/Accessories/AeroStone.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; @@ -10,7 +11,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Aero Stone"); Tooltip.SetDefault("One of the ancient relics\n" + - "Increases movement speed by 10%, jump speed by 100%, and all damage by 3%"); + "Increases movement speed by 10%, jump speed by 20%, and all damage by 3%"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 8)); } @@ -23,6 +24,19 @@ namespace CalamityMod.Items.Accessories item.accessory = true; } + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "5" : "20"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + { + line2.text = "Increases movement speed by 10%, jump speed by " + jumpAmt + "%, and all damage by 3%"; + } + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0f, 0.425f, 0.425f); diff --git a/Items/Accessories/GrandGelatin.cs b/Items/Accessories/GrandGelatin.cs index 9fcc958425..e28518e65d 100644 --- a/Items/Accessories/GrandGelatin.cs +++ b/Items/Accessories/GrandGelatin.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,7 +12,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Grand Gelatin"); Tooltip.SetDefault("10% increased movement speed\n" + - "200% increased jump speed\n" + + "40% increased jump speed\n" + "+20 max life and mana\n" + "Standing still boosts life and mana regen"); } @@ -25,6 +26,19 @@ namespace CalamityMod.Items.Accessories item.accessory = true; } + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "10" : "40"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + { + line2.text = jumpAmt + "% increased jump speed"; + } + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed += 0.1f; diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 8c91663429..0fb723f893 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Heart of the Elements"); Tooltip.SetDefault("The heart of the world\n" + "Increases max life by 20, life regen by 1, and all damage by 8%\n" + - "Increases movement speed by 10% and jump speed by 100%\n" + + "Increases movement speed by 10% and jump speed by 20%\n" + "Increases damage reduction by 5%\n" + "Increases max mana by 50 and reduces mana usage by 5%\n" + "You grow flowers on the grass beneath you, chance to grow very random dye plants on grassless dirt\n" + diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index f5faacd468..00b9534f64 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories "Poison, Freeze, Chill, Frostburn, and Venom immunity\n" + "Honey-like life regen with no speed penalty, +20 max life and mana\n" + "Most bee/hornet enemies and projectiles do 75% damage to you\n" + - "120% increased jump speed and 12% increased movement speed\n" + + "24% increased jump speed and 12% increased movement speed\n" + "Standing still boosts life and mana regen\n" + "Increased defense and damage reduction when submerged in liquid\n" + "Increased movement speed when submerged in liquid\n" + diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index 11954e4a3f..a5f37323e6 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -62,7 +62,8 @@ namespace CalamityMod.Items.Accessories int lifeRegen = modPlayer.lifeRegenStat; int manaRegen = modPlayer.manaRegenStat; int armorPenetration = modPlayer.armorPenetrationStat; - int wingFlightTime = modPlayer.wingFlightTimeStat; + string wingFlightTime = modPlayer.wingFlightTimeStat.ToString("n2"); + string jumpSpeed = modPlayer.jumpSpeedStat.ToString("n2"); int moveSpeed = modPlayer.moveSpeedStat; int lightLevel = modPlayer.abyssLightLevelStat; int breathLoss = modPlayer.abyssBreathLossStat; @@ -124,10 +125,11 @@ namespace CalamityMod.Items.Accessories // Generic stats always render. sb.Append("Defense: ").Append(defense); - sb.Append(" | DR: ").Append(DR).Append("%\n"); - sb.Append("Life Regen: ").Append(lifeRegen); - sb.Append(" | Armor Penetration: ").Append(armorPenetration).Append("\n"); - sb.Append("Wing Flight Time: ").Append(wingFlightTime); + sb.Append(" | DR: ").Append(DR).Append("%"); + sb.Append(" | Life Regen: ").Append(lifeRegen).Append("%\n"); + sb.Append("Armor Penetration: ").Append(armorPenetration); + sb.Append(" | Wing Flight Time: ").Append(wingFlightTime).Append(" seconds\n"); + sb.Append("Jump Speed Boost: ").Append(jumpSpeed).Append("%"); sb.Append(" | Movement Speed Boost: ").Append(moveSpeed).Append("%\n\n"); sb.Append(CalamityWorld.death ? "Abyss/Cave Light Strength: " : "Abyss Light Strength: ").Append(lightLevel).Append("\n\n"); diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index bf47a82aa2..4fa75465a5 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Statis' Void Sash"); - Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" + + Tooltip.SetDefault("24% increased jump speed and allows constant jumping\n" + + "Increases fall damage resistance by 50 blocks\n" + "Can climb walls, dash, and dodge attacks\n" + "Dashes leave homing scythes in your wake\n" + "Toggle visibility of this accessory to enable/disable the dash"); diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index ea42449d67..dd713bf077 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -11,7 +11,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Statis' Ninja Belt"); - Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" + + Tooltip.SetDefault("8% increased jump speed and allows constant jumping\n" + + "Increased fall damage resistance by 35 blocks\n" + "Can climb walls, dash, and dodge attacks\n" + "Toggle visibility of this accessory to enable/disable the dash"); } diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index 0d620fda79..e4132ff431 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("The Absorber"); Tooltip.SetDefault("12% increased movement speed\n" + - "120% increased jump speed\n" + + "24% increased jump speed\n" + "+20 max life and mana\n" + "Standing still boosts life and mana regen\n" + "Increased defense and damage reduction when submerged in liquid\n" + diff --git a/Items/Accessories/VitalJelly.cs b/Items/Accessories/VitalJelly.cs index e08c36085e..785dd687f1 100644 --- a/Items/Accessories/VitalJelly.cs +++ b/Items/Accessories/VitalJelly.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Terraria; using Terraria.ModLoader; @@ -9,7 +10,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Vital Jelly"); Tooltip.SetDefault("20% increased movement speed\n" + - "120% increased jump speed"); + "24% increased jump speed"); } public override void SetDefaults() @@ -21,6 +22,19 @@ namespace CalamityMod.Items.Accessories item.accessory = true; } + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "6" : "24"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + { + line2.text = jumpAmt + "% increased jump speed"; + } + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed += 0.2f; diff --git a/Items/Accessories/Wings/HadarianWings.cs b/Items/Accessories/Wings/HadarianWings.cs index 74844d49be..7ee4b9e037 100644 --- a/Items/Accessories/Wings/HadarianWings.cs +++ b/Items/Accessories/Wings/HadarianWings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 1.75\n" + "Good vertical speed\n" + "Flight time: 120\n" + - "20% increased movement speed and 40% increased jump speed while wearing the Astral Armor"); + "20% increased movement speed and 8% increased jump speed while wearing the Astral Armor"); } public override void SetDefaults() diff --git a/Items/Accessories/Wings/MOAB.cs b/Items/Accessories/Wings/MOAB.cs index a66df6b8a8..67ff14258b 100644 --- a/Items/Accessories/Wings/MOAB.cs +++ b/Items/Accessories/Wings/MOAB.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 1\n" + "Good vertical speed\n" + "Flight time: 75\n" + - "Increases jump height and allows auto-jump\n" + + "16% increased jump speed and allows auto-jump\n" + "Grants the player cloud, blizzard, and sandstorm mid-air jumps"); } diff --git a/Items/Accessories/Wings/SkylineWings.cs b/Items/Accessories/Wings/SkylineWings.cs index facddd0bc4..1df024f0af 100644 --- a/Items/Accessories/Wings/SkylineWings.cs +++ b/Items/Accessories/Wings/SkylineWings.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 60\n" + - "25% increased jump speed while wearing the Aerospec armor"); + "5% increased jump speed while wearing the Aerospec armor"); } public override void SetDefaults() diff --git a/Items/Armor/PrismaticGreaves.cs b/Items/Armor/PrismaticGreaves.cs index 89c4ebf7ef..29b5d83c97 100644 --- a/Items/Armor/PrismaticGreaves.cs +++ b/Items/Armor/PrismaticGreaves.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Armor DisplayName.SetDefault("Prismatic Greaves"); Tooltip.SetDefault("10% increased magic damage and 12% increased magic crit\n" + "20% decreased non-magic damage\n" + - "Increases flight time and jump speed by 10%"); + "10% increased flight time and 2% increased jump speed"); } public override void SetDefaults() diff --git a/Items/Armor/StatigelCap.cs b/Items/Armor/StatigelCap.cs index c6fd840397..4ac3046f6d 100644 --- a/Items/Armor/StatigelCap.cs +++ b/Items/Armor/StatigelCap.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + - "Grants an extra jump and increased jump height"; + "Grants an extra jump and increased jump height\n" + + "30% increased jump speed"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.doubleJumpSail = true; diff --git a/Items/Armor/StatigelHeadgear.cs b/Items/Armor/StatigelHeadgear.cs index cb81719099..0f199aa456 100644 --- a/Items/Armor/StatigelHeadgear.cs +++ b/Items/Armor/StatigelHeadgear.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + - "Grants an extra jump and increased jump height"; + "Grants an extra jump and increased jump height\n" + + "30% increased jump speed"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.doubleJumpSail = true; diff --git a/Items/Armor/StatigelHelm.cs b/Items/Armor/StatigelHelm.cs index 3eb6b9d3f6..42e3982386 100644 --- a/Items/Armor/StatigelHelm.cs +++ b/Items/Armor/StatigelHelm.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + - "Grants an extra jump and increased jump height"; + "Grants an extra jump and increased jump height\n" + + "30% increased jump speed"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.doubleJumpSail = true; diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index f46db6e48c..b19e5d77fa 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -37,7 +37,8 @@ namespace CalamityMod.Items.Armor player.setBonus = "18% increased minion damage\n" + "Summons a mini slime god to fight for you, the type depends on what world evil you have\n" + "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + - "Grants an extra jump and increased jump height"; + "Grants an extra jump and increased jump height\n" + + "30% increased jump speed"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.slimeGod = true; diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index 215328946b..8625f8e775 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height\n" + + "30% increased jump speed\n" + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + diff --git a/Items/LoreItems/KnowledgeAstrumAureus.cs b/Items/LoreItems/KnowledgeAstrumAureus.cs index 7b1d99ae7d..5e7fd29484 100644 --- a/Items/LoreItems/KnowledgeAstrumAureus.cs +++ b/Items/LoreItems/KnowledgeAstrumAureus.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Astrum Aureus"); Tooltip.SetDefault("A titanic cyborg infected by a star-borne disease expelled from the belly of an ancient god.\n" + "The destruction of this creature will not prevent the spread of the disease.\n" + - "Place in your inventory to gain increased jump speed in space."); + "Place in your inventory to gain 10% increased jump speed in space."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeKingSlime.cs b/Items/LoreItems/KnowledgeKingSlime.cs index 9b7704180f..24ee891577 100644 --- a/Items/LoreItems/KnowledgeKingSlime.cs +++ b/Items/LoreItems/KnowledgeKingSlime.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,8 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("King Slime"); Tooltip.SetDefault("Only a fool could be caught by this pitiful excuse for a hunter.\n" + "Unfortunately, our world has no shortage of those.\n" + - "Place in your inventory to gain a slight movement speed and jump boost.\n" + - "However, your defense is slightly reduced due to your gelatinous body."); + "Place in your inventory to gain 5% increased movement speed and 2% increased jump speed.\n" + + "However, your defense is reduced by 3 due to your gelatinous body."); } public override void SetDefaults() @@ -24,6 +25,20 @@ namespace CalamityMod.Items.LoreItems item.consumable = false; } + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string hasJumpBoost = "Place in your inventory to gain 5% increased movement speed and 2% increased jump speed."; + string noJumpBoost = "Place in your inventory to gain 5% increased movement speed."; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip2") + { + line2.text = autoJump ? noJumpBoost : hasJumpBoost; + } + } + } + public override bool CanUseItem(Player player) { return false; diff --git a/Items/Potions/BoundingPotion.cs b/Items/Potions/BoundingPotion.cs index 83c761a909..b5e6d45a15 100644 --- a/Items/Potions/BoundingPotion.cs +++ b/Items/Potions/BoundingPotion.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Bounding Potion"); - Tooltip.SetDefault("Increases jump height, jump speed, and fall damage resistance"); + Tooltip.SetDefault("Grants 10% increased jump speed, 25 extra blocks of fall damage resistance, and increased jump height"); } public override void SetDefaults() diff --git a/Items/Weapons/Summon/AbandonedSlimeStaff.cs b/Items/Weapons/Summon/AbandonedSlimeStaff.cs index fa629db71e..d6bd213542 100644 --- a/Items/Weapons/Summon/AbandonedSlimeStaff.cs +++ b/Items/Weapons/Summon/AbandonedSlimeStaff.cs @@ -1,6 +1,7 @@ using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; using System; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -16,7 +17,8 @@ namespace CalamityMod.Items.Weapons.Summon Tooltip.SetDefault("Cast down from the heavens in disgust, this relic sings a song of quiet tragedy...\n" + "Consumes all of the remaining minion slots on use\n" + "Must be used from the hotbar\n" + - "Increased power and size based on the number of minion slots used"); + "Increased power and size based on the number of minion slots used\n" + + "Holding this weapon grants 20% increased jump speed"); } public override void SetDefaults() @@ -40,6 +42,19 @@ namespace CalamityMod.Items.Weapons.Summon item.Calamity().customRarity = CalamityRarity.Dedicated; //rarity 21 } + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "5" : "20"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip4") + { + line2.text = "Holding this weapon grants " + jumpAmt + "% increased jump speed"; + } + } + } + public override void HoldItem(Player player) { //same boost as Aero Stone From c90663b40ab84fd8e250e2c6bad79d1e8650c524 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 2 Jul 2020 23:50:31 -0400 Subject: [PATCH 115/128] cleaned up Tenebreus Tides and attempted to fix it --- .../Melee/Spears/TenebreusTidesProjectile.cs | 37 ++------------ .../Melee/TenebreusTidesWaterProjectile.cs | 48 +++++-------------- 2 files changed, 16 insertions(+), 69 deletions(-) diff --git a/Projectiles/Melee/Spears/TenebreusTidesProjectile.cs b/Projectiles/Melee/Spears/TenebreusTidesProjectile.cs index 1c64eed847..d228b7851f 100644 --- a/Projectiles/Melee/Spears/TenebreusTidesProjectile.cs +++ b/Projectiles/Melee/Spears/TenebreusTidesProjectile.cs @@ -48,17 +48,17 @@ namespace CalamityMod.Projectiles.Melee.Spears public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 300); - SwordSpam(target, damage, knockback, crit); + SwordSpam(target.Center); } public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(ModContent.BuffType(), 300); - SwordSpamPvp(target, damage, crit); + SwordSpam(target.Center); } // Spawns a storm of water projectiles on-hit. - public void SwordSpam(NPC target, int damage, float knockback, bool crit) + public void SwordSpam(Vector2 targetPos) { int projAmt = 3; for (int i = 0; i < projAmt; ++i) @@ -66,35 +66,8 @@ namespace CalamityMod.Projectiles.Melee.Spears int type = Main.rand.NextBool() ? ModContent.ProjectileType() : ModContent.ProjectileType(); 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); - Vector2 projVel = target.Center - startPos; - - // Add some randomness / inaccuracy to the projectile target location - projVel.X += Main.rand.NextFloat(-5f, 5f); - projVel.Y += Main.rand.NextFloat(-5f, 5f); - float speed = Main.rand.NextFloat(25f, 35f); - float dist = projVel.Length(); - dist = speed / dist; - projVel.X *= dist; - projVel.Y *= dist; - if (projectile.owner == Main.myPlayer) - { - Projectile.NewProjectile(startPos, projVel, type, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); - } - } - } - - // Spawns a storm of water projectiles on-hit. - public void SwordSpamPvp(Player target, int damage, bool crit) - { - int projAmt = 3; - for (int i = 0; i < projAmt; ++i) - { - int type = Main.rand.NextBool() ? ModContent.ProjectileType() : ModContent.ProjectileType(); - 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); - Vector2 projVel = target.Center - startPos; + Vector2 startPos = new Vector2(targetPos.X + startOffsetX, targetPos.Y + startOffsetY); + Vector2 projVel = targetPos - startPos; // Add some randomness / inaccuracy to the projectile target location projVel.X += Main.rand.NextFloat(-5f, 5f); diff --git a/Projectiles/Melee/TenebreusTidesWaterProjectile.cs b/Projectiles/Melee/TenebreusTidesWaterProjectile.cs index 11c42e25f4..e84120f9bc 100644 --- a/Projectiles/Melee/TenebreusTidesWaterProjectile.cs +++ b/Projectiles/Melee/TenebreusTidesWaterProjectile.cs @@ -29,17 +29,18 @@ namespace CalamityMod.Projectiles.Melee projectile.usesIDStaticNPCImmunity = true; projectile.idStaticNPCHitCooldown = 10; projectile.tileCollide = false; + aiType = ProjectileID.SporeCloud; } public override void AI() { Lighting.AddLight((int)projectile.Center.X / 16, (int)projectile.Center.Y / 16, 0f, 0f, (255 - projectile.alpha) * 1f / 255f); - int water = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 0.4f); + int water = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 0.4f); Main.dust[water].noGravity = true; Main.dust[water].velocity *= 0.5f; Main.dust[water].velocity += projectile.velocity * 0.1f; - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + MathHelper.ToRadians(135f); + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.ToRadians(135f); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -57,8 +58,8 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.Item10, projectile.position); 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.position.X -= (float)(projectile.width / 2); + projectile.position.Y -= (float)(projectile.height / 2); for (int dustIndex = 0; dustIndex <= 30; dustIndex++) { Vector2 dustVel = new Vector2(Main.rand.Next(-10, 11), Main.rand.Next(-10, 11)); @@ -67,7 +68,7 @@ namespace CalamityMod.Projectiles.Melee dist = dustSpeed / dist; dustVel.X *= dist; dustVel.Y *= dist; - int water = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default, 1.2f); + int water = Dust.NewDust(projectile.position, projectile.width, projectile.height, 33, 0f, 0f, 100, default, 1.2f); Dust dust = Main.dust[water]; dust.noGravity = true; dust.position.X = projectile.Center.X; @@ -81,17 +82,17 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(ModContent.BuffType(), 240); - SwordSpam(target, damage, knockback, crit); + SwordSpam(target.Center); } public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(ModContent.BuffType(), 240); - SwordSpamPvp(target, damage, crit); + SwordSpam(target.Center); } // Spawns a storm of water projectiles on-hit. - public void SwordSpam(NPC target, int damage, float knockback, bool crit) + public void SwordSpam(Vector2 targetPos) { int projAmt = 3; for (int i = 0; i < projAmt; ++i) @@ -99,35 +100,8 @@ namespace CalamityMod.Projectiles.Melee int type = Main.rand.NextBool() ? ModContent.ProjectileType() : ModContent.ProjectileType(); 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); - Vector2 projVel = target.Center - startPos; - - // Add some randomness / inaccuracy to the projectile target location - projVel.X += Main.rand.NextFloat(-5f, 5f); - projVel.Y += Main.rand.NextFloat(-5f, 5f); - float speed = Main.rand.NextFloat(25f, 35f); - float dist = projVel.Length(); - dist = speed / dist; - projVel.X *= dist; - projVel.Y *= dist; - if (projectile.owner == Main.myPlayer) - { - Projectile.NewProjectile(startPos, projVel, type, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f); - } - } - } - - // Spawns a storm of water projectiles on-hit. - public void SwordSpamPvp(Player target, int damage, bool crit) - { - int projAmt = 3; - for (int i = 0; i < projAmt; ++i) - { - int type = Main.rand.NextBool() ? ModContent.ProjectileType() : ModContent.ProjectileType(); - 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); - Vector2 projVel = target.Center - startPos; + Vector2 startPos = new Vector2(targetPos.X + startOffsetX, targetPos.Y + startOffsetY); + Vector2 projVel = targetPos - startPos; // Add some randomness / inaccuracy to the projectile target location projVel.X += Main.rand.NextFloat(-5f, 5f); From f0df3b318a10c8bf223e61444d682d555737a335 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 3 Jul 2020 19:05:45 -0400 Subject: [PATCH 116/128] fixed rev+ moon lord not dropping other mod's loot --- CalPlayer/CalamityPlayer.cs | 78 ++++++------- NPCs/CalamityGlobalAI.cs | 105 +----------------- NPCs/CalamityGlobalNPCLoot.cs | 2 +- .../Melee/TenebreusTidesWaterProjectile.cs | 2 +- 4 files changed, 46 insertions(+), 141 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a07cf598d3..b4db16669b 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -8084,11 +8084,11 @@ namespace CalamityMod.CalPlayer Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8); for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0) + NPC npc = Main.npc[i]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) { - NPC nPC = Main.npc[i]; - Rectangle rect = nPC.getRect(); - if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) { float num = 50f * player.AverageDamage(); float num2 = 3f; @@ -8116,11 +8116,11 @@ namespace CalamityMod.CalPlayer } if (player.whoAmI == Main.myPlayer) { - player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit); + player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); } - if (nPC.immune[player.whoAmI] < 6) - nPC.immune[player.whoAmI] = 6; - nPC.AddBuff(ModContent.BuffType(), 300); + if (npc.immune[player.whoAmI] < 6) + npc.immune[player.whoAmI] = 6; + npc.AddBuff(ModContent.BuffType(), 300); player.immune = true; player.immuneNoBlink = true; if (player.immuneTime < 4) @@ -8138,11 +8138,11 @@ namespace CalamityMod.CalPlayer Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8); for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0) + NPC npc = Main.npc[i]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) { - NPC nPC = Main.npc[i]; - Rectangle rect = nPC.getRect(); - if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) { float num = 1500f * player.AverageDamage(); float num2 = 15f; @@ -8170,13 +8170,13 @@ namespace CalamityMod.CalPlayer } if (player.whoAmI == Main.myPlayer) { - player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit); + player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(1000 * player.AverageDamage()), 20f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(780 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f); } - if (nPC.immune[player.whoAmI] < 6) - nPC.immune[player.whoAmI] = 6; - nPC.AddBuff(ModContent.BuffType(), 300); + if (npc.immune[player.whoAmI] < 6) + npc.immune[player.whoAmI] = 6; + npc.AddBuff(ModContent.BuffType(), 300); player.immune = true; player.immuneNoBlink = true; if (player.immuneTime < 4) @@ -8194,11 +8194,11 @@ namespace CalamityMod.CalPlayer Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8); for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0) + NPC npc = Main.npc[i]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) { - NPC nPC = Main.npc[i]; - Rectangle rect = nPC.getRect(); - if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) { float num = 500f * player.AverageDamage(); float num2 = 12f; @@ -8226,12 +8226,12 @@ namespace CalamityMod.CalPlayer } if (player.whoAmI == Main.myPlayer) { - player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit); + player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(500 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(380 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f); } - if (nPC.immune[player.whoAmI] < 6) - nPC.immune[player.whoAmI] = 6; + if (npc.immune[player.whoAmI] < 6) + npc.immune[player.whoAmI] = 6; player.immune = true; player.immuneNoBlink = true; if (player.immuneTime < 4) @@ -8249,11 +8249,11 @@ namespace CalamityMod.CalPlayer Rectangle rectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8); for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0) + NPC npc = Main.npc[i]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) { - NPC nPC = Main.npc[i]; - Rectangle rect = nPC.getRect(); - if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) { float num = 100f * player.AverageDamage(); float num2 = 9f; @@ -8281,11 +8281,11 @@ namespace CalamityMod.CalPlayer } if (player.whoAmI == Main.myPlayer) { - player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit); + player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(100 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f); } - if (nPC.immune[player.whoAmI] < 6) - nPC.immune[player.whoAmI] = 6; + if (npc.immune[player.whoAmI] < 6) + npc.immune[player.whoAmI] = 6; player.immune = true; player.immuneNoBlink = true; if (player.immuneTime < 4) @@ -8303,11 +8303,11 @@ namespace CalamityMod.CalPlayer Rectangle rectangle = new Rectangle((int)(player.position.X + player.velocity.X * 0.5f - 4f), (int)(player.position.Y + player.velocity.Y * 0.5f - 4f), player.width + 8, player.height + 8); for (int i = 0; i < Main.maxNPCs; i++) { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && Main.npc[i].immune[player.whoAmI] <= 0) + NPC npc = Main.npc[i]; + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) { - NPC nPC = Main.npc[i]; - Rectangle rect = nPC.getRect(); - if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC))) + Rectangle rect = npc.getRect(); + if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) { float num = 50f * player.MinionDamage(); float num2 = 3f; @@ -8323,11 +8323,11 @@ namespace CalamityMod.CalPlayer } if (player.whoAmI == Main.myPlayer) { - player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit); + player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); } - if (nPC.immune[player.whoAmI] < 6) - nPC.immune[player.whoAmI] = 6; - nPC.AddBuff(ModContent.BuffType(), 300); + if (npc.immune[player.whoAmI] < 6) + npc.immune[player.whoAmI] = 6; + npc.AddBuff(ModContent.BuffType(), 300); player.immune = true; player.immuneNoBlink = true; if (player.immuneTime < 4) @@ -8348,7 +8348,7 @@ namespace CalamityMod.CalPlayer NPC npc = Main.npc[i]; if (npc.active && !npc.dontTakeDamage && !npc.friendly && !npc.townNPC && npc.immune[player.whoAmI] <= 0 && npc.damage > 0) { - Rectangle rect = nPC.getRect(); + Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) { OnDodge(); diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 8a9641e590..d4b6be1ed3 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -12764,18 +12764,18 @@ namespace CalamityMod.NPCs if (npc.ai[1] == 60f) { - for (int num1161 = 0; num1161 < Main.maxProjectiles; num1161++) + for (int i = 0; i < Main.maxProjectiles; i++) { - Projectile projectile = Main.projectile[num1161]; + Projectile projectile = Main.projectile[i]; if (projectile.active && (projectile.type == ProjectileID.MoonLeech || projectile.type == ProjectileID.PhantasmalBolt || projectile.type == ProjectileID.PhantasmalDeathray || projectile.type == ProjectileID.PhantasmalEye || projectile.type == ProjectileID.PhantasmalSphere)) projectile.Kill(); } - for (int num1162 = 0; num1162 < Main.maxNPCs; num1162++) + for (int j = 0; j < Main.maxNPCs; j++) { - NPC nPC3 = Main.npc[num1162]; + NPC nPC3 = Main.npc[j]; if (nPC3.active && nPC3.type == NPCID.MoonLordFreeEye) { nPC3.HitEffect(0, 9999.0); @@ -12893,9 +12893,6 @@ namespace CalamityMod.NPCs npc.HitEffect(0, 1337.0); npc.checkDead(); - if (!CalamityWorld.bossRushActive) - MoonLordLoot(npc); - for (int num1174 = 0; num1174 < Main.maxNPCs; num1174++) { NPC nPC5 = Main.npc[num1174]; @@ -14660,98 +14657,6 @@ namespace CalamityMod.NPCs } return false; } - - #region Moon Lord Loot - private static void MoonLordLoot(NPC npc) - { - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !NPC.downedMoonlord); - DropHelper.DropResidentEvilAmmo(npc, NPC.downedMoonlord, 5, 2, 1); - - string key = "Mods.CalamityMod.MoonBossText"; - Color messageColor = Color.Orange; - string key2 = "Mods.CalamityMod.MoonBossText2"; - Color messageColor2 = Color.Violet; - string key3 = "Mods.CalamityMod.MoonBossText3"; - Color messageColor3 = Color.Crimson; - string key4 = "Mods.CalamityMod.ProfanedBossText2"; - Color messageColor4 = Color.Cyan; - string key5 = "Mods.CalamityMod.FutureOreText"; - Color messageColor5 = Color.LightGray; - - // Spawn Exodium and send messages about Providence, Bloodstone, Phantoplasm, etc. if ML has not been killed yet - if (!NPC.downedMoonlord) - { - WorldGenerationMethods.SpawnOre(ModContent.TileType(), 12E-05, .01f, .07f); - - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue(key), messageColor); - Main.NewText(Language.GetTextValue(key2), messageColor2); - Main.NewText(Language.GetTextValue(key3), messageColor3); - Main.NewText(Language.GetTextValue(key4), messageColor4); - Main.NewText(Language.GetTextValue(key5), messageColor5); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key2), messageColor2); - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key3), messageColor3); - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key4), messageColor4); - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key5), messageColor5); - } - } - - if (CalamityWorld.armageddon) - { - DropHelper.DropArmageddonBags(npc); - } - - if (Main.netMode != NetmodeID.Server) - { - if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active) - { - Main.player[Main.myPlayer].Calamity().adrenaline = 0; - } - } - - NPC.downedMoonlord = true; - NPC.LunarApocalypseIsUp = false; - - npc.DropBossBags(); - - if (Main.rand.NextBool(10)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 3595, 1, false, 0, false, false); - } - - int stack = Main.rand.Next(5, 16); - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 499, stack, false, 0, false, false); - - int num70 = Main.rand.Next(5) + 5; - for (int num71 = 0; num71 < num70; num71++) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 58, 1, false, 0, false, false); - } - - if (Main.netMode == NetmodeID.SinglePlayer) - { - Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", Language.GetTextValue("Enemies.MoonLord")), 175, 75, 255, false); - } - else if (Main.netMode == NetmodeID.Server) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", new object[] - { - NetworkText.FromKey("Enemies.MoonLord", new object[0]) - }), new Color(175, 75, 255), -1); - } - - if (Main.netMode == NetmodeID.Server) - { - NetMessage.SendData(MessageID.WorldData, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); - } - } - #endregion - #endregion #region Buffed Mothron AI @@ -14861,7 +14766,7 @@ namespace CalamityMod.NPCs npc.ai[0] = 2f; else if (num1355 == 1) npc.ai[0] = 3f; - else if (num1355 == 2 && NPC.CountNPCS(478) + NPC.CountNPCS(479) < 2) + else if (num1355 == 2 && NPC.CountNPCS(NPCID.MothronEgg) + NPC.CountNPCS(NPCID.MothronSpawn) < 2) npc.ai[0] = 4f; } } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 03ed95d646..2f1736d33c 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs if (CalamityWorld.revenge) { - if (npc.type == NPCID.Probe || npc.type == NPCID.ServantofCthulhu || npc.type == NPCID.MoonLordCore) + if (npc.type == NPCID.Probe || npc.type == NPCID.ServantofCthulhu) { return false; } diff --git a/Projectiles/Melee/TenebreusTidesWaterProjectile.cs b/Projectiles/Melee/TenebreusTidesWaterProjectile.cs index e84120f9bc..9860c3de00 100644 --- a/Projectiles/Melee/TenebreusTidesWaterProjectile.cs +++ b/Projectiles/Melee/TenebreusTidesWaterProjectile.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee projectile.usesIDStaticNPCImmunity = true; projectile.idStaticNPCHitCooldown = 10; projectile.tileCollide = false; - aiType = ProjectileID.SporeCloud; + aiType = ProjectileID.LightBeam; } public override void AI() From 8d92620cda4f49e45073b27b772a788d18f30670 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 3 Jul 2020 19:39:58 -0400 Subject: [PATCH 117/128] forgot these when fixing jump speed --- Items/CalamityGlobalItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 4e1fa81839..a039cc81fe 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -2051,7 +2051,7 @@ Provides heat and cold protection in Death Mode"; "Flight time: 100\n" + "Gills effect and you can move freely through liquids\n" + "You fall faster while submerged in liquid\n" + - "20% increased movement speed and 180% increased jump speed"; + "20% increased movement speed and 36% increased jump speed"; } } } @@ -2113,7 +2113,7 @@ Provides heat and cold protection in Death Mode"; "Average vertical speed\n" + "Flight time: 140\n" + "At night or during an eclipse, you will gain the following boosts:\n" + - "10% increased movement speed, 100% increased jump speed,\n" + + "10% increased movement speed, 20% increased jump speed,\n" + "+15 defense, 10% increased damage, and 5% increased critical strike chance"; } } @@ -2209,7 +2209,7 @@ Provides heat and cold protection in Death Mode"; "Average vertical speed\n" + "Flight time: 160\n" + "+5 defense, 5% increased damage, " + - "10% increased movement speed and 120% increased jump speed"; + "10% increased movement speed and 24% increased jump speed"; } } } From e97590e6e7c2faae146cb02b76839a9c2cab3a09 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 3 Jul 2020 20:45:05 -0400 Subject: [PATCH 118/128] added a void of extinction bool --- CalPlayer/CalamityPlayer.cs | 6 ++++-- Items/Accessories/VoidofExtinction.cs | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index b4db16669b..54785253f2 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -489,6 +489,7 @@ namespace CalamityMod.CalPlayer public bool aquaticEmblem = false; public bool darkSunRing = false; public bool calamityRing = false; + public bool voidOfExtinction = false; public bool eArtifact = false; public bool dArtifact = false; public bool gArtifact = false; @@ -1536,6 +1537,7 @@ namespace CalamityMod.CalPlayer harpyWingBoost = false; //harpy wings + harpy ring darkSunRing = false; calamityRing = false; + voidOfExtinction = false; eArtifact = false; dArtifact = false; gArtifact = false; @@ -5913,7 +5915,7 @@ namespace CalamityMod.CalPlayer if (corrEffigy) contactDamageReduction -= 0.2; - if (calamityRing) + if (calamityRing && !voidOfExtinction) contactDamageReduction -= 0.15; // 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50% @@ -6142,7 +6144,7 @@ namespace CalamityMod.CalPlayer if (corrEffigy) projectileDamageReduction -= 0.2; - if (calamityRing) + if (calamityRing && !voidOfExtinction) projectileDamageReduction -= 0.15; // 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50% diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index 48c478d3a1..ccbe436768 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -55,6 +55,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.calamityRing = true; + modPlayer.voidOfExtinction = true; player.lavaRose = true; player.lavaMax += 240; player.allDamage += 0.15f; From 5372f480ead06374eb3352f2a47728da0d325d3d Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 3 Jul 2020 21:21:59 -0400 Subject: [PATCH 119/128] made a jump speed boost soft cap formula (commeted out) idk if we'll actually use it --- CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f17d62bf3e..aead4800e3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3769,6 +3769,10 @@ namespace CalamityMod.CalPlayer if (player.endurance > 0f) player.endurance = 1f - (1f / (1f + player.endurance)); + // Very similar scaling to damage reduction. Ex. Frog Leg goes from 48% jump speed to 38% + //if (player.jumpSpeedBoost > 0f) + // player.jumpSpeedBoost = (1f - 1f / (1f + (player.jumpSpeedBoost / 10f))) * 10f + if (modPlayer.yharonLore && !CalamityWorld.defiled) { if (player.wingTimeMax < 50000) From 04831b2c3cfa25c03e369a4911a5aa383a1b96ff Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 3 Jul 2020 21:39:44 -0400 Subject: [PATCH 120/128] lock meter positions now defaults to true --- CalamityConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalamityConfig.cs b/CalamityConfig.cs index cd453418ff..ba3be07e85 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -64,7 +64,7 @@ namespace CalamityMod [BackgroundColor(192, 54, 64, 192)] [Label("Lock Meter Positions")] - [DefaultValue(false)] + [DefaultValue(true)] [Tooltip("Prevents clicking on the Stealth, Rage and Adrenaline Meters.\nThis stops them from being dragged around with the mouse.")] public bool MeterPosLock { get; set; } From f1fc0d45c40003b1f9c33803a738ea96bc699b5e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 10:01:42 -0400 Subject: [PATCH 121/128] fixed this cuz it was lost in translation --- Projectiles/Magic/FabRay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index 90dcd7d976..bf16753878 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic { Lighting.AddLight(projectile.Center, 0.2f, 0.01f, 0.1f); projectile.ai[0] += 1f; - if (projectile.ai[0] >= 6f && projectile.owner == Main.myPlayer) + if (projectile.ai[0] % 6f == 0f && projectile.owner == Main.myPlayer) { Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, Main.rand.Next(2), 0f); } From b20565ad6e37c779b73d3fe092908f17b5a033f6 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 10:03:23 -0400 Subject: [PATCH 122/128] small tweak --- Projectiles/Magic/FabRay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index bf16753878..4fab9f0e9d 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic projectile.ai[0] += 1f; if (projectile.ai[0] % 6f == 0f && projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, Main.rand.Next(2), 0f); + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } if (projectile.ai[0] > 16f && projectile.ai[0] % 2f == 0f) From b0aee084bb1478f807573ce3384aed9426f530d3 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 11:02:00 -0400 Subject: [PATCH 123/128] random wall id --- NPCs/CalamityGlobalAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 1801c92868..b83ccc4acc 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -19916,7 +19916,7 @@ namespace CalamityMod.NPCs bool foundGoodTeleport = true; // I don't understand why the hell this exists if it's only for Chaos Elementals, but I suppose I'll // Leave it here - if (npcType == NPCID.DarkCaster && Main.tile[randX, num181 - 1].wall == 0) + if (npcType == NPCID.DarkCaster && Main.tile[randX, num181 - 1].wall == WallID.None) { foundGoodTeleport = false; } From d88c3334aca100d5469a75bdbf5433e21edd05d9 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 11:07:30 -0400 Subject: [PATCH 124/128] calamitas' brew now uses brimstone fish --- CalPlayer/CalamityPlayerFishing.cs | 2 ++ Items/Potions/CalamitasBrew.cs | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs index 01064f7d9d..d42c7755f3 100644 --- a/CalPlayer/CalamityPlayerFishing.cs +++ b/CalPlayer/CalamityPlayerFishing.cs @@ -97,6 +97,8 @@ namespace CalamityMod.CalPlayer CalamityUtils.AddWithCondition(fishList, ItemID.FlarefinKoi, !modPlayer.ZoneCalamity); CalamityUtils.AddWithCondition(fishList, ItemID.Obsidifish, !modPlayer.ZoneCalamity); CalamityUtils.AddWithCondition(fishList, ModContent.ItemType(), modPlayer.ZoneCalamity); + CalamityUtils.AddWithCondition(fishList, ModContent.ItemType(), modPlayer.ZoneCalamity); + CalamityUtils.AddWithCondition(fishList, ModContent.ItemType(), modPlayer.ZoneCalamity); } else if (water) { diff --git a/Items/Potions/CalamitasBrew.cs b/Items/Potions/CalamitasBrew.cs index 72c46ae0f2..edca20e9b1 100644 --- a/Items/Potions/CalamitasBrew.cs +++ b/Items/Potions/CalamitasBrew.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Potions; +using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -35,14 +36,16 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.BottledWater); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ItemID.BottledWater, 3); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 3); recipe.AddTile(TileID.ImbuingStation); - recipe.SetResult(this); + recipe.SetResult(this, 3); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.BottledWater); recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.ImbuingStation); recipe.SetResult(this); recipe.AddRecipe(); From c6672ebafbdafe4b146056b1183f43e2e0eb199f Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 12:50:26 -0400 Subject: [PATCH 125/128] changed all item lore tooltips. Fixed xeroc wings tooltip. Nerfed Fabstaff --- Items/Accessories/Wings/XerocWings.cs | 2 +- Items/LoreItems/KnowledgeAquaticScourge.cs | 5 ++--- Items/LoreItems/KnowledgeAstrumAureus.cs | 3 +-- Items/LoreItems/KnowledgeAstrumDeus.cs | 3 +-- Items/LoreItems/KnowledgeBrimstoneElemental.cs | 3 +-- Items/LoreItems/KnowledgeCalamitas.cs | 3 +-- Items/LoreItems/KnowledgeCalamitasClone.cs | 5 +++-- Items/LoreItems/KnowledgeCorruption.cs | 5 +++-- Items/LoreItems/KnowledgeCrabulon.cs | 5 ++--- Items/LoreItems/KnowledgeCrimson.cs | 5 +++-- Items/LoreItems/KnowledgeCryogen.cs | 3 +-- Items/LoreItems/KnowledgeDesertScourge.cs | 5 ++--- Items/LoreItems/KnowledgeDestroyer.cs | 5 ++--- Items/LoreItems/KnowledgeDevourerofGods.cs | 5 ++--- Items/LoreItems/KnowledgeDukeFishron.cs | 5 ++--- Items/LoreItems/KnowledgeEaterofWorlds.cs | 5 ++--- Items/LoreItems/KnowledgeEyeofCthulhu.cs | 5 ++--- Items/LoreItems/KnowledgeGolem.cs | 3 +-- Items/LoreItems/KnowledgeHiveMind.cs | 5 ++--- Items/LoreItems/KnowledgeKingSlime.cs | 5 ++--- Items/LoreItems/KnowledgeLeviathanandSiren.cs | 5 ++--- Items/LoreItems/KnowledgeLunaticCultist.cs | 5 ++--- Items/LoreItems/KnowledgeMoonLord.cs | 5 ++--- Items/LoreItems/KnowledgeOcean.cs | 5 +++-- Items/LoreItems/KnowledgeOldDuke.cs | 3 +-- Items/LoreItems/KnowledgePerforators.cs | 5 ++--- Items/LoreItems/KnowledgePlaguebringerGoliath.cs | 3 +-- Items/LoreItems/KnowledgePlantera.cs | 3 +-- Items/LoreItems/KnowledgePolterghast.cs | 3 +-- Items/LoreItems/KnowledgeProvidence.cs | 5 ++--- Items/LoreItems/KnowledgeQueenBee.cs | 3 +-- Items/LoreItems/KnowledgeRavager.cs | 3 +-- Items/LoreItems/KnowledgeSkeletron.cs | 5 ++--- Items/LoreItems/KnowledgeSkeletronPrime.cs | 5 ++--- Items/LoreItems/KnowledgeSlimeGod.cs | 5 ++--- Items/LoreItems/KnowledgeTwins.cs | 5 ++--- Items/LoreItems/KnowledgeUnderworld.cs | 5 +++-- Items/LoreItems/KnowledgeWallofFlesh.cs | 3 +-- Items/LoreItems/KnowledgeYharon.cs | 3 +-- Items/Weapons/Magic/Fabstaff.cs | 2 +- 40 files changed, 69 insertions(+), 97 deletions(-) diff --git a/Items/Accessories/Wings/XerocWings.cs b/Items/Accessories/Wings/XerocWings.cs index 8afbc8cd60..f9f9fafd38 100644 --- a/Items/Accessories/Wings/XerocWings.cs +++ b/Items/Accessories/Wings/XerocWings.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories.Wings "Acceleration multiplier: 2\n" + "Good vertical speed\n" + "Flight time: 180\n" + - "5% increased rogue damage and critical strike chance while wearing the Xeroc Armor"); + "5% increased rogue damage and critical strike chance while wearing the Empyrean Armor"); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeAquaticScourge.cs b/Items/LoreItems/KnowledgeAquaticScourge.cs index c00a8083ea..58d2e763bf 100644 --- a/Items/LoreItems/KnowledgeAquaticScourge.cs +++ b/Items/LoreItems/KnowledgeAquaticScourge.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Aquatic Scourge"); Tooltip.SetDefault("A horror born of pollution and insatiable hunger; based on size alone this was merely a juvenile.\n" + "These scourge creatures are the largest aquatic predators and very rarely do they frequent such shallow waters.\n" + - "Place in your inventory to gain immunity to the sulphurous waters and increase the stat gains from the Well Fed buff.\n" + - "However, without the Well Fed buff your stats will decrease due to your insatiable hunger.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain immunity to the sulphurous waters and increase the stat gains from the Well Fed buff.\n" + + "However, without the Well Fed buff your stats will decrease due to your insatiable hunger."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeAstrumAureus.cs b/Items/LoreItems/KnowledgeAstrumAureus.cs index 73f24ba78b..c651b54717 100644 --- a/Items/LoreItems/KnowledgeAstrumAureus.cs +++ b/Items/LoreItems/KnowledgeAstrumAureus.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Astrum Aureus"); Tooltip.SetDefault("A titanic cyborg infected by a star-borne disease expelled from the belly of an ancient god.\n" + "The destruction of this creature will not prevent the spread of the disease.\n" + - "Place in your inventory to gain 10% increased jump speed in space.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to gain 10% increased jump speed in space."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeAstrumDeus.cs b/Items/LoreItems/KnowledgeAstrumDeus.cs index a8b5376105..9a369f5a92 100644 --- a/Items/LoreItems/KnowledgeAstrumDeus.cs +++ b/Items/LoreItems/KnowledgeAstrumDeus.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Astrum Deus"); Tooltip.SetDefault("God of the stars and largest vessel for the Astral Infection.\n" + "Though struck down from its place among the stars its remnants have gathered strength, aiming to take its rightful place in the cosmos once more.\n" + - "Place in your inventory to gain increased movement speed in space.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to gain increased movement speed in space."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeBrimstoneElemental.cs b/Items/LoreItems/KnowledgeBrimstoneElemental.cs index d9a666e5d1..1cc9c218e6 100644 --- a/Items/LoreItems/KnowledgeBrimstoneElemental.cs +++ b/Items/LoreItems/KnowledgeBrimstoneElemental.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Brimstone Elemental"); Tooltip.SetDefault("The most powerful of the elementals, bent on exacting revenge upon the bloody inferno that demolished her home.\n" + "Finally put to rest, she will suffer no longer from the grief caused by the deaths of her people.\n" + - "Place in your inventory to improve the inferno potion effect.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to improve the inferno potion effect."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeCalamitas.cs b/Items/LoreItems/KnowledgeCalamitas.cs index d2cddd9d9c..09f6cd25a4 100644 --- a/Items/LoreItems/KnowledgeCalamitas.cs +++ b/Items/LoreItems/KnowledgeCalamitas.cs @@ -15,8 +15,7 @@ namespace CalamityMod.Items.LoreItems Tooltip.SetDefault("The witch unrivaled. Perhaps the only one amongst my cohorts to have ever given me cause for doubt.\n" + "Now that you have defeated her your destiny is clear.\n" + "Come now, face me.\n" + - "Place in your inventory to die instantly from every hit.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to die instantly from every hit."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeCalamitasClone.cs b/Items/LoreItems/KnowledgeCalamitasClone.cs index d7fc3ef186..cd8a243315 100644 --- a/Items/LoreItems/KnowledgeCalamitasClone.cs +++ b/Items/LoreItems/KnowledgeCalamitasClone.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Calamitas Clone"); Tooltip.SetDefault("You are indeed stronger than I thought.\n" + "Though the bloody inferno still lingers, observing your progress.\n" + - "Place in your inventory to gain a boost to your minion slots but at the cost of reduced max health."); + "Favorite this item to gain a boost to your minion slots but at the cost of reduced max health."); } public override void SetDefaults() @@ -33,7 +33,8 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.calamitasLore = true; + if (item.favorited) + modPlayer.calamitasLore = true; } public override void AddRecipes() diff --git a/Items/LoreItems/KnowledgeCorruption.cs b/Items/LoreItems/KnowledgeCorruption.cs index ca722fac4e..7841002d85 100644 --- a/Items/LoreItems/KnowledgeCorruption.cs +++ b/Items/LoreItems/KnowledgeCorruption.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Corruption"); Tooltip.SetDefault("The rotten and forever-deteriorating landscape of infected life, brought upon by a deadly microbe long ago.\n" + "It is rumored that the microbe was created through experimentation by a long-dead race, predating the Terrarians.\n" + - "Place in your inventory to prevent hive cysts from spawning."); + "Favorite this item to prevent hive cysts from spawning."); } public override void SetDefaults() @@ -32,7 +32,8 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.corruptionLore = true; + if (item.favorited) + modPlayer.corruptionLore = true; } public override void AddRecipes() diff --git a/Items/LoreItems/KnowledgeCrabulon.cs b/Items/LoreItems/KnowledgeCrabulon.cs index 1b2116ca4e..55583c83f1 100644 --- a/Items/LoreItems/KnowledgeCrabulon.cs +++ b/Items/LoreItems/KnowledgeCrabulon.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Crabulon"); Tooltip.SetDefault("A crab and its mushrooms, a love story.\n" + "It's interesting how creatures can adapt given certain circumstances.\n" + - "Place in your inventory to gain the Mushy buff while underground or in the mushroom biome.\n" + - "However, your movement speed will be decreased while in these areas due to you being covered in fungi.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain the Mushy buff while underground or in the mushroom biome.\n" + + "However, your movement speed will be decreased while in these areas due to you being covered in fungi."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeCrimson.cs b/Items/LoreItems/KnowledgeCrimson.cs index 6cdf1c5d07..08905ab61a 100644 --- a/Items/LoreItems/KnowledgeCrimson.cs +++ b/Items/LoreItems/KnowledgeCrimson.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Crimson"); Tooltip.SetDefault("This bloody hell, spawned from a formless mass of flesh that fell from the stars eons ago.\n" + "It is now home to many hideous creatures, spawned from the pumping blood and lurching organs deep within.\n" + - "Place in your inventory to prevent perforator cysts from spawning."); + "Favorite this item to prevent perforator cysts from spawning."); } public override void SetDefaults() @@ -32,7 +32,8 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.crimsonLore = true; + if (item.favorited) + modPlayer.crimsonLore = true; } public override void AddRecipes() diff --git a/Items/LoreItems/KnowledgeCryogen.cs b/Items/LoreItems/KnowledgeCryogen.cs index 16b985b6f8..e3e40b1f1c 100644 --- a/Items/LoreItems/KnowledgeCryogen.cs +++ b/Items/LoreItems/KnowledgeCryogen.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Cryogen"); Tooltip.SetDefault("The archmage's prison.\n" + "I am unsure if it has grown weaker over the decades of imprisonment.\n" + - "Place in your inventory to gain a frost dash that freezes enemies, at the cost of slightly reduced defense due to your brittle body.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain a frost dash that freezes enemies, at the cost of slightly reduced defense due to your brittle body."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeDesertScourge.cs b/Items/LoreItems/KnowledgeDesertScourge.cs index a631c734fa..b97efbacf6 100644 --- a/Items/LoreItems/KnowledgeDesertScourge.cs +++ b/Items/LoreItems/KnowledgeDesertScourge.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems Tooltip.SetDefault("The great sea worm appears to have survived the extreme heat and has even adapted to it.\n" + "What used to be a majestic beast swimming through the water has now become a dried-up and\n" + "gluttonous husk, constantly on a voracious search for its next meal.\n" + - "Place in your inventory for an increase to defense while in the desert or sunken sea.\n" + - "However, you will deal decreased damage while in these areas due to being a husk of your former self.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item for an increase to defense while in the desert or sunken sea.\n" + + "However, you will deal decreased damage while in these areas due to being a husk of your former self."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeDestroyer.cs b/Items/LoreItems/KnowledgeDestroyer.cs index 5c3141b702..cea12b9e5e 100644 --- a/Items/LoreItems/KnowledgeDestroyer.cs +++ b/Items/LoreItems/KnowledgeDestroyer.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Destroyer"); Tooltip.SetDefault("A machine brought to life by the mighty souls of warriors, and built to excavate massive tunnels in planets to gather resources.\n" + "Could have proven useful if Draedon didn't have an obsession with turning everything into a tool of destruction.\n" + - "Place in your inventory to gain a boost to your pick speed.\n" + - "However, your max acceleration is decreased slightly due to you feeling heavier.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain a boost to your pick speed.\n" + + "However, your max acceleration is decreased slightly due to you feeling heavier."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeDevourerofGods.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs index 3cf2fa69fd..f34573d0fd 100644 --- a/Items/LoreItems/KnowledgeDevourerofGods.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Devourer of Gods"); Tooltip.SetDefault("This serpent’s power to assimilate the abilities and energy of those it consumed is unique in almost all the known cosmos, save for its lesser brethren.\n" + "I would have soon had to eliminate it as a threat had it been given more time and creatures to feast upon.\n" + - "Place in your inventory to boost the power of your true melee strikes by 25%.\n" + - "However, due to your reckless nature you will take increased damage.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to boost the power of your true melee strikes by 25%.\n" + + "However, due to your reckless nature you will take increased damage."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeDukeFishron.cs b/Items/LoreItems/KnowledgeDukeFishron.cs index fdc59c60bd..e82c8dc7a7 100644 --- a/Items/LoreItems/KnowledgeDukeFishron.cs +++ b/Items/LoreItems/KnowledgeDukeFishron.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Duke Fishron"); Tooltip.SetDefault("The mutant terror of the sea was once the trusted companion of an old king; he tamed it using its favorite treat.\n" + "Long ago, the creature flew in desperation from the raging bloody inferno consuming its home, ultimately finding its way to the ocean.\n" + - "Place in your inventory for an increase to all damage, crit and movement speed while submerged in liquid.\n" + - "However, while not submerged in liquid you will have slightly decreased damage, crit and movement speed due to feeling dried out.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item for an increase to all damage, crit and movement speed while submerged in liquid.\n" + + "However, while not submerged in liquid you will have slightly decreased damage, crit and movement speed due to feeling dried out."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeEaterofWorlds.cs b/Items/LoreItems/KnowledgeEaterofWorlds.cs index 83269fc9a3..9c69fba845 100644 --- a/Items/LoreItems/KnowledgeEaterofWorlds.cs +++ b/Items/LoreItems/KnowledgeEaterofWorlds.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Eater of Worlds"); Tooltip.SetDefault("Perhaps it was just a giant worm infected by the microbe, given centuries to feed and grow its festering body.\n" + "Seems likely, given the origins of this place.\n" + - "Deadly microbes spawn around you while this is placed in your inventory.\n" + - "However, you will have decreased life regen due to your skin rotting off.\n" + - "These effects only occur if the item is favorited."); + "Deadly microbes spawn around you while this item is favorited.\n" + + "However, you will have decreased life regen due to your skin rotting off."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeEyeofCthulhu.cs b/Items/LoreItems/KnowledgeEyeofCthulhu.cs index 086355307c..34854f3d4b 100644 --- a/Items/LoreItems/KnowledgeEyeofCthulhu.cs +++ b/Items/LoreItems/KnowledgeEyeofCthulhu.cs @@ -12,9 +12,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Eye of Cthulhu"); Tooltip.SetDefault("That eye...how peculiar.\n" + "I sensed it watching you more intensely as you grew stronger.\n" + - "Place in your inventory for night vision at night.\n" + - "However, your vision is reduced during the day.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item for night vision at night.\n" + + "However, your vision is reduced during the day."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeGolem.cs b/Items/LoreItems/KnowledgeGolem.cs index d661b84483..d2a7451b6c 100644 --- a/Items/LoreItems/KnowledgeGolem.cs +++ b/Items/LoreItems/KnowledgeGolem.cs @@ -13,8 +13,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Golem"); Tooltip.SetDefault("A primitive construct.\n" + "I admire the lihzahrd race for their ingenuity, though finding faith in such a flawed idol would invariably lead to their downfall.\n" + - "Place in your inventory to gain increased defense while standing still.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to gain increased defense while standing still."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeHiveMind.cs b/Items/LoreItems/KnowledgeHiveMind.cs index 9ad9b6dbd9..e2d694dd1c 100644 --- a/Items/LoreItems/KnowledgeHiveMind.cs +++ b/Items/LoreItems/KnowledgeHiveMind.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Hive Mind"); Tooltip.SetDefault("A hive of clustered microbial-infected flesh.\n" + "I do not believe killing it will lessen the corruption here.\n" + - "Place in your inventory for all of your projectiles to inflict cursed flames when in the corruption.\n" + - "However, enemy spawn rates will be greatly reduced while in the corruption due to your overwhelmingly-putrid odor.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item for all of your projectiles to inflict cursed flames when in the corruption.\n" + + "However, enemy spawn rates will be greatly reduced while in the corruption due to your overwhelmingly-putrid odor."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeKingSlime.cs b/Items/LoreItems/KnowledgeKingSlime.cs index ae7ca88231..fdd0f6a6f4 100644 --- a/Items/LoreItems/KnowledgeKingSlime.cs +++ b/Items/LoreItems/KnowledgeKingSlime.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("King Slime"); Tooltip.SetDefault("Only a fool could be caught by this pitiful excuse for a hunter.\n" + "Unfortunately, our world has no shortage of those.\n" + - "Place in your inventory to gain 5% increased movement speed and 2% increased jump speed.\n" + - "However, your defense is reduced by 3 due to your gelatinous body.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain 5% increased movement speed and 2% increased jump speed.\n" + + "However, your defense is reduced by 3 due to your gelatinous body."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeLeviathanandSiren.cs b/Items/LoreItems/KnowledgeLeviathanandSiren.cs index e95bef421f..7dd1598dfe 100644 --- a/Items/LoreItems/KnowledgeLeviathanandSiren.cs +++ b/Items/LoreItems/KnowledgeLeviathanandSiren.cs @@ -14,10 +14,9 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Leviathan and Siren"); Tooltip.SetDefault("An odd pair of creatures; one seeking companionship and the other seeking sustenance.\n" + "Perhaps two genetic misfits outcast from their homes that found comfort in assisting one another.\n" + - "Place in your inventory to gain increased max health while wearing the siren heart and treasure detect while wearing the strange orb.\n" + + "Favorite this item to gain increased max health while wearing the siren heart and treasure detect while wearing the strange orb.\n" + "Allows the young siren pet to move normally while outside of liquids.\n" + - "However, if you're not submerged in liquid you will have decreased defense and damage reduction.\n" + - "These effects only occur if the item is favorited."); + "However, if you're not submerged in liquid you will have decreased defense and damage reduction."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeLunaticCultist.cs b/Items/LoreItems/KnowledgeLunaticCultist.cs index 4ddea4544f..a701aee0f5 100644 --- a/Items/LoreItems/KnowledgeLunaticCultist.cs +++ b/Items/LoreItems/KnowledgeLunaticCultist.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems Tooltip.SetDefault("The gifted one that terminated my grand summoning so long ago with his uncanny powers over the arcane.\n" + "Someone I once held in such contempt for his actions is now...deceased, his sealing ritual undone...prepare for the end.\n" + "Your impending doom approaches...\n" + - "Place in your inventory for an increase to all stats during the lunar event.\n" + - "However, your vision is decreased due to eldritch knowledge damaging your mind.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item for an increase to all stats during the lunar event.\n" + + "However, your vision is decreased due to eldritch knowledge damaging your mind."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeMoonLord.cs b/Items/LoreItems/KnowledgeMoonLord.cs index 6d023e3fcb..113e46931d 100644 --- a/Items/LoreItems/KnowledgeMoonLord.cs +++ b/Items/LoreItems/KnowledgeMoonLord.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems Tooltip.SetDefault("What a waste.\n" + "Had it been fully restored it would have been a force to behold, but what you fought was an empty shell.\n" + "However, that doesn't diminish the immense potential locked within it, released upon its death.\n" + - "Place in your inventory to gain an improved Gravity Globe that gives you an increase to all stats while upside down.\n" + - "However, while not upside down you have permanent featherfall.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain an improved Gravity Globe that gives you an increase to all stats while upside down.\n" + + "However, while not upside down you have permanent featherfall."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeOcean.cs b/Items/LoreItems/KnowledgeOcean.cs index 3928714138..7b3af37673 100644 --- a/Items/LoreItems/KnowledgeOcean.cs +++ b/Items/LoreItems/KnowledgeOcean.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Ocean"); Tooltip.SetDefault("Take care to not disturb the deep waters of this world.\n" + "You may awaken something more terrifying than death itself.\n" + - "Place in your inventory to prevent the mysterious siren lure from spawning."); + "Favorite this item to prevent the mysterious siren lure from spawning."); } public override void SetDefaults() @@ -33,7 +33,8 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.oceanLore = true; + if (item.favorited) + modPlayer.oceanLore = true; } public override void AddRecipes() diff --git a/Items/LoreItems/KnowledgeOldDuke.cs b/Items/LoreItems/KnowledgeOldDuke.cs index 6df689a8c1..0747a4d8d1 100644 --- a/Items/LoreItems/KnowledgeOldDuke.cs +++ b/Items/LoreItems/KnowledgeOldDuke.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Old Duke"); Tooltip.SetDefault("Strange, to find out that the mutant terror of the seas was not alone in its unique biology.\n" + "Perhaps I was mistaken to classify the creature from its relation to pigrons alone.\n" + - "Place in your inventory to convert negative effects from the Acid Rain debuff to positive effects.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to convert negative effects from the Acid Rain debuff to positive effects."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgePerforators.cs b/Items/LoreItems/KnowledgePerforators.cs index 53dbe77a77..b3a903fa69 100644 --- a/Items/LoreItems/KnowledgePerforators.cs +++ b/Items/LoreItems/KnowledgePerforators.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems { DisplayName.SetDefault("The Perforators and their Hive"); Tooltip.SetDefault("An abomination of comingled flesh, bone, and organ, infested primarily by blood-slurping worms.\n" + - "Place in your inventory for all of your projectiles to inflict ichor when in the crimson.\n" + - "However, enemy spawn rates will be greatly increased while in the crimson due to your body excreting a sweet-smelling pus.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item for all of your projectiles to inflict ichor when in the crimson.\n" + + "However, enemy spawn rates will be greatly increased while in the crimson due to your body excreting a sweet-smelling pus."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgePlaguebringerGoliath.cs b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs index 4f88bf176c..6e781bb644 100644 --- a/Items/LoreItems/KnowledgePlaguebringerGoliath.cs +++ b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Plaguebringer Goliath"); Tooltip.SetDefault("A horrific amalgam of steel, flesh, and infection, capable of destroying an entire civilization in just one onslaught.\n" + "Its plague nuke barrage can leave an entire area uninhabitable for months. A shame that it came to this but the plague must be contained.\n" + - "Place in your inventory to gain increased wing flight time, but at the cost of reduced life regen.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain increased wing flight time, but at the cost of reduced life regen."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgePlantera.cs b/Items/LoreItems/KnowledgePlantera.cs index 7c71900847..4ad06181b9 100644 --- a/Items/LoreItems/KnowledgePlantera.cs +++ b/Items/LoreItems/KnowledgePlantera.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems Tooltip.SetDefault("Well done, you killed a plant.\n" + "It was used as a vessel to house the spirits of those unfortunate enough to find their way down here.\n" + "I wish you luck in dealing with the fallout.\n" + - "Place in your inventory to gain increased item grab range.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to gain increased item grab range."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgePolterghast.cs b/Items/LoreItems/KnowledgePolterghast.cs index acce6e2081..4cb59d9af4 100644 --- a/Items/LoreItems/KnowledgePolterghast.cs +++ b/Items/LoreItems/KnowledgePolterghast.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Polterghast"); Tooltip.SetDefault("A creature born of hatred and anger, formed by countless human souls with all of their energy entirely devoted to consuming others.\n" + "It seems a waste to have had such a potent source of power ravage mindlessly through these empty halls.\n" + - "Place in your inventory to gain increased item grab range.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to gain increased item grab range."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeProvidence.cs b/Items/LoreItems/KnowledgeProvidence.cs index 16183e5179..73be8e36d1 100644 --- a/Items/LoreItems/KnowledgeProvidence.cs +++ b/Items/LoreItems/KnowledgeProvidence.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Providence, the Profaned Goddess"); Tooltip.SetDefault("A core surrounded by stone and flame, a simple origin and a simple goal.\n" + "What would have become of us had she not been defeated is a frightening concept to consider.\n" + - "Place in your inventory to imbue all projectiles with profaned flames, causing them to inflict extra damage.\n" + - "However, your max life is decreased due to a part of your soul being required to fuel the profaned flames.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to imbue all projectiles with profaned flames, causing them to inflict extra damage.\n" + + "However, your max life is decreased due to a part of your soul being required to fuel the profaned flames."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeQueenBee.cs b/Items/LoreItems/KnowledgeQueenBee.cs index b91706e5ae..6981252208 100644 --- a/Items/LoreItems/KnowledgeQueenBee.cs +++ b/Items/LoreItems/KnowledgeQueenBee.cs @@ -12,8 +12,7 @@ namespace CalamityMod.Items.LoreItems { DisplayName.SetDefault("Queen Bee"); Tooltip.SetDefault("As crude as the giant insects are they can prove useful in certain situations...given the ability to control them.\n" + - "Place in your inventory to make small bees and weak hornets friendly.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to make small bees and weak hornets friendly."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeRavager.cs b/Items/LoreItems/KnowledgeRavager.cs index 461310f14d..736ed52ef6 100644 --- a/Items/LoreItems/KnowledgeRavager.cs +++ b/Items/LoreItems/KnowledgeRavager.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Ravager"); Tooltip.SetDefault("The flesh golem constructed using twisted necromancy during the time of my conquest to counter my unstoppable forces.\n" + "Its creators were slaughtered by it moments after its conception. It is for the best that it has been destroyed.\n" + - "Place in your inventory to gain an increase to all damage, but at the cost of reduced wing flight time.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain an increase to all damage, but at the cost of reduced wing flight time."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeSkeletron.cs b/Items/LoreItems/KnowledgeSkeletron.cs index 8f54da002b..ece05bc9b5 100644 --- a/Items/LoreItems/KnowledgeSkeletron.cs +++ b/Items/LoreItems/KnowledgeSkeletron.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Skeletron"); Tooltip.SetDefault("The curse is said to only affect the elderly.\n" + "After they are afflicted they become an immortal vessel for an ancient demon of the underworld.\n" + - "Place in your inventory to gain increased damage while in the dungeon.\n" + - "However, your max health is decreased due to Skeletron's curse.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain increased damage while in the dungeon.\n" + + "However, your max health is decreased due to Skeletron's curse."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeSkeletronPrime.cs b/Items/LoreItems/KnowledgeSkeletronPrime.cs index 22239ad9f4..9e89adf1f1 100644 --- a/Items/LoreItems/KnowledgeSkeletronPrime.cs +++ b/Items/LoreItems/KnowledgeSkeletronPrime.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Skeletron Prime"); Tooltip.SetDefault("What a silly and pointless contraption for something created with the essence of pure terror.\n" + "Draedon obviously took several liberties with its design...I am not impressed.\n" + - "Place in your inventory to gain a boost to your armor penetration.\n" + - "However, your max acceleration is decreased due to you feeling heavier.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain a boost to your armor penetration.\n" + + "However, your max acceleration is decreased due to you feeling heavier."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeSlimeGod.cs b/Items/LoreItems/KnowledgeSlimeGod.cs index c194ec932f..358c2b67b7 100644 --- a/Items/LoreItems/KnowledgeSlimeGod.cs +++ b/Items/LoreItems/KnowledgeSlimeGod.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Slime God"); Tooltip.SetDefault("It is a travesty, one of the most threatening biological terrors ever created.\n" + "If this creature were allowed to combine every slime on the planet it would become nearly unstoppable.\n" + - "Place in your inventory to become slimed and able to slide around on tiles quickly, at the cost of reduced defense.\n" + - "This effect makes dashing more difficult and does not work with mounts.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to become slimed and able to slide around on tiles quickly, at the cost of reduced defense.\n" + + "This effect makes dashing more difficult and does not work with mounts."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeTwins.cs b/Items/LoreItems/KnowledgeTwins.cs index 1514675839..c4a4cc77bf 100644 --- a/Items/LoreItems/KnowledgeTwins.cs +++ b/Items/LoreItems/KnowledgeTwins.cs @@ -13,10 +13,9 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Twins"); Tooltip.SetDefault("The bio-mechanical watchers of the night, originally created as security using the souls extracted from human eyes.\n" + "These creatures did not belong in this world, it's best to be rid of them.\n" + - "Place in your inventory to gain invisibility and rogue bonuses at night.\n" + + "Favorite this item to gain invisibility and rogue bonuses at night.\n" + "However, your defense is reduced while above 50% life due to you feeling softer.\n" + - "Your max acceleration is reduced while below 50% life due to you feeling heavier.\n" + - "These effects only occur if the item is favorited."); + "Your max acceleration is reduced while below 50% life due to you feeling heavier."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeUnderworld.cs b/Items/LoreItems/KnowledgeUnderworld.cs index c07159d8be..e4c3123334 100644 --- a/Items/LoreItems/KnowledgeUnderworld.cs +++ b/Items/LoreItems/KnowledgeUnderworld.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("The Underworld"); Tooltip.SetDefault("These obsidian and hellstone towers were once home to thousands of...'people'.\n" + "Unfortunately for them, they were twisted by their inner demons until they were beyond saving.\n" + - "Place in your inventory to prevent voodoo demons from dropping voodoo dolls."); + "Favorite this item to prevent voodoo demons from dropping voodoo dolls."); } public override void SetDefaults() @@ -32,7 +32,8 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.underworldLore = true; + if (item.favorited) + modPlayer.underworldLore = true; } public override void AddRecipes() diff --git a/Items/LoreItems/KnowledgeWallofFlesh.cs b/Items/LoreItems/KnowledgeWallofFlesh.cs index 6c4b7a7015..cff5e2c5b6 100644 --- a/Items/LoreItems/KnowledgeWallofFlesh.cs +++ b/Items/LoreItems/KnowledgeWallofFlesh.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems Tooltip.SetDefault("I see the deed is done.\n" + "The unholy amalgamation of flesh and hatred has been defeated.\n" + "Prepare to face the terrors that lurk in the light and dark parts of this world.\n" + - "Place in your inventory to gain increased item grab range.\n" + - "This effect only occurs if the item is favorited."); + "Favorite this item to gain increased item grab range."); } public override void SetDefaults() diff --git a/Items/LoreItems/KnowledgeYharon.cs b/Items/LoreItems/KnowledgeYharon.cs index bbf5a90a42..586afec642 100644 --- a/Items/LoreItems/KnowledgeYharon.cs +++ b/Items/LoreItems/KnowledgeYharon.cs @@ -14,8 +14,7 @@ namespace CalamityMod.Items.LoreItems DisplayName.SetDefault("Jungle Dragon, Yharon"); Tooltip.SetDefault("I would not be able to bear a world without my faithful companion by my side.\n" + "Fortunately, fate will have it so that it is a world I shall never have to see, for better or for worse.\n" + - "Place in your inventory to gain nearly-infinite wing flight time, but at the cost of a 25% decrease to all damage.\n" + - "These effects only occur if the item is favorited."); + "Favorite this item to gain nearly-infinite wing flight time, but at the cost of a 25% decrease to all damage."); } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Fabstaff.cs b/Items/Weapons/Magic/Fabstaff.cs index c05347edfd..12267f8077 100644 --- a/Items/Weapons/Magic/Fabstaff.cs +++ b/Items/Weapons/Magic/Fabstaff.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 1600; + item.damage = 880; item.magic = true; item.mana = 50; item.width = 84; From 5f33ad3f8a3b12f07a3f19835dd72ec3b48a0525 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 12:52:22 -0400 Subject: [PATCH 126/128] nerfed Ultima --- Items/Weapons/Ranged/Ultima.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/Ultima.cs b/Items/Weapons/Ranged/Ultima.cs index f51f49efef..4ac1d21e23 100644 --- a/Items/Weapons/Ranged/Ultima.cs +++ b/Items/Weapons/Ranged/Ultima.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 210; + item.damage = 119; item.ranged = true; item.width = 44; item.height = 58; From 95e21b17d436e7a99346efaca67eb9a49b92eb4a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 12:55:44 -0400 Subject: [PATCH 127/128] fixed stat meter and titan heart armor --- Items/Accessories/StatMeter.cs | 2 +- Items/Armor/TitanHeartBoots.cs | 3 ++- Items/Armor/TitanHeartMantle.cs | 3 ++- Items/Armor/TitanHeartMask.cs | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index a5f37323e6..72bf551374 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Items.Accessories // Generic stats always render. sb.Append("Defense: ").Append(defense); sb.Append(" | DR: ").Append(DR).Append("%"); - sb.Append(" | Life Regen: ").Append(lifeRegen).Append("%\n"); + sb.Append(" | Life Regen: ").Append(lifeRegen).Append("\n"); sb.Append("Armor Penetration: ").Append(armorPenetration); sb.Append(" | Wing Flight Time: ").Append(wingFlightTime).Append(" seconds\n"); sb.Append("Jump Speed Boost: ").Append(jumpSpeed).Append("%"); diff --git a/Items/Armor/TitanHeartBoots.cs b/Items/Armor/TitanHeartBoots.cs index 68ced6a884..03bd012f0e 100644 --- a/Items/Armor/TitanHeartBoots.cs +++ b/Items/Armor/TitanHeartBoots.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 14); + recipe.AddIngredient(ModContent.ItemType(), 14); recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); diff --git a/Items/Armor/TitanHeartMantle.cs b/Items/Armor/TitanHeartMantle.cs index 5ddc500f41..1b38d8e86d 100644 --- a/Items/Armor/TitanHeartMantle.cs +++ b/Items/Armor/TitanHeartMantle.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 20); + recipe.AddIngredient(ModContent.ItemType(), 20); recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); diff --git a/Items/Armor/TitanHeartMask.cs b/Items/Armor/TitanHeartMask.cs index db9b696842..cbba9c0f80 100644 --- a/Items/Armor/TitanHeartMask.cs +++ b/Items/Armor/TitanHeartMask.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -54,7 +55,7 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 10); + recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); From 5aec1fc0f6f49956e93d5a07ff7fd01c9eb81e32 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 4 Jul 2020 12:58:53 -0400 Subject: [PATCH 128/128] renamed xeroc wings --- Items/Accessories/Wings/XerocWings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/Wings/XerocWings.cs b/Items/Accessories/Wings/XerocWings.cs index f9f9fafd38..ad99258922 100644 --- a/Items/Accessories/Wings/XerocWings.cs +++ b/Items/Accessories/Wings/XerocWings.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories.Wings { public override void SetStaticDefaults() { - DisplayName.SetDefault("Xeroc Wings"); + DisplayName.SetDefault("Exodus Wings"); Tooltip.SetDefault("Highly radioactive\n" + "Horizontal speed: 8.5\n" + "Acceleration multiplier: 2\n" +