From 374de1e44ac525848c1a29dd8b7f30c843ecd669 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 5 Dec 2020 16:00:09 -0500 Subject: [PATCH 1/5] fixed onyx chain blaster damage & shard range --- Items/Weapons/Ranged/OnyxChainBlaster.cs | 22 ++++++++++++++-------- Items/Weapons/Ranged/Onyxia.cs | 22 +++++++++++----------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Items/Weapons/Ranged/OnyxChainBlaster.cs b/Items/Weapons/Ranged/OnyxChainBlaster.cs index d73eab249d..12cb896924 100644 --- a/Items/Weapons/Ranged/OnyxChainBlaster.cs +++ b/Items/Weapons/Ranged/OnyxChainBlaster.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4.5f; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; + item.value = CalamityGlobalItem.Rarity13BuyPrice; + item.rare = ItemRarityID.Red; item.UseSound = SoundID.Item36; item.autoReuse = true; item.shoot = ProjectileID.PurificationPowder; @@ -42,14 +42,20 @@ namespace CalamityMod.Items.Weapons.Ranged 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 SpeedX = speedX + Main.rand.Next(-25, 26) * 0.05f; - float SpeedY = speedY + Main.rand.Next(-25, 26) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX * 0.9f, SpeedY * 0.9f, ProjectileID.BlackBolt, damage, knockBack, player.whoAmI, 0f, 0f); + Vector2 velocity = new Vector2(speedX, speedY); + + // Fire the Onyx Shard that is characteristic of the Onyx Blaster + // The shard deals 250% damage and double knockback + int shardDamage = (int)(2.5f * damage); + float shardKB = 2f * knockBack; + Vector2 offset = new Vector2(Main.rand.Next(-25, 26) * 0.05f, Main.rand.Next(-25, 26) * 0.05f); + Projectile shard = Projectile.NewProjectileDirect(position, velocity + offset, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); + shard.timeLeft = (int)(shard.timeLeft * 1.4f); + for (int i = 0; i < 4; i++) { - float SpeedNewX = speedX + Main.rand.Next(-45, 46) * 0.05f; - float SpeedNewY = speedY + Main.rand.Next(-45, 46) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedNewX, SpeedNewY, type, (int)(damage * 1.25f), knockBack, player.whoAmI, 0f, 0f); + offset = new Vector2(Main.rand.Next(-45, 46) * 0.05f, Main.rand.Next(-45, 46) * 0.05f); + Projectile.NewProjectile(position, velocity + offset, type, damage, knockBack, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index 90e3c091de..26e84f47bf 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.noMelee = true; item.knockBack = 4.5f; item.value = Item.buyPrice(2, 50, 0, 0); - item.rare = 10; + item.rare = ItemRarityID.Red; item.UseSound = SoundID.Item36; item.autoReuse = true; item.shoot = ProjectileID.PurificationPowder; // wait why @@ -46,24 +46,24 @@ namespace CalamityMod.Items.Weapons.Ranged 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 velocity = new Vector2(speedX, speedY); + // Fire the Onyx Shard that is characteristic of the Onyx Blaster - // The shard deals triple damage and double knockback - int shardDamage = (int)(2.5 * damage); + // The shard deals 250% damage and double knockback + int shardDamage = (int)(2.5f * damage); float shardKB = 2f * knockBack; - float shardVelocityX = (speedX + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f; - float shardVelocityY = (speedY + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f; - Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); + Vector2 offset = new Vector2(Main.rand.Next(-25, 26) * 0.05f, Main.rand.Next(-25, 26) * 0.05f) * 0.9f; + Projectile.NewProjectile(position, velocity + offset, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); // Fire three symmetric pairs of bullets alongside it - Vector2 baseVelocity = new Vector2(speedX, speedY); for (int i = 0; i < 3; i++) { float randAngle = Main.rand.NextFloat(0.035f); float randVelMultiplier = Main.rand.NextFloat(0.92f, 1.08f); - Vector2 left = baseVelocity.RotatedBy(-randAngle) * randVelMultiplier; - Vector2 right = baseVelocity.RotatedBy(randAngle) * randVelMultiplier; - Projectile.NewProjectile(position.X, position.Y, left.X, left.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); - Projectile.NewProjectile(position.X, position.Y, right.X, right.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); + Vector2 ccwVelocity = velocity.RotatedBy(-randAngle) * randVelMultiplier; + Vector2 cwVelocity = velocity.RotatedBy(randAngle) * randVelMultiplier; + Projectile.NewProjectile(position, ccwVelocity, type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position, cwVelocity, type, damage, knockBack, player.whoAmI, 0f, 0f); } return false; } From d1208d4b63664cdae4a36d7f29cd5c983abe17a8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 5 Dec 2020 16:17:12 -0500 Subject: [PATCH 2/5] fixed shard ranges on onyx weapons --- Items/Weapons/Ranged/OnyxChainBlaster.cs | 4 ++-- Items/Weapons/Ranged/Onyxia.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Ranged/OnyxChainBlaster.cs b/Items/Weapons/Ranged/OnyxChainBlaster.cs index 12cb896924..1ad45f059d 100644 --- a/Items/Weapons/Ranged/OnyxChainBlaster.cs +++ b/Items/Weapons/Ranged/OnyxChainBlaster.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 42; + item.damage = 52; item.ranged = true; item.width = 64; item.height = 32; @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged float shardKB = 2f * knockBack; Vector2 offset = new Vector2(Main.rand.Next(-25, 26) * 0.05f, Main.rand.Next(-25, 26) * 0.05f); Projectile shard = Projectile.NewProjectileDirect(position, velocity + offset, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); - shard.timeLeft = (int)(shard.timeLeft * 1.4f); + shard.timeLeft = (int)(shard.timeLeft * 1.25f); for (int i = 0; i < 4; i++) { diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index 26e84f47bf..7917b44dd5 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -52,8 +52,8 @@ namespace CalamityMod.Items.Weapons.Ranged // The shard deals 250% damage and double knockback int shardDamage = (int)(2.5f * damage); float shardKB = 2f * knockBack; - Vector2 offset = new Vector2(Main.rand.Next(-25, 26) * 0.05f, Main.rand.Next(-25, 26) * 0.05f) * 0.9f; - Projectile.NewProjectile(position, velocity + offset, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); + Projectile shard = Projectile.NewProjectileDirect(position, velocity, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); + shard.timeLeft = (int)(shard.timeLeft * 1.4f); // Fire three symmetric pairs of bullets alongside it for (int i = 0; i < 3; i++) From dd806a3620f77e8c041d94fd3d93627b190af8cf Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 5 Dec 2020 16:30:30 -0500 Subject: [PATCH 3/5] fixed sell price being the wrong rarity --- Items/Weapons/Ranged/OnyxChainBlaster.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/OnyxChainBlaster.cs b/Items/Weapons/Ranged/OnyxChainBlaster.cs index 1ad45f059d..4c29a8d8a8 100644 --- a/Items/Weapons/Ranged/OnyxChainBlaster.cs +++ b/Items/Weapons/Ranged/OnyxChainBlaster.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4.5f; - item.value = CalamityGlobalItem.Rarity13BuyPrice; + item.value = CalamityGlobalItem.Rarity12BuyPrice; item.rare = ItemRarityID.Red; item.UseSound = SoundID.Item36; item.autoReuse = true; From 97e2ad71576ec72cd3aeb78cae8c4e6ed79da1a1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 3 Dec 2020 22:43:59 -0500 Subject: [PATCH 4/5] tried to fix folly going invincibile if you skip phase 2 --- NPCs/CalamityAI.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index c90f772c39..cf0e85aa1f 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -4056,6 +4056,7 @@ namespace CalamityMod.NPCs if (calamityGlobalNPC.newAI[1] >= newPhaseTimer) { calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 1f; calamityGlobalNPC.newAI[3] = 1f; npc.ai[0] = 0f; npc.ai[1] = 0f; From eb516da9ebfebb58365e3aba5f54568318efe0e7 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 6 Dec 2020 18:47:28 -0500 Subject: [PATCH 5/5] added cron script to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 516f1ca200..057b56f873 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# manually added cronscript +cronpull.sh + ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. *.csproj