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 diff --git a/Items/Weapons/Ranged/OnyxChainBlaster.cs b/Items/Weapons/Ranged/OnyxChainBlaster.cs index d73eab249d..4c29a8d8a8 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; @@ -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.Rarity12BuyPrice; + 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.25f); + 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..7917b44dd5 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); + 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 - 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; } 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;