diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 02a207d308..9c9ddb8fa3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2828,6 +2828,10 @@ namespace CalamityMod.CalPlayer if (Player.ichor) Player.statDefense += 5; + // Holding Walking Cane increases movement speed + if (Player.HeldItem.type == ModContent.ItemType()) + Player.moveSpeed += WalkingCane.MoveSpeedBoost; + // Fairy Boots bonus if (fairyBoots) { @@ -3633,8 +3637,7 @@ namespace CalamityMod.CalPlayer --bloodflareCoreRemainingHealOverTime; } - - // Reduce how slow Chilled makes the player, because it's cancerous right now + // Reduce how slow Chilled makes the player // The moveSpeed multiplier for Chilled in vanilla is 0.75, so we just multiply by 1.166667 here to make it 0.875, effectively cutting the reduction in half if (Player.chilled) Player.moveSpeed *= 1f + (1f / 6f); diff --git a/Effects/BasicTint.fx b/Effects/BasicTint.fx index 8b3b2268c2..ca360c3e68 100644 --- a/Effects/BasicTint.fx +++ b/Effects/BasicTint.fx @@ -3,7 +3,7 @@ sampler uImage1 : register(s1); float3 uColor; float3 uSecondaryColor; float uOpacity; -float uSaturation; +float uSaturation; // Saturation gets used as a "true" opacity float uRotation; float uTime; float4 uSourceRect; @@ -20,7 +20,7 @@ float4 Recolor(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR0 float4 color = tex2D(uImage0, coords); float originalAlpha = color.a; color.rbg = lerp(color.rbg, uColor, uOpacity); - return color * originalAlpha; + return color * originalAlpha * uSaturation; } diff --git a/Effects/BasicTint.xnb b/Effects/BasicTint.xnb index 4b02bc2bdc..3fe8964653 100644 Binary files a/Effects/BasicTint.xnb and b/Effects/BasicTint.xnb differ diff --git a/Items/CalamityGlobalItemLoot.cs b/Items/CalamityGlobalItemLoot.cs index a3bf25dbd3..3d3ed8176e 100644 --- a/Items/CalamityGlobalItemLoot.cs +++ b/Items/CalamityGlobalItemLoot.cs @@ -76,7 +76,8 @@ namespace CalamityMod.Items ItemID.LucyTheAxe, ItemID.PewMaticHorn, ItemID.WeatherPain, - ItemID.HoundiusShootius + ItemID.HoundiusShootius, + ModContent.ItemType() }; loot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, deerclopsWeapons)); loot.AddRevBagAccessories(); diff --git a/Items/Weapons/Rogue/SlickCane.cs b/Items/Weapons/Rogue/WalkingCane.cs similarity index 80% rename from Items/Weapons/Rogue/SlickCane.cs rename to Items/Weapons/Rogue/WalkingCane.cs index 0331d03098..e7856d099c 100644 --- a/Items/Weapons/Rogue/SlickCane.cs +++ b/Items/Weapons/Rogue/WalkingCane.cs @@ -3,12 +3,17 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { - public class SlickCane : RogueWeapon + [LegacyName("SlickCane")] + public class WalkingCane : RogueWeapon { + public static float MoveSpeedBoost = 0.15f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MoveSpeedBoost.ToPercent()); + public override void SetDefaults() { Item.width = 42; @@ -22,9 +27,9 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 6f; Item.UseSound = SoundID.DD2_GhastlyGlaivePierce; Item.autoReuse = true; - Item.value = Item.buyPrice(gold: 35); // Sold by Bandit + Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/SlickCane.png b/Items/Weapons/Rogue/WalkingCane.png similarity index 100% rename from Items/Weapons/Rogue/SlickCane.png rename to Items/Weapons/Rogue/WalkingCane.png diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 51e11a5e97..419a2e7967 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -1069,17 +1069,6 @@ SkyfinBombers: { ''' } -SlickCane: { - DisplayName: Slick Cane - Tooltip: - ''' - Swipes a cane that steals money from enemies - Stealth strikes give a 1 in 20 chance for enemies to drop 1-2 gold coins when hit - Stealth strikes boost damage in proportion to money in the inventory, up to 1 Platinum - 'Economy at its finest' - ''' -} - SludgeSplotch: { DisplayName: Sludge Splotch Tooltip: Stealth strikes cause the main ball of sludge to split on hit, inflicting more damage @@ -1359,6 +1348,17 @@ Vega: { ''' } +WalkingCane: { + DisplayName: Walking Cane + Tooltip: + ''' + Swipes a pointed walking cane + Stealth strikes drain the sanity of foes, causing shadow hands to be summoned when attacked + While held, increases movement speed by {0}% + 'Is it walking me, or am I walking it?' + ''' +} + WaveSkipper: { DisplayName: Wave Skipper Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 4ce439ea10..74d6beff22 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -400,7 +400,7 @@ TavernkeepChat.FullMoon: Care for a little Moonshine? TaxCollectorChat: { DoGDefeated: Devourer of what, you said? Devourer of Funds, if its payroll is anything to go by! PreBrimmy: So those punks on Azafure think they can live for free on my lands? Tell you what, do my job there and I might give you a bonus. - HasSlickCane: Goodness! That cane has swagger! + HasWalkingCane: Goodness! That cane has swagger! Has100Plat: BAH! Doesn't seem like I'll ever be able to quarrel with the debts of the town again! Has500Plat: Where and how are you getting all of this money?! Scram, you have no need for me! } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index bfd43316ca..b5827985bb 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -288,6 +288,7 @@ namespace CalamityMod.NPCs public bool crumble = false; public int antlionCloudDebuffTimer = 0; + public int caneInsanityTimer = 0; public bool scionsCurioEffected = false; public bool abaddonEffected = false; public bool apollyonEffected = false; @@ -569,6 +570,7 @@ namespace CalamityMod.NPCs myClone.crumble = crumble; myClone.antlionCloudDebuffTimer = antlionCloudDebuffTimer; + myClone.caneInsanityTimer = caneInsanityTimer; myClone.scionsCurioEffected = scionsCurioEffected; myClone.abaddonEffected = abaddonEffected; myClone.apollyonEffected = apollyonEffected; @@ -799,6 +801,8 @@ namespace CalamityMod.NPCs if (antlionCloudDebuffTimer > 0) antlionCloudDebuffTimer--; + if (caneInsanityTimer > 0) + caneInsanityTimer--; if (cursorFocus > 0 && cursorFocus < cursorFocusMax) cursorFocus--; relicOfResilienceWeakness = false; @@ -4865,6 +4869,29 @@ namespace CalamityMod.NPCs return DrawVanillaBestiaryWorms(spriteBatch, npc, drawColor); } } + + if (caneInsanityTimer > 0) + { + Texture2D tex = TextureAssets.Npc[npc.type].Value; + Rectangle frame = npc.frame; + float fadeInAmt = caneInsanityTimer > 570 ? Utils.GetLerpValue(600, 570, caneInsanityTimer) : caneInsanityTimer < 30 ? Utils.GetLerpValue(0, 30, caneInsanityTimer) : 1f; + Vector2 origin = new Vector2(tex.Width / 2, tex.Height / Main.npcFrameCount[npc.type] / 2); + SpriteEffects sp = npc.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Vector3 colorHSL = Main.rgbToHsl(Color.Violet); + + CalamityUtils.EnterShaderRegion(spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); + GameShaders.Misc["CalamityMod:BasicTint"].UseSaturation(fadeInAmt * 0.35f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Main.hslToRgb(1f - colorHSL.X, colorHSL.Y, colorHSL.Z)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + for (int i = 0; i < 4; i++) + { + Vector2 offset = Vector2.UnitX.RotatedBy(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi * 2f + (MathHelper.TwoPi * i / 4f)) * 0f * fadeInAmt; + Main.EntitySpriteDraw(tex, npc.Center - screenPos - Vector2.UnitY * (npc.gfxOffY) + offset, frame, Color.Violet, npc.rotation, origin, npc.scale, sp); + } + CalamityUtils.ExitShaderRegion(spriteBatch); + } + if (npc.type != NPCID.BrainofCthulhu && (npc.type != NPCID.DukeFishron || npc.ai[0] <= 9f) && npc.active) { if (CalamityClientConfig.Instance.DebuffDisplay && (npc.boss || BossHealthBarManager.MinibossHPBarList.Contains(npc.type) || BossHealthBarManager.OneToMany.ContainsKey(npc.type) || CalamityNPCSets.ForceDrawDebuffDisplay[npc.type])) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index fc2a6c5711..aea2e19677 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1196,7 +1196,8 @@ namespace CalamityMod.NPCs ItemID.LucyTheAxe, ItemID.PewMaticHorn, ItemID.WeatherPain, - ItemID.HoundiusShootius + ItemID.HoundiusShootius, + ModContent.ItemType() }; LCR_NotExpert.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, deerWeapons)); } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index f02551ccd6..9911710c7f 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1234,8 +1234,8 @@ namespace CalamityMod.NPCs chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.DoGDefeated"); else if (Main.rand.NextBool(5) && !DownedBossSystem.downedBrimstoneElemental) chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.PreBrimmy"); - else if (Main.rand.NextBool(10) && CalamityUtils.InventoryHas(Main.LocalPlayer, ItemType())) - chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.HasSlickCane"); + else if (Main.rand.NextBool(10) && CalamityUtils.InventoryHas(Main.LocalPlayer, ItemType())) + chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.HasWalkingCane"); else if (Main.rand.NextBool(5) && platinumCoins >= 500) chat = CalamityUtils.GetTextValue("Vanilla.TaxCollectorChat.Has500Plat"); else if (Main.rand.NextBool(5) && platinumCoins >= 100) @@ -1315,14 +1315,6 @@ namespace CalamityMod.NPCs defense += 20; } } - - public override bool? CanBeHitByProjectile(NPC npc, Projectile projectile) - { - // Not an axe but close enough - if (npc.type == NPCID.TaxCollector && projectile.type == ProjectileType()) - return true; - return base.CanBeHitByProjectile(npc, projectile); - } #endregion #region Shop Stuff diff --git a/NPCs/TownNPCs/Bandit.cs b/NPCs/TownNPCs/Bandit.cs index 0398c06522..001595d331 100644 --- a/NPCs/TownNPCs/Bandit.cs +++ b/NPCs/TownNPCs/Bandit.cs @@ -307,7 +307,6 @@ namespace CalamityMod.NPCs.TownNPCs NPCShop shop = new(Type); shop.Add() .Add() - .Add() .Add() .Add(ItemID.TigerClimbingGear) .Add(Condition.DownedPirates) diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs deleted file mode 100644 index a9584f036a..0000000000 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System; -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.Systems.Collections; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class SlickCaneProjectile : BaseSpearProjectile - { - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - public override string Texture => "CalamityMod/Items/Weapons/Rogue/SlickCane"; - - private bool initialized = false; - public override void SetDefaults() - { - Projectile.width = 40; - Projectile.height = 36; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.timeLeft = 120; - Projectile.friendly = true; - Projectile.hostile = false; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.ownerHitCheck = true; - Projectile.hide = true; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.alpha = 180; - Projectile.scale = 1.25f; - } - public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; - public override float TravelSpeed => 8f; - - public override bool PreAI() - { - // Initialization. Using the AI hook would override the base spear's code, and we don't want that. - if (!initialized) - { - Main.player[Projectile.owner].Calamity().ConsumeStealthByAttacking(); - initialized = true; - } - return true; - } - - public override bool PreDraw(ref Color lightColor) - { - Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request("CalamityMod/Projectiles/Rogue/SlickCaneProjectileAlt").Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); - Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null, - lightColor, Projectile.rotation, - origin, Projectile.scale, SpriteEffects.None, 0); - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float spearLengthMult = 2.5f; - float velocityMagnitude = 0f; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), - Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, - (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude)) - { - return true; - } - return false; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - Player player = Main.player[Projectile.owner]; - //Dont drop money from Dummies, WoF eyes and worm segments to make grinding money a bit harder and not give money from Dummies since that was apparently happening - if (Projectile.owner == Main.myPlayer && target.IsAnEnemy(false) && !target.dontCountMe && !CalamityNPCSets.ForceDrawDebuffDisplay[target.type]) - { - float moneyValueToDrop = target.value / Main.rand.NextFloat(15f, 35f); - // Maximum of 50 silver, not counting steath strikes - moneyValueToDrop = (int)MathHelper.Clamp(moneyValueToDrop, 0, 5000f); - if (Projectile.Calamity().stealthStrike && Main.rand.NextBool(20)) - { - moneyValueToDrop += Item.buyPrice(0, Main.rand.Next(1, 3), Main.rand.Next(0, 100), Main.rand.Next(0, 100)); - SoundEngine.PlaySound(TheSevensStriker.TriplesSound, Projectile.Center); - } - else if (moneyValueToDrop > 0f) - SoundEngine.PlaySound(TheSevensStriker.DoublesSound, Projectile.Center); - while (moneyValueToDrop > 10000f) - { - int modifiedMoneyValue = (int)(moneyValueToDrop / 10000f); - if (modifiedMoneyValue > 50 && Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - if (Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - moneyValueToDrop -= 10000 * modifiedMoneyValue; - Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.GoldCoin, modifiedMoneyValue); - } - while (moneyValueToDrop > 100f) - { - int modifiedMoneyValue = (int)(moneyValueToDrop / 100f); - if (modifiedMoneyValue > 50 && Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - if (Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - moneyValueToDrop -= 100 * modifiedMoneyValue; - Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.SilverCoin, modifiedMoneyValue); - } - while (moneyValueToDrop > 0f) - { - int modifiedMoneyValue = (int)moneyValueToDrop; - if (modifiedMoneyValue > 50 && Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(3) + 1; - } - if (Main.rand.NextBool(5)) - { - modifiedMoneyValue /= Main.rand.Next(4) + 1; - } - if (modifiedMoneyValue < 1) - { - modifiedMoneyValue = 1; - } - moneyValueToDrop -= modifiedMoneyValue; - Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.CopperCoin, modifiedMoneyValue); - } - } - } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - // Boost dmg in proportion to money, caps at 1 plat. - if (Projectile.Calamity().stealthStrike) - { - Player player = Main.player[Projectile.owner]; - double money = Utils.CoinsCount(out bool overflow, player.inventory); - double cap = 1000000; - if (money >= cap) - money = cap; - if (money != 0) - { - modifiers.SourceDamage *= (float)(money / 1000000 + 1); - SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center); - for (int j = 0; j < 8; j++) - { - int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 3f); - Main.dust[dust2].noGravity = true; - Main.dust[dust2].velocity *= 5f; - dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 2f); - Main.dust[dust2].velocity *= 2f; - } - } - } - } - } -} diff --git a/Projectiles/Rogue/SlickCaneProjectileAlt.png b/Projectiles/Rogue/SlickCaneProjectileAlt.png deleted file mode 100644 index 1453d66510..0000000000 Binary files a/Projectiles/Rogue/SlickCaneProjectileAlt.png and /dev/null differ diff --git a/Projectiles/Rogue/WalkingCaneProjectile.cs b/Projectiles/Rogue/WalkingCaneProjectile.cs new file mode 100644 index 0000000000..5034f5c68f --- /dev/null +++ b/Projectiles/Rogue/WalkingCaneProjectile.cs @@ -0,0 +1,99 @@ +using System; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Systems.Collections; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class WalkingCaneProjectile : BaseSpearProjectile + { + public override LocalizedText DisplayName => CalamityUtils.GetItemName(); + public static Asset AltTexture; + + private bool initialized = false; + + public override void SetStaticDefaults() + { + if (!Main.dedServ) + AltTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/WalkingCaneProjectileAlt"); + } + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 36; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.timeLeft = 120; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.ownerHitCheck = true; + Projectile.hide = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.alpha = 180; + Projectile.scale = 1.25f; + } + public override SpearType SpearAiType => SpearType.GhastlyGlaiveSpear; + public override float TravelSpeed => 12f; + + public override bool PreAI() + { + // Initialization. Using the AI hook would override the base spear's code, and we don't want that. + if (!initialized) + { + Main.player[Projectile.owner].Calamity().ConsumeStealthByAttacking(); + initialized = true; + } + return true; + } + + public override bool PreDraw(ref Color lightColor) + { + Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; + Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? AltTexture.Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); + + Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null, lightColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float spearLengthMult = 2.5f; + float velocityMagnitude = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), + Main.player[Projectile.owner].Center, Main.player[Projectile.owner].Center + Projectile.velocity * spearLengthMult, + (TravelSpeed + 1f) * Projectile.scale, ref velocityMagnitude)) + { + return true; + } + return false; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Projectile.Calamity().stealthStrike) + { + target.Calamity().caneInsanityTimer = 600; + } + else if (target.Calamity().caneInsanityTimer > 0) + { + Vector2 position = target.Center + Main.rand.NextVector2CircularEdge(100f, 100f); + Vector2 velocity = (target.Center - position).SafeNormalize(Vector2.Zero) * 6f; + float ai0 = Main.rand.NextBool() ? 300f : 0f; + float ai1 = Main.rand.NextBool() ? velocity.ToRotation() : 0f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, velocity, ProjectileID.InsanityShadowFriendly, Projectile.damage / 2, Projectile.knockBack, Projectile.owner, ai0, ai1); + } + } + } +} diff --git a/Projectiles/Rogue/WalkingCaneProjectile.png b/Projectiles/Rogue/WalkingCaneProjectile.png new file mode 100644 index 0000000000..f3c41400f5 Binary files /dev/null and b/Projectiles/Rogue/WalkingCaneProjectile.png differ diff --git a/Projectiles/Rogue/WalkingCaneProjectileAlt.png b/Projectiles/Rogue/WalkingCaneProjectileAlt.png new file mode 100644 index 0000000000..42856edc4c Binary files /dev/null and b/Projectiles/Rogue/WalkingCaneProjectileAlt.png differ diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index 6098ba21ff..480042173a 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Systems.Collections /// public static bool[] DisablesVeneratedLocketEffect = Factory.CreateNamedSet("DisablesVeneratedLocketEffect") .Description("Prevents this item from triggering Venerated Locket's clone projectiles.") - .RegisterBoolSet(ItemType(), ItemType(), ItemType()); + .RegisterBoolSet(ItemType(), ItemType(), ItemType()); /// /// If for an item type, this item is considered to be a magic gun.