diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index d526037595..516075adcf 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2220,12 +2220,13 @@ namespace CalamityMod.CalPlayer } } - if (fleshTotem && hurtInfo.Damage > 0) + if (fleshTotem && hurtInfo.Damage > 0 && fleshTotemManaStorage > 0) { SoundStyle Counter = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Shield_Down"); if (fleshTotemManaStorage >= 100 && fleshTotemVisual) SoundEngine.PlaySound(Counter with { Volume = 0.75f}, Player.Center); - int lostSoulAmount = fleshTotemManaStorage / 25; + int lostSoulAmount = (fleshTotemManaStorage / 2) / 25; + int lostSoulDamage = (int)Player.GetTotalDamage().ApplyTo(FleshTotem.lostSoulDamage); if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) { for (int i = 0; i < Main.maxProjectiles; i++) @@ -2235,13 +2236,13 @@ namespace CalamityMod.CalPlayer { for (int k = 0; k < lostSoulAmount; k++) { - Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); + Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); } break; } } } - fleshTotemManaStorage = 0; + fleshTotemManaStorage = fleshTotemManaStorage / 2; } // By setting brainOfConfusionItem, these accessories have this code already, diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4eeef63f01..c11c8b3a75 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -4139,9 +4139,9 @@ namespace CalamityMod.CalPlayer Player.lavaImmune = true; Player.fireWalk = true; Player.buffImmune[ModContent.BuffType()] = true; + Player.buffImmune[ModContent.BuffType()] = true; Player.buffImmune[BuffID.OnFire] = true; Player.buffImmune[BuffID.Burning] = true; - Player.buffImmune[BuffID.Daybreak] = true; if (Player.wingTimeMax > 0) Player.wingTimeMax = (int)(Player.wingTimeMax * 1.1D); diff --git a/Items/Armor/Demonshade/DemonshadeGreaves.cs b/Items/Armor/Demonshade/DemonshadeGreaves.cs index 153c39dc9d..4d63a9c4e0 100644 --- a/Items/Armor/Demonshade/DemonshadeGreaves.cs +++ b/Items/Armor/Demonshade/DemonshadeGreaves.cs @@ -4,6 +4,10 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.Localization; using Terraria.ModLoader; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ModLoader.IO; namespace CalamityMod.Items.Armor.Demonshade { @@ -28,10 +32,47 @@ namespace CalamityMod.Items.Armor.Demonshade Item.Calamity().devItem = true; } + #region Toggleable Acceleration effect + + bool toggleEnabled = true; + + public override bool CanRightClick() => Main.keyState.PressingShift(); + public override void RightClick(Player player) + { + toggleEnabled = !toggleEnabled; + Item.NetStateChanged(); + } + public override bool ConsumeItem(Player player) => false; + public override void SaveData(TagCompound tag) + { + tag.Add("toggleEffect", toggleEnabled); + } + + public override void LoadData(TagCompound tag) + { + toggleEnabled = tag.GetBool("toggleEffect"); + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write(toggleEnabled); + } + + public override void NetReceive(BinaryReader reader) + { + toggleEnabled = reader.ReadBoolean(); + } + + public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled); + } + #endregion + public override void UpdateEquip(Player player) { var modPlayer = player.Calamity(); - modPlayer.shadowSpeed = true; + modPlayer.shadowSpeed = toggleEnabled; player.moveSpeed += MoveSpeedBoost; } diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 341e60f662..a1c210079a 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/YharonEgg.cs b/Items/SummonItems/YharonEgg.cs index f5b1b48745..9e5f3d5bf6 100644 --- a/Items/SummonItems/YharonEgg.cs +++ b/Items/SummonItems/YharonEgg.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs index ea6a5d12a4..bd5de5f274 100644 --- a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs +++ b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public static int ArmorPenetration = 15; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration); + public override void SetStaticDefaults() => ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f; + public override void SetDefaults() { CalamityGlobalItem modItem = Item.Calamity(); diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 71bccf18c8..4d37a1313d 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 66e42a42cc..ef8f145ad3 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Systems.Collections; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; @@ -15,6 +15,10 @@ namespace CalamityMod.Items.Weapons.Ranged public static int AmmoSavedPercent = 25; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); + public override void SetStaticDefaults() + { + CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [BuffID.Slimed]; + } public override void SetDefaults() { Item.width = 42; diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index 1f8298046b..1a59bd8fbf 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -58,7 +58,6 @@ namespace CalamityMod.Items.Weapons.Rogue CreateRecipe(). AddIngredient(). AddIngredient(6). - AddIngredient(40). AddIngredient(ItemID.Ectoplasm, 5). AddTile(TileID.MythrilAnvil). Register(); diff --git a/Items/Weapons/Summon/FrostBlossomStaff.cs b/Items/Weapons/Summon/FrostBlossomStaff.cs index 798bceb466..38a48495d1 100644 --- a/Items/Weapons/Summon/FrostBlossomStaff.cs +++ b/Items/Weapons/Summon/FrostBlossomStaff.cs @@ -12,10 +12,6 @@ namespace CalamityMod.Items.Weapons.Summon public class FrostBlossomStaff : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; - public override void SetStaticDefaults() - { - CalamityItemSets.ExtraDebuffTooltip_Enemy[Type] = [BuffID.Frostburn]; - } public override void SetDefaults() { Item.width = 34; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 3efe06428d..43556c1ac5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -843,7 +843,7 @@ FleshTotem: { Summons an effigy above your head that stores mana as you use it, up to 600 mana The effigy occasionally pulses, restoring 25 mana Pulses appear more frequently the more mana is stored - Upon being struck, the effigy unleashes all stored up mana as vengeful souls that chase your enemies + Upon being struck, the effigy unleashes half of all stored up mana as vengeful souls that chase your enemies The effigy is transparent and silent if visibility is disabled ''' } @@ -882,7 +882,7 @@ FungalSymbiote: { Tooltip: ''' You grow mushrooms on the grass beneath you - Consuming mushrooms provides [cbuffplr:CalamityMod/Mushy], granting 5 defense and +1 HP/s life regen + Consuming mushrooms provides [cbuffplr:CalamityMod/Mushy], granting 3 defense and +1 HP/s life regen 10% increased damage while you have [cbuffplr:CalamityMod/Mushy] ''' SalesPitch: "{$Common.SalesmanShrinePitch}" @@ -2173,7 +2173,7 @@ WarbanneroftheRighteous: { Tooltip: ''' Multiplies all damage based on how close you are to enemies - Maximum damage boost is 15%, minimum damage boost is -15% + Maximum damage boost is 1.15x, minimum damage boost is 0.85x Emit a blazing aura that burns and repels nearby enemies with [cbuff:CalamityMod/HolyFlames] Enemies take increasing damage the closer they are to you and the longer they are near you Effects are transparent and silent if visibility is disabled diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 9be46a57ac..777a63f898 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -287,7 +287,11 @@ DemonshadeBreastplate: { DemonshadeGreaves: { DisplayName: Demonshade Greaves - Tooltip: "{$CommonItemTooltip.PercentIncreasedMovementSpeed} and {1}% increased acceleration" + Tooltip: + ''' + Shadow speed + [c/aaaaaa:Shift- in your inventory to toggle the increased acceleration] + ''' } DemonshadeHelm: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index d64aec2a46..33a6e5a1a9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -925,7 +925,6 @@ Oblivion: { At maximum charge, the yoyo bursts into brimstone darts and resets its flight duration Striking an enemy at maximum charge will overload the yoyo, causing it to release all stored up power and shatter Shattering the yoyo deals immense damage but leaves it unable to be used for several seconds - [c/C61B40:'I have memories from eyes that are not my own'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index d48bb3c7f8..edf3cfd303 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -855,7 +855,8 @@ VoidConcentrationStaff: { DisplayName: Void Concentration Staff Tooltip: ''' - Surrounds you with dark energy, which makes all attacks deal 15% less damage + Summons an endless darkness that surrounds you with orbiting dark energies + While the dark energies are orbiting you, you take 15% less damage from all attacks to condense the energy onto a target, focusing your minions on them and creating homing beams When the focused enemy takes damage from any source, they will be struck by additional dark energies These dark energy are twice as strong when the strike was from a minion or sentry diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 184b471dde..0e98aaff44 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -277,13 +277,13 @@ namespace CalamityMod.NPCs.TownNPCs .Add(Condition.MoonPhasesOdd) .Add(Condition.MoonPhasesHalf0) .Add(Condition.MoonPhasesHalf1) - .Add() + .Add(Condition.MoonPhasesEven) + .Add(Condition.MoonPhasesOdd) .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases04) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases15) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases26) - .Add(Condition.DownedGoblinArmy, Condition.MoonPhases37) - .Add() + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesEven) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesOdd) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesEven) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhasesOdd) .Add() .Add() .Add() diff --git a/Projectiles/Ranged/ExoFire.cs b/Projectiles/Ranged/ExoFire.cs index 59fe2939aa..7310012ff8 100644 --- a/Projectiles/Ranged/ExoFire.cs +++ b/Projectiles/Ranged/ExoFire.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; +using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -71,10 +72,12 @@ namespace CalamityMod.Projectiles.Ranged // I hate metaballs >:( Particle beam3 = new CustomSpark(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.5f, 4f), "CalamityMod/Particles/SmallBloom", false, 4, ((37 - Time * (PhotoTimer == 0 ? 0.165f : 0.088f)) - PhotoTimer * 0.2f + (PhotoTimer == 1 ? 20 : 0)) * 0.005f, sparkColor, new Vector2(1f, 1 + Time * 0.1f), true, false); GeneralParticleHandler.SpawnParticle(beam3); + beam3.DrawLayer = Enums.GeneralDrawLayer.BeforeProjectiles; if (!photosens) { Particle beam32 = new CustomSpark(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.5f, 4f), "CalamityMod/Particles/SmallBloom", false, 4, ((37 - Time * (PhotoTimer == 0 ? 0.165f : 0.088f)) - PhotoTimer * 0.2f + (PhotoTimer == 1 ? 20 : 0)) * 0.003f, Color.Lerp(Color.Blue, sparkColor, 0.5f), new Vector2(1f, 1 + Time * 0.1f), true, false); GeneralParticleHandler.SpawnParticle(beam32); + beam32.DrawLayer = Enums.GeneralDrawLayer.BeforeProjectiles; } } if (Main.rand.NextBool(35) && targetDist < 1400f && Time > 5) diff --git a/Projectiles/Typeless/Elumphant.cs b/Projectiles/Typeless/Elumphant.cs index a9dfac404d..e7986fcb7c 100644 --- a/Projectiles/Typeless/Elumphant.cs +++ b/Projectiles/Typeless/Elumphant.cs @@ -783,5 +783,10 @@ namespace CalamityMod.Projectiles.Typeless // These extra frames before the hit allow for a bit of "hitstop" on the jump attack return (dashing && attackTimer >= attackTimeAdjusted + 3 && target == targeted) ? null : false; } + + public override bool? CanCutTiles() + { + return false; + } } } diff --git a/Tiles/Ores/AstralOre.cs b/Tiles/Ores/AstralOre.cs index d3a404368b..be3c6ca0ff 100644 --- a/Tiles/Ores/AstralOre.cs +++ b/Tiles/Ores/AstralOre.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using CalamityMod.Dusts; -using CalamityMod.Items.Materials; using CalamityMod.Tiles.Astral; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -29,7 +27,7 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.Ore[Type] = true; TileID.Sets.OreMergesWithMud[Type] = true; - MinPick = 110; + MinPick = 210; DustType = DustID.ShadowbeamStaff; AddMapEntry(new Color(255, 153, 255), CreateMapEntryName()); MineResist = 3f; @@ -37,7 +35,7 @@ namespace CalamityMod.Tiles.Ores TileID.Sets.Ore[Type] = true; TileID.Sets.ChecksForMerge[Type] = true; - // TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true; + TileID.Sets.DoesntGetReplacedWithTileReplacement[Type] = true; TileID.Sets.AvoidedByMeteorLanding[Type] = true; this.RegisterBlendMergeWith(ModContent.TileType()); @@ -72,19 +70,15 @@ namespace CalamityMod.Tiles.Ores } } - public override IEnumerable GetItemDrops(int i, int j) + public override bool CanKillTile(int i, int j, ref bool blockDamaged) { - if (!DownedBossSystem.downedAstrumDeus) - { - if (Main.rand.NextBool()) - yield return new Item(ModContent.ItemType()); - else - yield return new Item(0); - } - else - yield return new Item(ModContent.ItemType()); + return DownedBossSystem.downedAstrumDeus; } + public override bool CanExplode(int i, int j) + { + return false; + } public override void NumDust(int i, int j, bool fail, ref int num) { num = fail ? 1 : 3; diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 487ee4a02a..c5dbd5a42a 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -106,7 +106,7 @@ namespace CalamityMod NPCID.Sets.SpecificDebuffImmunity[npc.type][BuffID.Confused] = true; // Sets certain vanilla NPCs and all town NPCs to be immune to most debuffs. - bool isConsideredSpecialTarget = npc.type == NPCID.SkeletronHead || npc.type == NPCID.DD2EterniaCrystal; + bool isConsideredSpecialTarget = npc.type == NPCID.DD2EterniaCrystal; bool isTownNPC = npc.townNPC || NPCID.Sets.ActsLikeTownNPC[npc.type]; bool applyRegularBuffImmunitySpecialCases = isConsideredSpecialTarget || isTownNPC; if (applyRegularBuffImmunitySpecialCases) diff --git a/Walls/LimestoneWall.cs b/Walls/LimestoneWall.cs index f6c40077db..a7a15cedd6 100644 --- a/Walls/LimestoneWall.cs +++ b/Walls/LimestoneWall.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria.ID; using Terraria.ModLoader; +using Terraria; namespace CalamityMod.Walls { @@ -10,6 +11,7 @@ namespace CalamityMod.Walls public override void SetStaticDefaults() { + Main.wallHouse[Type] = true; DustType = DustID.Pot; AddMapEntry(new Color(125, 85, 61)); this.AddMapEntryWithWaterVisibility(new Color(78, 76, 127));