From 35fa516f07301b4e827e6f24bdfdd4592e818318 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Mon, 4 Aug 2025 09:32:59 -0500 Subject: [PATCH] manhattan, screwdriver, cinnamon roll --- Buffs/Alcohol/ManhattanBuff.cs | 24 ++++++++ Buffs/Alcohol/ManhattanBuff.png | Bin 0 -> 626 bytes Buffs/Alcohol/ScrewdriverBuff.cs | 6 +- CalPlayer/CalamityPlayerMiscEffects.cs | 15 +++-- Items/Potions/Alcohol/CinnamonRoll.cs | 7 --- Items/Potions/Alcohol/Manhattan.cs | 54 ++++++++++++++++++ Items/Potions/Alcohol/Manhattan.png | Bin 0 -> 647 bytes .../en-US/Mods.CalamityMod.Buffs.hjson | 5 ++ .../Mods.CalamityMod.Items.Potions.hjson | 18 ++++-- 9 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 Buffs/Alcohol/ManhattanBuff.cs create mode 100644 Buffs/Alcohol/ManhattanBuff.png create mode 100644 Items/Potions/Alcohol/Manhattan.cs create mode 100644 Items/Potions/Alcohol/Manhattan.png diff --git a/Buffs/Alcohol/ManhattanBuff.cs b/Buffs/Alcohol/ManhattanBuff.cs new file mode 100644 index 0000000000..2a8c160cd8 --- /dev/null +++ b/Buffs/Alcohol/ManhattanBuff.cs @@ -0,0 +1,24 @@ +using CalamityMod.Items.Potions.Alcohol; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Alcohol +{ + public class ManhattanBuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().ColdDebuffMultiplier += Manhattan.DebuffBoost; + player.Calamity().WaterDebuffMultiplier -= Manhattan.DebuffLoss; + } + } +} diff --git a/Buffs/Alcohol/ManhattanBuff.png b/Buffs/Alcohol/ManhattanBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..8d3c026da5bca54f642800c06f8178c46c01d436 GIT binary patch literal 626 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCikF1AIbUfiyFNCbzVYgjVuXJH~(g5g*D~va-_Wa5B0^O#Hui@qZPSljpAd z|M7KVXz0^dAGYc;uaIK;8KdOH#i(J|xOC|vpU}juzaDG@8pK)P5n0T@z;_UY8Fx&~ zehUR|DNig)We7;j%q!9Ja}7~2)iczykj{Ly0;pzNYJ_K+r>7PJ2av3CK2NWMU8i(osO1+0FtM&jPYR;AR;k!wX<2z-Tl} zfgWazyvgx39K^6(gMhW>M}Gi0LebB&1_8y zoVpLlyx{5L7-Hc+_p-N8vw{Fiz@c=B(g2pP|J;2|r_4H~K5Sg#vgGSNd3Fx5?k$Z`$;qxR-(p!<#09oCO1yr% m!G=X%*Q;ks!}0mwIrlL3#YlF3y|q>t "Items.Potions"; - // Mana has a stupid formula so it won't go into the tooltip - public static float ManaRegenDelayBonus = 1f; - public static int ManaRegenBonus = 10; - public static float HeatDebuffBoost = 0.5f; - public static float DefenseLossPercent = 0.1f; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((1f + HeatDebuffBoost).ToString(), DefenseLossPercent.ToPercent()); - public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; diff --git a/Items/Potions/Alcohol/Manhattan.cs b/Items/Potions/Alcohol/Manhattan.cs new file mode 100644 index 0000000000..d274d53d16 --- /dev/null +++ b/Items/Potions/Alcohol/Manhattan.cs @@ -0,0 +1,54 @@ +using CalamityMod.Buffs.Alcohol; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Ores; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Potions.Alcohol +{ + public class Manhattan : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Potions"; + + public static float DebuffBoost = 0.5f; + public static float DebuffLoss = 0.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((DebuffBoost).ToPercent(), DebuffLoss.ToPercent()); + + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(225, 84, 33), + new Color(244, 176, 77), + new Color(255, 218, 102) + }; + } + + public override void SetDefaults() + { + Item.DefaultToFood(14, 28, ModContent.BuffType(), CalamityUtils.MinutesToFrames(5), true); + + Item.value = Item.sellPrice(silver: 40); + Item.rare = ItemRarityID.LightPurple; + } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.Ale). + AddIngredient(3). + AddTile(TileID.Kegs). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register() + .DisableDecraft(); + } + } +} diff --git a/Items/Potions/Alcohol/Manhattan.png b/Items/Potions/Alcohol/Manhattan.png new file mode 100644 index 0000000000000000000000000000000000000000..c6226e8ff76826ebc4918f528f90d9e2ec7b02c5 GIT binary patch literal 647 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`v!3-p;7kgF%DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheegQrqu31^>PhWkQ!^s%P!0>O>_%)r2R2!t6$HM|;tf)XXJ5hcO-X(i=}MX3w{iJ5sNdVa1U z3Z{C7dKS`|uT}unY)g&sO!M^AV&DLBSQ(@kSs56CEH5CIhO$ASp~1)u7H0yo4H=mj z1b}oD5NEctfW@nsj7-%pW%~A%S)C6`07NAN4BVz-`1rSp~HnJ{&m^1~* z1_36ZxlCY{L6#Ok7F3s^fdNSNOrBVcSMUo^ByIC_aSXBW-+JLKU$X)aYk-4p#DOk( z(R=@0r=QC)KK-cRCvcc#w>#tiDVfz7o|moKAKB2jh68}pQ+)tC{=OR^C+Fv z*kBxr5@U$~fZZWsQqPdR6q l{%rM$H?~RV?(P2}lK)KJ