From 62700b3da60d2cd9435a437083d08ef0e2a70e2a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 22 Mar 2020 11:27:23 -0400 Subject: [PATCH] balancing, fixes, festive wings buff --- Items/Accessories/Wings/SoulofCryogen.cs | 4 +-- Items/CalamityGlobalItem.cs | 26 ++++++++++++++---- Items/Weapons/Rogue/ToxicantTwister.cs | 2 +- Items/Weapons/Summon/CadaverousCarrion.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 33 +++++++++++++++++++++++ Projectiles/Summon/OldDukeSharkVomit.cs | 2 +- 6 files changed, 59 insertions(+), 10 deletions(-) diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index 85cbc0c4ae..ce26fb4d85 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -66,9 +66,9 @@ namespace CalamityMod.Items.Accessories.Wings player.noFallDmg = true; if (modPlayer.icicleCooldown <= 0) { - if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f) + if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart) { - int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType(), 25, 3f, player.whoAmI); + int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType(), (int)(25 * player.allDamage), 3f, player.whoAmI); Main.projectile[p].minion = false; Main.projectile[p].Calamity().rogue = false; Main.projectile[p].frame = Main.rand.Next(5); diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 70794fa5bb..8313c38305 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items if (CalamityMod.weaponAutoreuseList?.Contains(item.type) ?? false) item.autoReuse = true; - if (item.type == ItemID.PsychoKnife || item.type == ItemID.PearlwoodSword || item.type == ItemID.PearlwoodBow || item.type == ItemID.TaxCollectorsStickOfDoom) + if (item.type == ItemID.PsychoKnife || item.type == ItemID.TaxCollectorsStickOfDoom) item.damage *= 4; else if (item.type == ItemID.SpectreStaff) item.damage *= 3; @@ -164,15 +164,21 @@ namespace CalamityMod.Items item.useTime = 15; item.damage *= 4; item.tileBoost += 1; + item.rare = 4; } - if (item.type == ItemID.PearlwoodBow) { item.useAnimation += 8; //35 item.useTime += 8; //35 item.shootSpeed += 3.4f; //10f item.knockBack += 1f; //1f - item.shoot = ProjectileID.RainbowFront; + item.rare = 4; + item.damage *= 4; + } + if (item.type == ItemID.PearlwoodSword) + { + item.damage *= 4; + item.rare = 4; } } #endregion @@ -361,7 +367,6 @@ namespace CalamityMod.Items if (Main.projectile[i].active && (Main.projectile[i].type == ProjectileID.RainbowFront || Main.projectile[i].type == ProjectileID.RainbowBack) && Main.projectile[i].owner == player.whoAmI) { Main.projectile[i].Kill(); - break; } } for (int i = -8; i <= 8; i += 8) @@ -1866,7 +1871,8 @@ Provides heat and cold protection in Death Mode"; "Acceleration multiplier: 1\n" + "Average vertical speed\n" + "Flight time: 170\n" + - "+50 max life"; + "+50 max life\n" + + "Ornaments rain down as you fly"; } } } @@ -2863,6 +2869,16 @@ Provides heat and cold protection in Death Mode"; { player.noFallDmg = true; player.statLifeMax2 += 50; + if (modPlayer.icicleCooldown <= 0) + { + if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart) + { + int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ProjectileID.OrnamentFriendly, (int)(100 * player.allDamage), 5f, player.whoAmI); + Main.projectile[p].melee = false; + Main.projectile[p].Calamity().lineColor = 1; + modPlayer.icicleCooldown = 10; + } + } } else if (item.type == ItemID.SpookyWings) // Bonus to summon stats while wearing spooky armor { diff --git a/Items/Weapons/Rogue/ToxicantTwister.cs b/Items/Weapons/Rogue/ToxicantTwister.cs index ecf0c0d655..9126670a40 100644 --- a/Items/Weapons/Rogue/ToxicantTwister.cs +++ b/Items/Weapons/Rogue/ToxicantTwister.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue { item.width = 42; item.height = 46; - item.damage = 820; + item.damage = 950; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = item.useTime = 20; diff --git a/Items/Weapons/Summon/CadaverousCarrion.cs b/Items/Weapons/Summon/CadaverousCarrion.cs index 3178baba4a..cf74b2e061 100644 --- a/Items/Weapons/Summon/CadaverousCarrion.cs +++ b/Items/Weapons/Summon/CadaverousCarrion.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 680; + item.damage = 640; item.mana = 32; item.summon = true; item.sentry = true; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 66b406308b..694862085f 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -623,6 +623,39 @@ namespace CalamityMod.Projectiles } } + if (projectile.type == ProjectileID.OrnamentFriendly && lineColor == 1) //spawned by Festive Wings + { + Vector2 center = projectile.Center; + float maxDistance = 460f; + bool homeIn = false; + + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].CanBeChasedBy(projectile, false)) + { + float extraDistance = (float)(Main.npc[i].width / 2) + (float)(Main.npc[i].height / 2); + + bool canHit = Collision.CanHit(projectile.Center, 1, 1, Main.npc[i].Center, 1, 1); + + if (Vector2.Distance(Main.npc[i].Center, projectile.Center) < (maxDistance + extraDistance) && canHit) + { + center = Main.npc[i].Center; + homeIn = true; + break; + } + } + } + + if (homeIn) + { + Vector2 homeInVector = projectile.DirectionTo(center); + if (homeInVector.HasNaNs()) + homeInVector = Vector2.UnitY; + + projectile.velocity = (projectile.velocity * 20f + homeInVector * 15f) / (21f); + } + } + if (!projectile.npcProj && !projectile.trap && projectile.friendly && projectile.damage > 0) { if (modPlayer.eQuiver && projectile.ranged && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) diff --git a/Projectiles/Summon/OldDukeSharkVomit.cs b/Projectiles/Summon/OldDukeSharkVomit.cs index f7e48f7755..3d74d06225 100644 --- a/Projectiles/Summon/OldDukeSharkVomit.cs +++ b/Projectiles/Summon/OldDukeSharkVomit.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Summon if (hasHomingTarget) { NPC target = Main.npc[targetIdx]; - Vector2 homingVector = (target.Center - projectile.Center).SafeNormalize(Vector2.Zero) * 15f; + Vector2 homingVector = (target.Center - projectile.Center).SafeNormalize(Vector2.Zero) * 25f; float homingRatio = 20f; projectile.velocity = (projectile.velocity * homingRatio + homingVector) / (homingRatio + 1f); }