diff --git a/Buffs/StatBuffs/TarraLifeRegen.png b/Buffs/StatBuffs/TarraLifeRegen.png index c4899950bb..a204331e7d 100644 Binary files a/Buffs/StatBuffs/TarraLifeRegen.png and b/Buffs/StatBuffs/TarraLifeRegen.png differ diff --git a/Items/SummonItems/NaiadsWarhorn.cs b/Items/SummonItems/NaiadsWarhorn.cs new file mode 100644 index 0000000000..a6f8ede7fb --- /dev/null +++ b/Items/SummonItems/NaiadsWarhorn.cs @@ -0,0 +1,74 @@ +using CalamityMod.Events; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Abyss; +using CalamityMod.NPCs.Leviathan; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.SummonItems +{ + public class NaiadsWarhorn : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.SummonItems"; + public static readonly SoundStyle HornSound = new("CalamityMod/Sounds/Item/LeviathanHornSound"); + public override void SetStaticDefaults() + { + ItemID.Sets.SortingPriorityBossSpawns[Type] = 12; // Truffle Worm + } + + public override void SetDefaults() + { + Item.width = 108; + Item.height = 68; + Item.rare = ItemRarityID.Lime; + Item.useAnimation = 30; + Item.useTime = 30; + Item.useStyle = ItemUseStyleID.Shoot; + Item.consumable = false; + } + + public override Vector2? HoldoutOffset() => new Vector2(5, 8); + + public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) + { + itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem; + } + + public override bool CanUseItem(Player player) + { + return player.ZoneBeach && !player.Calamity().ZoneSulphur && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; + } + + public override bool? UseItem(Player player) + { + int posX = (int)player.position.X; + int posY = (int)(player.position.Y - 700f); + int bossToSpawn = ModContent.NPCType(); + CalamityUtils.SpawnBossOnPosUsingItem(player, bossToSpawn, posX, posY, HornSound); + return true; + } + + // Makes it draw lower in the world so that it doesn't look weird with the cloth at the bottom + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D tex = ModContent.Request(Texture).Value; + spriteBatch.Draw(tex, Item.Center - Main.screenPosition + Vector2.UnitY * 20f, null, lightColor, rotation, tex.Size() / 2f, scale, 0, 0); + return false; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(30). + AddIngredient(15). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); + } + } +} diff --git a/Items/SummonItems/NaiadsWarhorn.png b/Items/SummonItems/NaiadsWarhorn.png new file mode 100644 index 0000000000..9eb845833b Binary files /dev/null and b/Items/SummonItems/NaiadsWarhorn.png differ diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index 1490126c7e..d4192e2eda 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = Item.height = 108; - Item.damage = 400; + Item.damage = 415; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = useTime; Item.useStyle = ItemUseStyleID.Swing; @@ -101,7 +101,7 @@ namespace CalamityMod.Items.Weapons.Melee } public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { - int beamDamage = player.CalcIntDamage(Item.damage); + int beamDamage = player.CalcIntDamage(Item.damage * 0.5f); Vector2 mouseClamped = player.ClampedMouseWorld(); for (int i = 0; i < 2; i++) { diff --git a/Items/Weapons/Rogue/CrushsawCrasher.cs b/Items/Weapons/Rogue/CrushsawCrasher.cs index 0f3435fa1c..eafe36747f 100644 --- a/Items/Weapons/Rogue/CrushsawCrasher.cs +++ b/Items/Weapons/Rogue/CrushsawCrasher.cs @@ -61,8 +61,8 @@ namespace CalamityMod.Items.Weapons.Rogue if (!HasHoveredOverNameInGFB) { HasHoveredOverNameInGFB = true; - string firstWord = this.GetLocalizedValue("GFBFirstWord" + Main.rand.Next(1, 12 + 1).ToString()); - string lastWord = this.GetLocalizedValue("GFBLastWord" + Main.rand.Next(1, 10 + 1).ToString()); + string firstWord = this.GetLocalizedValue("GFBFirstWord" + Main.rand.Next(1, 16 + 1).ToString()); + string lastWord = this.GetLocalizedValue("GFBLastWord" + Main.rand.Next(1, 13 + 1).ToString()); Item.SetNameOverride(firstWord + " " + lastWord); } } diff --git a/Items/Weapons/Rogue/UrchinStinger.cs b/Items/Weapons/Rogue/UrchinStinger.cs index 395ef3a5fd..a4fea72bfc 100644 --- a/Items/Weapons/Rogue/UrchinStinger.cs +++ b/Items/Weapons/Rogue/UrchinStinger.cs @@ -8,18 +8,13 @@ namespace CalamityMod.Items.Weapons.Rogue { public class UrchinStinger : RogueWeapon { - public override void SetStaticDefaults() - { - Item.ResearchUnlockCount = 99; - } - public override void SetDefaults() { Item.width = 10; Item.height = 26; - Item.damage = 15; + Item.damage = 9; Item.DamageType = RogueDamageClass.Instance; - Item.useAnimation = Item.useTime = 14; + Item.useAnimation = Item.useTime = 17; Item.knockBack = 1.5f; Item.noMelee = true; @@ -28,9 +23,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.consumable = true; - Item.maxStack = Item.CommonMaxStack; - Item.value = Item.sellPrice(silver: 2); + Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; @@ -38,10 +31,28 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - if (player.Calamity().StealthStrikeAvailable()) - Main.projectile[proj].Calamity().stealthStrike = true; - return false; + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(23f)) * 0.6f; + Vector2 newVel2 = velocity.RotatedByRandom(MathHelper.ToRadians(23f)) * 0.8f; + if (!player.Calamity().StealthStrikeAvailable()) + { + Projectile.NewProjectile(source, position, newVel, type, damage / 2, knockback, player.whoAmI); + Projectile.NewProjectile(source, position, newVel2, type, damage / 2, knockback, player.whoAmI); + } + + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + for (int i = 0; i < 3; i++) + { + newVel = velocity.RotatedByRandom(MathHelper.ToRadians(23f)); + int stealth = Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); + if (stealth.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[stealth].Calamity().stealthStrike = true; + } + } + return false; + } + return true; } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson index c3de3820df..ad00243c80 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson @@ -160,6 +160,17 @@ EyeofDesolation: { GFBInfo: Creates a square arena of blocks, with you at its center } +NaiadsWarhorn: { + DisplayName: Naiad's Warhorn + Tooltip: + ''' + Summons Anahita when used in the Ocean + Enrages outside the Ocean + {$Common.NotConsumable} + 'An instrument used by mermen to call upon Anahita. Its melody is oddly alluring.' + ''' +} + MarkofProvidence: { DisplayName: Mark of Providence Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 212689fcc1..e984558533 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -217,6 +217,10 @@ CrushsawCrasher: { GFBFirstWord10: Coleslaw GFBFirstWord11: Cashew GFBFirstWord12: Cawcaw + GFBFirstWord13: Crabshaw + GFBFirstWord14: Castle + GFBFirstWord15: Catshaw + GFBFirstWord16: Catspaw GFBLastWord1: Crasher GFBLastWord2: Crusher GFBLastWord3: Clasher @@ -227,6 +231,9 @@ CrushsawCrasher: { GFBLastWord8: Rasher GFBLastWord9: Cracker GFBLastWord10: Cackler + GFBLastWord11: Checker + GFBLastWord12: Clicker + GFBLastWord13: Catsher } Crystalline: { diff --git a/NPCs/NormalNPCs/WulfrumAmplifier.cs b/NPCs/NormalNPCs/WulfrumAmplifier.cs index 135d2d0b9c..80a086b0d8 100644 --- a/NPCs/NormalNPCs/WulfrumAmplifier.cs +++ b/NPCs/NormalNPCs/WulfrumAmplifier.cs @@ -7,6 +7,7 @@ using CalamityMod.Sounds; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.GameContent.Bestiary; using Terraria.ID; using Terraria.ModLoader; @@ -16,6 +17,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public class WulfrumAmplifier : ModNPC { + public static readonly SoundStyle Hit = new("CalamityMod/Sounds/NPCHit/WulfrumHit", 3); public bool Charging { get => NPC.ai[0] != 0f; @@ -54,7 +56,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.value = Item.buyPrice(0, 0, 1, 0); NPC.noGravity = false; NPC.noTileCollide = false; - NPC.HitSound = SoundID.NPCHit4; + NPC.HitSound = Hit; NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound; Banner = NPC.type; BannerItem = ModContent.ItemType(); diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index dda3185cc5..58beddcec3 100644 --- a/NPCs/NormalNPCs/WulfrumDrone.cs +++ b/NPCs/NormalNPCs/WulfrumDrone.cs @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.value = Item.buyPrice(0, 0, 0, 80); NPC.noGravity = true; NPC.noTileCollide = true; - NPC.HitSound = SoundID.NPCHit4; + NPC.HitSound = WulfrumAmplifier.Hit; NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound; Banner = NPC.type; BannerItem = ModContent.ItemType(); diff --git a/NPCs/NormalNPCs/WulfrumGyrator.cs b/NPCs/NormalNPCs/WulfrumGyrator.cs index 5ac2e3eceb..fec5270941 100644 --- a/NPCs/NormalNPCs/WulfrumGyrator.cs +++ b/NPCs/NormalNPCs/WulfrumGyrator.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.lifeMax = 23; NPC.knockBackResist = 0.15f; NPC.value = Item.buyPrice(0, 0, 0, 75); - NPC.HitSound = SoundID.NPCHit4; + NPC.HitSound = WulfrumAmplifier.Hit; NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound; Banner = NPC.type; BannerItem = ModContent.ItemType(); diff --git a/NPCs/NormalNPCs/WulfrumHovercraft.cs b/NPCs/NormalNPCs/WulfrumHovercraft.cs index d9233382d8..b278e299f7 100644 --- a/NPCs/NormalNPCs/WulfrumHovercraft.cs +++ b/NPCs/NormalNPCs/WulfrumHovercraft.cs @@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.defense = 4; NPC.lifeMax = 25; NPC.value = Item.buyPrice(0, 0, 1, 0); - NPC.HitSound = SoundID.NPCHit4; + NPC.HitSound = WulfrumAmplifier.Hit; NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound; NPC.noGravity = true; NPC.noTileCollide = true; diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index b8605d39e1..32f84de137 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.lifeMax = 40; NPC.knockBackResist = Main.zenithWorld ? 0f : 0.15f; NPC.value = Item.buyPrice(0, 0, 0, 75); - NPC.HitSound = SoundID.NPCHit4; + NPC.HitSound = WulfrumAmplifier.Hit; NPC.DeathSound = CommonCalamitySounds.WulfrumNPCDeathSound; Banner = NPC.type; BannerItem = ModContent.ItemType(); diff --git a/NPCs/SulphurousSea/AquaticUrchin.cs b/NPCs/SulphurousSea/AquaticUrchin.cs index be52ddff23..6d911aa579 100644 --- a/NPCs/SulphurousSea/AquaticUrchin.cs +++ b/NPCs/SulphurousSea/AquaticUrchin.cs @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.SulphurousSea public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(ModContent.ItemType(), 1, 30, 50); + npcLoot.Add(ModContent.ItemType(), 15); } public override void HitEffect(NPC.HitInfo hit) diff --git a/Projectiles/Melee/DevilsStrike.cs b/Projectiles/Melee/DevilsStrike.cs index 61328e0474..47d45183f0 100644 --- a/Projectiles/Melee/DevilsStrike.cs +++ b/Projectiles/Melee/DevilsStrike.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee } if (time % 6 == 0) { - GeneralParticleHandler.SpawnParticle(new CustomSpark(Projectile.Center, Projectile.velocity * 0.1f, "CalamityMod/Particles/BloomCircle", false, 20, Main.rand.NextFloat(0.05f, 0.055f) * deathLerp * Projectile.ai[0], (Main.rand.NextBool() ? Color.MediumOrchid : clr) * 0.7f, new Vector2(0.8f, 1), shrinkSpeed: 0.2f)); + GeneralParticleHandler.SpawnParticle(new CustomSpark(Projectile.Center, Projectile.velocity * 0.1f, "CalamityMod/Particles/BloomCircle", false, 20, Main.rand.NextFloat(0.05f, 0.055f) * deathLerp * Projectile.ai[0], (Main.rand.NextBool() ? Color.MediumOrchid : clr) * (CalamityClientConfig.Instance.Photosensitivity ? 0.25f : 0.7f), new Vector2(0.8f, 1), shrinkSpeed: 0.2f)); } if (angleTimer % 60 == 0 && Projectile.ai[0] > 0.7f) { diff --git a/Projectiles/Summon/LuxorsGiftSummon.cs b/Projectiles/Summon/LuxorsGiftSummon.cs index e6a4a36e32..3ad6878f52 100644 --- a/Projectiles/Summon/LuxorsGiftSummon.cs +++ b/Projectiles/Summon/LuxorsGiftSummon.cs @@ -92,6 +92,8 @@ namespace CalamityMod.Projectiles.Summon public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { modifiers.DisableCrit(); + if (!Collision.CanHit(Projectile, Main.player[Projectile.owner])) + modifiers.SourceDamage *= 0.75f; // Minion deals 75% damage if it doesn't have line of sight with its owner } public override Color? GetAlpha(Color lightColor) diff --git a/Sounds/Item/LeviathanHornSound.ogg b/Sounds/Item/LeviathanHornSound.ogg new file mode 100644 index 0000000000..719077cb3e Binary files /dev/null and b/Sounds/Item/LeviathanHornSound.ogg differ diff --git a/Sounds/NPCHit/WulfrumHit1.wav b/Sounds/NPCHit/WulfrumHit1.wav new file mode 100644 index 0000000000..a07f2b7194 Binary files /dev/null and b/Sounds/NPCHit/WulfrumHit1.wav differ diff --git a/Sounds/NPCHit/WulfrumHit2.wav b/Sounds/NPCHit/WulfrumHit2.wav new file mode 100644 index 0000000000..1ba1f11026 Binary files /dev/null and b/Sounds/NPCHit/WulfrumHit2.wav differ diff --git a/Sounds/NPCHit/WulfrumHit3.wav b/Sounds/NPCHit/WulfrumHit3.wav new file mode 100644 index 0000000000..782a47fb54 Binary files /dev/null and b/Sounds/NPCHit/WulfrumHit3.wav differ