diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 75ddc0033c..2bbb8073fa 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2771,7 +2771,7 @@ namespace CalamityMod.CalPlayer if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != Player.oldVelocity.Y) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued) { gSabatonHotkeyHoldTime++; - if (gSabatonHotkeyHoldTime < 60 && gSabatonHotkeyHoldTime % 3f == 0) + if (gSabatonHotkeyHoldTime < 30 && gSabatonHotkeyHoldTime % 3f == 0) { SpawnGravistarParticle(); } @@ -3475,58 +3475,65 @@ namespace CalamityMod.CalPlayer { Player.AddBuff(ModContent.BuffType(), 60, true); } - if (gSabaton && Player.whoAmI == Main.myPlayer) + if (gSabaton) { - //While holding hotkey, but before slam, bring Y velocity closer to 0 - if (gSabatonHotkeyHoldTime < 60 && gSabatonHotkeyHoldTime != 0 && !gSabatonFalling) + if (Player.whoAmI == Main.myPlayer) { - Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime / 4f)) / 60f; - } - //Play sound a bit early so it goes in time with the fall - if (gSabatonHotkeyHoldTime == 45 && !gSabatonFalling) - { - SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/GravistarCharge") { Volume = 0.3f }); - } - //1 second passed, falling time - if (gSabatonHotkeyHoldTime == 60) - { - gSabatonFalling = true; - } - //Cancel fall and don't give 'on ground' effects if on rope, on mount, grappled, or tongued - if (Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued) - { - gSabatonFall = 0; - gSabatonFalling = false; - } - if (gSabatonFalling) - { - SpawnGravistarParticle(); - - //Cap time converted to damage at 2 seconds - if (gSabatonFall < 120) - gSabatonFall++; - - Player.maxFallSpeed = 40f; - Player.gravity = 1.3f; - //If the player can fly during the fall, the physics gets a bit funky - Player.controlJump = false; - - //Check if player hit some form of solid resistance (the ground) - if (Player.oldVelocity.Y == Player.velocity.Y) + //While holding hotkey, but before slam, bring Y velocity closer to 0 + if (gSabatonHotkeyHoldTime < 30 && gSabatonHotkeyHoldTime != 0 && !gSabatonFalling) + { + Player.velocity.Y *= (60 - (gSabatonHotkeyHoldTime / 2f)) / 60f; + } + //Play sound a bit early so it goes in time with the fall + if (gSabatonHotkeyHoldTime == 15 && !gSabatonFalling) + { + SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/GravistarCharge") { Volume = 0.3f }); + } + // 0.5 seconds passed, falling time + if (gSabatonHotkeyHoldTime == 30) + { + gSabatonFalling = true; + } + //Cancel fall and don't give 'on ground' effects if on rope, on mount, grappled, or tongued + if (Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued) { - var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); - //Spawn explosion. ai[0] is used for transferring the recorded falling time - - int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage(GravistarSabaton.SlamDamage)); - - Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 4f, Player.whoAmI, gSabatonFall); gSabatonFall = 0; gSabatonFalling = false; - //Temporary jump speed is granted for 40 frames - gSabatonTempJumpSpeed = 40; + } + if (gSabatonFalling) + { + SpawnGravistarParticle(); + + //Cap time converted to damage at 2 seconds + if (gSabatonFall < 120) + gSabatonFall++; + + Player.maxFallSpeed = 40f; + Player.gravity = 1.3f; + //If the player can fly during the fall, the physics gets a bit funky + Player.controlJump = false; + + //Check if player hit some form of solid resistance (the ground) + if (Player.oldVelocity.Y == Player.velocity.Y) + { + var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); + //Spawn explosion. ai[0] is used for transferring the recorded falling time + + int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage(InterstellarStompers.SlamDamage)); + + Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 4f, Player.whoAmI, gSabatonFall); + gSabatonFall = 0; + gSabatonFalling = false; + //Temporary jump speed is granted for 40 frames + gSabatonTempJumpSpeed = 40; + } } } - + } + else // Reset slam effect if the accessory is unequipped + { + gSabatonFall = 0; + gSabatonFalling = false; } } #endregion diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index fddbf4e15d..cf7314b1e8 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1558,14 +1558,14 @@ namespace CalamityMod.CalPlayer Rectangle npcHitbox = n.getRect(); if ((Player.getRect()).Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height))) { - int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage(GravistarSabaton.PassthroughDamage)); + int damage = Player.ApplyArmorAccDamageBonusesTo(Player.CalcIntDamage(InterstellarStompers.PassthroughDamage)); Projectile.NewProjectile(Player.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0, Main.myPlayer); // 17APR2024: Ozzatron: Gravistar Sabaton gives iframes when passing through enemies for projectile safety. // This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace. n.Calamity().dashImmunityTime[Player.whoAmI] = 4; - Player.GiveUniversalIFrames(GravistarSabaton.PassthroughIFrames, false); + Player.GiveUniversalIFrames(InterstellarStompers.PassthroughIFrames, false); return true; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 0e083e7e7b..afad3a11f3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -691,18 +691,8 @@ namespace CalamityMod.CalPlayer SoundEngine.PlaySound(explode with { Pitch = 0.8f }, touchedTile.ToWorldCoordinates()); GenericSparkle sparker = new GenericSparkle(touchedTile.ToWorldCoordinates(), Vector2.Zero, Color.Goldenrod, Color.Gold, 2.5f, 9, Main.rand.NextFloat(-0.01f, 0.01f), 2.68f); GeneralParticleHandler.SpawnParticle(sparker); - //GeneralScreenShakePower = 200; Player.RemoveAllIFrames(); Projectile.NewProjectile(new EntitySource_TileInteraction(Player, touchedTile.X, touchedTile.Y), touchedTile.ToWorldCoordinates(), Vector2.Zero, ModContent.ProjectileType(), 40000, 0f); - //for (int i = 0; i < 3; i++) - { - /* int p = Projectile.NewProjectile(new EntitySource_TileInteraction(Player, touchedTile.X, touchedTile.Y), touchedTile.ToWorldCoordinates(), Vector2.Zero, ModContent.ProjectileType(), 0, 0f); - Projectile explosion = Main.projectile[p]; - explosion.ai[1] = 560f + 90f; - explosion.localAI[1] = 0.25f; - explosion.Opacity = MathHelper.Lerp(0.18f, 0.6f, 0.2f) + Main.rand.NextFloat(-0.08f, 0.08f); - explosion.netUpdate = true;*/ - } WorldGen.KillTile(touchedTile.X, touchedTile.Y, noItem: true); } } diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index c8dae6d018..2c192904f9 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1095,7 +1095,7 @@ namespace CalamityMod.CalPlayer int damage = (int)Player.GetTotalDamage().ApplyTo(40); damage = Player.ApplyArmorAccDamageBonusesTo(damage); - Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), damage, proj.knockBack, proj.owner, 1f, 0f); + Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), damage, proj.knockBack, proj.owner, 1f, 0f); SoundEngine.PlaySound(SoundID.Item14, proj.Center); for (int dustexplode = 0; dustexplode < 360; dustexplode++) { diff --git a/Items/Accessories/GravistarSabaton.cs b/Items/Accessories/InterstellarStompers.cs similarity index 87% rename from Items/Accessories/GravistarSabaton.cs rename to Items/Accessories/InterstellarStompers.cs index 93913e2744..992c2d701c 100644 --- a/Items/Accessories/GravistarSabaton.cs +++ b/Items/Accessories/InterstellarStompers.cs @@ -5,7 +5,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class GravistarSabaton : ModItem, ILocalizedModType + [LegacyName("GravistarSabaton")] + public class InterstellarStompers : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; @@ -27,6 +28,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.noFallDmg = true; + player.moveSpeed += 0.06f; player.jumpSpeedBoost += 1f; player.Calamity().gSabaton = true; } diff --git a/Items/Accessories/GravistarSabaton.png b/Items/Accessories/InterstellarStompers.png similarity index 100% rename from Items/Accessories/GravistarSabaton.png rename to Items/Accessories/InterstellarStompers.png diff --git a/Items/TreasureBags/AstrumAureusBag.cs b/Items/TreasureBags/AstrumAureusBag.cs index b94f45c744..0b3d7925d6 100644 --- a/Items/TreasureBags/AstrumAureusBag.cs +++ b/Items/TreasureBags/AstrumAureusBag.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment itemLoot.Add(ModContent.ItemType()); - itemLoot.Add(ModContent.ItemType()); + itemLoot.Add(ModContent.ItemType()); itemLoot.AddRevBagAccessories(); // Vanity diff --git a/Items/Weapons/Melee/StellarStriker.cs b/Items/Weapons/Melee/StellarStriker.cs index 6e2e7945b2..49569015ed 100644 --- a/Items/Weapons/Melee/StellarStriker.cs +++ b/Items/Weapons/Melee/StellarStriker.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - Item.width = 90; - Item.height = 100; + Item.width = 100; + Item.height = 118; Item.damage = 450; Item.DamageType = DamageClass.Melee; Item.useAnimation = 25; diff --git a/Items/Weapons/Melee/StellarStriker.png b/Items/Weapons/Melee/StellarStriker.png index f8932765d9..766388eebb 100644 Binary files a/Items/Weapons/Melee/StellarStriker.png and b/Items/Weapons/Melee/StellarStriker.png differ diff --git a/Items/Weapons/Melee/Terratomere.cs b/Items/Weapons/Melee/Terratomere.cs index 2d5ad1044c..55e29d8ac4 100644 --- a/Items/Weapons/Melee/Terratomere.cs +++ b/Items/Weapons/Melee/Terratomere.cs @@ -60,8 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.TerraBlade). - AddIngredient(). - AddIngredient(). + AddIngredient(9). AddIngredient(7). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Weapons/Ranged/TheSevensStriker.cs b/Items/Weapons/Ranged/TheSevensStriker.cs index 236639769c..8c404d042e 100644 --- a/Items/Weapons/Ranged/TheSevensStriker.cs +++ b/Items/Weapons/Ranged/TheSevensStriker.cs @@ -17,9 +17,11 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle RouletteSound = new("CalamityMod/Sounds/Item/SevensStrikerRoulette") { Volume = 0.6f, SoundLimitBehavior = SoundLimitBehavior.ReplaceOldest }; public static readonly SoundStyle RouletteTickSound = new("CalamityMod/Sounds/Item/SevensStrikerRouletteTick") { Volume = 0.5f }; public static readonly SoundStyle BustSound = new("CalamityMod/Sounds/Item/SevensStrikerBust"); + public static readonly SoundStyle BustGFB = new("CalamityMod/Sounds/Item/SevensStrikerBustGFB"); public static readonly SoundStyle DoublesSound = new("CalamityMod/Sounds/Item/SevensStrikerDoubles"); public static readonly SoundStyle TriplesSound = new("CalamityMod/Sounds/Item/SevensStrikerTriples"); public static readonly SoundStyle JackpotSound = new("CalamityMod/Sounds/Item/SevensStrikerJackpot"); + public static readonly SoundStyle JackpotGFB = new("CalamityMod/Sounds/Item/SevensStrikerJackpotGFB"); public static readonly SoundStyle CoinSound = new("CalamityMod/Sounds/Item/SevensStrikerCoinShot") { MaxInstances = 0, PitchVariance = 0.5f }; public static int ShotCoin = 0; // projectile ID to use for right click, affects damage multiplier @@ -31,7 +33,8 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly float TriplesCherryMultiplier = 1f; public static readonly float TriplesCherrySplitMultiplier = 0.333f; public static readonly float TriplesGrapeMultiplier = 0.333f; // fixed the grapes interfering with each other's iframes - public static readonly float JackpotMultiplier = 0.5f; // Jackpot fires 49 shots total and thus needs to be reduced somehow + public static readonly float JackpotMultiplier = 0.5f; // Jackpot fires 49 shots total and thus needs to be reduced somehow... + public static readonly float JackpotMultiplierGFB = 7f; // ...Unless you simply cannot stop winning public override void SetStaticDefaults() { diff --git a/Items/Weapons/Rogue/Crystalline.cs b/Items/Weapons/Rogue/Crystalline.cs index 41d9c078e2..c7de2c3c34 100644 --- a/Items/Weapons/Rogue/Crystalline.cs +++ b/Items/Weapons/Rogue/Crystalline.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Items.Weapons.Rogue { public override void SetDefaults() { - Item.width = 48; - Item.height = 48; + Item.width = 50; + Item.height = 50; Item.damage = 16; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/Crystalline.png b/Items/Weapons/Rogue/Crystalline.png index 14a0bd0c4b..f4fe70d74e 100644 Binary files a/Items/Weapons/Rogue/Crystalline.png and b/Items/Weapons/Rogue/Crystalline.png differ diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 4fda6ed14d..6ad0a5f551 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -877,20 +877,6 @@ GrandGelatin: { ''' } -GravistarSabaton: { - DisplayName: Gravistar Sabaton - Tooltip: - ''' - 20% increased jump speed and negates fall damage - Hold DOWN to increase your maximum fall speed - Hold [KEY] for 1 second while midair to charge up a superspeed slam - While falling, you ram through enemies and don't take contact damage - Once you hit the ground, you create an explosion at your feet - The explosion scales in both damage and size the longer you slam for - Temporary 40% increased jump speed after slamming into the ground - ''' -} - HallowedRune: { DisplayName: Hallowed Rune Tooltip: @@ -981,6 +967,20 @@ InkBomb: { ''' } +InterstellarStompers: { + DisplayName: Interstellar Stompers + Tooltip: + ''' + 6% increased movement speed, 20% increased jump speed, and negates fall damage + Hold DOWN to increase your maximum fall speed + Hold [KEY] for 0.5 seconds while midair to charge up a superspeed slam + While falling, you ram through enemies and don't take contact damage + Once you hit the ground, you create an explosion at your feet + The explosion scales in both damage and size the longer you slam for + Temporary 40% increased jump speed after slamming into the ground + ''' +} + IronBoots: { DisplayName: Iron Boots Tooltip: Allows you to sink faster through liquids diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 54849a57f6..259341d807 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -100,8 +100,6 @@ ReaverOrb.DisplayName: Reaver Orb ReaverThornBase.DisplayName: Thorn RedLabSeeker.DisplayName: Seeking Mechanism RiftReelerBobber.DisplayName: Chaotic Bobber -SabatonBoom.DisplayName: Sabaton Boom -SabatonSlam.DisplayName: Sabaton Slam SandCloakVeil.DisplayName: Dust Veil SandExplosion.DisplayName: Sand Seashell.DisplayName: Seashell @@ -116,12 +114,14 @@ SpiritOriginBullseye.DisplayName: Spirit Origin Bullseye StandingFire.DisplayName: Flame StarStruckWaterBottle.DisplayName: Bottle StickyFeatherAero.DisplayName: Feather +StomperSlam.DisplayName: Stomper Slam SuicideBomberDemon.DisplayName: Demon SulphuricAcidBubbleFriendly.DisplayName: Acid Bubble SulphurousSandBallGun.DisplayName: Sulphurous Sand TarraEnergy.DisplayName: Tarra Energy TarragonAura.DisplayName: Tarragon Aura TeslaAura.DisplayName: Tesla's Electricity +TitanHeartBoom.DisplayName: Titan Heart Boom VerstaltiteBobber.DisplayName: Verstaltite Bobber VoidFieldGenerator.DisplayName: Void Field Generator WaterConvertor.DisplayName: Water Convertor diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 976dfca1e7..9cb628306b 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -399,7 +399,7 @@ namespace CalamityMod.NPCs.AstrumAureus normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt); // Equipment - normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); + normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); // Other normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 9, 12)); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e0dd97dee1..fad87e4254 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5318,11 +5318,12 @@ namespace CalamityMod.NPCs npc.velocity *= 0.9f; } - // Auric Ore/Repulsers reject Town NPCs and dummies + // Auric Ore/Repulsers reject Town NPCs and dummies (Auric Land Mines work on them too) if ((NPCID.Sets.ActsLikeTownNPC[npc.type] || npc.townNPC) && !npc.dontTakeDamage || npc.type == NPCType()) { int auricOreID = TileType(); int auricRepulserID = TileType(); + int auricLandMineID = TileType(); // Get a list of tiles near the npc // This is just Collision.GetEntityTiles but with a larger detection square because the sheer speed from auric boosts causes the detection to fail at higher speeds @@ -5372,6 +5373,18 @@ namespace CalamityMod.NPCs Tile tile = Framing.GetTileSafely(touchedTile); if (!tile.HasTile || !tile.HasUnactuatedTile) continue; + + if (tile.TileType == auricLandMineID) + { + SoundStyle explode = new("CalamityMod/Sounds/Item/DudFire"); + SoundEngine.PlaySound(explode with { Pitch = 0.8f }, touchedTile.ToWorldCoordinates()); + GenericSparkle sparker = new GenericSparkle(touchedTile.ToWorldCoordinates(), Vector2.Zero, Color.Goldenrod, Color.Gold, 2.5f, 9, Main.rand.NextFloat(-0.01f, 0.01f), 2.68f); + GeneralParticleHandler.SpawnParticle(sparker); + Projectile.NewProjectile(new EntitySource_TileInteraction(npc, touchedTile.X, touchedTile.Y), touchedTile.ToWorldCoordinates(), Vector2.Zero, ModContent.ProjectileType(), 40000, 0f); + WorldGen.KillTile(touchedTile.X, touchedTile.Y, noItem: true); + continue; + } + if (tile.TileType != auricOreID && tile.TileType != auricRepulserID) continue; diff --git a/Projectiles/Ranged/SevensStrikerHoldout.cs b/Projectiles/Ranged/SevensStrikerHoldout.cs index 47b6b88a0f..8d25d50b28 100644 --- a/Projectiles/Ranged/SevensStrikerHoldout.cs +++ b/Projectiles/Ranged/SevensStrikerHoldout.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.Ranged public int soundtimer = 0; // Counts how long the slot machine has been spinning + the cooldown public SlotId RouletteSoundSlot; + public SlotId JingleSoundSlot; public override void SetStaticDefaults() { @@ -134,18 +135,18 @@ namespace CalamityMod.Projectiles.Ranged // Play a sound and display the jackpot text if (shottimer == 1) { - SoundEngine.PlaySound(TheSevensStriker.JackpotSound, Projectile.Center); + JingleSoundSlot = SoundEngine.PlaySound(Main.zenithWorld ? TheSevensStriker.JackpotGFB : TheSevensStriker.JackpotSound, player.Center); CombatText.NewText(player.getRect(), Color.Gold, CalamityUtils.GetTextValue("Misc.SevensJackpot"), true); } // Every 7 frames, shoot 7 coins. The first 7 frames are excluded for timing purposes - if (shottimer % 7 == 0 && shottimer > 7) + if (shottimer % 7 == 0 && shottimer > 7 && shottimer <= 56) { - int jackpotDamage = (int)(weaponDamage * TheSevensStriker.JackpotMultiplier); + int jackpotDamage = (int)(weaponDamage * (Main.zenithWorld ? TheSevensStriker.JackpotMultiplierGFB : TheSevensStriker.JackpotMultiplier)); Shoot(7, ModContent.ProjectileType(), jackpotDamage, weaponKnockback, (int)scaleFactor * 2f, 0.2f); SoundEngine.PlaySound(TheSevensStriker.CoinSound, Projectile.Center); } // After 7 waves have been shot, reset the gun and roll again - if (shottimer > 56) + if (shottimer > (Main.zenithWorld ? 88 : 56)) { soundtimer = 0; rolling = true; @@ -166,14 +167,14 @@ namespace CalamityMod.Projectiles.Ranged case 1: Shoot(1, ModContent.ProjectileType(), weaponDamage, 0, 2f, 0); CombatText.NewText(player.getRect(), Color.Gray, CalamityUtils.GetTextValue("Misc.SevensBust"), true); - SoundEngine.PlaySound(TheSevensStriker.BustSound, Projectile.Center); + JingleSoundSlot = SoundEngine.PlaySound(Main.zenithWorld ? TheSevensStriker.BustGFB : TheSevensStriker.BustSound, player.Center); break; // 7 exploding oranges with 100% damage case 2: int doublesDamage = (int)(weaponDamage * TheSevensStriker.DoublesMultiplier); Shoot(7, ModContent.ProjectileType(), doublesDamage, weaponKnockback, 2f, 0.1f); CombatText.NewText(player.getRect(), Color.Orange, CalamityUtils.GetTextValue("Misc.SevensDoubles"), true); - SoundEngine.PlaySound(TheSevensStriker.DoublesSound, Projectile.Center); + JingleSoundSlot = SoundEngine.PlaySound(TheSevensStriker.DoublesSound, player.Center); break; // 7 piercing grapes with X% damage // Also fires 7 splitting cherries in a tighter spread with Y% damage @@ -183,13 +184,13 @@ namespace CalamityMod.Projectiles.Ranged Shoot(7, ModContent.ProjectileType(), cherryDamage, weaponKnockback, 1.5f, 0.1f); Shoot(7, ModContent.ProjectileType(), grapeDamage, weaponKnockback, 2f, 0.2f); CombatText.NewText(player.getRect(), Color.Red, CalamityUtils.GetTextValue("Misc.SevensTriples"), true); - SoundEngine.PlaySound(TheSevensStriker.TriplesSound, Projectile.Center); + JingleSoundSlot = SoundEngine.PlaySound(TheSevensStriker.TriplesSound, player.Center); break; } } // Reset the gun and roll again - if (shottimer > 16) + if (shottimer > (Main.zenithWorld ? 56 : 16)) { soundtimer = 0; rolling = true; @@ -198,9 +199,12 @@ namespace CalamityMod.Projectiles.Ranged } } } - // Update the roll sound position + // Update the roll and jingle sound positions, if applicable if (SoundEngine.TryGetActiveSound(RouletteSoundSlot, out var rouletteSound) && rouletteSound.IsPlaying) rouletteSound.Position = Projectile.Center; + + if (SoundEngine.TryGetActiveSound(JingleSoundSlot, out var jingle) && jingle.IsPlaying) + jingle.Position = player.Center; } // If the player can't use the gun, KILL it else @@ -237,62 +241,73 @@ namespace CalamityMod.Projectiles.Ranged // Calculates which attack will occur based on coin. public int CalculateOutcome() { - switch (Projectile.ai[0]) + if (Main.zenithWorld) { - // Copper Coins have: - // 50% chance for a brick - // 30% chance for oranges - // 15% chance for grapes and cherries - // 5% chance for a jackpot - case ProjectileID.CopperCoin: - { - int roll = Main.rand.Next(100); - if (roll <= 50) - return 1; - else if (roll > 50 && roll <= 80) - return 2; - else if (roll > 80 && roll <= 95) - return 3; - else - return 4; - } - // Silver Coins have: - // 20% chance for a brick - // 50% chance for oranges - // 20% chance for grapes and cherries - // 10% chance for a jackpot - case ProjectileID.SilverCoin: - { - int roll = Main.rand.Next(100); - if (roll <= 20) - return 1; - else if (roll > 20 && roll <= 70) - return 2; - else if (roll > 70 && roll <= 90) - return 3; - else - return 4; - } - // Gold Coins have: - // 5% chance for a brick - // 30% chance for oranges - // 50% chance for grapes and cherries - // 15% chance for a jackpot - case ProjectileID.GoldCoin: - { - int roll = Main.rand.Next(100); - if (roll <= 5) - return 1; - else if (roll > 5 && roll <= 35) - return 2; - else if (roll > 35 && roll <= 85) - return 3; - else - return 4; - } - // Platinum Coins are a guaranteed jackpot - case ProjectileID.PlatinumCoin: + int roll = Main.rand.Next(100); + if (roll < 20) return 4; + else + return 1; + } + else + { + switch (Projectile.ai[0]) + { + // Copper Coins have: + // 50% chance for a brick + // 30% chance for oranges + // 15% chance for grapes and cherries + // 5% chance for a jackpot + case ProjectileID.CopperCoin: + { + int roll = Main.rand.Next(100); + if (roll <= 50) + return 1; + else if (roll > 50 && roll <= 80) + return 2; + else if (roll > 80 && roll <= 95) + return 3; + else + return 4; + } + // Silver Coins have: + // 20% chance for a brick + // 50% chance for oranges + // 20% chance for grapes and cherries + // 10% chance for a jackpot + case ProjectileID.SilverCoin: + { + int roll = Main.rand.Next(100); + if (roll <= 20) + return 1; + else if (roll > 20 && roll <= 70) + return 2; + else if (roll > 70 && roll <= 90) + return 3; + else + return 4; + } + // Gold Coins have: + // 5% chance for a brick + // 30% chance for oranges + // 50% chance for grapes and cherries + // 15% chance for a jackpot + case ProjectileID.GoldCoin: + { + int roll = Main.rand.Next(100); + if (roll <= 5) + return 1; + else if (roll > 5 && roll <= 35) + return 2; + else if (roll > 35 && roll <= 85) + return 3; + else + return 4; + } + // Platinum Coins are a guaranteed jackpot + case ProjectileID.PlatinumCoin: + return 4; + } } // This should never be returned return 1; @@ -336,12 +351,15 @@ namespace CalamityMod.Projectiles.Ranged return false; } - // When the gun disappears, stop any in-progress slots sounds and set a cooldown of 12 frames. + // When the gun disappears, stop any in-progress slot or jingle sounds and set a cooldown of 12 frames. public override void OnKill(int timeLeft) { if (SoundEngine.TryGetActiveSound(RouletteSoundSlot, out var dringdring)) dringdring.Stop(); + if (SoundEngine.TryGetActiveSound(JingleSoundSlot, out var jingle)) + jingle.Stop(); + Main.player[Projectile.owner].SetDummyItemTime(12); } diff --git a/Projectiles/Rogue/Crystalline2.cs b/Projectiles/Rogue/Crystalline2.cs index b01506837b..f14f4858d9 100644 --- a/Projectiles/Rogue/Crystalline2.cs +++ b/Projectiles/Rogue/Crystalline2.cs @@ -12,8 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 20; Projectile.friendly = true; Projectile.penetrate = 1; //Projectile.aiStyle = ProjAIStyleID.StickProjectile; diff --git a/Projectiles/Rogue/CrystallineProj.cs b/Projectiles/Rogue/CrystallineProj.cs index fff8a5a9d5..7ff1767715 100644 --- a/Projectiles/Rogue/CrystallineProj.cs +++ b/Projectiles/Rogue/CrystallineProj.cs @@ -13,8 +13,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 20; Projectile.friendly = true; Projectile.penetrate = 1; Projectile.aiStyle = ProjAIStyleID.StickProjectile; diff --git a/Projectiles/Typeless/SabatonSlam.cs b/Projectiles/Typeless/StomperSlam.cs similarity index 96% rename from Projectiles/Typeless/SabatonSlam.cs rename to Projectiles/Typeless/StomperSlam.cs index 8abe1134e2..53cc78a957 100644 --- a/Projectiles/Typeless/SabatonSlam.cs +++ b/Projectiles/Typeless/StomperSlam.cs @@ -11,7 +11,7 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { - public class SabatonSlam : ModProjectile, ILocalizedModType + public class StomperSlam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Typeless"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Typeless } if (Projectile.localAI[0] == 0) { - scaleFromFall = (Projectile.ai[0] / 22) + 0.5f; + scaleFromFall = (Projectile.ai[0] / 20) + 0.5f; damageScaleFromFall = Projectile.ai[0] / 40; Projectile.damage = (int)(300f * damageScaleFromFall + 300f); diff --git a/Projectiles/Typeless/SabatonBoom.cs b/Projectiles/Typeless/TitanHeartBoom.cs similarity index 95% rename from Projectiles/Typeless/SabatonBoom.cs rename to Projectiles/Typeless/TitanHeartBoom.cs index 4a7a7d32bb..06a5e3623a 100644 --- a/Projectiles/Typeless/SabatonBoom.cs +++ b/Projectiles/Typeless/TitanHeartBoom.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { - public class SabatonBoom : ModProjectile, ILocalizedModType + public class TitanHeartBoom : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Typeless"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Sounds/Item/SevensStrikerBustGFB.ogg b/Sounds/Item/SevensStrikerBustGFB.ogg new file mode 100644 index 0000000000..b7b48240ea Binary files /dev/null and b/Sounds/Item/SevensStrikerBustGFB.ogg differ diff --git a/Sounds/Item/SevensStrikerJackpotGFB.ogg b/Sounds/Item/SevensStrikerJackpotGFB.ogg new file mode 100644 index 0000000000..1393f65a70 Binary files /dev/null and b/Sounds/Item/SevensStrikerJackpotGFB.ogg differ