From 026d914ed54a583d9b4e4dc31b4ed671e754c3d4 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:20:47 +0700 Subject: [PATCH] suggestions --- Buffs/Placeables/CorruptionEffigyBuff.cs | 6 ++-- Buffs/Placeables/CrimsonEffigyBuff.cs | 6 ++-- Items/Armor/Astral/AstralBreastplate.cs | 2 +- Items/Armor/Astral/AstralHelm.cs | 8 +++-- Items/Armor/Astral/AstralLeggings.cs | 4 +-- Items/CalamityGlobalItem.cs | 2 ++ ...ods.CalamityMod.Items.Armor.Hardmode.hjson | 13 ++++---- .../Mods.CalamityMod.Items.Placeables.hjson | 8 ++--- .../Mods.CalamityMod.Vanilla.Armor.hjson | 1 + Systems/Mechanic/RecipeSystem.cs | 9 ----- Tiles/Furniture/CorruptionEffigy.cs | 31 +++++++++++++++--- .../Furniture/CorruptionEffigy_Highlight.png | Bin 0 -> 624 bytes Tiles/Furniture/CrimsonEffigy.cs | 31 +++++++++++++++--- Tiles/Furniture/CrimsonEffigy_Highlight.png | Bin 0 -> 705 bytes 14 files changed, 82 insertions(+), 39 deletions(-) create mode 100644 Tiles/Furniture/CorruptionEffigy_Highlight.png create mode 100644 Tiles/Furniture/CrimsonEffigy_Highlight.png diff --git a/Buffs/Placeables/CorruptionEffigyBuff.cs b/Buffs/Placeables/CorruptionEffigyBuff.cs index e4d2e0a39f..8214914087 100644 --- a/Buffs/Placeables/CorruptionEffigyBuff.cs +++ b/Buffs/Placeables/CorruptionEffigyBuff.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Placeables @@ -7,10 +8,11 @@ namespace CalamityMod.Buffs.Placeables { public override void SetStaticDefaults() { + Main.buffNoSave[Type] = false; Main.buffNoTimeDisplay[Type] = true; - Main.debuff[Type] = false; + Main.persistentBuff[Type] = true; Main.pvpBuff[Type] = true; - Main.buffNoSave[Type] = true; + BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Placeables/CrimsonEffigyBuff.cs b/Buffs/Placeables/CrimsonEffigyBuff.cs index a26c9e3f4e..6cfdcee075 100644 --- a/Buffs/Placeables/CrimsonEffigyBuff.cs +++ b/Buffs/Placeables/CrimsonEffigyBuff.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Placeables @@ -7,10 +8,11 @@ namespace CalamityMod.Buffs.Placeables { public override void SetStaticDefaults() { + Main.buffNoSave[Type] = false; Main.buffNoTimeDisplay[Type] = true; - Main.debuff[Type] = false; + Main.persistentBuff[Type] = true; Main.pvpBuff[Type] = true; - Main.buffNoSave[Type] = true; + BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Items/Armor/Astral/AstralBreastplate.cs b/Items/Armor/Astral/AstralBreastplate.cs index 4b71e1d7bf..9785855ba4 100644 --- a/Items/Armor/Astral/AstralBreastplate.cs +++ b/Items/Armor/Astral/AstralBreastplate.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Astral { player.statLifeMax2 += 20; player.statManaMax2 += 80; - player.detectCreature = true; + player.GetDamage() += 0.1f; } public override void AddRecipes() diff --git a/Items/Armor/Astral/AstralHelm.cs b/Items/Armor/Astral/AstralHelm.cs index 7df783d9e1..d9a0cd32b8 100644 --- a/Items/Armor/Astral/AstralHelm.cs +++ b/Items/Armor/Astral/AstralHelm.cs @@ -34,16 +34,18 @@ namespace CalamityMod.Items.Armor.Astral player.setBonus = this.GetLocalizedValue("SetBonus"); var modPlayer = player.Calamity(); modPlayer.astralStarRain = true; + modPlayer.omniscience = true; player.moveSpeed += 0.05f; - player.GetDamage() += 0.35f; + player.GetDamage() += 0.1f; player.maxMinions += 3; - player.GetCritChance() += 25; + player.GetCritChance() += 10; player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.dangerSense = true; + player.GetDamage() += 0.05f; + player.GetCritChance() += 15; } public override void AddRecipes() diff --git a/Items/Armor/Astral/AstralLeggings.cs b/Items/Armor/Astral/AstralLeggings.cs index ff3e4af4a0..093563cbfc 100644 --- a/Items/Armor/Astral/AstralLeggings.cs +++ b/Items/Armor/Astral/AstralLeggings.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Armor.Astral public override void UpdateEquip(Player player) { - player.moveSpeed += 0.1f; - player.findTreasure = true; + player.moveSpeed += 0.15f; + player.GetDamage() += 0.1f; } public override void AddRecipes() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index dfd4df9d5c..01c99c9c0e 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1006,6 +1006,8 @@ namespace CalamityMod.Items { player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.CrystalAssassin"); modPlayer.DashID = string.Empty; + modPlayer.rogueStealthMax += 0.9f; + modPlayer.wearingRogueArmor = true; } else if (set == "SquireTier2") { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index eb17975d7f..9dd0f19240 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -2,18 +2,19 @@ AstralBreastplate: { DisplayName: Astral Breastplate Tooltip: ''' + 10% increased damage +80 max mana and +20 max life - Creature detection ''' } AstralHelm: { DisplayName: Astral Helm - Tooltip: Danger detection + Tooltip: 5% increased damage and 15% increased critical strike chance SetBonus: ''' - 5% increased movement speed and +3 max minions - 35% increased damage and 25% increased critical strike chance + +3 max minions + 10% increased damage and critical strike chance + Detects nearby creatures, enemy projectiles, danger sources, and treasure Whenever you crit an enemy, a barrage of stars will rain down This effect has a 1 second cooldown before it can trigger again ''' @@ -23,8 +24,8 @@ AstralLeggings: { DisplayName: Astral Leggings Tooltip: ''' - 10% increased movement speed - Treasure and ore detection + 10% increased damage + 15% increased movement speed ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 4e77a31e8b..9647aaee6f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -512,8 +512,8 @@ CorruptionEffigy: { DisplayName: Corruption Effigy Tooltip: ''' - When placed down, nearby players have their movement speed and crit chance increased by 10% - Nearby players also suffer a 5% decrease to their damage reduction + when placed to gain 10% increased movement speed and critical strike chance + However, this comes at a cost of 5% damage reduction ''' } @@ -605,8 +605,8 @@ CrimsonEffigy: { DisplayName: Crimson Effigy Tooltip: ''' - When placed down nearby players have their damage increased by 15% and defense by 10 - Nearby players also suffer a 10% decrease to their maximum health + when placed to gain 15% damage and 10 defense + However, this comes at a cost of 10% maximum health ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index e7a5ceade6..da33d395bd 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -137,6 +137,7 @@ SetBonus: { ''' Allows the ability to dash 10% increased damage and critical strike chance + +90 maximum stealth ''' SquireTier2: ''' diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index e2e260a317..fb4d790a98 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -1375,15 +1375,6 @@ namespace CalamityMod.Systems r.Register(); r.DisableDecraft(); - // Gelatin Crystal (Queen Slime summon) - r = Recipe.Create(ItemID.QueenSlimeCrystal); - r.AddIngredient(ItemID.CrystalShard, 10); - r.AddIngredient(ItemID.PinkGel, 5); - r.AddIngredient(ItemID.SoulofLight, 5); - r.AddTile(TileID.Solidifier); - r.Register(); - r.DisableDecraft(); - // Temple Key r = Recipe.Create(ItemID.TempleKey); r.AddIngredient(ItemID.JungleSpores, 15); diff --git a/Tiles/Furniture/CorruptionEffigy.cs b/Tiles/Furniture/CorruptionEffigy.cs index f0b28ff9f7..0e66e71ea8 100644 --- a/Tiles/Furniture/CorruptionEffigy.cs +++ b/Tiles/Furniture/CorruptionEffigy.cs @@ -1,8 +1,11 @@ using CalamityMod.Buffs.Placeables; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.Enums; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using Terraria.ObjectData; @@ -15,6 +18,7 @@ namespace CalamityMod.Tiles.Furniture { Main.tileFrameImportant[Type] = true; Main.tileLavaDeath[Type] = true; + TileID.Sets.HasOutlines[Type] = true; TileObjectData.newTile.Width = 2; TileObjectData.newTile.Height = 4; @@ -34,13 +38,30 @@ namespace CalamityMod.Tiles.Furniture AddMapEntry(new Color(126, 156, 134), CalamityUtils.GetItemName()); } - public override void NearbyEffects(int i, int j, bool closer) + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override bool RightClick(int i, int j) + { + Player p = Main.LocalPlayer; + + // Forcibly remove Crimson Effigy's buff. + p.ClearBuff(ModContent.BuffType()); + + // 108000 is the duration used by Ammo Box. + p.AddBuff(ModContent.BuffType(), 108000); + + // Play a sound. + SoundEngine.PlaySound(SoundID.NPCHit13 with { Pitch = -0.4f, PitchVariance = 0.2f }, new Vector2(i * 16, j * 16)); + + return true; + } + + public override void MouseOver(int i, int j) { Player player = Main.LocalPlayer; - if (player is null) - return; - if (!player.dead && player.active) - player.AddBuff(ModContent.BuffType(), 20); + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); } } } diff --git a/Tiles/Furniture/CorruptionEffigy_Highlight.png b/Tiles/Furniture/CorruptionEffigy_Highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..00449db10a466274dc10f46f66fdfa77f4c17c78 GIT binary patch literal 624 zcmV-$0+0QPP)C@_FA=5#uy#102x)-1a5_-E%5%2PDxvT_V%o@3J(D?7Ge|W0`lf+)I*RmOZ#4X z$a7dlqV{M73DEE21Qq0w^}MJyvqeeS`q_TbQ%r!){SWe%XlA2v9{6m1Daa6r0zhyO?uUV*7kci zpw_4US`gJ|vFrm;eE|Z51W16;B)Tt`f}|iRC`UjF%JGv2t*)Tfr(sr4vna^BMYz0K zWv?q(AWxmjJ3utpW=RJqMMu z&-3EZa|8&ydLIVJ+rguZwo*>?1R+3C1@+F{EDAzO(osW4jhJg`CtbUfp2d66HAqYc z`KZUf?qIuy5`)Uw=SAa(17Zix#z#R!ch=oMUSJ2z#xDyfJJ4+XD7ax$EIYt#eF2IR zAeZ}Y9+Xu;wtke~Wr{^BerlX<6hY>@O)+$8j_ymIR`Re_Y*|3H9k0zKYqo5B>wa~= z4`K(*#xD;js@Ps&P=C5B2z4l0UaJ&#F&GBO1JPSKC?NuL5^}FxM`dg_1$q7HzEQLu zU=uW3!UV`I()); } - public override void NearbyEffects(int i, int j, bool closer) + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override bool RightClick(int i, int j) + { + Player p = Main.LocalPlayer; + + // Forcibly remove Corruption Effigy's buff. + p.ClearBuff(ModContent.BuffType()); + + // 108000 is the duration used by Ammo Box. + p.AddBuff(ModContent.BuffType(), 108000); + + // Play a sound. + SoundEngine.PlaySound(SoundID.NPCHit13 with { Pitch = 0.4f, PitchVariance = 0.2f }, new Vector2(i * 16, j * 16)); + + return true; + } + + public override void MouseOver(int i, int j) { Player player = Main.LocalPlayer; - if (player is null) - return; - if (!player.dead && player.active) - player.AddBuff(ModContent.BuffType(), 20); + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); } } } diff --git a/Tiles/Furniture/CrimsonEffigy_Highlight.png b/Tiles/Furniture/CrimsonEffigy_Highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..65062f866ad7f914cf457d5dbfbe8c0390627462 GIT binary patch literal 705 zcmV;y0zUnTP) zK02Oza>{3PKuRos5feoi0@SqO17&mT3Pb)Euf zYcef@hXWMFyp?gPU1~f9kgA|)rjCrN^Q-<=1zDB!qM)+_@&Y;xpwYls8Ji6d#r310 z0_bstIv#8bpiM$8ffPUmkgaT&f&eE3$cFR#dEssT{UG_B@w6iCJw|xP6VbTE&I*76 zr-PhzJozC&qXY30;2q!lUN!A5=1tH$J}p4eiOrsGxPoRUM72h}3=exSiv~tbjDWJn zR{*ImiY=!0@9B3gD>KBf)oxuc&F^B?fUN+KpLM-q0I7T58ZaepwbOcJr*-7J7%fP4 z3P`ondSs{d5Fk~W-he1zRnf;Ag0+_JegzOP65i&sDyUa^1(5d~q}GJ1`C|>bTEc2R z;akkxH7EhKtM)!~U>EZi+o(jmSD&;1^>z(!LZrZ>!s%`~Y>QnUAQfq1E^5mXoh=>UojhyZJKr6^)( zeIl&+yBH0mc1m^vfb29s*{wpD_TL@q!ErP|)_4k_4XG9(%WS5Ixoq(iKnKQ-1Yw(} zVs~|W0YoS1Y&NoR|vwpeYk+F}|4;9WK7zW_wV znCzjld73PZf(QVzPXj3W*9&Xl1OVBs>sbAo4`v0>1A#OEsmf6Ot%{+S&D}ozO