From 0d41953eaf66195754ecfcc1b2c58dfcf68c2d09 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 12 Oct 2019 20:44:02 -0500 Subject: [PATCH] Glove of Recklessness and fixes --- CalPlayer/CalamityPlayer.cs | 7 +++++ Items/Accessories/GloveOfPrecicion.cs | 2 +- Items/Accessories/GloveOfRecklessness.cs | 32 ++++++++++++++++++++++ Items/Accessories/GloveOfRecklessness.png | Bin 0 -> 626 bytes Items/CalamityGlobalItem.cs | 7 +++++ Projectiles/Rogue/DragonShit.cs | 1 - 6 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 Items/Accessories/GloveOfRecklessness.cs create mode 100644 Items/Accessories/GloveOfRecklessness.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3d11e73798..68d984728c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -310,6 +310,7 @@ namespace CalamityMod.CalPlayer public bool moonCrown = false; public bool dragonScales = false; public bool gloveOfPrecision = false; + public bool gloveOfRecklessness = false; public bool momentumCapacitor = false; // Armor Set @@ -1023,6 +1024,7 @@ namespace CalamityMod.CalPlayer moonCrown = false; dragonScales = false; gloveOfPrecision = false; + gloveOfRecklessness = false; momentumCapacitor = false; shadowflame = false; @@ -4466,6 +4468,11 @@ namespace CalamityMod.CalPlayer player.Calamity().throwingCrit += 12; player.Calamity().throwingVelocity *= 1.2f; } + if (gloveOfRecklessness) + { + player.Calamity().throwingVelocity *= 1.2f; + player.Calamity().throwingDamage *= 0.9f; + } if (tarraSummon) { int lifeCounter = 0; diff --git a/Items/Accessories/GloveOfPrecicion.cs b/Items/Accessories/GloveOfPrecicion.cs index b974bade08..193cdee8f6 100644 --- a/Items/Accessories/GloveOfPrecicion.cs +++ b/Items/Accessories/GloveOfPrecicion.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Glove Of Precision"); - Tooltip.SetDefault("Decreases rogue speed by 20% but increase damage and crit by 12% and velocity by 25%"); + Tooltip.SetDefault("Decreases rogue speed by 20% but increases damage and crit by 12% and velocity by 25%"); } public override void SetDefaults() diff --git a/Items/Accessories/GloveOfRecklessness.cs b/Items/Accessories/GloveOfRecklessness.cs new file mode 100644 index 0000000000..340478b985 --- /dev/null +++ b/Items/Accessories/GloveOfRecklessness.cs @@ -0,0 +1,32 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class GloveOfRecklessness : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Glove Of Recklessness"); + Tooltip.SetDefault("Increases rogue speed by 20% but decreases damage by 10%\n" + + "Adds inaccuracy to rogue weapons"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 40; + item.value = Item.buyPrice(0, 50, 0, 0); + item.accessory = true; + item.rare = 8; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.gloveOfRecklessness = true; + } + } +} diff --git a/Items/Accessories/GloveOfRecklessness.png b/Items/Accessories/GloveOfRecklessness.png new file mode 100644 index 0000000000000000000000000000000000000000..518e6ed5a20b9f1b1548ddbc8395e7a51c37f24e GIT binary patch literal 626 zcmV-&0*(ENP)Px%EJ;K`R7i={mqAYxK^TUgv89n(3+MqC+*mOI!UdBioJiDP;7#KdqZe+*=+&zR zy?KEjK;TcPKcI^R1blF2$ti zW*8cPZwChewAOlA}7`B)zfFf|4bwZLI9$ueJ+{t@oUzGTCHl0Cns+J10t?h#>VXZ zu6}fX0v-{`Mp66R1(8T1GcuAh0QGt`2AG{)V0b(+aoqrvN;3d78hfdA#~&g=Fa~JMAlI|#x6v36JD@l*AJmU?K)5@y1uxz_1kRFiE3$f6 zcV1bd-gu}7_AF~I8Yn^{b9?3v0Q*j#F+aax0Csn)sb7%pJ9tCn7YXLeKx?6-JOBUy M07*qoM6N<$f|oiO?*IS* literal 0 HcmV?d00001 diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 525962a728..7e489c3357 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -118,6 +118,13 @@ namespace CalamityMod.Items { speedX *= player.Calamity().throwingVelocity; speedY *= player.Calamity().throwingVelocity; + if (player.Calamity().gloveOfRecklessness) + { + Vector2 rotated = new Vector2(speedX, speedY); + rotated = rotated.RotatedByRandom(MathHelper.ToRadians(10f)); + speedX = rotated.X; + speedY = rotated.Y; + } } if (player.Calamity().luxorsGift) { diff --git a/Projectiles/Rogue/DragonShit.cs b/Projectiles/Rogue/DragonShit.cs index 0636b90d38..3fed2ea8b3 100644 --- a/Projectiles/Rogue/DragonShit.cs +++ b/Projectiles/Rogue/DragonShit.cs @@ -139,7 +139,6 @@ namespace CalamityMod.Projectiles.Rogue Gore expr_13D1F_cp_0 = Main.gore[num626]; expr_13D1F_cp_0.velocity.Y -= 1f; } - projectile.damage = Main.expertMode ? 300 : 180; projectile.Damage(); } }